* [PATCH 6.18 0000/2151] 6.18.65-rc1 review
@ 2026-11-18 14:28 Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0001/2151] KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM Greg Kroah-Hartman
` (882 more replies)
0 siblings, 883 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:28 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, rwarsow, conor, hargar, broonie, achill, sr
This is the start of the stable review cycle for the 6.18.65 release.
There are 2151 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 Fri, 20 Nov 2026 14:55:45 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.65-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 6.18.65-rc1
Giuseppe Piscitelli <ooonea@gmail.com>
scsi: core: Balance the pseudo target reap reference
Dave Jiang <dave.jiang@intel.com>
ACPI: extlog: Fix CONFIG_ACPI_APEI_PCIEAER guard typo
Dave Jiang <dave.jiang@intel.com>
ACPI: extlog: Validate PCIe error section length before payload access
Dave Jiang <dave.jiang@intel.com>
ACPI: extlog: Avoid populating software AER metadata from raw hardware buffer
Hemanth Selam <hemanth.selam@gmail.com>
selftests/cgroup: set the test plan after the setup checks
Hugo Villeneuve <hvilleneuve@dimonoff.com>
serial: 8250_hub6: add missing include for hub6_match_port()
Jakub Sitnicki <jakub@cloudflare.com>
net: lwtunnel: Drop skb metadata before LWT encapsulation
Ewan D. Milne <emilne@redhat.com>
scsi: scsi_debug: Add missing newline in scsi_debug_device_reset()
Qu Wenruo <wqu@suse.com>
btrfs: do not reject a valid running dev-replace
Leon Romanovsky <leon@kernel.org>
PCI/P2PDMA: Add missing struct p2pdma_provider documentation
Szymon Wilczek <swilczek.lx@gmail.com>
fs/ntfs3: fix deadlock in ni_read_folio_cmpr
Arnaldo Carvalho de Melo <acme@kernel.org>
perf auxtrace: Include sys/types.h for pid_t
Anubhav Shelat <ashelat@redhat.com>
perf pmu: fix duplicate conditional statement
Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
selftests/x86: Add selftests include path for kselftest.h after centralization
Brian Norris <briannorris@chromium.org>
PM: runtime: Only queue an idle check for RPM-linked suppliers (part 2)
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
nvmet-auth: reject incomplete DHCHAP messages
Christoph Hellwig <hch@lst.de>
zloop: fix block size query
Shakeel Butt <shakeel.butt@linux.dev>
kernfs: avoid READ_ONCE() on a kgid_t in kernfs_new_node()
Damien Le Moal <dlemoal@kernel.org>
scsi: core: Fix additional sense code definition
Krzysztof Wilczyński <kwilczynski@kernel.org>
PCI/sysfs: Decouple acpi_index from the optional device name element
Linus Torvalds <torvalds@linux-foundation.org>
vdpa_sim: disable page faults around vringh_need_notify_iotlb()
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
mm: fix OOM killer inaccuracy on large many-core systems
Dominique Martinet <asmadeus@codewreck.org>
libbpf: fix cross-endian build with newer libbpf
Imre Kaloz <kaloz@kernel.org>
rtc: ds1685: do not sleep in the power-off handler
Imre Kaloz <kaloz@kernel.org>
rtc: ds1685: arm the wake-up alarm at power-off only if an alarm is set
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
minix: reject rmdir of a directory with a corrupted link count
Jori Koolstra <jkoolstra@xs4all.nl>
Fix a drop_nlink warning in minix_rmdir
Jori Koolstra <jkoolstra@xs4all.nl>
Add error handling to minix filesystem for inode corruption detection
Nickolai Zeldovich <nickolai@csail.mit.edu>
fs_pin: do not trust the pin after a spurious wakeup in pin_kill()
Nickolai Zeldovich <nickolai@csail.mit.edu>
ucount: read the parent ucounts before dropping the rlimit count
Nickolai Zeldovich <nickolai@csail.mit.edu>
splice: retry tee() instead of returning 0 when it races
Zhiyu Zhang <zhiyuzhang999@gmail.com>
watch_queue: keep info_id separate from rcu_head
Xiao Liang <shaw.leon@gmail.com>
tun: drop batched packets while the device is down
John Johansen <john.johansen@canonical.com>
apparmor: advertise that sctp is being mediated
Jhonata Poma-Hansen <jhonata.poma@gmail.com>
netlink: check sk_rcvbuf before charging the dump skb
Eric Dumazet <edumazet@kernel.org>
openvswitch: use eth_type_trans_careful() in internal_dev_recv()
Eric Dumazet <edumazet@kernel.org>
net: use eth_type_trans_careful() in __dev_forward_skb2()
Sun Jian <sun.jian.kdev@gmail.com>
selftests/bpf: cover short IPv4/IPv6 inputs with adjust_room
Eric Dumazet <edumazet@kernel.org>
loopback: use eth_type_trans_careful()
Eric Dumazet <edumazet@kernel.org>
net: add eth_type_trans_careful()
Kyle Zeng <kylebot@openai.com>
tcp: initialize mapped children before route lookup
John Johansen <john.johansen@canonical.com>
apparmor: fix check SCTP bind, and connect permission checks
Kyle Zeng <kylebot@openai.com>
tcp: avoid double destroy in tcp_abort() of an unaccepted child
Rosen Penev <rosenp@gmail.com>
net: bgmac: fix TX DMA unmapping and slot cleanup
Kyle Zeng <kylebot@openai.com>
gro: do not GRO GSO packets with inconsistent payload
Jakub Kicinski <kuba@kernel.org>
eth: bnxt: hand XDP frags over to the copybreak skb
Jakub Kicinski <kuba@kernel.org>
eth: bnxt: free XDP frags when xdp_do_redirect() fails
Jakub Kicinski <kuba@kernel.org>
eth: bnxt: don't leak buffers when XDP agg buffer allocation fails
Jakub Kicinski <kuba@kernel.org>
eth: bnxt: resize Rx head buffers when rx-copybreak changes
Jakub Kicinski <kuba@kernel.org>
eth: bnxt: recycle agg buffers when Rx head buffer allocation fails
Chris J Arges <carges@cloudflare.com>
bnxt_en: use bnxt_xdp_buff for xdp context
Naman Gulati <namangulati@google.com>
netdev-genl: ignore NETDEV_UNREGISTER rebroadcasts
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
apparmor: check connect permission for SCTP
Wentao Liang <vulab@iscas.ac.cn>
apparmor: Fix namespace reference leak in __aa_find_or_create_ns()
Maxime Bélair <maxime.belair@canonical.com>
apparmor: convert duplicated dfa transitions to match_char()
Maxime Bélair <maxime.belair@canonical.com>
apparmor: fix table_size() integer overflow on 32 bit
Christoph Hellwig <hch@lst.de>
zloop: check that the zone backing file support ->{read,write}_iter
Christoph Hellwig <hch@lst.de>
zloop: fput file after failed zone init
Christoph Hellwig <hch@lst.de>
zloop: share more code for opening a zone backing file
Christoph Hellwig <hch@lst.de>
zloop: remove a duplicate call to zloop_get_block_size
Maxime Bélair <maxime.belair@canonical.com>
apparmor: report a label allocation failure as -ENOMEM
Jamie Nguyen <jamien@nvidia.com>
selftests: net: txtimestamp: fix out-of-bounds read in raw UDP checksum
Kunhai Dai <daikunhai@didiglobal.com>
blk-iocost: publish hweights as one atomic value
Bart Van Assche <bvanassche@acm.org>
block/blk-iocost: Inline iocg_lock() and iocg_unlock()
Bart Van Assche <bvanassche@acm.org>
block/blk-iocost: Split ioc_rqos_throttle()
Chris Mason <mason@kernel.org>
rnbd-srv: publish the sess_dev at the end of OPEN
Chris Mason <mason@kernel.org>
rnbd-srv: fix use-after-free on two CLOSE messages
Josef Bacik <josef@toxicpanda.com>
block/rnbd-srv: drop the sess_dev kobject unlocked
Josef Bacik <josef@toxicpanda.com>
block/rnbd-srv: don't free the device on a sysfs error
Josef Bacik <josef@toxicpanda.com>
drbd: take req_lock to skip the initial sync as peer
Josef Bacik <josef@toxicpanda.com>
drbd: stop the start_resync timer of a dying device
Josef Bacik <josef@toxicpanda.com>
blk-mq: free the bitmaps of tags in the SRCU callback
Josef Bacik <josef@toxicpanda.com>
block: partitions/mac: compute the sectors in 64 bits
Josef Bacik <josef@toxicpanda.com>
blk-mq: set up a queue under tag_list_lock
Josef Bacik <josef@toxicpanda.com>
blk-mq: exit the hctxs of a queue under tag_list_lock
Josef Bacik <josef@toxicpanda.com>
blk-mq: quiesce a queue that joins a quiesced tag set
Josef Bacik <josef@toxicpanda.com>
blk-mq: don't forget a timer the driver has restarted
Josef Bacik <josef@toxicpanda.com>
blk-mq: don't bring back flags of a completed request
Josef Bacik <josef@toxicpanda.com>
blk-mq: keep sharing tags fairly after a queue update
Josef Bacik <josef@toxicpanda.com>
blk-mq: don't trust the cookie in blk_mq_poll()
Fengnan Chang <fengnanchang@gmail.com>
blk-mq: use array manage hctx map instead of xarray
Josef Bacik <josef@toxicpanda.com>
block: don't lose the status of a failed flush request
Josef Bacik <josef@toxicpanda.com>
block: fix use-after-free of the disk in sync_bdevs()
Amir Goldstein <amir73il@gmail.com>
selftests/ovl: fix detached layer mountinfo expectations
Dominik Maier <dmnk@google.com>
xattr: always invoke cap_convert_nscap() for security.capability writes
Josef Bacik <josef@toxicpanda.com>
fork: Let nobody keep a task that may not come to life
Nicolai Buchwitz <nb@tipi-net.de>
octeontx2-pf: pass the skb to otx2_dma_unmap_skb_frags()
Nicolai Buchwitz <nb@tipi-net.de>
octeontx2-pf: fix skb use-after-free on ipsec transmit drop
Markus Probst <markus.probst@posteo.de>
rtc: s35390a: Read 24-hour mode on access
Alexandre Belloni <alexandre.belloni@bootlin.com>
rtc: s35390a: fix typo in comment
Nick Huang <sef1548@gmail.com>
rtc: s35390a: use u8 instead of char for register buffer
Markus Probst <markus.probst@posteo.de>
rtc: s35390a: Fix alarm not disabling
Markus Probst <markus.probst@posteo.de>
rtc: s35390a: Add missing newline to dev_err
Joas Antonio dos Santos <joasantonio108@gmail.com>
net: mctp: free reassembly head skb when key_add fails on SOM
Cosmin Ratiu <cratiu@nvidia.com>
net/mlx5: Only set num_doorbells on a fully initialized SF
Linkui Xiao <xiaolinkui@kylinos.cn>
net: bridge: netlink: do not clear the vlan info dump error
Eric Dumazet <edumazet@google.com>
net: bridge: use atomic ops to read/change p->flags (III)
Eric Dumazet <edumazet@google.com>
bridge: add bridge_flags_bit enum
Danielle Ratson <danieller@nvidia.com>
bridge: Add internal flags for neigh_forward_grat
Eric Woudstra <ericwouds@gmail.com>
bridge: No DEV_PATH_BR_VLAN_UNTAG_HW for dsa foreign
Karol Kolacinski <karol.kolacinski@intel.com>
ice: E822: keep Tx timestamps disabled during offset calibration
Jacob Keller <jacob.e.keller@intel.com>
ice: set in_use only after preparing Tx timestamp index
Dharmender Garg <dharmender.garg@broadcom.com>
bnge: fix RSS table sizing for large RX ring counts
Dharmender Garg <dharmender.garg@broadcom.com>
bnge: cap RSS contexts and RX rings to the RSS table size
Eric Dumazet <edumazet@kernel.org>
ppp: linearize and segment bridged packets when required
Joas Antonio dos Santos <joasantonio108@gmail.com>
net: dcb: initialize PFC value before calling getpfccfg
Nicolai Buchwitz <nb@tipi-net.de>
net: bcmgenet: restore the Tx coalescing setting when the rings are rebuilt
Nicolai Buchwitz <nb@tipi-net.de>
net: bcmgenet: recover from a failed resume
Josef Bacik <josef@toxicpanda.com>
blk-throttle: make blkio.reset_stats reset I/O counts
Josef Bacik <josef@toxicpanda.com>
blk-throttle: pass the I/O counts of a dead group on
Josef Bacik <josef@toxicpanda.com>
blk-iolatency: flush enable_work after going offline
Josef Bacik <josef@toxicpanda.com>
blk-cgroup: don't free a blkg with its punt work queued
Josef Bacik <josef@toxicpanda.com>
blk-cgroup: fix root io.stat byte counts on 32-bit
Josef Bacik <josef@toxicpanda.com>
blk-throttle: don't truncate the cgroup v1 iops limits
Chris Mason <mason@kernel.org>
nvmet: don't clear sq->ctrl for a Connect with sqsize 0
Chris Mason <mason@kernel.org>
nvmet-rdma: fix double puts after a failed RDMA WRITE
Chris Mason <mason@kernel.org>
nvmet-rdma: disable interrupts under rsp_wr_wait_lock
Chris Mason <mason@kernel.org>
nvmet-rdma: flush nvmet-wq on module exit
Josef Bacik <josef@toxicpanda.com>
nvme-loop: don't BUG() if a scan runs beside a reset
Josef Bacik <josef@toxicpanda.com>
nvmet-tcp: don't read a removed port at Connect time
Josef Bacik <josef@toxicpanda.com>
nvmet: fix NULL dereference in debugfs host_traddr
Josef Bacik <josef@toxicpanda.com>
nvmet-tcp: stop listening when a port is removed
Josef Bacik <josef@toxicpanda.com>
nvmet: fix NULL dereference of PCI endpoint targets
Josef Bacik <josef@toxicpanda.com>
nvmet-auth: take only AUTH_Negotiate for a negotiation
Josef Bacik <josef@toxicpanda.com>
nvmet: don't truncate the length of big discards
Chaitanya Kulkarni <kch@nvidia.com>
nvmet: ignore discard return value
Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
kdb: unify CMD_BUFLEN definition into kdb_private.h
Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
kdb: fix memory leak in kdb_setenv() when environment is full
Rongzheng Wang <testwrzwrz@gmail.com>
nvmet: use the enabled transport when disabling a port
Qing Zhang <diasyzhang@tencent.com>
nvmet: protect nvmet_ports_list with nvmet_config_sem
Avi Weiss <thnkslprpt@gmail.com>
nvmet: prevent double-free after metadata SGL allocation failure
Andrea Parri <parri.andrea@gmail.com>
nvmet: zns: reject a NUMD whose byte count wraps
bui duc phuc <phucduc.bui@gmail.com>
ASoC: xilinx: formatter_pcm: Fix read-modify-write of AUD_CTRL in hw_params
Sicong Huang <congei42@163.com>
nfp: flower: fix use-after-free in neighbour update work
Peter Morrow <pdmorrow@gmail.com>
net/mlx4: always create the eth and ib auxiliary devices
Feng Yang <yangfeng@kylinos.cn>
bpf: Fix out-of-bounds btf->types write for split BTF
Ömer Mete Kaya <omermetekaya0@gmail.com>
usbnet: fix EVENT_RX_PAUSED race in usbnet_skb_return()
Florian Fainelli <f.fainelli@gmail.com>
net: dsa: mv88e6xxx: fix 88E6171 statistics type
Florian Fainelli <f.fainelli@gmail.com>
net: dsa: mv88e6xxx: fix 6351 family statistics snapshot
Daniel Machon <daniel.machon@microchip.com>
net: lan966x: don't disable hardirqs in fdma tx clear path
Zhewei Yuan <yzwlhm@gmail.com>
tcp: Fix fastreuse cache initialization on first bind
Fernando Fernandez Mancera <fmancera@suse.de>
devlink: region: fix snapshot id leak on kernel-allocated ids
Daniel Machon <daniel.machon@microchip.com>
net: microchip: fdma: fix DCB corruption under sustained load
Daniel Machon <daniel.machon@microchip.com>
net: microchip: fdma: use little-endian types for descriptor fields
Daniel Machon <daniel.machon@microchip.com>
net: lan966x: release the in-flight slot of a stale TX skb
Daniel Machon <daniel.machon@microchip.com>
net: lan966x: fix the DB dataptr of frames from ndo_xdp_xmit
Harkirat Gill <harkirat.gill@amd.com>
drm/amdgpu: re-enable GFXOFF for compute on GFX12
Florian Fainelli <florian.fainelli@broadcom.com>
perf parse-events: Include errno.h before kernel headers
Florian Fainelli <florian.fainelli@broadcom.com>
perf print_insn: Include sys/types.h for ssize_t
Paul Moses <p@1g4.org>
perf mmap: Preserve the consumed cursor in forward mode
Paul Moses <p@1g4.org>
perf mmap: Use the head selected by read_init
Len Brown <len.brown@intel.com>
x86_energy_perf_policy: Cleanup: Check fseek() in VM path
Len Brown <len.brown@intel.com>
x86_energy_perf_policy: Fix optarg keyword matching
Zhenxian Ma <mzx199711@gmail.com>
block: fix recursive i_rwsem locking in blkdev_write_iter()
Daniel Machon <daniel.machon@microchip.com>
net: lan966x: do not warn on MAC entries that are not port destined
Daniel Machon <daniel.machon@microchip.com>
net: lan966x: do not inject uninitialised bytes past skb->len
Dudu Lu <phx0fer@gmail.com>
net: xps: bound the cleanup loop by the old map's num_tc
Qingfang Deng <qingfang.deng@linux.dev>
pppoe: wait for RCU readers before reusing a socket
Hannes Laimer <h.laimer@proxmox.com>
vxlan: keep reserved_bits across changelink
Allison Henderson <achender@kernel.org>
net/rds: do not initialize transports after rds_init() failed
Allison Henderson <achender@kernel.org>
net/rds: do not fail init when CONFIG_SYSCTL=n
Tao Gong <gongtao0607@gmail.com>
net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583
Cheng Yongkang <teel4res@gmail.com>
net: tun: hold napi_mutex when deleting NAPI in tun_detach_all()
Sally Marcher <me@gry.sh>
ALSA: usb-audio: Add correct datainterval in the quirks-table for Microbook II
HyeongJun An <sammiee5311@gmail.com>
ALSA: pcmtest: Honor the enable parameter
Nicolai Buchwitz <nb@tipi-net.de>
net: usb: cdc_mbim: don't enable BHs in tx_fixup under netpoll
Nicolai Buchwitz <nb@tipi-net.de>
net: usb: cdc_ncm: don't enable BHs in tx_fixup under netpoll
Binbin Deng <18983559317@163.com>
net: atlantic: Unregister before clearing RXNFC rules
Paolo Abeni <pabeni@redhat.com>
gtp: hold RCU in gtp_genl_send_echo_req()
Qingfang Deng <qingfang.deng@linux.dev>
pppoe: drop discovery frames with no MAC header
Tung Nguyen <tung.quang.nguyen@est.tech>
tipc: fix refcount panic in tipc_rcv() when receiving shared skb
Jerome Brunet <jbrunet@baylibre.com>
clk: cdce925: Size the PLL child name buffer for any int
Gabriel Fernandez <gabriel.fernandez@foss.st.com>
clk: stm32: fix clock array size for STM32MP21
bui duc phuc <phucduc.bui@gmail.com>
clk: lmk04832: Handle reset GPIO lookup errors
Eric Dumazet <edumazet@kernel.org>
ipmr: clear skb->cb[] in reg_vif_xmit()
alex todadze <todadzealexi19@proton.me>
net: stmmac: fix rx checksum offload with extended descriptors
Dudu Lu <phx0fer@gmail.com>
net/sched: taprio: unwind the netdevice notifier if register_qdisc() fails
Alexandre Cassen <acassen@corp.free.fr>
net/sched: act_api: inherit filter offload flags only on new actions
Prashant Sengar <prashantsengar25031@gmail.com>
net: usb: lan78xx: avoid NULL PHY dereference in WoL setup
Dudu Lu <phx0fer@gmail.com>
net/sched: gred: keep the qdisc lock while updating the table
Zhang Yi <zhangyi@everest-semi.com>
ASoC: codecs: es*: Modify the maximum value of DMIC_GAIN
Zhang Yi <zhangyi@everest-semi.com>
ASoC: codecs: es*: Modify the registers related to ALC RECOVERY
Ravi Hothi <ravi.hothi@oss.qualcomm.com>
ASoC: codecs: wsa883x: Fix VI sense port channel count
Ravi Hothi <ravi.hothi@oss.qualcomm.com>
ASoC: codecs: wsa884x: Fix VI sense port channel count
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
ASoC: codecs: wsa883x: disable runtime PM on unbind
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
ASoC: codecs: wsa884x: disable runtime PM on unbind
Hungyu Lin <dennylin0707@gmail.com>
thermal: Fix CPU mask truncation in power limit trace event
Sasha Levin <sashal@kernel.org>
selftests/thermal: allow cross builds of the Intel tests
Aleksei Oladko <aleksey.oladko@virtuozzo.com>
selftests: fix ARCH normalization to handle command-line argument
Jérémie Rodon <jeremie.rodon@gmail.com>
spi: cs42l43: Add speaker ID quirk for Dell XPS 13 DX13260 SKU 0E54
TJ Adams <tadamsjr@google.com>
block: advance iterator after copy-in for SG_DXFER_TO_FROM_DEV
Waiman Long <longman@redhat.com>
cgroup/cpuset: Make sure compute_partition_effective_cpumask() is only called for valid partition
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
libceph: reject bad connect_seq in msgr1 READY reply
Yogesh Gaur <yogeshgaur.83@gmail.com>
ceph: don't keep a mon_addr string that failed to parse
Xiang Mei <xmei5@asu.edu>
ceph: fix off-by-one NUL termination in decode_encrypted_symlink()
Tal Zussman <tz2294@columbia.edu>
ceph: don't clear write_congested when collecting folios
Tal Zussman <tz2294@columbia.edu>
ceph: fix writeback_count leak when a bounce page allocation fails
Tal Zussman <tz2294@columbia.edu>
ceph: wait for pending fscache write in write_folio_nounlock()
Tal Zussman <tz2294@columbia.edu>
ceph: fix error handling when the OSD client is stopping in ceph_submit_write()
Alex Markuze <amarkuze@redhat.com>
ceph: fix page vector leak on encrypted netfs read EIO path
Xiubo Li <xiubo.li@clyso.com>
ceph: mark the superblock active after mounting
Max Kellermann <max.kellermann@ionos.com>
ceph: remove unused field `i_cap_migration_resv`
Henry Martin <bsdhenrymartin@gmail.com>
netlink: fix out-of-bounds bitmap access clearing stale mc groups
HyeongJun An <sammiee5311@gmail.com>
ALSA: pcmtest: Reject invalid fill_mode values
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
vdso/gettimeofday: Correct the read of tz_minuteswest and tz_dsttime
Cen Zhang <zzzccc427@gmail.com>
ALSA: ump: Drain sequencer callbacks before freeing their client
Dimitris Charisis <dchar@cslab.ece.ntua.gr>
maple_tree: fix maple_range_64 crashes in RCU mode
Liam R. Howlett (Google) <liam@infradead.org>
tools/testing/shared: catch a failed posix_memalign()
Ren Tamura <ren.tamura.oss@gmail.com>
tools/cgroup: sum shrinker object counts across NUMA nodes
Lorenzo Stoakes (ARM) <ljs@kernel.org>
ALSA: us122l: mark hwdep mappings VM_MIXEDMAP
Ting-Han Hou <ue081723@gmail.com>
scripts/gdb: fix stack depot out-of-bounds diagnostic
Ting-Han Hou <ue081723@gmail.com>
scripts/gdb: fix radix tree lookup pointer handling
Ilya Leoshkevich <iii@linux.ibm.com>
scripts/gdb/radix-tree: add lx-radix-tree-command
Avi Weiss <thnkslprpt@gmail.com>
profiling: fix sampling step on 64-bit big-endian systems
Edward Adam Davis <eadavis@sina.com>
kernel/reboot: avoid potential deadlocks during suspension
Aditya Sharma <adi.sharma@zohomail.in>
bpf: Remove nmi_uaccess_okay() check in bpf_send_signal_common()
Ayushman Rout <ayushmanrout27@gmail.com>
bpf: Use memmove() to load bytes from an skb and an xdp_buff
Feng Yang <yangfeng@kylinos.cn>
bpf: Propagate btf_add_type() errors in btf_check_all_metas()
Haotian Zhang <vulab@iscas.ac.cn>
scsi: elx: libefc: Fix resource leak in efcport_init() error path
Dudu Lu <phx0fer@gmail.com>
net/sched: etf: initialise the sock_exterr_skb before filling it
Nandor Kracser <nandor@riptides.io>
tls: avoid field-spanning write when copying crypto info
Greg Thelen <gthelen@google.com>
selftests/net: tcp_mmap: remove unused -k option and keepflag
Allison Henderson <achender@kernel.org>
net/rds: keep the connected peer's scope id apart from the bound one
Allison Henderson <achender@kernel.org>
net/rds: include the scope id in the sendmsg connection cache check
Gal Pressman <gal@nvidia.com>
net/mlx5e: IPsec, Fix out-of-bounds comparison of neighbour keys
Cosmin Ratiu <cratiu@nvidia.com>
net/mlx5e: SHAMPO: Do not merge PSP packets
Eric Dumazet <edumazet@kernel.org>
net: fix frag_list leak in skb_segment_list() error path
Daniel Machon <daniel.machon@microchip.com>
net: sparx5: fix tx DCB index drift in fdma xmit
Daniel Machon <daniel.machon@microchip.com>
net: sparx5/lan969x: do not read past skb->len when injecting a frame
Piotr Kubik <piotr@kubik.pl>
net: pse-pd: si3474: validate the channels of a PI
Piotr Kubik <piotr@kubik.pl>
net: pse-pd: si3474: keep detection enabled on the other PIs
Dimitri Daskalakis <daskald@meta.com>
eth: fbnic: Correct packet header prefetch
James Clark <jjc@jclark.com>
net: ethernet: ti: am65-cpts: fix support for PTP_EXTTS_REQUEST2 ioctl
Florian Fuchs <fuchsfl@gmail.com>
ALSA: sh: aica: Fix spu_memset() stride
Gregory Price (Meta) <gourry@gourry.net>
cgroup/cpuset: check effective mems for a movable-only configuration
Kaifeng Wang <kaifengw@google.com>
tcp: reject devmem tx with fastopen and repair
Xingyuan Mo <hdthky0@gmail.com>
sctp: reject forged cookie peer_addr with unknown address family
Jiale Yao <yaojiale02@163.com>
regulator: irq: freeze deferred hardware access during suspend
Marco Crivellari <marco.crivellari@suse.com>
regulator: irq_helper: replace use of system_wq with system_dfl_wq
Steven Rostedt <rostedt@goodmis.org>
cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: raven: Fix memory leak in acp3x_dma_close()
Lee Jia Jie <mkofdwu@gmail.com>
perf: Fix UAF in attach_task_ctx_data()
Michail Andreas Michalopoulos <mike.michalo@gmail.com>
ksmbd: select CRYPTO_AES
Ivan Hu <ivan.hu@canonical.com>
ACPICA: Initialize parser_state.aml_end in acpi_install_method()
Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
ACPI: platform_profile: Separate handler locking from sysfs lifetime
Nickolai Zeldovich <nickolai@csail.mit.edu>
nsproxy: Fix cred leak in the error path of prepare_nsset()
Avi Weiss <thnkslprpt@gmail.com>
signal: skip blocked signals in dequeue_synchronous_signal()
Karl Mehltretter <kmehltretter@gmail.com>
netfs: Restore selective debug mask handling
Nickolai Zeldovich <nickolai@csail.mit.edu>
nsfs: check the trailing bytes of a file handle in bytes, not words
Tianyi Chen <hi@tychen.cc>
eventpoll: propagate wakeup source creation failure in ep_modify()
Nickolai Zeldovich <nickolai@csail.mit.edu>
proc/kcore: advance the vmalloc retry by the last copy, not the total
Marek Szyprowski <m.szyprowski@samsung.com>
ASoC: wm8994: follow AIF clock source changes in MCLK gating
Binbin Deng <18983559317@163.com>
tipc: fix use-after-free of broadcast reception link at node release
Baek Kyu, Kim <pocj8ur4in@gmail.com>
gpiolib: Propagate emulated drive errors when setting arrays
Rand Deeb <rand.sec96@gmail.com>
ata: libata-core: Ignore forced transfer modes the host does not support
Travis Howard <thoward@lafayetteinstrument.com>
tg3: Add Datto SIRIS 5 1U Server to restart AER quirk table
Cosmin Ratiu <cratiu@nvidia.com>
net/mlx5e: Stop asserting for RTNL when closing channels
Eric Dumazet <edumazet@kernel.org>
net: shrink the payload-only part of skb dataref to one bit
Tianyi Gao <tianyi@cloudflare.com>
veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled
Daniel Machon <daniel.machon@microchip.com>
net: lan969x: don't disable hardirqs in fdma tx clear
Daniel Machon <daniel.machon@microchip.com>
net: sparx5/lan969x: do not clobber the PSFP cycle timer update period
Daniel Machon <daniel.machon@microchip.com>
net: lan969x: fix DSM calendar for empty taxis
Willem de Bruijn <willemb@google.com>
virtio-net: fix frag overflow in big packets receive
Jijie Shao <shaojijie@huawei.com>
net: hibmcge: set netdev_ops before hbg_init() to fix NULL pointer dereference
Eric Joyner <eric.joyner@amd.com>
ionic: free port_info when probe fails after the port is set up
Nikhil P. Rao <nikhil.rao@amd.com>
ionic: fix port_info use-after-free on firmware recovery
Sivansh Gupta <sivansh.gupta@oss.qualcomm.com>
mailbox: qcom-cpucp: read mbox hardware register using readq()
Deepti Jaggi <deepti.jaggi@oss.qualcomm.com>
mailbox: qcom-cpucp: Add support for Nord CPUCP mailbox controller
Daniel Wagner <wagi@kernel.org>
nvme-fabrics: clear the poll map if no poll queues are mapped
Daniel Wagner <wagi@kernel.org>
nvme-fabrics: limit each queue type to the number of online CPUs
Daniel Wagner <wagi@kernel.org>
nvme-fabrics: reset io_queues before computing the queue mapping
James Clark <james.clark@linaro.org>
perf cs-etm: Don't add global v0 HW_IDs to unformatted queues
Namhyung Kim <namhyung@kernel.org>
perf c2c: Fix memory leaks on output fields
Waldemar Brodkorb <wbx@openadk.org>
sh: Select BINFMT_FLAT_NO_DATA_START_OFFSET for !MMU
Marek Szyprowski <m.szyprowski@samsung.com>
ASoC: samsung: midas_wm1811: run FLL1 at the AIF1 configured rate when idle
Marek Szyprowski <m.szyprowski@samsung.com>
ASoC: wm8994: fix MCLK index used for setting MCLK rate
Marek Szyprowski <m.szyprowski@samsung.com>
ASoC: wm8994: don't lose the AIF clock ratio when staying at 32kHz SYSCLK
Marek Szyprowski <m.szyprowski@samsung.com>
ASoC: wm8994: fix MCLK gating for AIF clocks sourced from MCLK2
HyeongJun An <sammiee5311@gmail.com>
selftests: ALSA: pcmtest: Compare all captured bytes in ni_capture
Alexandre Cassen <acassen@corp.free.fr>
net/mlx5: HWS, fix modify header pool match for copy actions
Alexandre Cassen <acassen@corp.free.fr>
net/mlx5: HWS, fix modify header pattern compare on big-endian
Anil Kaushik <anilkaushikwireless@gmail.com>
gtp: hold RCU for the device lookup when adding a PDP context
Anil Kaushik <anilkaushikwireless@gmail.com>
gtp: set a valid genl command in PDP context get and dump replies
HyeongJun An <sammiee5311@gmail.com>
selftests: ALSA: pcmtest: Make room for the longest fill pattern
HyeongJun An <sammiee5311@gmail.com>
selftests: ALSA: pcmtest: Check the frame count of each transfer
Takashi Iwai <tiwai@suse.de>
platform/x86: ibm_rtl: Fix potential OOB read at signature search
Shradha Gupta <shradhagupta@linux.microsoft.com>
Drivers: hv: Run VMBus kexec cleanup from syscore shutdown
Shradha Gupta <shradhagupta@linux.microsoft.com>
kexec: Add helper to report an active kexec reboot
Jork Loeser <jloeser@linux.microsoft.com>
x86/hyperv: move stimer cleanup to hv_machine_shutdown()
Jiale Yao <yaojiale02@163.com>
Drivers: hv: vmbus: Check ACPI companion before use
Sasha Levin <sashal@kernel.org>
selftests/proc: proc-pid-vm: fix unused variable warning on non-x86
Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
selftests: complete kselftest include centralization
Cen Zhang <zzzccc427@gmail.com>
ocfs2: initialize status waiters before publishing them
Joseph Qi <joseph.qi@linux.alibaba.com>
ocfs2: reserve xattr value tree metadata only once
Dmitry Antipov <dmantipov@yandex.ru>
tcp_bpf: propagate error code in tcp_bpf_sendmsg()
Carolina Jubran <cjubran@nvidia.com>
net: skbuff: don't copy alloc_cpu in skb header copies
Carlo Szelinsky <github@szelinsky.de>
net: pse-pd: si3474: fix use-after-free in ancillary client error path
Michail Andreas Michalopoulos <mike.michalo@gmail.com>
ksmbd: reject FILE_ATTRIBUTE_TEMPORARY on directories
Mohammed Alquraini <mohammed.saad.alquraini@gmail.com>
ksmbd: reject foreign RPC pipe handles on IPC$ read and write
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: fix fd_limit accounting across durable reconnects
DaeMyung Kang <charsyam@gmail.com>
ksmbd: round SetAllocation to the advertised allocation unit
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: stabilize allocation size after buffered writes
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: return requested create allocation size
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: preserve open change time across rename
ChenXiaoSong <chenxiaosong@kylinos.cn>
smb/server: fix trailing period in generated short names
Henry Hu <huhai@kylinos.cn>
ksmbd: report IPv4 and IPv6 addresses independently in iface query
Henry Hu <huhai@kylinos.cn>
ksmbd: fix invalid Next offset in interface info replies
Henry Hu <huhai@kylinos.cn>
ksmbd: fix unlocked IPv6 addr_list walk in fsctl_query_iface_info_ioctl()
Henry Hu <huhai@kylinos.cn>
ksmbd: fix link speed query in fsctl_query_iface_info_ioctl()
Henry Hu <huhai@kylinos.cn>
ksmbd: fix iface_list use-after-free during server reset
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: fix listener task lifetime on netdev events
Qingfang Deng <dqfext@gmail.com>
ksmbd: server: avoid busy polling in accept loop
Mingming Cao <mmc@linux.ibm.com>
ibmveth: check headers in the RX large send and checksum helpers
Mingming Cao <mmc@linux.ibm.com>
ibmveth: wait for the RX poll to return before freeing the RX queue
Mingming Cao <mmc@linux.ibm.com>
ibmveth: wait for in-flight transmits in ibmveth_close()
Mingming Cao <mmc@linux.ibm.com>
ibmveth: return the error when set_channels cannot add TX queues
Mingming Cao <mmc@linux.ibm.com>
ibmveth: release the pool kobjects when probe fails
Mingming Cao <mmc@linux.ibm.com>
ibmveth: step past bad RX correlators instead of spinning or oopsing
Mingming Cao <mmc@linux.ibm.com>
ibmveth: disable the reset work before unregister in remove
Mingming Cao <mmc@linux.ibm.com>
ibmveth: do not close twice after a failed reopen
Mingming Cao <mmc@linux.ibm.com>
ibmveth: fix netpoll races with RX replenish
Ovidiu Panait <ovidiu.panait.rb@renesas.com>
net: stmmac: Track the TX DMA threshold per queue
Jiale Yao <yaojiale02@163.com>
team: reject CAN, IEEE 802.15.4 and 6LoWPAN devices in team_port_add
Ido Schimmel <idosch@nvidia.com>
ipv6: Hold RCU when emitting route hardware flags notification
Dimitri Daskalakis <daskald@meta.com>
net/mlx5e: Update netdev features only after a successful ringparam set
Rosen Penev <rosenp@gmail.com>
net: phy: marvell: keep WOL_EIE across interrupt reconfiguration
Myeonghun Pak <mhun512@gmail.com>
platform/x86: gpd pocket fan: Cancel work before releasing GPIOs
Eric Dumazet <edumazet@kernel.org>
ipv6: account route exceptions to the netns of their dst
Sagi Maimon <maimon.sagi@gmail.com>
net: axienet: release every RX buffer in axienet_dma_bd_release()
Ido Schimmel <idosch@nvidia.com>
bridge: mcast: Delete empty MDB entry when port group creation fails
Florian Fainelli <florian.fainelli@broadcom.com>
net: bcmasp: fix network filter lookup and wake filter pair allocation
Florian Fainelli <florian.fainelli@broadcom.com>
net: bcmasp: account for offload header in TX short packet padding
Florian Fainelli <florian.fainelli@broadcom.com>
net: bcmasp: fix OF node reference leak for phy_dn
Florian Fainelli <florian.fainelli@broadcom.com>
net: bcmasp: validate minimum RX packet size in bcmasp_rx_poll()
Florian Fainelli <florian.fainelli@broadcom.com>
net: bcmasp: unmap previous DMA mappings on TX map failure
Florian Fainelli <florian.fainelli@broadcom.com>
net: bcmasp: fix mib counters struct alignment with ethtool stats
Myeonghun Pak <mhun512@gmail.com>
net: hix5hd2: serialize timeout recovery with interface teardown
Karl Mehltretter <kmehltretter@gmail.com>
net: phy: realtek: restore RTL8211F RGMII delays on resume
Anirudh Virdi <avirdi@redhat.com>
net: qede: initialize extack in qede_flow_spec_to_rule()
Binbin Deng <18983559317@163.com>
octeontx2: Fix use-after-free of qos node in delete path
Rishikesh Jethwani <rjethwani@purestorage.com>
tls: device: protect async RX resync state during device-down
Eric Dumazet <edumazet@kernel.org>
tcp: tcp_metrics: use the socket netns, not the dst device netns
Fernando Fernandez Mancera <fmancera@suse.de>
net: openvswitch: drop IP fragments on SCTP set action
Fernando Fernandez Mancera <fmancera@suse.de>
net: openvswitch: skip IPv4 later fragments on TCP/UDP set actions
Linus Torvalds <torvalds@linux-foundation.org>
vhost: vringh: use get_user()/put_user() for IOTLB 16-bit accesses
Rob Herring (Arm) <robh@kernel.org>
dt-bindings: clock: mediatek: Add MT8516 fallbacks
HyeongJun An <sammiee5311@gmail.com>
ASoC: cs42l56: Remove the ADC Mute Switch control
Liang Hao <haohlliang@gmail.com>
timers: Clear pending_map on CPU hotplug
Karl Mehltretter <kmehltretter@gmail.com>
rtc: class: Make the time32 hctosys limit configurable
Baek Kyu, Kim <pocj8ur4in@gmail.com>
rtc: mpfs: Fix alarm register word order
James Hilliard <james.hilliard1@gmail.com>
net: stmmac: avoid duplicate XSK TX completions
Alexandre Cassen <acassen@corp.free.fr>
net/mlx5: HWS, fix modify header pool creation race
Alexandre Cassen <acassen@corp.free.fr>
net/mlx5: HWS, fix reformat pool creation race
Sunny Tiwari <sunnytiwari@google.com>
RDMA/irdma: Bound in-flight CQP ops across deferred completions
Yongzhao Chen <yongzhao.derek@gmail.com>
net: phy: qca83xx: read resolved QCA8337 link status
Matthieu Baerts (NGI0) <matttbe@kernel.org>
mptcp: options: dss: avoid printing uninit csum
Matthieu Baerts (NGI0) <matttbe@kernel.org>
mptcp: options: mpc: avoid printing uninit data
Pengfei Zhang <zhangfeionline@gmail.com>
net: stmmac: xgmac: do not treat TBU as a TX event
Li RongQing <lirongqing@baidu.com>
RDMA/mlx5: Fix CQ resize destination index mask
Jamal Hadi Salim <jhs@mojatatu.com>
net/sched: act_api: reject duplicate actions in a batch
Fan Wu <wufan@kernel.org>
ipe: fix enforcement audit
Manuel Ebner <manuelebner@mailbox.org>
ipe: fix invalid sgid value in audit event documentation
Gregory Price (Meta) <gourry@gourry.net>
cgroup/cpuset: use mems_allowed_seq when checking a policy nodemask
Li RongQing <lirongqing@baidu.com>
block, bfq: initialize active lists for all actuators
Cen Zhang <zzzccc427@gmail.com>
ALSA: aloop: Keep the timer source alive until card release
Cen Zhang <zzzccc427@gmail.com>
ALSA: aloop: Keep shared timer callbacks alive through close
Takashi Iwai <tiwai@suse.de>
ALSA: aloop: Use the new helper for stop-count refcount
Marek Vasut <marek.vasut+renesas@mailbox.org>
PCI: rcar-gen4: Add missing PM ops
Jinpyo Lee <bint4b13@gmail.com>
nfs/localio: pin UUIDs during global invalidation
Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
pNFS/flexfiles: make pg_init retry loops killable
Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
nfsv4/pnfs: use the MDS authflavor for data server connections
Cen Zhang <zzzccc427@gmail.com>
ALSA: pcm: Protect channel-map reads against runtime detach
Cen Zhang <zzzccc427@gmail.com>
ALSA: jack: Pin the module while debugfs files are open
Cen Zhang <zzzccc427@gmail.com>
ALSA: pcm: Remove channel-map controls before freeing substreams
Cen Zhang <zzzccc427@gmail.com>
ALSA: pcmtest: Pin the module while pattern files are open
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
nios2: ksyms: Declare __mulsi3 export
Len Brown <len.brown@intel.com>
tools/power turbostat: pmt: Improve sscanf() hygiene
Sung Byeongchan <tjdqudcks0424@naver.com>
netfilter: xt_dccp: handle reserved options as single-byte
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nft_set_rbtree: narrow down range completion to anonymous sets
Shuangfeng He <huangya90@gmail.com>
netfilter: flowtable: use the vlan id, not the full tci, in the tuple key
Julian Anastasov <ja@ssi.bg>
ipvs: fix more races around the overload flag
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset
Alok Tiwari <alok.a.tiwari@oracle.com>
octeontx2-af: Fix CQ enable state tracking after AQ writes
Cen Zhang <zzzccc427@gmail.com>
ALSA: oss: Keep emulation modules loaded until object teardown
Cen Zhang <zzzccc427@gmail.com>
ALSA: pcm: Protect the unregister notifier traversal
Adrian Ambrozewicz <aambrozewicz@nvidia.com>
gpiolib: clear the event clock flags when a line is released
Kent Gibson <warthog618@gmail.com>
gpiolib: fix memory leak in gpiod_set_array_value_complex() EPERM error path
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Run the cpumask map insert tests only for the test task
KaFai Wan <kafai.wan@linux.dev>
selftests/bpf: Use _exit() in uprobe_multi_test clone-ed child
Troy Mitchell <troy.mitchell@linux.dev>
dt-bindings: vendor-prefixes: Add Sensylink
Serhat Kumral <serhatkumral1@gmail.com>
RDMA/usnic: Bound buffer size to sizeof(buf) in flowinfo_read()
Zhiwei Zhang <202275009@qq.com>
RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv()
HyeongJun An <sammiee5311@gmail.com>
ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control
Dmitry Torokhov <dmitry.torokhov@gmail.com>
ASoC: tlv320aic32x4: clean up driver code formatting and logging
Dmitry Torokhov <dmitry.torokhov@gmail.com>
ASoC: tlv320aic32x4: move regmap_config into i2c and spi drivers
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: sta350: Fix definition of limiter threshold controls
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: sta32x: Fix definition of limiter threshold controls
Serhat Kumral <serhatkumral1@gmail.com>
RDMA/srp: Avoid reading uninitialized has_port on srp_parse_in() failure
Leon Romanovsky <leon@kernel.org>
RDMA/core: Reject LAG selection when source MAC lookup fails
Leon Romanovsky <leon@kernel.org>
RDMA/core: Free unpublished port statistics after initial-read failure
Leon Romanovsky <leon@kernel.org>
RDMA/core: Preserve the selected source GID on failed AH modification
Igor Velkov <iav@iav.lv>
power: supply: gpio-charger: Report discharging without input power
Aleksandr Nogikh <nogikh@google.com>
usb: gadget: dummy_hcd: prevent unbind via sysfs
Igor Skalkin <igor.skalkin@oss.qualcomm.com>
usb: gadget: dummy_hcd: fix SuperSpeed ep0 maxpacket
Alexei Starovoitov <ast@kernel.org>
bpf: Use memmove() to store bytes in an xdp_buff
Josef Bacik <josef@toxicpanda.com>
bpf: Use memmove() to store bytes in an skb
Josef Bacik <josef@toxicpanda.com>
bpf: Follow the head if an skb is written from a slice
Jakub Sitnicki <jakub@cloudflare.com>
bpf: Unclone skb head on bpf_dynptr_write to skb metadata
Josef Bacik <josef@toxicpanda.com>
bpf, cpumap: Hold the device of frames in the queue
Josef Bacik <josef@toxicpanda.com>
bpf: Use the socket of a sk_lookup test run under RCU
Paul Chaignon <paul.chaignon@gmail.com>
bpf: Craft non-linear skbs in BPF_PROG_TEST_RUN
Paul Chaignon <paul.chaignon@gmail.com>
bpf: Reorder bpf_prog_test_run_skb initialization
Paul Chaignon <paul.chaignon@gmail.com>
bpf: Refactor cleanup of bpf_prog_test_run_skb
Josef Bacik <josef@toxicpanda.com>
bpf: Keep the symbols of a program until it has ended
Alexei Starovoitov <ast@kernel.org>
bpf: Don't let an extension reach further into the context than its target
Alexei Starovoitov <ast@kernel.org>
bpf: Don't take a program with a target program for an iterator
Florian Westphal <fw@strlen.de>
netfilter: nft_compat: restrict raw table targets/matches
Florian Westphal <fw@strlen.de>
selftests: netfilter: fix return value in zone subtest
Florian Westphal <fw@strlen.de>
netfilter: conntrack: fix unlikely UaF in gc worker
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
power: supply: qcom_battmgr: report full batteries
Alexei Starovoitov <ast@kernel.org>
bpf: Don't take an extension for a writable raw tracepoint program
Josef Bacik <josef@toxicpanda.com>
bpf: Don't take an extension for an iterator program
Josef Bacik <josef@toxicpanda.com>
bpf: Don't bind a program to a netdev that goes away
Josef Bacik <josef@toxicpanda.com>
bpf: Fix stale offload->prog pointer after realloc
Josef Bacik <josef@toxicpanda.com>
bpf: Bound the nesting that the BTF show code follows
Alexei Starovoitov <ast@kernel.org>
bpf: Clear sk_refcnt of a clone before its storage is linked
Josef Bacik <josef@toxicpanda.com>
bpf: Update the SRH state if End.B6 fails late
Josef Bacik <josef@toxicpanda.com>
bpf: Pull the inner header for End.DT6 in End.BPF
Josef Bacik <josef@toxicpanda.com>
bpf: Validate the SRH which End.DT6 uncovers in End.BPF
Josef Bacik <josef@toxicpanda.com>
bpf: Read the probe of a perf event under event_mutex
Josef Bacik <josef@toxicpanda.com>
bpf: Don't let bpf_skb_adjust_room() use up the MSS
Jakub Sitnicki <jakub@cloudflare.com>
bpf: Make bpf_skb_adjust_room metadata-safe
Jakub Sitnicki <jakub@cloudflare.com>
net: Helper to move packet data and metadata after skb_push/pull
Josef Bacik <josef@toxicpanda.com>
bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit
Josef Bacik <josef@toxicpanda.com>
bpf: Reject sleepable programs for task_vma iterator
Josef Bacik <josef@toxicpanda.com>
bpf: Use the frame mem type in devmap egress XDP
Joonhoe Kim <26rote@gmail.com>
power: supply: qcom_battmgr: report the USB type from USB_ADAP_TYPE
Jiayuan Chen <jiayuan.chen@linux.dev>
bpf: Fix verifier WARN on narrow read of bpf_tcp_sock u64 fields
Arnaldo Carvalho de Melo <acme@redhat.com>
perf evsel: Mark the event as supported when retrying an open
Cen Zhang <zzzccc427@gmail.com>
ALSA: jack: Protect the index scan against control removal
Daniel Borkmann <daniel@iogearbox.net>
bpf: Don't echo user-supplied map info fields back to userspace
Brad Fitzpatrick <bradfitz@tailscale.com>
gre: keep the UDP tunnel GSO type when completing GRO
Vincent Jardin <vjardin@free.fr>
ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl
Vincent Jardin <vjardin@free.fr>
net: enetc: fix support for PTP_EXTTS_REQUEST2 ioctl
Vincent Jardin <vjardin@free.fr>
dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl
Ivan Vecera <ivecera@redhat.com>
dpll: zl3073x: reject output frequencies with too small divisor
Ivan Vecera <ivecera@redhat.com>
dpll: zl3073x: reject inexact frequencies for N-divided outputs
Ivan Vecera <ivecera@redhat.com>
dpll: zl3073x: clean up esync get/set and use zl3073x_out_is_ndiv()
Ivan Vecera <ivecera@redhat.com>
dpll: zl3073x: do not offer 0 Hz as a supported pin frequency
Ivan Vecera <ivecera@redhat.com>
dpll: zl3073x: Include current frequency in supported frequencies list
Ivan Vecera <ivecera@redhat.com>
dpll: zl3073x: Add output pin frequency helper
Joas Antonio dos Santos <joasantonio108@gmail.com>
calipso: update payload_len when removing the CALIPSO option
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: sta350: Fix definition of Ch2 and Ch3 Volume Bypass controls
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: sta32x: Fix definition of Ch2 and Ch3 Volume Bypass controls
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: tlv320adc3xxx: Fix definition of AGC Target Level control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: da732x: Fix definition of ADC2 EQ Overall Volume control
Yuan Chen <chenyuan@kylinos.cn>
bpf: Claim the per-CPU send_signal irq_work before filling it
Sasha Levin <sashal@kernel.org>
ARC: Strip libgcc debug information when generating BTF
Tal Zussman <tz2294@columbia.edu>
btrfs: update the inode item when removing a free space inode
Tal Zussman <tz2294@columbia.edu>
btrfs: drop the extent maps of the written part of a failed ordered extent
Piotr Gliźniewicz <p.glizniewicz@gmail.com>
ALSA: 6fire: take stream_mutex in the Digital Thru control
Myeonghun Pak <mhun512@gmail.com>
platform: cznic: turris-omnia-mcu: stop button emulation producers
Ömer Mete Kaya <omermetekaya0@gmail.com>
usbnet: fix smp_processor_id() use in preemptible context
Yongzhao Chen <yongzhao.derek@gmail.com>
net: phy: qcom: at803x: Apply IPQ5018 analog settings at probe
Fabrice Derepas <fabrice.derepas@canonical.com>
ima: reject a kexec buffer whose declared size exceeds the buffer
Qiliang Yuan <odys.yuan@gmail.com>
blk-mq: share one tags_srcu instance across all tag sets
Tao Cui <cuitao@kylinos.cn>
blk-iocost: account zone append completions in latency stats
Tao Cui <cuitao@kylinos.cn>
blk-iocost: charge zone appends as writes
Viktor Menshin <ripeeerr@gmail.com>
ALSA: hda/realtek: Fix hiss/crackle on Lenovo Xiaoxin 14 GT (17aa:3912)
Jackie Dong <xy-jackie@139.com>
ALSA: hda/realtek: ALC269 fixup for Yoga/Legion Mic noise
Jackie Dong <xy-jackie@139.com>
ALSA: hda/realtek:ALC269 fixup for Yoga Pro 7 15ASH11 mic mute LED
Jackie Dong <xy-jackie@139.com>
ALSA: hda/realtek: ALC269 fixup for Lenovo Yoga Pro 7 15ASH111 audio
Colin Ian King <colin.i.king@gmail.com>
selftests/bpf: Fix spelling mistakes in descr literal strings
Yuan Chen <chenyuan@kylinos.cn>
bpftool: Fix inverted tracefs validation when scanning /proc/mounts
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Expect at least one kprobe miss in missed/perf_kprobe
Adam Azuddin <azuddinadam@gmail.com>
drm/appletbdrm: Fix incorrect error message on encoder attach failure
Hui Peng <benquike@gmail.com>
fuse: validate folio state before pipe_buf_try_steal() in fuse_try_move_folio()
Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>
HID: wacom: fix wacom_intuos_irq NULL pen_input deref
Dmitriy Geels <dmitriy.geels@gmail.com>
HID: logitech-hidpp: cancel reset_hi_res_work on probe failure
Nehuen Lian Bova <nehuenlian.kernel@gmail.com>
HID: magicmouse: fix null pointer dereference in magicmouse_event()
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Record only the test ICMP echo in tc8 of tc_netkit_scrub
Cen Zhang <zzzccc427@gmail.com>
ALSA: vmaster: Protect follower lookup and setup
Vasilij Markin <vasilij.kernel@tototo.si>
drm/appletbdrm: Add suspend and resume support
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Unmount the bpffs that cgroup_hierarchical_stats mounted
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Keep the bpffs of cgroup_hierarchical_stats private
Eric Dumazet <edumazet@kernel.org>
tcp: use the echoed source route in cookie_v4_check()
Theodor Arsenij Larionov Trichkine <theodorlarionov@gmail.com>
net: use the full socket in sk_mc_loop()
Eric Dumazet <edumazet@kernel.org>
ipv4: use RCU protection in inet_netconf_get_devconf()
George Melikov <mail@gmelikov.ru>
bnx2x: fix header length calculation for encapsulated TSO
Muchun Song <muchun.song@linux.dev>
dax/bus: Return errors for invalid mapping targets
Stefano Munari <stefanomunari.sm@gmail.com>
net: usb: lan78xx: reject invalid EEPROM write requests
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
macsec: prevent AES-GCM nonce reuse after packet number wrap
Yun Lu <luyun@kylinos.cn>
bpf: Prevent task work context reuse while irq_work is busy
Yun Lu <luyun@kylinos.cn>
bpf: Fix NULL task dereference in task work cancellation
Mykyta Yatsenko <yatsenko@meta.com>
bpf: Migrate bpf_task_work to kmalloc_nolock
KaFai Wan <kafai.wan@linux.dev>
selftests/bpf: Skip expected_msgs subtests when stdout is not saved
KaFai Wan <kafai.wan@linux.dev>
selftests/bpf: Fix prog_tests framework subtest count checks
Li RongQing <lirongqing@baidu.com>
ublk: use global index for reported zones
Damien Le Moal <dlemoal@kernel.org>
block: introduce disk_report_zone()
Damien Le Moal <dlemoal@kernel.org>
block: cleanup blkdev_report_zones()
Ming Lei <tom.leiming@gmail.com>
ublk: allow a NULL io->cmd in the cancel callback
Donggeun Yoo <donggeunyoo.kernel@gmail.com>
tracing: Print a signed histogram key as signed
Atharva Vartak <atharva.a.vartak@gmail.com>
net/smc: hold a reference on net_device returned by pnet_find_base_ndev()
Jianan Huang <jnhuang95@gmail.com>
f2fs: quota: fix quota flush failure during filesystem freeze
pengdonglin <pengdonglin@xiaomi.com>
tracing: Avoid BTF lookup in atomic context
Donggeun Yoo <donggeunyoo.kernel@gmail.com>
tracing: Clamp the printed end of a histogram bucket at U64_MAX
Donggeun Yoo <donggeunyoo.kernel@gmail.com>
tracing: Only report the stacktrace modifier on a real field
Donggeun Yoo <donggeunyoo.kernel@gmail.com>
tracing: Print the bucket size as unsigned
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix ETDM probe error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix HDMI TX startup error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix ETDM startup error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix ETDM MCLK error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Propagate IRQ lookup errors
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix runtime resume error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Check paired MEMIF clock enable in FE trigger
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix FE startup error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix paired memif clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix main clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix timing system clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix register access clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8195: Fix tuner clock error handling
Amadeusz Sławiński <amade@asmblr.net>
ASoC: soc-component: Fix return type of snd_soc_pcm_component_pointer()
Amadeusz Sławiński <amade@asmblr.net>
ASoC: soc-ac97: Fix error handling in snd_soc_new_ac97_component()
Amadeusz Sławiński <amade@asmblr.net>
ASoC: soc-card-test: Check return value of kunit_device_register()
Amadeusz Sławiński <amade@asmblr.net>
ASoC: soc-topology-test: Check return value of kunit_device_register()
Amadeusz Sławiński <amade@asmblr.net>
ASoC: ops: Fix return value in snd_soc_limit_volume()
Amadeusz Sławiński <amade@asmblr.net>
ASoC: soc-link: Correct stream stop operations in snd_soc_link_trigger
Abraham Zukor <abe@maticrobots.com>
spi: tegra114: initialize native chip selects inactive
Haotian Zhang <vulab@iscas.ac.cn>
ASoC: rockchip: fix device node reference leak in rk3288_hdmi_analog
bui duc phuc <phucduc.bui@gmail.com>
ASoC: rockchip: rk3288_hdmi_analog: Use dev_err_probe() for error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: rockchip: rk3288_hdmi_analog: Drop redundant probe error messages
Sasha Levin <sashal@kernel.org>
selftests: keep the build status from wrapping to success
Michael Auer <mick@yoxcu.de>
ASoC: qcom: sdm845: Disable the quaternary MI2S bit clock on shutdown
Robert Oscilowski <drgitx@gmail.com>
ASoC: qcom: sdm845: set quaternary MI2S codec DAI to I2S format
Cezary Rojewski <cezary.rojewski@intel.com>
ASoC: Intel: avs: Prevent module info underflow
Cezary Rojewski <cezary.rojewski@intel.com>
ASoC: Intel: avs: Unprepare a stream when recovery occurs
Jacob Moroni <jmoroni@google.com>
RDMA/irdma: Fix FRWR IRDMAQPSQ_PBLADDR field population
Serhat Kumral <serhatkumral1@gmail.com>
IB/rdmavt: Fix error unwind path for qp_priv_init() in rvt_create_qp()
Sasha Levin <sashal@kernel.org>
kselftest/arm64: signal: copy each test binary only once
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Accept unnamed dma-bufs in the dmabuf_iter default test
Takashi Iwai <tiwai@suse.de>
ALSA: core: Serialize snd_refcount put and sync
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Create the vxlan devices of test_tunnel with their MAC
Zhan Xusheng <zhanxusheng1024@gmail.com>
vdso/vsyscall: Keep the CLOCK_AUX base scaled
Zhan Xusheng <zhanxusheng1024@gmail.com>
vdso/math64: Add and use __iter_div64_u64_rem()
Jaewon Jung <jaewon8868@gmail.com>
selftests/ftrace: Avoid unlink error on first run
Myeonghun Pak <mhun512@gmail.com>
ASoC: rt5645: Shut down the button timer on removal
Zhang Yi <yi.zhang@huawei.com>
ext4: fix orig_mlen initialization in ext4_map_blocks()
Youngsung Ahn <ays511.kr@gmail.com>
RDMA/rxe: bound the WQE opcode before indexing rxe_wr_opcode_info[]
Honggang LI <honggangli@163.com>
RDMA/rxe: Fix out-of-range unsigned-to-signed conversion for RDMA message in 2GiB size
xiongweimin <xiongweimin@kylinos.cn>
RDMA/rxe: Hold netdev reference for transmit skbs
Youngsung Ahn <ays511.kr@gmail.com>
RDMA/rxe: validate inline sge_offset in finish_packet() before indexing inline_data[]
Youngsung Ahn <ays511.kr@gmail.com>
RDMA/rxe: bound the ODP page index against the umem in rxe_check_pagefault()
Youngsung Ahn <ays511.kr@gmail.com>
RDMA/rxe: reject IB_WR_REG_MR from user QPs in rxe_reg_fast_mr()
Youngsung Ahn <ays511.kr@gmail.com>
RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound
Sahaj Chaudhari <sahaj123.sc@gmail.com>
spi: omap2-mcspi: handle DMA setup failures
Julian Sun <sunjunchao@bytedance.com>
block: take the inode lock for buffered write fallback
Julian Sun <sunjunchao@bytedance.com>
block: reject NOWAIT buffered write fallback
zhoumin <teczm@foxmail.com>
ata: ahci: preserve preset port masks
Takashi Iwai <tiwai@suse.de>
ALSA: pcm: Add refcount for races between drain and unlink
Takashi Iwai <tiwai@suse.de>
ALSA: Add simple refcount helper functions
Benoît Monin <benoit.monin@bootlin.com>
irqchip/mips-gic: Transfer interrupt mask state across clusters
Benoît Monin <benoit.monin@bootlin.com>
irqchip/mips-gic: Fix recursive acquisition of gic_lock in gic_set_affinity()
Benoît Monin <benoit.monin@bootlin.com>
irqchip/mips-gic: Fix unbalanced cm_core_lock in for_each_online_cpu_gic()
Zhu Ling <zhuling2709@phytium.com.cn>
irqchip/gic: Fix UBSAN shift-out-of-bounds in GIC helpers
Fuad Tabba <fuad.tabba@linux.dev>
irqchip/gic-v3: Don't register a redistributor that was never counted
Fuad Tabba <fuad.tabba@linux.dev>
irqchip/gic-v3-its: Don't free the tables of an enabled ITS
Fuad Tabba <fuad.tabba@linux.dev>
irqchip/gic-v3-its: Don't free a vPE table shared with another ITS
Pengpeng Hou <hppiscas@163.com>
irqchip/riscv-imsic: Reject overlapping group index fields
Fuad Tabba <fuad.tabba@linux.dev>
irqchip/gic-v3-its: Clear vpt_page after freeing the pending table
David Howells <dhowells@redhat.com>
rxrpc: Fix sendmsg length
David Howells <dhowells@redhat.com>
rxrpc: Fix aborting in rxperf test server
David Howells <dhowells@redhat.com>
rxrpc: Fix rxperf test rxgk key kvno to be 0
David Howells <dhowells@redhat.com>
rxrpc: Revert "rxrpc: rxperf: Fix missing decoding of terminal magic cookie"
Carolina Jubran <cjubran@nvidia.com>
IB/IPoIB: Cancel normal flush work on device stop
Jiayuan Chen <jiayuan.chen@linux.dev>
veth: clear rx queue hint in veth_xmit
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Expect at least one tp_recursion miss in missed
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Report a failure to register the session key in test_progs
Qiliang Yuan <odys.yuan@gmail.com>
selftests/bpf: Use its own netns in flow_dissector_skb_less_direct_attach
Niklas Cassel <cassel@kernel.org>
ata: libata-core: Fix NO_FUA quirks shadowed by earlier quirk entries
Niklas Cassel <cassel@kernel.org>
ata: libata-core: Quirk INTEL SSDSC2KG480G8 max_sectors
Niklas Cassel <cassel@kernel.org>
ata: libata: Add ATA_QUIRK_MAX_SEC and convert all device quirks
Niklas Cassel <cassel@kernel.org>
ata: libata-core: Quirk DELLBOSS VD max_sectors
Niklas Cassel <cassel@kernel.org>
ata: libata: Move quirk flags to their own enum
Sagi Maimon <maimon.sagi@gmail.com>
net: axienet: free outstanding TX buffers in axienet_dma_bd_release()
Kyrylo Biryuk <illofspeed@gmail.com>
ata: libahci: re-enable FBS after error handling on a port multiplier
Long Zhao <longzhao@ambarella.com>
dt-bindings: vendor-prefixes: add Ambarella
Fenglin Wu <fenglin.wu@oss.qualcomm.com>
spmi: pmic-arb: return 0 in spmi_pmic_arb_register_buses() on success
Xingui Yang <yangxingui@huawei.com>
scsi: hisi_sas: Fix spinup failure for SAS SSP devices in Active_Wait state
Damien Le Moal <dlemoal@kernel.org>
scsi: core: Prepare for using combined sense codes
Damien Le Moal <dlemoal@kernel.org>
scsi: core: Rename sense field of struct scsi_failure
Damien Le Moal <dlemoal@kernel.org>
scsi: core: Define all additional sense codes and their qualifiers
Damien Le Moal <dlemoal@kernel.org>
scsi: scsi_debug: move ASC and ASCQ definitions to scsi_proto.h
Xingui Yang <yangxingui@huawei.com>
scsi: hisi_sas: Fix incorrect delay values from magic-number cleanup
Xingui Yang <yangxingui@huawei.com>
scsi: libsas: Fix out-of-bounds memcpy() in sas_ssp_task_response()
Donggeun Yoo <donggeunyoo.kernel@gmail.com>
iommufd: Keep reserved IOVA ranges when a replace within one IOAS fails
Sasha Levin <sashal@kernel.org>
selftests/nolibc: use the configured kernel header directory
Thomas Weißschuh <linux@weissschuh.net>
selftests/nolibc: scope custom flags to the nolibc-test target
Nicolai Buchwitz <nb@tipi-net.de>
net/mlx5e: use skb_share_check() in the loopback selftest hook
Nicolai Buchwitz <nb@tipi-net.de>
net: stmmac: selftests: use skb_share_check() in the loopback receive hook
Nicolai Buchwitz <nb@tipi-net.de>
net: selftests: use skb_share_check() in the loopback receive hook
Jiale Yao <yaojiale02@163.com>
clocksource/drivers/timer-ti-dm: Handle runtime resume failure
Kyle Pepper <cochcoder@proton.me>
Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: MSFT: Serialize handle map cleanup with event processing
Kiran K <kiran.k@intel.com>
Bluetooth: btintel: Zero version data before parsing TLVs
Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
Bluetooth: btintel: propagate version TLV parsing errors
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: hci_sync: Protect IRK identity reads with RCU
Eric Dumazet <edumazet@kernel.org>
Bluetooth: btmtk: fix skb double free on ISO padding failure
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: 6lowpan: Drain RCU readers on registration failure
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: msft: Lock failed probe cleanup against feature readers
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: MGMT: Reject quality report requests during unregister
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: ISO: Hold the listener during disconnect notification
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: hci_sync: Serialize devcoredump reset during device open
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: hci_core: Keep RCU protection through LTK filtering
Hitalo Souza <enghitalo@gmail.com>
Bluetooth: Add missing newline to bt_dev_{err,warn}_ratelimited()
Cen Zhang <zzzccc427@gmail.com>
Bluetooth: 6LoWPAN: Use RCU-safe device list removal
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: MGMT: Fix leaking instance on Add Extended Advertising Parameters
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: MGMT: Fix pending state of instances added without HCI traffic
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: HCI: Fix tracking of instances sharing handle 0x00
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: MGMT: Fix advertising instances with Global Advertising
Pauli Virtanen <pav@iki.fi>
Bluetooth: hci_sync: fix mesh adv timeout units
Kiran K <kiran.k@intel.com>
Bluetooth: btusb: Preserve event and ACL packet ordering
Zijun Hu <zijun.hu@oss.qualcomm.com>
Bluetooth: btusb: Make btusb_recv_{event,acl}() take struct hci_dev *
Chris Lu <chris.lu@mediatek.com>
Bluetooth: btmtk: Improve BT firmware logging
Chris Lu <chris.lu@mediatek.com>
Bluetooth: btmtk: Validate the firmware layout before parsing it
Pauli Virtanen <pav@iki.fi>
Bluetooth: L2CAP: hold chan in l2cap_ecred_conn_rsp()
Pauli Virtanen <pav@iki.fi>
Bluetooth: L2CAP: hold l2cap_conn::lock in l2cap_connect_cfm()
Pauli Virtanen <pav@iki.fi>
Bluetooth: L2CAP: take chan->lock for l2cap_chan_add/ready/del
Chris Lu <chris.lu@mediatek.com>
Bluetooth: btmtksdio: Pass the hardware device id to mt79xx_setup()
Chris Lu <chris.lu@mediatek.com>
Bluetooth: btmtksdio: Remove redundant firmware filename override
Mohamad Raizudeen <raizudeen.kerneldev@gmail.com>
PCI: Fix out-of-bounds MMIO read in nvme_disable_and_flr()
Marek Szyprowski <m.szyprowski@samsung.com>
ARM: 9519/1: dma-mapping: Fix wrong free function in __iommu_alloc_simple() error path
Karl Mehltretter <kmehltretter@gmail.com>
ARM: 9492/1: alignment: fix LSR #32 and ASR #32 offset decoding
Karl Mehltretter <kmehltretter@gmail.com>
ARM: 9486/1: set !LPAE MAX_PHYSMEM_BITS to 32 and remove supersection mappings
Atul Akella <atul.akella@gmail.com>
rpmsg: virtio: fix error handling in TX buffer wait
Patrick Oppenlander <patrick.oppenlander@gmail.com>
rpmsg: virtio: EPOLLOUT support
Avi Weiss <thnkslprpt@gmail.com>
rpmsg: mtk: release channel OF node on device teardown
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8510: Fix definition of ADC Inversion Switch control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8750: Fix definition of ALC Capture NG Type control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm5100: Fix definition of EQ3 Band 1 Volume control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8737: Fix definition of zero cross switches
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm_hubs: Fix definition of MIXINR to MIXOUTR volume control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8955: Fix definition of Treble Cutoff control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8994: Fix definition of WM8958 noise gate hold time controls
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8985: Fix definition of ADC 128x Oversampling control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8983: Fix definition of ADC 128x Oversampling control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8991: Fix definition of LOMIX AINLMUX Bypass Volume control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8991: Fix definition of right input PGA controls
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8990: Fix definition of LOMIX AINLMUX Bypass Volume control
HyeongJun An <sammiee5311@gmail.com>
ASoC: codecs: wm8990: Fix definition of right input PGA controls
Tim Douglas <me@timdoug.com>
serial: pmac_zilog: report received breaks
Karl Mehltretter <kmehltretter@gmail.com>
serial: ma35d1: Do not force-enable an unselected console
Muhammad Bilal <meatuni001@gmail.com>
platform/x86: hp-bioscfg: fix oops on short integer attribute buffer
Muhammad Bilal <meatuni001@gmail.com>
platform/x86: hp-bioscfg: validate SPM state returned by firmware
Muhammad Bilal <meatuni001@gmail.com>
platform/x86: hp-bioscfg: fix off-by-one in password length check
Cen Zhang <zzzccc427@gmail.com>
ALSA: pcm: Unlink substreams before releasing them
Kohei Enju <enju.kohei@fujitsu.com>
arm64: rsi: Correct type of realm_config::hash_algo
Johannes Berg <johannes.berg@intel.com>
wifi: cfg80211: track SSID regardless of country data
Julian Anastasov <ja@ssi.bg>
ipvs: fix buffer overflow when sending sync messages
Endrik Einberg <git@endrik.dev>
wifi: iwlwifi: mld: include VI packets in low latency detection
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
wifi: iwlwifi: mvm: fix the VHT MCS sent to a v1 firmware
Johannes Berg <johannes.berg@intel.com>
wifi: iwlwifi: mvm: move rate conversions to utils.c
Binbin Deng <18983559317@163.com>
module: Fix uninitialized count read of unloaded taint tracking record
Kees Cook <kees@kernel.org>
mm/slab: Mark the kmem_buckets_create() context as a Context: section
Pengpeng Hou <hppiscas@163.com>
thermal/drivers/rzg3e: Propagate reset assertion failure from suspend
Karl Mehltretter <kmehltretter@gmail.com>
thermal: ti-soc-thermal: Fix the return value in ti_bandgap_get_sensor_data() kernel-doc
Florian Fainelli <florian.fainelli@broadcom.com>
tools/thermal/tmon: Fix string truncation warning in optarg copy
Weigang He <geoffreyhe2@gmail.com>
thermal/drivers/sprd: validate the sensor id from the device tree
Takashi Iwai <tiwai@suse.de>
ALSA: usb-audio: Use fixed control index for us16x08 mixer elements
Cen Zhang <zzzccc427@gmail.com>
ALSA: vmaster: Serialize hook registration with control callbacks
Takashi Iwai <tiwai@suse.de>
ALSA: line6: Use kzalloc() for PCM buffer allocation
Takashi Iwai <tiwai@suse.de>
ALSA: pcm: Protect delay DMA sync in forward and rewind, too
Takashi Iwai <tiwai@suse.de>
ALSA: jack: Fix kctl free at error in snd_jack_kctl_new()
Amadeusz Sławiński <amade@asmblr.net>
ALSA: pcm: Fix driver_tstamp value reporting
Bradley Morgan <brads@mainlining.org>
watchdog/perf: one digit too short in the raw event config copy
Karl Mehltretter <kmehltretter@gmail.com>
kcov: report spurious PCs in the interrupt selftest
Karl Mehltretter <kmehltretter@gmail.com>
resource, kunit: stop selecting GET_FREE_REGION
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
ocfs2: validate chunk and block counts of the local quota file
Joseph Qi <joseph.qi@linux.alibaba.com>
ocfs2: fix possible deadlock between nfs_sync_rwlock and fs_reclaim
Joseph Qi <joseph.qi@linux.alibaba.com>
ocfs2: retain all security xattrs during inode creation
Zhiling Zou <zhilinz@nebusec.ai>
lib: validate in-memory LZ4 chunk length
Bart Van Assche <bvanassche@acm.org>
scsi: scsi_debug: Fix a locking bug in resp_write_same()
Hongjian Dai <daihongjian@kylinsec.com.cn>
spi: meson-spicc: fix invalid DMA unmap on mapping failure
Runyu Xiao <runyu.xiao@seu.edu.cn>
ASoC: codecs: wcd937x: request watchdog IRQs without devm
Priyanka Mani <priyankamani2100@gmail.com>
ASoC: mediatek: mt8365: Fix out-of-bounds read in get_iir_coef()
Jonathan Santos <Jonathan.Santos@analog.com>
spi: axi-spi-engine: fix stale SYNC IRQ pending in trigger_enable
Jonathan Santos <Jonathan.Santos@analog.com>
spi: axi-spi-engine: fix stale SYNC IRQ pending
Namhyung Kim <namhyung@kernel.org>
perf symbol: Add missing symsrc__destroy() for libbfd
Namhyung Kim <namhyung@kernel.org>
perf symbol: Fix symbol loading from libbfd
Gabor Juhos <j4g8y7@gmail.com>
spi: spi-qpic-snand: skip BBM copy on regular raw reads
Karl Mehltretter <kmehltretter@gmail.com>
sh: sh7785lcr: Register the PCA9564 controller as I2C bus 0
bui duc phuc <phucduc.bui@gmail.com>
ASoC: atmel-i2s: use optional API for gclk
bui duc phuc <phucduc.bui@gmail.com>
ASoC: atmel-i2s: use optional API for muxclk
bui duc phuc <phucduc.bui@gmail.com>
ASoC: atmel-i2s: fix MCK generator error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: renesas: msiof: Fix msiof_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: intel: atom: Fix .shutdown() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: Intel: atom: Use scoped_guard() for scoped locking
bui duc phuc <phucduc.bui@gmail.com>
ASoC: intel: atom: Use __free(kfree) for stream pointer
bui duc phuc <phucduc.bui@gmail.com>
ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: atmel: atmel-pcm-pdc: Fix atmel_pcm_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: yc: Fix acp6x_pdm_dma_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: vangogh: Fix acp5x_dma_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: raven: Fix acp3x_dma_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: ps: Fix acp63_sdw_dma_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: ps: Fix acp63_pdm_dma_close() being skipped on rollback
bui duc phuc <phucduc.bui@gmail.com>
ASoC: amd: acp: Fix .close() being skipped on rollback
Mingxuan Guo <gmx472@qq.com>
firmware: cs_dsp: clear dsp->running on the cs_dsp_run() error path
Yao Sang <sangyao@kylinos.cn>
nvme: pass partition flags to passthrough checks
Sung Byeongchan <tjdqudcks0424@naver.com>
nvmet-auth: reject undersized AUTH_SEND payloads
Palla Raghunath <raghunathpalla.0209@gmail.com>
nvmet-fc: don't drop the last assoc reference in nvmet_fc_delete_ctrl()
Longfang Liu <liulongfang@huawei.com>
hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough
Surabhi Gogte <sgogte@purestorage.com>
nvme-tcp: store and use the caller's network namespace
Heiko Carstens <hca@linux.ibm.com>
s390/uprobes: Fix off-by-one bug in emulated PER handling
Heiko Carstens <hca@linux.ibm.com>
s390/ptrace: Preserve ILC when updating system call number
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
clk: qcom: rcg2: Clear force enable after rate failure
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
clk: qcom: rcg2: Propagate force-enable status errors
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
clk: qcom: rcg2: Initialize shared floor clock state
Abel Vesa <abel.vesa@oss.qualcomm.com>
clk: qcom: mmcc-msm8960: Configure PLL15 only on APQ8064
Abel Vesa <abel.vesa@oss.qualcomm.com>
clk: qcom: mmcc-sdm660: Fix MDSS AHB clock HWCG register offset
Abel Vesa <abel.vesa@oss.qualcomm.com>
clk: qcom: mmcc-msm8996: Fix FD AHB clock register offset
Abel Vesa <abel.vesa@oss.qualcomm.com>
clk: qcom: gcc-ipq5424: Fix TME reset register offsets
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
clk: qcom: gcc-x1e80100: Don't poll the status bit of GCC_USB4_n_SYS_CLK
Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
clk: qcom: gcc-glymur: Use clk_regmap_phy_mux_ops for GCC UFS muxes
Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
clk: qcom: rpmhcc: Add LNBB clocks support for Glymur
Taniya Das <taniya.das@oss.qualcomm.com>
clk: qcom: rpmh: Update the clock suffix for Glymur
Yuho Choi <oss.patchbox@gmail.com>
bus: arm-cci: Drop cci-control-port node reference in __cci_ace_get_port()
Yuho Choi <oss.patchbox@gmail.com>
bus: arm-cci: Drop CPU node reference in cci_ace_init_ports()
Linkai Gong <gonglinkai@kylinos.cn>
char: scx200_gpio: check cdev_add() return value
Sasha Levin <sashal@kernel.org>
tools: hv: remove unused rte_smp_mb()
Weigang He <geoffreyhe2@gmail.com>
thermal/drivers/ti-soc-thermal: Cancel pending alert work on remove
Georgi Djakov <djakov@kernel.org>
thermal/drivers/qcom-spmi-temp-alarm: Fix temp_map indexing
Arnaldo Carvalho de Melo <acme@redhat.com>
perf test attr: Source setup_python.sh instead of calling python
Yogesh Gaur <yogeshgaur.83@gmail.com>
comedi: pcmuio: validate the IRQs supplied by userspace
Yogesh Gaur <yogeshgaur.83@gmail.com>
comedi: pcmmio: validate the IRQ supplied by userspace
Yogesh Gaur <yogeshgaur.83@gmail.com>
comedi: dmm32at: validate the IRQ supplied by userspace
Yogesh Gaur <yogeshgaur.83@gmail.com>
comedi: dt2814: validate the IRQ supplied by userspace
Yogesh Gaur <yogeshgaur.83@gmail.com>
comedi: ni_atmio16d: validate the IRQ supplied by userspace
Yogesh Gaur <yogeshgaur.83@gmail.com>
comedi: comedi_parport: validate the IRQ supplied by userspace
Thomas Fourier <fourier.thomas@gmail.com>
net: alacritech: fix dma_free_coherent() in error path
Weiming Shi <bestswngs@gmail.com>
fs/ntfs3: do not mark frame pages uptodate on read error
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3: remove ntfs_bio_pages and use page cache for compressed I/O
Matthew Wilcox (Oracle) <willy@infradead.org>
ntfs: Do not kmap pages used for reading from disk
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: don't transmit while an RS485 reconfigure is pending
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: drive RTS in software when hardware delays are too short
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: support active-low RTS on the hardware path
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: register GPIO controller before adding UART ports
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: don't power down the port mid-transmission on close
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: fix RS485 delays being programmed as bit-times
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: centralize the RS485 transceiver programming
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: fix breaks not reaching the wire in RS485 mode
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: don't clobber the TX break bit in set_termios
Jiayuan Chen <jiayuan.chen@linux.dev>
tcp_cubic: fix divide by zero and endless loop on bad module params
Jiayuan Chen <jiayuan.chen@linux.dev>
tcp_hybla: fix divide by zero on rtt0 == 0
Jiayuan Chen <jiayuan.chen@linux.dev>
tcp_bic: fix divide by zero on max_increment == 0
Jeff Chen <jeff.chen_1@nxp.com>
wifi: mwifiex: append hotfix number to firmware version string
Chien Wong <m@xv97.com>
wifi: mac80211: reserve MME tailroom for protected beacons
Chien Wong <m@xv97.com>
wifi: mac80211: fix encryption tailroom
Yonatan Nachum <ynachum@amazon.com>
RDMA/efa: Fix race between admin command timeout and completion
Haitam Lazaar <haitam@lazaarsec.com>
RDMA/siw: Enforce IB_ACCESS_REMOTE_READ for read responses
Luca Leonardo Scorcia <l.scorcia@gmail.com>
clocksource/drivers/timer-mediatek: Fix random crash at boot
Joas Antonio dos Santos <joasantonio108@gmail.com>
calipso: hash the cache key, not the option start, in calipso_cache_add()
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
PCI: qcom: Honor IOMMU provider's #iommu-cells in qcom_pcie_config_sid_1_9_0()
Cen Zhang <zzzccc427@gmail.com>
ALSA: pcm: Protect delay DMA sync against concurrent HW_FREE
Cen Zhang <zzzccc427@gmail.com>
ALSA: rawmidi: Drain input work before freeing the runtime
Myeonghun Pak <mhun512@gmail.com>
fbdev: gxt4500: Release WC setup on probe failure
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse
Jiale Yao <yaojiale02@163.com>
platform/olpc: Reserve space for a string terminator
Aleksandrova Alyona <aga@itb.spb.ru>
platform/x86: intel_telemetry: initialize default trace verbosity
Kristen Carlson Accardi <kristen.c.accardi@intel.com>
platform/x86/intel: power-domains: Handle failed init in tpmi_get_linux_die_id()
Daasaradhi Mannava <daasaradhimannava@gmail.com>
platform/x86: msi-ec: Report valid charge thresholds when unset
Ahmed Yaseen <yaseen@ghoul.dev>
platform/x86: asus-wmi: validate custom fan curves on enable
Ali Ahmet Memiş <aliamemis@disroot.org>
ALSA: hda: intel: Don't free card in the probe work
Cen Zhang <zzzccc427@gmail.com>
ALSA: jack: Remove debugfs before freeing unregistered jacks
Dan Carpenter <error27@gmail.com>
mm/hmm/test: reject overflowing page counts
Harry Yoo (Meta) <harry@kernel.org>
selftests/cgroup: ignore memory.reclaim -EAGAIN for zswap writeback test
Zenghui Yu (Huawei) <zenghui.yu@linux.dev>
selftests/damon: stop kdamond on error exits of no-op commit test
Jiale Yao <yaojiale02@163.com>
wifi: ath12k: avoid IDR mutation during vif mgmt TX cleanup
Jiale Yao <yaojiale02@163.com>
wifi: ath11k: avoid IDR mutation during vif mgmt TX cleanup
Jiale Yao <yaojiale02@163.com>
wifi: ath11k: avoid IDR mutation during pending mgmt TX cleanup
Jiale Yao <yaojiale02@163.com>
wifi: ath10k: avoid IDR mutation during TX cleanup
Kunwu Chan <kunwu.chan@gmail.com>
rcutorture: Fix divide-by-zero with fwd_progress_div=1
Joonhoe Kim <26rote@gmail.com>
ASoC: codecs: wcd939x: read the SoundWire port switches per channel
bui duc phuc <phucduc.bui@gmail.com>
ASoC: codecs: rt5659: propagate GPIO errors
Sidong Yang <sidong.yang@furiosa.ai>
accel/rocket: Don't tear down the scheduler when drm_sched_init() fails
Roberto Bergantinos Corpas <rbergant@redhat.com>
nfs: set gencount on protocol-specific remove
Haotian Zhang <vulab@iscas.ac.cn>
mtd: rawnand: pl353: fix clk reference leak in pl35x_nfc_setup_interface()
bui duc phuc <phucduc.bui@gmail.com>
power: supply: generic-adc-battery: Propagate charged GPIO errors
Filipe Manana <fdmanana@suse.com>
btrfs: defrag: fix check to see if next extent can be defragged too
Filipe Manana <fdmanana@suse.com>
btrfs: fix lost error return value in btrfs_alloc_logged_file_extent()
Filipe Manana <fdmanana@suse.com>
btrfs: qgroup: fix swapped blocks existence check when tracing after COW
Qu Wenruo <wqu@suse.com>
btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup
Filipe Manana <fdmanana@suse.com>
btrfs: fix off-by-one end offset check in report_setget_bounds()
Filipe Manana <fdmanana@suse.com>
btrfs: fix incomplete iteration over fs state when logging messages
Johannes Thumshirn <johannes.thumshirn@wdc.com>
btrfs: zoned: fix double list add in btrfs_load_block_group_zone_info
Filipe Manana <fdmanana@suse.com>
btrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root()
Filipe Manana <fdmanana@suse.com>
btrfs: fix off by one super block end offset calculation when writing super blocks
Qu Wenruo <wqu@suse.com>
btrfs: refactor read_key_bytes() to remove the dest_folio parameter
Guanghui Yang <3497809730@qq.com>
btrfs: roll back sprout setup after device add failure
Qu Wenruo <wqu@suse.com>
btrfs: update per-profile available estimation
Qu Wenruo <wqu@suse.com>
btrfs: introduce the device layout aware per-profile available space
Qu Wenruo <wqu@suse.com>
btrfs: add extra device item checks at mount
Tal Zussman <tz2294@columbia.edu>
block: don't fall back to buffered I/O for atomic writes
Tal Zussman <tz2294@columbia.edu>
block: honor IOCB_NOWAIT in the block device buffered read path
Tal Zussman <tz2294@columbia.edu>
block: take i_rwsem for the splice read path
Tal Zussman <tz2294@columbia.edu>
block: take i_rwsem for the direct I/O write fallback
Zhenxian Ma <mzx199711@gmail.com>
block: only use REQ_FUA for direct writes if the device supports it
Zhenxian Ma <mzx199711@gmail.com>
block: skip redundant flush for O_DSYNC direct writes
Tal Zussman <tz2294@columbia.edu>
block: use iomap_dirty_folio for block devices
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
drm/rockchip: dw_hdmi_qp: Cancel pending HPD work on suspend
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
drm/rockchip: dw_hdmi_qp: Fix invalid drvdata access in PM ops
Luca Ceresoli <luca.ceresoli@bootlin.com>
drm/rockchip: dw_hdmi_qp: remove now-redundant call to drm_connector_attach_encoder()
Jiale Yao <yaojiale02@163.com>
ACPI: PCI: pci_link: clear driver_data before free
Adrián Larumbe <adrian.larumbe@collabora.com>
drm/panfrost: Explicitly enable MMU interrupts at device init
Ali Ahmet Memiş <aliamemis@disroot.org>
ALSA: control_led: Fix deadlock between sysfs writes and card disconnect
Takashi Iwai <tiwai@suse.de>
ALSA: control: Relax __free() variable declarations
Mikulas Patocka <mpatocka@redhat.com>
dm-snapshot: make the chunk list sorted by the chunk number
Yuan Chen <chenyuan@kylinos.cn>
bpftool: Fix out-of-bounds read in kprobe_multi link info dump
Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
RDMA/mlx5: Cancel software CQ notifications before teardown
Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
RDMA/mlx5: Cancel deferred page-fault EQ work before teardown
Ting-Han Hou <ue081723@gmail.com>
ALSA: virtio: reset I/O message fill level on prepare
Cen Zhang <zzzccc427@gmail.com>
ALSA: timer: Pin the module for userspace timer controllers
Kees Cook <kees@kernel.org>
seq_buf: Do not print an empty line from an overflowed seq_buf_do_printk()
Shuvam Pandey <shuvampandey1@gmail.com>
seq_buf: Export seq_buf_putmem_hex() and add KUnit tests
Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
mailbox: qcom-ipcc: remove stray disable_irq_wake() call
Linkai Gong <gonglinkai@kylinos.cn>
mailbox: arm_mhuv2: time out if the receiver never comes up
Beleswar Padhi <b-padhi@ti.com>
mailbox: ti-msgmgr: Read exact number of trailing message bytes
Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
mailbox: arm_mhu_db: Remove redundant mbox_controller_unregister() on probe failure
Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
mailbox: qcom-ipcc: Remove redundant mbox_controller_unregister() on probe failure
Pan Chuang <panchuang@vivo.com>
mailbox: Remove redundant dev_err()/dev_err_probe()
Breno Leitao <leitao@debian.org>
mailbox: pcc: Free the channel before unmapping the shared memory
Sang-Hoon Choi <csh0052@gmail.com>
xhci: dbc: lock the minor IDR on registration failure
Kumar Kartikeya Dwivedi <memxor@gmail.com>
bpf, riscv: Fix stack-passed arguments for indirect trampolines
Kees Cook <kees@kernel.org>
kbuild: Mark the initcall ordering recipe as recursive
Binglei Wang <l3b2w1@gmail.com>
erofs: fix xattrs handling when metadata compression is used
Matthew Wood <thepacketgeek@gmail.com>
bpf, arm64: Fix racy plt target update in bpf_arch_text_poke()
Maxim Skokov <skokovmaksimevg@gmail.com>
bpf: test_run: Fix false -EBADMSG after skb leaves CHECKSUM_COMPLETE
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Add NULL check for the driver pointer at unsol event work
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Stop unsol event and jack polling at hda-ext device removal, too
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Disable unsol event handling at error and shutdown paths
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Stop unsol events and jack polling before codec unbind
Tony Luck <tony.luck@intel.com>
fs/resctrl: Ensure default group reports tasks on monitor-only systems
Guixin Liu <kanie@linux.alibaba.com>
cxl/pci: Update only the Port GPF timeout fields
Ting-Han Hou <ue081723@gmail.com>
scripts/make_fit: Ignore schema checks when decomposing DTBs
Ting-Han Hou <ue081723@gmail.com>
clang-tools: Import os for broken pipe handling
Leizhen Zhang <lzsx618@gmail.com>
kconfig: fix infinite loop in conf_choice() when no choice value is visible
Jiale Yao <yaojiale02@163.com>
vfio/pci: Drain eventfd RCU callbacks on module exit
Leon Romanovsky <leon@kernel.org>
PCI/P2PDMA: Gate the host bridge whitelist warning on verbose
Leon Romanovsky <leon@kernel.org>
PCI/P2PDMA: Safely terminate ACS redirect lists
Leon Romanovsky <leon@kernel.org>
PCI/P2PDMA: Do not tear down the allocate attribute on registration failure
Leon Romanovsky <leon@kernel.org>
PCI/P2PDMA: Separate the mmap() support from the core logic
Antoni Pokusinski <apokusinski01@gmail.com>
rtc: abx80x: properly handle shared IRQs
Antoni Pokusinski <apokusinski01@gmail.com>
rtc: abx80x: fix error check after i2c_smbus_read in read_alarm()
Leo Cheng <leo-cheng@vip.qq.com>
nvmem: layouts: onie-tlv: fix device_node reference leak in error path
Leo Cheng <leo-cheng@vip.qq.com>
nvmem: layouts: sl28vpd: fix device_node reference leak in error path
Felix Fietkau <nbd@nbd.name>
wifi: mac80211: use link address as TA for non-MLO 4-addr station on MLD AP
Johannes Berg <johannes.berg@intel.com>
wifi: cfg80211: reg: protect regdb pointer with RCU
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: fix mbssid/rnr allocation in beacon data
Aloka Dixit <aloka.dixit@oss.qualcomm.com>
wifi: mac80211: remove redundant null check in ieee80211_assign_beacon()
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: limit injected HT/VHT MCSes
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: init radiotap iter after length checks
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: kill wake_txqs_tasklet on unregistration
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: mesh: use hlist_add_head_rcu()
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: clear fragment cache entry 'is_protected'
Johannes Berg <johannes.berg@intel.com>
wifi: ath6kl: don't take RTNL in del_virtual_intf
Takashi Iwai <tiwai@suse.de>
ALSA: hda: intel: Cancel delayed work at shutdown, too
Takashi Iwai <tiwai@suse.de>
ASoC: fsl_asrc_m2m: Fix bogus compress task pointer assignments
Takashi Iwai <tiwai@suse.de>
ALSA: line6: Fix potential OOB write in line6_capture_copy()
Takashi Iwai <tiwai@suse.de>
ALSA: line6: Reject too small max packet sizes
Takashi Iwai <tiwai@suse.de>
ALSA: usb: us16x08: Fix racy accesses of mixer elements
Takashi Iwai <tiwai@suse.de>
ALSA: usb-audio: Fix data race at mixer_ctl_feature_info()
Takashi Iwai <tiwai@suse.de>
ALSA: caiaq: Fix races at MIDI URB and trigger accesses
Karl Mehltretter <kmehltretter@gmail.com>
gpu: buddy: Drop the stale @p line from the gpu_buddy_print() kernel-doc
Jan Beulich <jbeulich@suse.com>
x86/PVH: don't truncate initrd address/size
Gui-Dong Han <hanguidong02@gmail.com>
xen/blkback: Prevent missed completion when draining I/O
Ruoyu Wang <ruoyuw560@gmail.com>
xen/pcifront: Fix PCI device reference leak in AER handling
Haotian Zhang <vulab@iscas.ac.cn>
cpufreq: qcom-cpufreq-hw: fix device node refcount leak in phandle parsing
Jake Labelle <southampton.jake.labelle@gmail.com>
nilfs2: reject non-regular inodes in dsync recovery
Michał Kopeć <michal@nozomi.space>
ASoC: mediatek: mt8188: Constrain UL8 FE to its back end's capabilities
Michał Kopeć <michal@nozomi.space>
ASoC: mediatek: common: Keep codec references until the card is bound
Rosen Penev <rosenp@gmail.com>
crypto: talitos - init tasklets before requesting IRQs
Rosen Penev <rosenp@gmail.com>
crypto: talitos - Use platform_get_irq() to retrieve interrupt
Rosen Penev <rosenp@gmail.com>
crypto: talitos - use devm_platform_ioremap_resource()
Rosen Penev <rosenp@gmail.com>
crypto: talitos - allocate channels with main struct
George Abraham P <george.abraham.p@intel.com>
crypto: qat - force an edge when re-enabling all VF2PF interrupts
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Don't free card at probe error in vga_switcheroo handler
Takashi Iwai <tiwai@suse.de>
ALSA: hda/intel: Move firmware loading into the probe work
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Avoid non-operational GPU warning at regular device removal
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Use linked list for jack table
Takashi Iwai <tiwai@suse.de>
ALSA: info: Fix memory leak at card removal
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix missing direction and ump_group handling in 32bit compat ioctl
Takashi Iwai <tiwai@suse.de>
ALSA: core: Add missing barriers for power_ref vs card->shutdown
Takashi Iwai <tiwai@suse.de>
ALSA: pcmtest: Fix a bogus pointer read in snd_pcmtst_pcm_pointer()
Takashi Iwai <tiwai@suse.de>
ALSA: usb-audio: Fix invalid UAC2/3 mixer unit matrix evaluation
Takashi Iwai <tiwai@suse.de>
ALSA: usb-audio: Check mixer matrix size for UAC2/3 at parsing
Takashi Iwai <tiwai@suse.de>
ALSA: hda: Fix potential UAF for gating jack
Marek Maslanka <mmaslanka@google.com>
platform/chrome: cros_ec_typec: Poll for role swap completion
Chen-Yu Yeh <chenyou910331@gmail.com>
riscv: dts: sophgo: cv180x: Fix internal ephy node name
Krzysztof Wilczyński <kwilczynski@kernel.org>
PCI/sysfs: Handle a malformed _DSM result in acpi_attr_is_visible()
Krzysztof Wilczyński <kwilczynski@kernel.org>
PCI/sysfs: Stop reporting _DSM failures as -EPERM
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8365: Handle constraint return value in FE startup
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8188: Handle constraint return value in FE startup
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: common: Handle constraint return value in FE startup
Melissa Wen <mwen@igalia.com>
drm/amd/display: copy function name into dcn_optc_lock_unlock_state trace event
Melissa Wen <mwen@igalia.com>
drm/amd/display: copy function name into dcn_fpu trace event
Melissa Wen <mwen@igalia.com>
drm/amd/display: use right type for amdgpu_dc_performance event entries
Melissa Wen <mwen@igalia.com>
drm/amd/display: fix vready offset assignment in dcn_optc_lock_unlock_state
Melissa Wen <mwen@igalia.com>
drm/amd/display: remove duplicated prev_p_state_change_support assignment
Melissa Wen <mwen@igalia.com>
drm/amd/display: assign missing trace entry in amdgpu_dm_dc_clocks_state
Shenghao Ding <shenghao-ding@ti.com>
ASoC: tas2781: Fix TAS2781/TAS5825 PPC version logic conflict
Wentao Liang <vulab@iscas.ac.cn>
clocksource/drivers/timer-econet-en751221: Fix clock reference leak
Ting-Han Hou <ue081723@gmail.com>
checkkconfigsymbols.py: Parse Git status output line by line
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt792x: compute the assoc RSSI from the chain signals
Felix Fietkau <nbd@nbd.name>
wifi: mt76: report an aborted scan or ROC to mac80211 during a reset
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: refuse scan and ROC until the hardware restart is done
Karl Mehltretter <kmehltretter@gmail.com>
kobject: Fix the kobj_set_name reference in kset_register() kernel-doc
bui duc phuc <phucduc.bui@gmail.com>
ASoC: rockchip: rockchip_i2s: Handle runtime PM resume failures in set_fmt
bui duc phuc <phucduc.bui@gmail.com>
ASoC: rockchip: rockchip_sai: Handle runtime PM resume failures in set_fmt
John Crispin <john@phrozen.org>
wifi: mt76: mt7996: disable the RX NAPIs before the DMA cleanup
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: fix the hw-queues debugfs queue requests
Lorenzo Bianconi <lorenzo@kernel.org>
wifi: mt76: mt7996: Remove unnecessary phy filed in mt7996_vif_link struct
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: fix PLE free page and AC queue register offsets
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: clear all link wcid entries in sta_pre_rcu_remove
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: report station statistics from the primary link
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: upload only the keys of the link being set up
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: set sniffer mode on a radio that is already running
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: enable the SKU power limit table
Felix Fietkau <nbd@nbd.name>
wifi: mt76: abort a scan only for a link change on the scanning radio
Cristian Papa <pcristian292@gmail.com>
wifi: mt76: feed the station RSSI average from the chain signals
Slavin Liu <bolin.liu@seu.edu.cn>
wifi: mt76: mt7996: guard station-only MLO TX handling
Pengpeng Hou <pengpeng@iscas.ac.cn>
wifi: mt76: mt7615: validate MCU response lengths
Ahmed Naseef <naseefkm@gmail.com>
wifi: mt76: mt7615: read MT7663 temperature from the correct offset
Ryan Leung <untilscour@protonmail.com>
wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()
Aamir Ahmed <elb12345@hotmail.co.uk>
wifi: mt76: mt7996: validate TLV length in mt7996_mcu_ie_countdown()
Shayne Chen <shayne.chen@mediatek.com>
wifi: mt76: mt7996: extend CSA and CCA support for MLO
Cristian Papa <pcristian292@gmail.com>
wifi: mt76: mt7603: don't drop short frames looped back on PS entry
Jiale Yao <yaojiale02@163.com>
wifi: mt76: mt7615: usb: fix source overread in mt7663u_copy
Jiale Yao <yaojiale02@163.com>
wifi: mt76: usb: fix source overread in mt76u_copy
Mark Anthony Agarro <markanthonyagarro@gmail.com>
wifi: mt76: mt7925: keep the join ROC until the station is authorized
Mark Anthony Agarro <markanthonyagarro@gmail.com>
wifi: mt76: mt7921: keep the join ROC until the station is authorized
Jiale Yao <yaojiale02@163.com>
wifi: mt76: mt76x02: validate RX padding before use
Ryan Leung <untilscour@protonmail.com>
wifi: mt76: fix wcid teardown ordering in mt76_reset_device()
Ryan Leung <untilscour@protonmail.com>
wifi: mt76: fix unlocked wcid check in mt76_tx_status_skb_add()
Ryan Leung <untilscour@protonmail.com>
wifi: mt76: mt7915: publish wcid before MCU add commands
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7921: honour FIF_FCSFAIL instead of hardcoding drop_err
Mark Anthony Agarro <markanthonyagarro@gmail.com>
wifi: mt76: mt7925: honour mac80211's FIF_FCSFAIL instead of hardcoding drop_err
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7925: fix the lock inversion in suspend and resume
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7921: fix the lock inversion in suspend and resume
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7925: restore the reset state when fw_pmctrl fails
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7925: check drv_pmctrl return in the PCIe reset path
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7921: check drv_pmctrl return in the PCIe reset path
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7925: fix lock inversion between dev->mutex and iflist_mtx
Devin Wittmayer <lucid_duck@justthetip.ca>
wifi: mt76: mt7921: fix lock inversion between dev->mutex and iflist_mtx
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: bound RRO session id before indexing addr_elem[]
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7915: guard firmware memory dump write on disabled memdump
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7915: unregister thermal cooling device on hwmon failure
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7996: validate firmware event lengths before parsing
Felix Fietkau <nbd@nbd.name>
wifi: mt76: mt7915: check default EEPROM firmware size before copying
Felix Fietkau <nbd@nbd.name>
wifi: mt76: clear offchannel state if a scan has no channel to restore
Felix Fietkau <nbd@nbd.name>
wifi: mt76: set MT76_SCANNING when starting a hw scan
Felix Fietkau <nbd@nbd.name>
wifi: mt76: send nullfunc PS frames on offchannel transitions
Felix Fietkau <nbd@nbd.name>
wifi: mt76: optimize ROC for same-channel case
Felix Fietkau <nbd@nbd.name>
wifi: mt76: check chanctx before restoring channel after ROC
Felix Fietkau <nbd@nbd.name>
wifi: mt76: add offchannel check to mt76_roc_complete
Felix Fietkau <nbd@nbd.name>
wifi: mt76: check the owner of a remain-on-channel request
Jiale Yao <yaojiale02@163.com>
pinctrl: sprd: free maps on DT map failure
Leizhen Zhang <lzsx618@gmail.com>
gen_init_cpio: stop parsing on lines with a missing argument list
Michael Petlan <mpetlan@redhat.com>
perf test attr: Propagate the return value from the test to the wrapper
Takashi Iwai <tiwai@suse.de>
ALSA: caiaq: Allow zero-length packet handling for EP1
Priyank Rathod <rathodpriyank@google.com>
PCI/AER: Fix struct pci_dev reference leak in aer_process_err_devices()
Joseph Qi <joseph.qi@linux.alibaba.com>
ocfs2: reject inconsistent xattr bucket during defrag
Andrei Vagin <avagin@google.com>
proc: report SIGEV_NONE in /proc/pid/timers if target task has died
Wilson Felipe Pereira <wfelipe@google.com>
init/main: fix false-positive kernel panic on environment variable overwrite
Wilson Felipe Pereira <wfelipe@google.com>
init/main: fix off-by-one in argv_init cleanup
Florian Schmaus <florian.schmaus@codasip.com>
selftests/epoll: fix race condition in multi-waiter wakeup tests
Joseph Qi <joseph.qi@linux.alibaba.com>
ocfs2: fix deadlock in inline-data truncate transactions
Petr Vorel <pvorel@suse.cz>
checkpatch: skip CamelCase cache for --no-tree without root
Wilson Felipe Pereira <wfelipe@google.com>
selftests/cgroup: test_zswap: fix implicit unsigned promotion bug in test_no_kmem_bypass
Li Wang <li.wang@linux.dev>
selftests/cgroup: replace hardcoded page size values in test_zswap
Li Wang <li.wang@linux.dev>
selftests/cgroup: use runtime page size for zswpin check
Li Wang <li.wang@linux.dev>
selftests/cgroup: avoid OOM in test_swapin_nozswap
Li Wang <li.wang@linux.dev>
selftests/cgroup: skip test_zswap if zswap is globally disabled
Jiayuan Chen <jiayuan.chen@shopee.com>
selftests/cgroup: add test for zswap incompressible pages
Guopeng Zhang <zhangguopeng@kylinos.cn>
selftests/cgroup: conform test to KTAP format output
Karl Mehltretter <kmehltretter@gmail.com>
rcuref: Fix the rcuread_is_dead reference in rcuref_read() kernel-doc
Ryusuke Konishi <konishi.ryusuke@gmail.com>
nilfs2: fix link count underflow when removing corrupted directory
Georgios Androutsopoulos <georgeandrout13@gmail.com>
rust: bitmap: document panics in `next_bit` and `next_zero_bit`
Georgios Androutsopoulos <georgeandrout13@gmail.com>
rust: id_pool: document panics in `find_unused_id` and `release_id`
Roberto Bergantinos Corpas <rbergant@redhat.com>
NFS: return DENIED in decode_lock_denied if we cannot decode owner
Marc Kleine-Budde <mkl@pengutronix.de>
spi: spi-sun4i: sun4i_spi_handler(): fix race condition between transfer completion and RX FIFO interrupt
Marc Kleine-Budde <mkl@pengutronix.de>
spi: spi-sun4i: sun4i_spi_transfer_one(): fix setting of clock rate
Marc Kleine-Budde <mkl@pengutronix.de>
spi: spi-sun4i: sun4i_spi_fill_fifo(): always apply A10 FIFO fill level workaround
Marc Kleine-Budde <mkl@pengutronix.de>
spi: spi-sun4i: sun4i_spi_transfer_one(): fix transfers for SUN4I_FIFO_DEPTH
Daniel Drake <dan@reactivated.net>
drm/vc4: Set DRM DMA device directly from HVS and V3D
Maíra Canal <mcanal@igalia.com>
drm/vc4: Drop the undocumented brcm,vc4-v3d compatible
Linus Walleij <linusw@kernel.org>
dt-bindings: dma: dma40: Restore disabled-channels
Jason Gunthorpe <jgg@ziepe.ca>
efi/libstub: Free cmdline_ptr in efi_pe_entry
Vincent Mailhol <mailhol@kernel.org>
efi/libstub: make local GUID variables static
Jason Gunthorpe <jgg@ziepe.ca>
efi/riscv: libstub: Don't set image_size in handle_kernel_image()
Jason Gunthorpe <jgg@ziepe.ca>
efi/libstub: Fix error unwind freeing fdt in allocate_new_fdt_and_exit_boot()
Pengpeng Hou <pengpeng@iscas.ac.cn>
sh: defconfig: Enable the current M66592 UDC symbol
Florian Fuchs <fuchsfl@gmail.com>
sh: uaccess: Require offsettable operands for 64-bit user access
Florian Fuchs <fuchsfl@gmail.com>
sh: Fix built-in DTB build with generic rule
Aurelien Jarno <aurelien@aurel32.net>
riscv: fix RVG_SYSTEM_CSR_MASK width mask
Daniel Zahka <daniel.zahka@gmail.com>
selftests: drv-net: psp: test that rx-assoc fails on closed and listen socks
Daniel Zahka <daniel.zahka@gmail.com>
net: psp: drop psp assoc clear in sk_clone()
Daniel Zahka <daniel.zahka@gmail.com>
net: psp: require an established connection for association setup
Eric Dumazet <edumazet@google.com>
tcp: populate inet->cork.fl.u.ip6 in tcp_v6_connect()
Eric Dumazet <edumazet@google.com>
ipv6: add daddr/final storage in struct ipv6_pinfo
Daniel Zahka <daniel.zahka@gmail.com>
selftests: drv-net: psp: swap closed for connected sockets in assoc tests
Eric Dumazet <edumazet@kernel.org>
ipv4: reserve one IP ID per segment for UDP GSO packets
Eric Dumazet <edumazet@kernel.org>
ipv4: fix IP ID reuse in ip_select_ident_segs()
Chen-Yu Tsai <wens@kernel.org>
arm64: dts: allwinner: sun50i-h6: Add missing IOMMU for video engine
Chen-Yu Tsai <wens@kernel.org>
arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine
Mike Snitzer <snitzer@kernel.org>
pNFS/flexfiles: don't reset to MDS for v4 error when previous layout forbid it
Mike Snitzer <snitzer@kernel.org>
pNFS/flexfiles: don't read through MDS when previous layout forbid it
Mike Snitzer <snitzer@kernel.org>
pNFS/flexfiles: honor FF_FLAGS_NO_IO_THRU_MDS over the mdsthreshold hint
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Validate memcpy configuration
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Validate fixed physical channel indexes
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix V4B event group mapping
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix event group bounds
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix logical channel bounds check
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Reject direction changes after allocation
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Validate DMA specifier length
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Validate disabled channel indexes
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix memcpy channel parsing
Rosen Penev <rosenp@gmail.com>
dmaengine: ste_dma40: turn d40_base phy_chans into a flexible array
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Put the LCPA SRAM node
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix probe LCLA free
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix LCLA allocation order
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix DMA registration unwind
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix probe IRQ leak
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Init hardware before registration
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Return IRQ_NONE when no interrupt is pending
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Handle runtime PM resume errors
Sakari Ailus <sakari.ailus@linux.intel.com>
dmaengine: ste_dma40: Remove redundant pm_runtime_mark_last_busy() calls
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Check runtime PM in IRQ
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix probe runtime PM disable
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix failed start cleanup
Linus Walleij <linusw@kernel.org>
dmaengine: ste_dma40: Fix physical cyclic capability
Roman Demidov <roman.demidov.nn@gmail.com>
drm/msm/a6xx: check pm_runtime_resume_and_get during resume
Jie Zhang <quic_jiezh@quicinc.com>
drm/msm/a6xx: Add support for Adreno 612
Roman Demidov <roman.demidov.nn@gmail.com>
drm/msm/a6xx: fix use-after-free of OPP in a6xx_pm_resume
Jiale Yao <yaojiale02@163.com>
wifi: ath12k: Reserve space for a string terminator
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
wifi: ath11k: fix unbalanced IRQ enable/disable during suspend/resume
Guangshuo Li <lgs201920130244@gmail.com>
floppy: unregister platform device on add_disk failure
Yang Xiuwei <yangxiuwei@kylinos.cn>
floppy: avoid NULL deref in reset_interrupt when cont is cleared
Karl Mehltretter <kmehltretter@gmail.com>
floppy: flush pending work before releasing resources on init failure
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
NFS: filelayout: calculate dense stripe width in 64 bits
Chuck Lever <chuck.lever@oracle.com>
SUNRPC: treat every client-side TLS error alert as fatal
Chuck Lever <chuck.lever@oracle.com>
SUNRPC: reject a client-side TLS alert record that is not two octets
Logan Gunthorpe <logang@deltatee.com>
dmaengine: plx_dma: fix NULL pointer deref in plx_dma_isr()
Logan Gunthorpe <logang@deltatee.com>
dmaengine: ioat: disable relaxed ordering before registering the device
Aloka Dixit <aloka.dixit@oss.qualcomm.com>
Revert "wifi: mac80211: do not use old MBSSID elements"
Dan Carpenter <error27@gmail.com>
wifi: carl9170: NUL terminate string in debugfs
Dan Carpenter <error27@gmail.com>
wifi: b43legacy: debugfs: NUL terminate string in debugfs
Dan Carpenter <error27@gmail.com>
wifi: b43: don't pass unterminated string to sscanf()
Dominic White <github@singe.za.net>
wifi: cfg80211: allow zero HE OBSS PD offsets
Karl Mehltretter <kmehltretter@gmail.com>
ASoC: codecs: es8375: use devm_clk_get_optional() for mclk
Yibo Tan <lhfff@tju.edu.cn>
soc: qcom: pmic_pdcharger_ulog: prevent work requeue during remove
Neil Armstrong <neil.armstrong@linaro.org>
soc: qcom: geni-se: provide PROG_RAM_DEPTH for I2C HUB Serial Engines
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
soc: qcom: pmic_glink: Avoid losing early rpmsg probe
Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
firmware: qcom: tzmem: Use DO_ONCE_SLEEPABLE() in qcom_tzmem_enable()
Joonhoe Kim <26rote@gmail.com>
drm/msm/dpu: round up the compressed INTF width
Xueqin Luo <luoxueqin@kylinos.cn>
cpufreq: sti: avoid NULL dereference in dev_err()
Xueqin Luo <luoxueqin@kylinos.cn>
cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv
Xueqin Luo <luoxueqin@kylinos.cn>
cpufreq: sparc-us2e: fix frequency table index copy-paste error
Karl Mehltretter <kmehltretter@gmail.com>
svcrdma: Fix svc_rdma_recv_cid_init() kernel-doc
hpp.iscas <hppiscas@163.com>
perf/marvell: cn10k_tad: Publish the OF module alias
Hongyan Xu <getshell@seu.edu.cn>
ASoC: mt6359-accdet: manage private workqueues with devres
Yaozhong Li <yaozhonguwl@gmail.com>
arm64: dts: rockchip: disable unused i2s0 on rk3399-firefly
Yaozhong Li <yaozhonguwl@gmail.com>
arm64: dts: rockchip: fix analog headphone output on rk3399-firefly
Joachim Eastwood <joachim.eastwood@gmail.com>
arm64: dts: rockchip: fix missing pcie rst pinctrl on rk3588s-nanopi-r6
Joachim Eastwood <joachim.eastwood@gmail.com>
arm64: dts: rockchip: fix missing sdmmc cd pinctrl on rk3588s-nanopi-r6
Detlev Casanova <detlev.casanova@collabora.com>
arm64: dts: rockchip: Rename rk3588 HDMI audio cards
Detlev Casanova <detlev.casanova@collabora.com>
arm64: dts: rockchip: Rename rk3576 HDMI audio card
Detlev Casanova <detlev.casanova@collabora.com>
arm64: dts: rockchip: Rename rk3566 and rk3568 HDMI audio cards
Linus Walleij <linusw@kernel.org>
ARM: dts: ux500: Use AB8505 charger compatible
Detlev Casanova <detlev.casanova@collabora.com>
arm64: dts: rockchip: Rename rk3328 HDMI audio card
Jiale Yao <yaojiale02@163.com>
ASoC: rt722-sdca: always cancel jack work on remove
Jiale Yao <yaojiale02@163.com>
ASoC: rt721-sdca: always cancel jack work on remove
Jiale Yao <yaojiale02@163.com>
ASoC: rt712-sdca: always cancel jack work on remove
Jiale Yao <yaojiale02@163.com>
ASoC: rt711-sdca: always cancel jack work on remove
Jiale Yao <yaojiale02@163.com>
ASoC: rt711-sdw: always cancel jack work on remove
Jiale Yao <yaojiale02@163.com>
ASoC: rt5682-sdw: always cancel jack work on remove
Marco Giunta <marco_giunta@outlook.it>
ASoC: aw88399: skip BSTS check when boost converter is bypassed
Marco Giunta <marco_giunta@outlook.it>
ASoC: aw88399: add per-instance BSTS status bypass flag
Marco Giunta <marco_giunta@outlook.it>
ASoC: aw88399: extract shared device library
Weidong Wang <wangweidong.a@awinic.com>
ASoC: codecs: Modify awinic amplifier dsp read and write functions
Marco Crivellari <marco.crivellari@suse.com>
ASoC: replace use of system_wq with system_dfl_wq
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_fg: Avoid reserved AB8505 CCConf bit
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_fg: Finalize current measurements
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Recover inactive AB8505 charger
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Retry AB8505 USB detection
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Skip absent AB8505 main charger
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Handle detection errors
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Respect AB8505 register layout
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Decode AB8505 USB status
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_charger: Fix AC charger re-enable
Linus Walleij <linusw@kernel.org>
power: supply: ab8500: Preserve battery termination current
Linus Walleij <linusw@kernel.org>
power: supply: ab8500_btemp: Fix event temperature reporting
HyeongJun An <sammiee5311@gmail.com>
selftests/alsa: Do not take another control's event as our own
Guangshuo Li <lgs201920130244@gmail.com>
spi: bcm63xx-hsspi: Disable runtime PM on remove
Guangshuo Li <lgs201920130244@gmail.com>
spi: fsl: unmap immr_spi_cs on remove
Johan Hovold <johan@kernel.org>
spi: fsl: switch to managed controller allocation
Ruoyu Wang <ruoyuw560@gmail.com>
perf/dwc_pcie: Fix PCI device reference leak in probe
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Clear stale overflow status before using a counter
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Don't log through pmu.dev in the overflow interrupt handler
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Validate the hardware-reported counter width
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Unfreeze counters after handling an overflow interrupt
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Don't share the overflow interrupt, and keep it pinned
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Accept an overflow interrupt on MSI message number 0
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Fix the counter overflow delta fixup
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Clear stale event fields before reprogramming a counter
Dave Jiang <dave.jiang@intel.com>
perf/cxl: Program the requested event group on configurable counters
Alexey Charkov <alchark@flipper.net>
power: supply: bq257xx: Use psy directly instead of driver data
Jan Stancek <jstancek@redhat.com>
.gitignore: drop Module.markers
Liviu Nicoara <lnicoara@thinkoid.org>
power: supply: qcom_battmgr: Report capacity on X1E80100
Linus Walleij <linusw@kernel.org>
dt-bindings: power: supply: ab8500: Add AB8505 charger
Zhihao Cheng <chengzhihao1@huawei.com>
md: Fix the null-ptr-deref of 'mddev->private' while submitting IO
Ryan Brue <ryanbrue.dev@gmail.com>
power: supply: bq24190_charger: don't reset registers across system suspend
Chen-Yu Tsai <wens@kernel.org>
dt-bindings: media: sun4i-a10-video-engine: Fix IOMMU count for H6
Sang-Hoon Choi <csh0052@gmail.com>
md/raid5: protect big_stripe_tree lookup with RCU
Linkai Gong <gonglinkai@kylinos.cn>
clk: imx: composite-93: return timeout from gate enable
Li Youhong <liyouhong@kylinos.cn>
md/raid5: drain released_stripes before destroying the cache
Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
md: take reconfig_mutex when enabling PPL on an inactive array
Aristo Chen <aristo.chen@canonical.com>
phy: freescale: fsl-samsung-hdmi: initialize default rate
Shawn Lin <shawn.lin@rock-chips.com>
phy: rockchip: naneng-combphy: Fix TX detect RX termination errata
Jason Yang <jason98166@gmail.com>
phy: rockchip-samsung-dcphy: Enable runtime PM at PHY core level
Laurence Oberman <loberman@redhat.com>
scsi: st: Record the tape position after a successful MTLOAD
Laurence Oberman <loberman@redhat.com>
scsi: st: Restore changed drive settings after reset also for MTLOAD and MTRETEN
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Validate the access parameters of WRITE ATOMIC (16)
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Map the region written by WRITE ATOMIC (16)
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Refuse a short WRITE ATOMIC (16) before writing it
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Advance the write pointer over the data written
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Avoid 32-bit overflow in WRITE SCATTERED offsets
John Garry <john.g.garry@oracle.com>
scsi: scsi_debug: Stop printing extra function name in debug logs
Bart Van Assche <bvanassche@acm.org>
scsi: scsi_debug: Abort SCSI commands via an internal command
Hannes Reinecke <hare@suse.de>
scsi: core: Add scsi_{get,put}_internal_cmd() helpers
John Garry <john.g.garry@oracle.com>
scsi: core: Introduce .queue_reserved_command()
Hannes Reinecke <hare@suse.de>
scsi: core: Support allocating a pseudo SCSI device
Bart Van Assche <bvanassche@acm.org>
scsi: core: Move two statements
Hannes Reinecke <hare@suse.de>
scsi: core: Support allocating reserved commands
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Take the zone metadata lock before the data lock
Niklas Cassel <cassel@kernel.org>
scsi: scsi_debug: Refuse a negative physblk_exp
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Only enable USB3 when not in high-speed mode
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Handle rk_udphy_reset_deassert errors
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Avoid xHCI SErrors
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Rename mode_change to phy_needs_reinit
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Hold mutex in DP PHY configure
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Properly handle TYPEC_STATE_SAFE and TYPEC_STATE_USB
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Drop DP HPD handling
Zhang Yubing <yubing.zhang@rock-chips.com>
phy: rockchip: usbdp: Support single-lane DP
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Add missing mode_change update
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Limit DP lane count to muxed lanes
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Drop seamless DP takeover
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Handle missing clock-names DT property gracefully
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Fix devm_clk_bulk_get_all check
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Do not lose USB3 PHY status
Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: usbdp: Update mode_change after error handling
Akash Sukhavasi <akash.sukhavasi@gmail.com>
phy: HiSilicon: Fix error handling in hi3670_pcie_allclk_ctrl()
Yeoreum Yun <yeoreum.yun@arm.com>
coresight: etm3x: fix inconsistencies with sysfs configuration
Yeoreum Yun <yeoreum.yun@arm.com>
coresight: etm3x: Prohibit modifying cntr_val while session is enabled
Leo Yan <leo.yan@arm.com>
coresight: etm3x: Set active path on target CPU
Leo Yan <leo.yan@arm.com>
coresight: Take hotplug lock in enable_source_store() for Sysfs mode
Joonhoe Kim <26rote@gmail.com>
drm/msm/dpu: compute the CRTC bandwidth from the state being checked
Joonhoe Kim <26rote@gmail.com>
drm/msm/dpu: disable the slave encoder before the master
Oleg Keri <okerixx@gmail.com>
drm/msm/dp: don't report link training success after a reinit
Yuho Choi <dbgh9129@gmail.com>
soc/tegra: flowctrl: Release OF node reference on error
Igor Velkov <iav@iav.lv>
arm64: dts: amlogic: meson-sm1-odroid-hc4: run the SPI NOR at 40 MHz
Igor Velkov <iav@iav.lv>
arm64: dts: amlogic: meson-sm1-odroid-hc4: mux the SPI NOR HOLD# and WP# pins
Hal Feng <hal.feng@starfivetech.com>
riscv: dts: starfive: Correct pwm nodes
Hal Feng <hal.feng@starfivetech.com>
riscv: dts: starfive: Add common board dtsi for VisionFive 2 Lite variants
James Clark <james.clark@linaro.org>
perf python: Track linked libraries as extension dependencies
Ian Rogers <irogers@google.com>
perf python: Clean up and restructure setup.py
Ian Rogers <irogers@google.com>
perf python: Add perf.pyi stubs file
Jens Remus <jremus@linux.ibm.com>
perf build: Do not duplicate CFLAGS in Python extension builds
Jens Remus <jremus@linux.ibm.com>
perf build: Respect V=1 for Python extension builds
Ian Rogers <irogers@google.com>
perf build python: Don't leave a.out file when building with clang
Mostafa Saleh <smostafa@google.com>
iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()
Mostafa Saleh <smostafa@google.com>
iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs
Yuri Zaporozhets <yuriz@vodafonemail.de>
ASoC: dwc: Use OF match data again for StarFive JH7110
Matthias Goergens <matthias.goergens@gmail.com>
isofs: return long Joliet names whole
Jennifer Berringer <jberring@redhat.com>
riscv: dts: spacemit: set console baud rate on OrangePi RV2
Slavin Liu <bolin.liu@seu.edu.cn>
clocksource/drivers/dbx500-prcmu: Check timer register mapping
Thorsten Blum <blum@kernel.org>
hwrng: intel - return -ENOMEM when ioremap() fails
Takashi Iwai <tiwai@suse.de>
ALSA: ump: Avoid dereference with max_src_size=0
Liu Dalin <liudalin@kylinsec.com.cn>
rtc: ftrtc010: fix integer overflow in time calculation
Thorsten Blum <blum@kernel.org>
hwrng: intel - return -ENOMEM when kmalloc_obj() fails
Herbert Xu <herbert@gondor.apana.org.au>
crypto: tcrypt - Avoid reading req->base after submission
Karl Mehltretter <kmehltretter@gmail.com>
crypto: atmel - handle authenc requests without plaintext
Bartosz Szpila <bszpila@google.com>
platform/chrome: cros_ec_typec: Validate SVID and mode counts in discovery data
Hemanth Selam <hemanth.selam@gmail.com>
nvdimm/pmem: Release gendisk on probe failure
Alexander Duyck <alexanderduyck@fb.com>
fbnic: Rework the BMC state pulled from the capabilities message
Daniel Zahka <daniel.zahka@gmail.com>
eth: fbnic: take netif_addr_lock_bh() around rx mode address programming
Stanislav Fomichev <sdf.kernel@gmail.com>
fbnic: convert to ndo_set_rx_mode_async
Stanislav Fomichev <sdf.kernel@gmail.com>
net: introduce ndo_set_rx_mode_async and netdev_rx_mode_work
Stanislav Fomichev <sdf.kernel@gmail.com>
net: add address list snapshot and reconciliation infrastructure
Kris Pan <kris.pan@intel.com>
net: iterate online nodes in skb_defer_free_flush()
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: var-som-am62p: Fix wkup R5F memory region size
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: k3-am62p5-sk: Fix wkup R5F memory region size
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: k3-am62p-verdin: Fix wkup R5F memory region size
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: k3-am62a7-sk: Fix wkup R5F memory region size
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: k3-am62d2-evm: Fix wkup R5F memory region size
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: k3-am62a-phycore-som: Fix wkup R5F memory region size
Mikko Perttunen <mperttunen@nvidia.com>
drm/tegra: Drop reference on postfence
Mikko Perttunen <mperttunen@nvidia.com>
drm/tegra: Don't pass an ERR_PTR to drm_syncobj_replace_fence()
Mikko Perttunen <mperttunen@nvidia.com>
drm/tegra: Fix syncobj_in wait return value check
Chuanhong Guo <gch981213@gmail.com>
pinctrl: mediatek: mt7629: fix the 2.4 GHz Wi-Fi pin mode array
Mario Limonciello <mario.limonciello@amd.com>
cpufreq: amd-pstate: Propagate cppc_set_auto_sel() errors on mode change
Mario Limonciello <mario.limonciello@amd.com>
cpufreq: amd-pstate: Restore previous mode when changing driver mode fails
Jesse Zhang <Jesse.Zhang@amd.com>
drm/amdgpu/userq: fix reading the WPTR at a non-zero BO offset
Sunil Khatri <sunil.khatri@amd.com>
drm/amdgpu/userq: use drm_exec in amdgpu_userq_fence_read_wptr
David (Ming Qiang) Wu <David.Wu3@amd.com>
drm/amdgpu/userq: need to unref bo
Ian Rogers <irogers@google.com>
perf thread_map: Add thread_map__tgid()
Ian Rogers <irogers@google.com>
perf trace: Copy sockaddr arguments by their length
Danish Khateeb <danishkhateeb03@gmail.com>
pps: generators: wake up PPS_GEN_FETCHEVENT readers on unregister
Shuming Fan <shumingf@realtek.com>
ASoC: rt712: avoid duplicate reset in io_init
Yichong Chen <chenyichong@uniontech.com>
debugfs: make debugfs_create_str() read-only
Runyu Xiao <runyu.xiao@seu.edu.cn>
mei: vsc-tp: initialize IRQ state before requesting interrupt
Ruoyu Wang <ruoyuw560@gmail.com>
misc: nsm: fix CBOR short-length decoding
Jasper Wise <jaspwise@amazon.co.uk>
misc: nsm: mark device ready before registering the hwrng and misc device
Linkai Gong <gonglinkai@kylinos.cn>
misc: enclosure: fix UAF on device_register() failure
Sechang Lim <rhkrqnwk98@gmail.com>
sched: Set TIF_NEED_RESCHED before calling __trace_set_need_resched()
Omar Ramadan <omar@blockcast.net>
amt: pull the AMT header behind the transport header in amt_parse_type()
Yuya Kusakabe <yuya.kusakabe@gmail.com>
seg6: fix HMAC validation when an extension header precedes the SRH
Mateusz Nowicki <mateusz.nowicki@posteo.net>
arm64: dts: st: fix sai3b unit address on stm32mp231
Mateusz Nowicki <mateusz.nowicki@posteo.net>
arm64: dts: st: fix sai3b unit address on stm32mp251
Danish Khateeb <danishkhateeb03@gmail.com>
serial: 8250: Fix section mismatch with CONFIG_MODULES=n
Weigang He <geoffreyhe2@gmail.com>
ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus()
Weigang He <geoffreyhe2@gmail.com>
ARM: vexpress: fix device_node refcount leak in vexpress_flags_set()
Liu Dalin <liudalin@kylinsec.com.cn>
rtc: ftrtc010: use devm clock APIs to fix use-after-disable in remove
Liu Dalin <liudalin@kylinsec.com.cn>
rtc: ftrtc010: fix clock resource leak on probe failure
Ze Huang <ze.huang@oss.qualcomm.com>
drm/imx/lcdc: avoid duplicate clk_per enable
Karl Mehltretter <kmehltretter@gmail.com>
OPP: Fix the return value in dev_pm_opp_get_of_node() kernel-doc
Lucas Costa <2000.costalucas@gmail.com>
staging: sm750fb: free cmap on framebuffer release
Xilin Wu <sophon@radxa.com>
drm/msm/dp: Initialize the debugfs connector pointer
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drm/msm/mdp5: drop cursor pipe for msm8x76
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
dt-bindings: display/msm: hdmi: Correct name of disallowed supplies
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
drm/msm: Properly handle msm_ioremap() without name
Alexandra Winter <wintera@linux.ibm.com>
s390/ism: Zerorize dmb at allocation
Przemek Kitszel <przemyslaw.kitszel@intel.com>
ice: skip stats handling for channel VSIs on rebuild
Qingfang Deng <qingfang.deng@linux.dev>
ARM: mvebu: fix Cortex-A9 errata selection for Armada 38x
Matthias Goergens <matthias.goergens@gmail.com>
x86/hibernate: Ignore page-zero RAM in E820 checksum
Nicolo Giuliani <nicolo.giuliani6@studio.unibo.it>
dt-bindings: vendor-prefixes: Add Sophos
Danish Khateeb <danishkhateeb03@gmail.com>
tools/nolibc: check for overflow in malloc()
Danish Khateeb <danishkhateeb03@gmail.com>
tools/nolibc: stop rounding malloc() sizes up to 4096 bytes
Leo Yan <leo.yan@arm.com>
perf build: Build the Python extension before pylint consumers
Michal Pluta <michalpl2003@gmail.com>
perf symbol: Don't return an unterminated Rust demangle buffer
Michal Pluta <michalpl2003@gmail.com>
perf test demangle: Fail when demangling fails
Arnd Bergmann <arnd@arndb.de>
f2fs: quota: fix unused-label warning
Gabor Juhos <j4g8y7@gmail.com>
spi: spi-qpic-snand: set 'qpic_version2' flag
Andreas Kemnade <andreas@kemnade.info>
rtc: bd70528: properly enable wakeup
Nguyễn Văn Cao Nguyên <nguyennvc@greennode.ai>
RDMA/irdma: Do not move a fresh RoCE QP to ERROR on RESET
Nicolas Schier <n.schier@fritz.com>
kconfig: tests: Provide defconfig outfile for savedefconfig
Wentao Liang <vulab@iscas.ac.cn>
pinctrl: stm32: Fix clock reference leak in stm32_pctl_probe()
Wentao Liang <vulab@iscas.ac.cn>
pinctrl: nuvoton: Fix clock reference leak in ma35_get_bank_data()
Hongyan Xu <getshell@seu.edu.cn>
RDMA/hfi1: quiesce SDMA asynchronous cleanup on exit
Hongyan Xu <getshell@seu.edu.cn>
RDMA/hfi1: shut down the trap timer before unregistering
Serhat Kumral <serhatkumral1@gmail.com>
RDMA/siw: Fix length of first chunk in siw_try_1seg()
Quanye Yang <quanyeyang@proton.me>
RDMA/rtrs-clt: Validate peer-supplied IO completion msg_id
Alireza Haghdoost <haghdoost@uber.com>
perf symbols: Don't let a module's last symbol overlap the next module
Qingshuang Fu <fuqingshuang@kylinos.cn>
selftests/timers: clocksource-switch: Fix unchecked open()/read()
Abdifatah Suruur <suruurism@gmail.com>
vfio/cdx: prevent read-only region mappings from becoming writable
Abdifatah Suruur <suruurism@gmail.com>
vfio/fsl-mc: prevent read-only region mappings from becoming writable
Abdifatah Suruur <suruurism@gmail.com>
vfio/platform: prevent read-only region mappings from becoming writable
Quanye Yang <quanyeyang@proton.me>
RDMA/rtrs-clt: Don't WARN on unexpected info-response opcode
Karl Mehltretter <kmehltretter@gmail.com>
time: Prevent time64_to_tm() day truncation on 32-bit
Jiale Yao <yaojiale02@163.com>
RDMA/cxgb4: Do not allow userspace to write the status page
Jiale Yao <yaojiale02@163.com>
RDMA/mlx4: Do not allow the user to write to the clock page
Jiale Yao <yaojiale02@163.com>
RDMA/mad: Reject receive completions shorter than GRH
Ian Rogers <irogers@google.com>
perf pmu: Fix race with concurrent tracepoint creation and removal in perf list
Ian Rogers <irogers@google.com>
perf python: Initialize debug output on module load
Abhijit Gangurde <abhijit.gangurde@amd.com>
RDMA/ionic: Fix double removal of CMB mmap entries in create QP error path
Abhijit Gangurde <abhijit.gangurde@amd.com>
RDMA/ionic: Fix XArray initialization to use XArray flags
Norbert Szetei <norbert@doyensec.com>
RDMA/rxe: Reject prefetch of a non-ODP MR
Quanye Yang <quanyeyang@proton.me>
RDMA/rtrs-clt: Reject invalid queue_depth from the peer
Yili Zhang <zhangyili01@baidu.com>
RDMA/nldev: Fix NULL deref in dumps of objects abandoned by DRIVER_FAILURE
Pengpeng Hou <hppiscas@163.com>
clk: si5351: fail prepare when PLL reset times out
Myeonghun Pak <mhun512@gmail.com>
clk: ti: adpll: unregister OF clock provider on remove
Danish Khateeb <danishkhateeb03@gmail.com>
pwm: Allow 32-bit tasks to use the character device
Dairui Zhang <zhangdairui@gmail.com>
IB/mad: fix UAF and double-free in RMPP receive reassembly
Sachin Kumar Garg <sachin.garg@oss.qualcomm.com>
media: iris: cache work mode after computing it in iris_set_stage
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
media: iris: reference count video instances
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
media: iris: reject open() when the session limit is reached
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
media: iris: take core lock when scanning the instance list
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
media: iris: fail firmware boot on invalid uc_region
Malte Wechter <maltewechter@gmail.com>
rnull: configfs: add power to configfs features
Hungyu Lin <dennylin0707@gmail.com>
media: iris: cancel sys error work on driver removal
Ruoyu Wang <ruoyuw560@gmail.com>
media: venus: Drop session events without an instance
Selvin Xavier <selvin.xavier@broadcom.com>
RDMA/bnxt_re: Use bnxt_ext_stats_supported for counter count selection
Selvin Xavier <selvin.xavier@broadcom.com>
RDMA/bnxt_re: Fix the PD and DPI table size
Selvin Xavier <selvin.xavier@broadcom.com>
RDMA/bnxt_re: Initialize wqe.flags in bnxt_re_post_srq_recv()
Selvin Xavier <selvin.xavier@broadcom.com>
RDMA/bnxt_re: Validate SRQ max_sge at create time
Selvin Xavier <selvin.xavier@broadcom.com>
RDMA/bnxt_re: Detect wrong sge_len passed for inline
Selvin Xavier <selvin.xavier@broadcom.com>
RDMA/bnxt_re: Fix integer overflow in send payload size computation
Finn Thain <fthain@linux-m68k.org>
swim3: Fix FDEJECT ioctl for exclusive open
Finn Thain <fthain@linux-m68k.org>
swim: Fix FDEJECT ioctl for exclusive open
Finn Thain <fthain@linux-m68k.org>
swim: Return -EROFS when opened with BLK_OPEN_WRITE flag
Logan Odell <loganodell@google.com>
PCI/IOV: Read VF config values that need not match PF
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx93-9x9-qsb: fix reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx93-14x14-evk: fix reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8ulp-evk: fix reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8qxp-mek: fix dsp reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8qxp-mek: fix reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8qm-mek: fix dsp reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8qm-mek: fix reserved memory node names for remoteproc
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8dxl-evk: fix reserved memory node names for remoteproc
Li RongQing <lirongqing@baidu.com>
IB/isert: Don't share drop_cmd_list across concurrent connection teardowns
Li RongQing <lirongqing@baidu.com>
RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment
Gabor Juhos <j4g8y7@gmail.com>
spi: spi-qpic-snand: fix read location register usage in qcom_spi_config_cw_read()
Waiman Long <longman@redhat.com>
cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only
Xiang Mei (Microsoft) <xmei5@asu.edu>
fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range()
Karl Mehltretter <kmehltretter@gmail.com>
soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc
Karl Mehltretter <kmehltretter@gmail.com>
soc: ti: k3-ringacc: Correct ring API kernel-doc
Ian Rogers <irogers@google.com>
perf vendor events intel: Fix snowridgex umask encoding.
Ian Rogers <irogers@google.com>
perf vendor events intel: Fix skylakex umask encoding.
Ian Rogers <irogers@google.com>
perf vendor events intel: Fix sierraforest umask encoding.
Francesco Dolcini <francesco.dolcini@toradex.com>
arm64: dts: ti: k3-am62-verdin-ivy: Fix main_gpio0/main_gpio1 line names size
Ian Rogers <irogers@google.com>
perf build: Clean libperf-gtk.so in 'make clean'
Ian Rogers <irogers@google.com>
perf test code-reading: Fix duplicate kernel maps and machine leak
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192-mt6359: Fix error handling in MTKAIF calibration
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: Propagate errors in I2S DAI DAPM event handlers
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: Propagate errors in TDM DAI DAPM event handlers
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: Propagate mt8192_afe_gpio_request() errors in ADDA DAI
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: Handle regcache_sync() failure in runtime resume
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: check return values in mt8192_afe_gpio_init()
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request()
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: mt8192-afe-gpio: Use guard() for mutex locks
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: switch to devm_clk_get_optional()
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: fix MCK clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: fix error handling in APLL enable functions
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: fix AFE clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8192: fix APLL mux error handling
Ovidiu Panait <ovidiu.panait.rb@renesas.com>
spi: rspi: Fix DMA mode when the DMA controller is built as a module
Niko Huuskonen <niko.huuskonen.00@gmail.com>
ALSA: caiaq: Fix the Kore controller key map
Niko Huuskonen <niko.huuskonen.00@gmail.com>
ALSA: caiaq: Serialize access to the EP1 command buffer
Arka Mondal <arka@arkamondal.net>
iio: dac: ad5758: Fix the offset calculation
Arka Mondal <arka@arkamondal.net>
iio: dac: ad5758: Reject out-of-range raw values
Arka Mondal <arka@arkamondal.net>
iio: dac: ad5758: Fix alignment for DMA safety
Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
staging: iio: adc: ad7816: Protect sysfs attributes with mutex
Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
staging: iio: adc: ad7816: Serialize SPI operations
Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
staging: iio: adc: ad7816: Sort headers alphabetically
Yilin Chen <1479826151@qq.com>
rust: configfs: require thread-safe callback data
Fuad Tabba <fuad.tabba@linux.dev>
of/irq: Fix device node refcount leak in of_check_msi_parent()
Chen-Yu Tsai <wenst@chromium.org>
drm/exynos/fimd: fix register offset type in fimd_trigger()
Runyu Xiao <runyu.xiao@seu.edu.cn>
ALSA: via82xx: use helper to activate DXS controls
Runyu Xiao <runyu.xiao@seu.edu.cn>
ALSA: oxygen: use helper to activate the SPDIF PCM control
Yibo Tan <lhfff@tju.edu.cn>
ASoC: amd: acp3x-es83xx: Keep an owned codec device reference
Yibo Tan <lhfff@tju.edu.cn>
ASoC: amd: acp-es8336: Use an owned codec device reference
Yishai Hadas <yishaih@nvidia.com>
RDMA/mlx5: Initialize QP/RQ/SQ resource refcount before publishing it
Yishai Hadas <yishaih@nvidia.com>
RDMA/mlx5: Set RQ event handler for raw-packet QP
Yishai Hadas <yishaih@nvidia.com>
RDMA/mlx5: Set SRQ event handler before xarray insertion
Yishai Hadas <yishaih@nvidia.com>
RDMA/mlx5: Set WQ event handler before firmware RQ insertion
Yishai Hadas <yishaih@nvidia.com>
RDMA/mlx5: Fix mlx5_ib_dev_res_init() failure when XRC cap is absent
Yishai Hadas <yishaih@nvidia.com>
RDMA/hns: Pin CQ buffer writable to match device DMA write access
Serhat Kumral <serhatkumral1@gmail.com>
RDMA/irdma: Free IRQ when CEQ vector mapping fails
Ginger Li <ginger.jzllee@gmail.com>
wifi: mac80211: Fix a race when expiring a mesh path
Mateusz Nowicki <mateusz.nowicki@posteo.net>
arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2
Guanghui Feng <guanghuifeng@linux.alibaba.com>
iommu/vt-d: Fix IQE handling to cover all descriptors in submission range
Lu Baolu <baolu.lu@linux.intel.com>
iommu/vt-d: Drop old iopf ref only after attach succeeds
Lu Baolu <baolu.lu@linux.intel.com>
iommu/vt-d: Fix iopf refcount leak in nested attach
Lu Baolu <baolu.lu@linux.intel.com>
iommu/vt-d: Reserve scalable-mode DIDs from PASID entries during copy
Lu Baolu <baolu.lu@linux.intel.com>
iommu/vt-d: Handle DID reservation errors when copying context tables
Lu Baolu <baolu.lu@linux.intel.com>
iommu/vt-d: Cache max domain ID to avoid redundant calculation
Lu Baolu <baolu.lu@linux.intel.com>
iommu/vt-d: Do not ignore context table copy failures
ZhaoJinming <zhaojinming@uniontech.com>
iommu/vt-d: Fix copied_tables bitmap leak on error in copy_translation_tables
Johannes Berg <johannes.berg@intel.com>
um: time-travel: fix sched_yield() behaviour
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: sm8150: Use SM8150_CX for the SDHC power domain
Myeonghun Pak <mhun512@gmail.com>
PCI: aardvark: Disable PHY on probe failures
Xin Liu <xin.liu@oss.qualcomm.com>
arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
arm64: dts: qcom: hamoa-iot-evk: add MCP2518FD CAN on spi18
Khalid Faisal Ansari <khalid.ansari@oss.qualcomm.com>
arm64: dts: qcom: hamoa-iot-evk: Enable TPM (ST33) on SPI11
Yongxing Mou <yongxing.mou@oss.qualcomm.com>
arm64: dts: qcom: hamoa-iot-evk: Add backlight support for eDP panel
Phil Sutter <phil@nwl.cc>
netfilter: nfnetlink: Fix for interrupted hook dumps
Phil Sutter <phil@nwl.cc>
netfilter: nfnetlink_hook: Dump nat type chains
Linus Walleij <linusw@kernel.org>
ARM: dts: gemini: Use a level-high interrupt for TVE200
Fernando Fernandez Mancera <fmancera@suse.de>
netfilter: synproxy: fix reset of ct seqadj when reopening a connection
Sasha Levin <sashal@kernel.org>
kbuild: keep .modinfo when vmlinux is linked with --gc-sections
Lorenzo Stoakes (ARM) <ljs@kernel.org>
kbuild: do not allocate .modinfo in vmlinux
Nathan Chancellor <nathan@kernel.org>
kbuild: Remove alignment on .modinfo section
Akhil P Oommen <akhilpo@oss.qualcomm.com>
drm/msm/a6xx: Fix secondary rail vote in ARC votes
Daniel Palmer <daniel@0x0f.com>
m68k: apollo: Fix interrupt setup
Shashank Mohan Jain <jain.sm@gmail.com>
bitmap: bitmap_parselist(): don't wrap around on a huge group size
Shashank Mohan Jain <jain.sm@gmail.com>
bitmap: bitmap_parselist(): reject trailing characters after group size
Shashank Mohan Jain <jain.sm@gmail.com>
bitmap: bitmap_parse(): reject non-hex character before 8 digits
Alexandra Lu <alexandra.lu@nokia.com>
bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices
WangYuli <wangyuli@uniontech.com>
MIPS: Only check -msym32 when need-compiler
Orgad Shaneh <orgads@gmail.com>
MIPS: Octeon: size the swiotlb for a modular OHCI platform driver
Danish Khateeb <danishkhateeb03@gmail.com>
tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit
Willy Tarreau <w@1wt.eu>
tools/nolibc: provide the portable sys/select.h
Kumar Kartikeya Dwivedi <memxor@gmail.com>
bpf: Skip zero-length stream writes
Aaron Kling <webgeek1234@gmail.com>
dt-bindings: vendor-prefixes: Add Retroid Pocket
Adam Skladowski <a39.skl@gmail.com>
dt-bindings: vendor-prefixes: Add LeEco
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
ARM: dts: qcom: msm8974: add MDSS reset
Luca Weiss <luca@lucaweiss.eu>
ARM: dts: qcom: msm8974: Sort header includes alphabetically
Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies
Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies
Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies
Andrei Vagin <avagin@google.com>
x86/fpu: Fix potential underflow in xstate_calculate_size()
Bruno Produit <bruno.produit@trailofbits.com>
hfs/hfsplus: serialize B-tree close against folio release
Paul Sajna <sajattack@postmarketos.org>
arm64: dts: qcom: sdm845-lg: fix sdcard pinctrl nodes
Aaron Kling <webgeek1234@gmail.com>
dt-bindings: vendor-prefixes: Add Chip Wealth Technology
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8183: Fix APLL enable error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8183: Fix clock handling in mux disable path
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure
Sudeep Holla <sudeep.holla@kernel.org>
ACPI: PCC: Preserve shared memory signature in OpRegion handler
Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate-data: Resolve type DIEs in the debug file they came from
Sudeep Holla <sudeep.holla@kernel.org>
ACPICA: Fix PCC OperationRegion command offsets
Breno Leitao <leitao@debian.org>
ACPICA: Fix memory leak in acpi_ds_create_field()
Xin Yin <yinxin.x@bytedance.com>
writeback: size foreign flushes by target wb dirty pages
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event()
Kang Yang <kang.yang@oss.qualcomm.com>
wifi: ath12k: avoid double DMA unmap of held monitor RX buffers
Abel Vesa <abel.vesa@oss.qualcomm.com>
clk: qcom: gcc-qcs615: Fix GCC_CPUSS_GNOC_CBCR offset
Qingfang Deng <qingfang.deng@linux.dev>
mtd: block: prevent reclaim I/O during request processing
Nia Su <nia.su@sifive.com>
perf evlist: Don't restrict uncore events to PMU CPUs
Ian Rogers <irogers@google.com>
perf evlist: Special map propagation for tool events that read on 1 CPU
Ian Rogers <irogers@google.com>
perf pmu: Add PMU kind to simplify differentiating
Jiebin Sun <jiebin.sun@intel.com>
perf c2c: Fix documented default coalesce fields
Muzaffer Kadir <muzafferkadir@mainlining.org>
dt-bindings: vendor-prefixes: Add General Mobile
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1p42100-thinkbook-16: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1-hp-omnibook-x14: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1-dell-thena: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1-asus-zenbook-a14: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1e80100-qcp: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1e80100-yoga-slim7x: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1e80100-dell-xps13-9345: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1e78100-t14s: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1e001de-devkit: Mark the EC reset gpio as reserved
Abel Vesa <abel.vesa@oss.qualcomm.com>
arm64: dts: qcom: x1-crd: Mark the EC reset gpio as reserved
Charlie Garner <charlie@akao.au>
arm64: dts: qcom: x1e80100-dell-inspiron-14-plus-7441: fix touchscreen i2c address
Alex Williamson <alex.williamson@nvidia.com>
vfio: Reject a second cdev open before mutating shared device state
Yibo Tan <lhfff@tju.edu.cn>
sysctl: unregister tables before freeing bitmap
Tengda Wu <wutengda@huaweicloud.com>
perf llvm: Fix memory leak of args->fileloc in symbol__disassemble_llvm()
Shrikanth Hegde <sshegde@linux.ibm.com>
powerpc/ftrace: Don't restore r13 during ftrace_regs_caller
Rob Herring (Arm) <robh@kernel.org>
dt-bindings: arm: mediatek: Fix MT6779 audsys compatible
Pengpeng Hou <hppiscas@163.com>
iio: accel: bma220: publish the SPI driver ACPI alias
Myeonghun Pak <mhun512@gmail.com>
spi: rockchip-sfc: skip DMA cleanup in PIO mode
Jiawen Liu <1298662399@qq.com>
spi: rockchip-sfc: disable runtime PM in remove
bui duc phuc <phucduc.bui@gmail.com>
ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt5665: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt5660: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt5659: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt5616: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt1318: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt1308: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt1305: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt1016: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt1011: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: nau8540: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: es8323: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: es8316: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: ak4642: return cache sync errors from resume
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: adau17x1: return cache sync errors from resume
Slavin Liu <bolin.liu@seu.edu.cn>
ASoC: fsl_asrc: check the second front-end DMA channel
Pu Lehui <pulehui@huawei.com>
bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv
Wei Huang <wei.huang2@amd.com>
PCI/TPH: Validate the firmware Steering Tag response
Chuck Lever <chuck.lever@oracle.com>
NFS: use TCP for MOUNT when xprtsec= selects TLS
Thomas Falcon <thomas.falcon@intel.com>
perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf()
Shengjiu Wang <shengjiu.wang@nxp.com>
ASoC: fsl_asrc: use regmap_write_bits to update clock source registers
Dmitrii Tulnov <tulnov.dl@gmail.com>
kconfig: warn about malformed KCONFIG_PROBABILITY values
Matteo Kloiber <kernel@matt3o12.de>
rust: scatterlist: honor the device's maximum segment size
Beata Michalska <beata.michalska@arm.com>
rust: dma: allow drivers to tune max segment size
Florian Fainelli <florian.fainelli@broadcom.com>
um: Add definition of __NR_close_range for older host OSs
Myeonghun Pak <mhun512@gmail.com>
mfd: da9150: Balance IRQ wake on teardown
Myeonghun Pak <mhun512@gmail.com>
mfd: intel_quark_i2c_gpio: Manage the fixed-rate clock
Eric Anderson <ejona86@gmail.com>
mfd: rk8xx: Register poweroff handler in atomic phase
Jiale Yao <yaojiale02@163.com>
ext2: drain in-flight DIO before buffered write fallback
Karl Mehltretter <kmehltretter@gmail.com>
iommufd: Fix iommufd_hw_capabilities reference in kernel-doc
Hui Su <sh_def@163.com>
bpftool: Fix sparse CPU IDs in prog profile
Mykyta Yatsenko <yatsenko@meta.com>
bpftool: Scale counters and report cycles per run
Mykyta Yatsenko <yatsenko@meta.com>
bpftool: Group profile events by CPU
Mykyta Yatsenko <yatsenko@meta.com>
bpftool: Accept zero perf counter snapshots
Hui Su <sh_def@163.com>
bpftool: Fix CPU IDs in per-CPU map output
Danish Khateeb <danishkhateeb03@gmail.com>
tools/nolibc: fix WIFSIGNALED() for status 0
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
clk: qcom: fix SM6115 lpasscc register offset
Esteban Urrutia <esteuwu@proton.me>
clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring
Esteban Urrutia <esteuwu@proton.me>
clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops
Oualid Derouiche <oualid.derouiche@kontron.de>
arm64: dts: imx8mp-kontron: Fix LVDS clock frequency for DL device
Vincent Jardin <vjardin@free.fr>
dt-bindings: vendor-prefixes: add Free Mobile
Georgios Androutsopoulos <georgeandrout13@gmail.com>
rust: clk: document overflow panics in `Hertz` constructors
Linus Walleij <linusw@kernel.org>
ARM: dts: ux500: Convert HREF audio to audio-graph-card2
Even Xu <even.xu@intel.com>
HID: Intel-thc-hid: Intel-quickspi: Use hid_safe_input_report()
Even Xu <even.xu@intel.com>
HID: Intel-thc-hid: Intel-quicki2c: Use hid_safe_input_report()
Zongmin Zhou <zhouzongmin@kylinos.cn>
serial: sifive: fix off-by-one in console port bounds check
Malathi A <malathi.a2000@gmail.com>
serial: 8250_uniphier: Use devm_clk_get_enabled()
Myeonghun Pak <mhun512@gmail.com>
serial: sh-sci: Unregister UART on sysfs setup failure
Biju Das <biju.das.jz@bp.renesas.com>
serial: sh-sci: Drop checking port type for device file{create, remove}
Li RongQing <lirongqing@baidu.com>
RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
serial: 8250: hub6: Add cleanup code
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
serial: 8250: Fix corner case for port matching
Hugo Villeneuve <hvilleneuve@dimonoff.com>
serial: 8250: fix compile error with hub6_match_port() when compiled as a module
Hugo Villeneuve <hvilleneuve@dimonoff.com>
serial: 8250_hub6: add hub6_match_port()
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
serial: txx9: Drop noop probe function and dangerous remove callback
Dmitry Sinyavin <sinyavin@gmail.com>
serial: msm: select PM_OPP
Guangshuo Li <lgs201920130244@gmail.com>
media: staging/ipu7: release ISYS firmware resources on remove
Ginger Li <ginger.jzllee@gmail.com>
media: i2c: ov5648: Fix a data race on state->streaming
Finn Thain <fthain@linux-m68k.org>
swim: Don't search beyond the first data mark
Finn Thain <fthain@linux-m68k.org>
swim: Revisit delays
Finn Thain <fthain@linux-m68k.org>
swim: Check drive ready bit
Finn Thain <fthain@linux-m68k.org>
swim: Deduplicate polling loops
Finn Thain <fthain@linux-m68k.org>
swim: Remove redundant RELAX actions
Finn Thain <fthain@linux-m68k.org>
swim: Convert to blocking queue
Finn Thain <fthain@linux-m68k.org>
swim: Fix buffer overflow
Finn Thain <fthain@linux-m68k.org>
swim: Don't use the mark register to read data
Finn Thain <fthain@linux-m68k.org>
swim: Check error register during sector read
Finn Thain <fthain@linux-m68k.org>
swim: Simplify return value initialization
Finn Thain <fthain@linux-m68k.org>
swim: Check for CRC errors
Finn Thain <fthain@linux-m68k.org>
swim: Handle FIFO timeout error
Finn Thain <fthain@linux-m68k.org>
swim: Add track zero recalibration delay
Finn Thain <fthain@linux-m68k.org>
swim: Recalibrate when drive is probed
Finn Thain <fthain@linux-m68k.org>
swim: Don't start motor until medium is present
Finn Thain <fthain@linux-m68k.org>
swim: Enable clock divider only where appropriate
Finn Thain <fthain@linux-m68k.org>
swim: Refactor SWIM setup
Finn Thain <fthain@linux-m68k.org>
swim: Configure parameter memory
Finn Thain <fthain@linux-m68k.org>
swim: Perform ISM/IWM mode switching according to specs
Finn Thain <fthain@linux-m68k.org>
swim: Don't disable drive after every sector
Finn Thain <fthain@linux-m68k.org>
swim: Enable the drive when probing
Finn Thain <fthain@linux-m68k.org>
swim: Select appropriate drive once only
Finn Thain <fthain@linux-m68k.org>
swim: Assert strobe with stable outputs
Li RongQing <lirongqing@baidu.com>
RDMA/mlx5: Guard steering anchor resource destruction on create error
Jiale Yao <yaojiale02@163.com>
crypto: ccp - kill v5 IRQ tasklet during teardown
Jiale Yao <yaojiale02@163.com>
crypto: ccp - kill v3 IRQ tasklet during teardown
Muhammad Bilal <meatuni001@gmail.com>
crypto: ccp - fix SFS ioctl race against device teardown
Weili Qian <qianweili@huawei.com>
crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH
Herbert Xu <herbert@gondor.apana.org.au>
crypto: api - Fix DUP_FIRST crash on unregister
Pengpeng Hou <pengpeng@iscas.ac.cn>
crypto: starfive - propagate clock and reset errors
Jiawen Liu <1298662399@qq.com>
crypto: starfive - handle clock enable failures
Pengpeng Hou <pengpeng@iscas.ac.cn>
hwrng: starfive - propagate clock and reset errors
Wentao Liang <vulab@iscas.ac.cn>
RDMA/siw: Fix qp use-after-free in siw_get_base_qp()
Wentao Liang <vulab@iscas.ac.cn>
RDMA/mlx5: Fix RQ resource reference leak in mlx5_ib_wq_event()
Wentao Liang <vulab@iscas.ac.cn>
RDMA/cxgb4: Fix skb reference leak in rx_pkt()
Wentao Liang <vulab@iscas.ac.cn>
RDMA/cxgb4: Fix neigh reference leak in rx_pkt()
Slavin Liu <bolin.liu@seu.edu.cn>
RDMA/irdma: check vport device allocation
Kim Wooseok <5mghybrid@khu.ac.kr>
wifi: rtl8xxxu: free RX skb when URB submission fails
Mauricio Faria de Oliveira <mfo@igalia.com>
x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs
Mauricio Faria de Oliveira <mfo@igalia.com>
x86/asm: Group inline string functions
Mauricio Faria de Oliveira <mfo@igalia.com>
x86/asm, x86/boot: Carve out inline memcmp() into a separate header
Peter Zijlstra (Intel) <peterz@infradead.org>
x86/asm: Introduce inline memcpy and memset
Mauricio Faria de Oliveira <mfo@igalia.com>
x86/boot: Remove redundant "cc" clobber in memcmp() and document it
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ASoC: amd: acp3x-es83xx: Switch to use acpi_bus_get_primary_device()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device()
Pei Xiao <xiaopei01@kylinos.cn>
ata: pata_parport: fix parport attach idr_alloc for
Jeremy Bongio <jbongio@google.com>
RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation
Francesco Dolcini <francesco.dolcini@toradex.com>
arm64: dts: ti: k3-am62-verdin: fix main_gpio0/main_gpio1 line names size
Jisheng Zhang <jszhang@kernel.org>
regulator: mp886x: fix pontential division by zero
Jisheng Zhang <jszhang@kernel.org>
regulator: mp886x: check get_voltage_sel() return value
Dmitry Antipov <dmantipov@yandex.ru>
leds: flash: Prevent using uninitialized variable in flash_fault_show()
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Cap the channel current in st1202_led_set()
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Honour max_brightness when blinking
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Clear unused pattern slots in blink_set()
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Do not set brightness from atomic context
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Take a reference on the LED firmware node
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Program the channel current for hardware patterns
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Spell out the phase-shift configuration bit
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Add hardware-accelerated blink support
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Scale pattern brightness to the 12-bit PWM range
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Name pattern index variables consistently
Manuel Fombuena <fombuena@outlook.com>
leds: st1202: Clear unused pattern slots in pattern_set()
Jacob Moroni <jmoroni@google.com>
RDMA/irdma: Fix erroneous -ENOMEM for large MR registration
Li RongQing <lirongqing@baidu.com>
RDMA/core: Fix partial copy of IPv6 flow_lbl in LAG hash skb
Arnaldo Carvalho de Melo <acme@redhat.com>
perf annotate-data: Show the sample count in the data-type browser
Cong Nguyen <congnt264@gmail.com>
leds: lm3692x: Fix regulator/gpio leak and wrong enabled state on last write failure
Ian Rogers <irogers@google.com>
perf build: Remove leftovers of removed build options
Michael Jeanson <mjeanson@efficios.com>
perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer
Ian Rogers <irogers@google.com>
tools build: Deduplicate test-libunwind for different architectures
Ian Rogers <irogers@google.com>
perf test: perf data --to-ctf testing
Ian Rogers <irogers@google.com>
perf check: Add libbabeltrace to the listed features
Ian Rogers <irogers@google.com>
perf build: Check the version of the compiler that is used
Ian Rogers <irogers@google.com>
perf build: Use the given CC rather than clang in clang builds
Ian Rogers <irogers@google.com>
perf build: Only pass clang flags to CXX when CXX is clang
Ian Rogers <irogers@google.com>
perf symbol: Fix the build when demangling with libbfd
Ian Rogers <irogers@google.com>
perf libbfd: Fix the clang -Wthread-safety build failure
Chen Pei <cp0613@linux.alibaba.com>
perf test: Fix a leaked map reference in the arch dwarf unwind tests
Haibo Chen <haibo.chen@nxp.com>
leds: pca9532: Check i2c_smbus_read_byte_data() return value
Miles Krause <mileskrause5200@gmail.com>
leds: lp8860: Fix device_node leak in lp8860_probe()
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked()
Yogesh Gaur <yogeshgaur.83@gmail.com>
md/raid5: give the io_unit slab caches per-array names
Arnd Bergmann <arnd@arndb.de>
KMSAN: fix memset() when using fortify-source, again
Andrea Parri <parri.andrea@gmail.com>
pstore: reject persistent RAM zones too small for the buffer header
Andrea Parri <parri.andrea@gmail.com>
pstore: don't leave an ERR_PTR in the ramoops zone pointer
Adrian Hunter <adrian.hunter@intel.com>
i3c: mipi-i3c-hci: Fix runtime PM violation in i3c_hci_free_ibi()
Adrian Hunter <adrian.hunter@intel.com>
i3c: mipi-i3c-hci: Restore controller state if i3c_hci_enable_ibi() returns an error
Yun Lu <luyun@kylinos.cn>
selftests/bpf: Clean up child when task_work__open() fails
Leon Hwang <leon.hwang@linux.dev>
bpftool: Compute map size of light skeletons at runtime
Leon Hwang <leon.hwang@linux.dev>
bpftool: Generate skeleton for global percpu data
WanLi Niu <niuwl1@chinatelecom.cn>
bpftool: Make skeleton C++ compatible with explicit casts
Ovidiu Panait <ovidiu.panait.rb@renesas.com>
thermal/drivers/renesas/rzg3e: Fix race between set_trips() and get_temp()
Ovidiu Panait <ovidiu.panait.rb@renesas.com>
thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq
John Madieu <john.madieu.xa@bp.renesas.com>
thermal: renesas: rzg3e: Remove stale @trim_offset kernel-doc entry
Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
thermal: renesas: rzg3e: make calibration value retrieval per-chip
Ovidiu Panait <ovidiu.panait.rb@renesas.com>
drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code()
Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
thermal: renesas: rzg3e: make min and max temperature per-chip
Neil Armstrong <neil.armstrong@linaro.org>
dt-bindings: vendor-prefixes: add vendor prefix for Nexperia B.V.
Pengpeng Hou <hppiscas@163.com>
pmdomain: imx: Propagate SCU provider registration failures
Xiang Mei <xmei5@asu.edu>
fs/ntfs3: validate $SDH entry size in ntfs_insert_security
Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea
Zhan Xusheng <zhanxusheng1024@gmail.com>
fs/ntfs3: fix valid_size not being updated in attr_allocate_frame()
Xiang Mei (Microsoft) <xmei5@asu.edu>
fs/ntfs3: check INDEX_ROOT resident size before use in ntfs_read_mft()
Andrew Gaylard <ag@ffroot.co.za>
pinctrl: fix PINCTRL_SPPCTL=m
Daniel Borkmann <daniel@iogearbox.net>
bpf, lsm: Reject writes into the BPF LSM program context
Slavin Liu <bolin.liu@seu.edu.cn>
clk: starfive: jh7110: reject oscillator lookup errors
Wentao Liang <vulab@iscas.ac.cn>
clk: versatile: clk-icst: Fix node reference leak in of_syscon_icst_setup()
Triet Hoang <triet.hoang.dev@gmail.com>
clk: raspberrypi: Handle cpufreq device registration failure
Karl Asseily <karl@asseily.com>
dt-bindings: vendor-prefixes: add ESS Technology
Zide Chen <zide.chen@intel.com>
perf topdown: Don't require config1==0 for a slots event
Ian Rogers <irogers@google.com>
perf arch x86 tests: Add test for topdown event sorting
Ian Rogers <irogers@google.com>
perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies
Ian Rogers <irogers@google.com>
perf build: Remove NO_AUXTRACE build option
Ian Rogers <irogers@google.com>
perf build: Don't add NO_AUXTRACE if missing feature-get_cpuid
Ian Rogers <irogers@google.com>
perf tool: Add the perf_tool argument to all callbacks
Alejandro Lucero <alucerop@amd.com>
ACPI: HMAT: preserve hmat_adist_nb notifier block
Felix Gu <ustc.gu@gmail.com>
spi: mxic: fix ps_clk leak in runtime resume
Linus Walleij <linusw@kernel.org>
ASoC: ab8500: Skip digital microphone support on AB8505
Linus Walleij <linusw@kernel.org>
ASoC: ab8500: Remove the nonfunctional sidetone apply control
bui duc phuc <phucduc.bui@gmail.com>
ASoC: codecs: ab8500: Use guard() for mutex locks
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
ASoC: codecs: ab8500: Remove suspicious code
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: codecs: ab8500: convert to snd_soc_dapm_xxx()
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: codecs: ab8500: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()
Christian Loehle <christian.loehle@arm.com>
ACPI: CPPC: Validate the _CPC package header
Guixin Liu <kanie@linux.alibaba.com>
cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails
Guixin Liu <kanie@linux.alibaba.com>
cxl/region: Create node access attributes for CFMWS-only NUMA nodes
Li RongQing <lirongqing@baidu.com>
RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT
Li RongQing <lirongqing@baidu.com>
RDMA/restrack: Don't set RESTRACK_DD mark after a failed xa_insert()
Li RongQing <lirongqing@baidu.com>
RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device()
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
interconnect: qcom: use 64-bit SMD RPM bus votes
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
interconnect: qcom: icc-rpm: Handle icc_link_create() failures
Myeonghun Pak <mhun512@gmail.com>
interconnect: exynos: Remove the PM QoS request on unbind
Slavin Liu <bolin.liu@seu.edu.cn>
crypto: atmel-sha - reject initialization without a device
Ahsan Atta <ahsan.atta@intel.com>
crypto: qat - fix active_devs leak on crypto alg registration failure
Guixin Liu <kanie@linux.alibaba.com>
cxl/core: Fix dport use-after-free via the einj_inject debugfs file
Dan Williams <dan.j.williams@intel.com>
cxl/port: Move dport RAS setup to dport add time
Dan Williams <dan.j.williams@intel.com>
cxl/port: Move dport probe operations to a driver event
Dan Williams <dan.j.williams@intel.com>
cxl/port: Move decoder setup before dport creation
Dan Williams <dan.j.williams@intel.com>
cxl/port: Cleanup dport removal with a devres group
Dan Williams <dan.j.williams@intel.com>
cxl/port: Reduce number of @dport variables in cxl_port_add_dport()
Dave Jiang <dave.jiang@intel.com>
cxl/test: Add support for acpi extended linear cache
Guixin Liu <kanie@linux.alibaba.com>
cxl/port: Fix uninitialized coordinates reported for RCDs
Guixin Liu <kanie@linux.alibaba.com>
cxl/pci: Skip reset detection for DVSEC emulated decoders
Julian Braha <julianbraha@gmail.com>
kconfig: fix extra output from savedefconfig on out-of-range defaults
Felix Gu <ustc.gu@gmail.com>
PCI: dra7xx: Fix clock enable leak on probe failure
vladimir.oltean@nxp.com <vladimir.oltean@nxp.com>
PCI: dra7xx: Remove device links to PHY
Longlong Xia <xialonglong@kylinos.cn>
rcu: fix shrink budget underflow in lazy_rcu_shrink_scan
Joel Fernandes <joelagnelf@nvidia.com>
rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path
Mingpei CAO <caomingpei@gmail.com>
libbpf: Reject local struct_ops bitfields before data access
Geert Uytterhoeven <geert+renesas@glider.be>
dt-bindings: interrupt-controller: chrp,open-pic: Fix dangling reference
Geert Uytterhoeven <geert+renesas@glider.be>
dt-bindings: interrupt-controller: chrp,open-pic: Typo s/pci/pic/
Lizhi Hou <lizhi.hou@amd.com>
accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults
Lizhi Hou <lizhi.hou@amd.com>
accel/amdxdna: Fully initialize map structure before registering notifier
Nikolay Borisov <nik.borisov@suse.com>
ata: sata_dwc_460ex: Don't enable interrupt if libATA core registration fails
Hari Mishal <harimishal1@gmail.com>
drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters
Lijo Lazar <lijo.lazar@amd.com>
drm/amdgpu: bounds check ATOM IIO table parsing
Lijo Lazar <lijo.lazar@amd.com>
drm/amdgpu: Print full vbios info
Mario Limonciello (AMD) <superm1@kernel.org>
drm/amd: Add correct prefix for VBIOS message
Hari Mishal <harimishal1@gmail.com>
drm/amd/pm: bound SCLK FCW range entries to the table size
Pengpeng Hou <hppiscas@163.com>
clk: milbeaut: Return divider update timeouts
Pengpeng Hou <pengpeng@iscas.ac.cn>
clk: si521xx: correct the SI52147 OF output enable map
Francesco Valla <francesco@valla.it>
spi: virtio: fix max frequency setting
Vijendar Mukunda <Vijendar.Mukunda@amd.com>
ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering
Vijendar Mukunda <Vijendar.Mukunda@amd.com>
ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering
Shakeel Butt <shakeel.butt@linux.dev>
kernfs: don't hold kernfs_rwsem across dir_emit()
Shakeel Butt <shakeel.butt@linux.dev>
kernfs: don't repeat or skip an entry when readdir resumes
Christian Brauner <brauner@kernel.org>
kernfs: make directory seek namespace-aware
Christian Brauner <brauner@kernel.org>
kernfs: pass struct ns_common instead of const void * for namespace tags
Shakeel Butt <shakeel.butt@linux.dev>
kernfs: don't hold kernfs_rwsem across notification delivery
Zizhi Wo <wozizhi@huawei.com>
md/raid5: reject a per-device size smaller than one chunk
Zhihao Cheng <chengzhihao1@huawei.com>
md/raid5: setup_conf: Fix null-ptr-def in error handling path
Chen Cheng <chencheng@fnnas.com>
md/raid5: reject raid4/5 arrays with too few disks
Yogesh Gaur <yogeshgaur.83@gmail.com>
md/raid5: don't BUG() on an inconsistent reshape state from the superblock
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
md: reject v0.90 arrays with too many devices
Zizhi Wo <wozizhi@huawei.com>
md/raid10: fix missing wakeup in wait_barrier_nolock
Alexei Starovoitov <ast@kernel.org>
selftests/bpf: Wait for links to come up in lwt_ip_encap
Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers
Bart Van Assche <bvanassche@acm.org>
scsi: pm8001: Fix SATA FIS offset in struct hw_event_resp
Ștefan Ghețu <stefanghetu9@gmail.com>
ASoC: SOF: imx: Prevent stack OOB read in DSP panic dump
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: rt1015: make control calibration failures observable
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: codecs: rt1015: convert to snd_soc_dapm_xxx()
Karl Mehltretter <kmehltretter@gmail.com>
pinctrl: stm32: Drop the nonexistent CONFIG_MACH_STM32MP25 from the STM32MP257 default
Alison Schofield <alison.schofield@intel.com>
cxl/port: Bound switch decoder target array access by nr_targets
Alison Schofield <alison.schofield@intel.com>
cxl/hdm: Restore commit_end when decoder enumeration fails
Alison Schofield <alison.schofield@intel.com>
cxl/hdm: Make switch decoder target parsing endian-safe
Alison Schofield <alison.schofield@intel.com>
cxl/hdm: Reject switch decoder interleave ways that overflow targets
Slavin Liu <bolin.liu@seu.edu.cn>
ACPI: tables: handle failed initrd override mappings
Chen-Yu Tsai <wenst@chromium.org>
arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock
Aleksander Jan Bajkowski <olek2@wp.pl>
crypto: eip93 - fix ssl mac bit field definition
Sarthak Sharma <sarthak.sharma@arm.com>
mm/gup_test: report actual pinned bytes
Sarthak Sharma <sarthak.sharma@arm.com>
mm/gup_test: safely calculate GUP batch size
Samuel Moelius <sam.moelius@trailofbits.com>
mm/gup_test: reject wrapped user ranges
Baolin Liu <liubaolin@kylinos.cn>
fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts
Weiming Shi <bestswngs@gmail.com>
ntfs3: fix out-of-bounds read in ntfs_read_mft()
Luka Gejak <luka.gejak@linux.dev>
wifi: rtw88: sdio: zero the padding added to a TX transfer
Guangshuo Li <lgs201920130244@gmail.com>
platform/x86/intel/vsec: reset state before re-enumerating
Karl Mehltretter <kmehltretter@gmail.com>
loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation
Rosen Penev <rosenp@gmail.com>
dmaengine: mv_xor: kill tasklet on channel add error path
Yonghao Zhang <hyz3367@gmail.com>
remoteproc: core: Set trace buffer name for diagnostics
Karl Mehltretter <kmehltretter@gmail.com>
block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc
Guangshuo Li <lgs201920130244@gmail.com>
media: i2c: ar0521: remove duplicate media entity cleanup
Li RongQing <lirongqing@baidu.com>
RDMA/uverbs: Make CQ handle mandatory for WQ creation
Nicolas Morey <nmorey@suse.com>
RDMA/rxe: Use validated num_sge in local buffer
Miles Krause <mileskrause5200@gmail.com>
memory: emif: fix device_node reference leak on np_ddr
Gregory CLEMENT <gregory.clement@bootlin.com>
phy: cadence: Sierra: Do not modify register when getting parent clock
Haotian Zhang <vulab@iscas.ac.cn>
phy: hisilicon: hi3670: Fix OF node and device reference leaks
Sang-Heon Jeon <ekffu200098@gmail.com>
memblock: reject non-page-aligned reserve_mem regions
Linkai Gong <gonglinkai@kylinos.cn>
firmware: imx: dsp: fix mailbox channel leak on kasprintf failure
Jianan Huang <jnhuang95@gmail.com>
f2fs: quota: fix stale lock holder on remount failure
Jérôme Pouiller <jerome.pouiller@silabs.com>
wifi: wfx: fix use-after-free of the cooling work on device removal
Takahiro Kuwano <takahiro.kuwano@infineon.com>
mtd: spi-nor: spansion: Remove s25fs256s0
Julius Bairaktaris <julius@bairaktaris.de>
wifi: mac80211: don't reset the TXQ scheduling round number
Karl Mehltretter <kmehltretter@gmail.com>
wifi: mac80211: Fix the return value in mesh_path_add() kernel-doc
Fuad Tabba <fuad.tabba@linux.dev>
arm64: pi: Run the source checker on the libfdt objects under C=2
Thomas Weißschuh <linux@weissschuh.net>
microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS
Thomas Weißschuh <linux@weissschuh.net>
microblaze: uaccess: Zero out destination on failed get_user()
Linkai Gong <gonglinkai@kylinos.cn>
pinctrl: amd: add timeout to irq-enable readback
Weiming Shi <bestswngs@gmail.com>
fs/ntfs3: zero frame pages on read error
Matthew Wilcox (Oracle) <willy@infradead.org>
ntfs: Do not kmap page cache pages for compression
Baolin Liu <liubaolin@kylinos.cn>
fs/ntfs3: update ctime only on successful setxattr
Weiming Shi <bestswngs@gmail.com>
fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file
Mahe Tardy <mahe.tardy@gmail.com>
libbpf: fix log level propagation for light skeleton loaders
Karl Mehltretter <kmehltretter@gmail.com>
regulator: qcom-rpmh: Fix the return value in rpmh_regulator_vrm_get_optimum_mode() kernel-doc
Ian Rogers <irogers@google.com>
perf header: Fix potential memory corruption in cpu_cache_level__read
Junhui Liu <junhui.liu@pigmoral.tech>
clk: sunxi-ng: sun55i-a523-r-ccu: Use P-only clocks for timers
Junhui Liu <junhui.liu@pigmoral.tech>
clk: sunxi-ng: sun55i-a523-ccu: Use P-only clocks for high-speed timers
Junhui Liu <junhui.liu@pigmoral.tech>
clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM
Junhui Liu <junhui.liu@pigmoral.tech>
clk: sunxi-ng: div: Add feature support to M clock macro
Karl Mehltretter <kmehltretter@gmail.com>
cgroup/dmem: Fix eviction helper reference in dmem_cgroup_try_charge()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: video: Fix backlight unregistration ordering
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument
Karl Mehltretter <kmehltretter@gmail.com>
ALSA: control: Fix virtual master creation reference in kernel-doc
Michael S. Tsirkin <mst@redhat.com>
virtio_pci_modern: move avq cleanup from reset to del_vqs
Michael S. Tsirkin <mst@redhat.com>
virtio: synchronize callbacks after device reset
Karl Mehltretter <kmehltretter@gmail.com>
gfs2: Fix the return value in gfs2_get_link() kernel-doc
Karl Mehltretter <kmehltretter@gmail.com>
ata: libata-scsi: Fix ata_scsi_hotplug() reference in kernel-doc
Karl Mehltretter <kmehltretter@gmail.com>
spi: Fix the return value in spi_new_ancillary_device() kernel-doc
Pengpeng Hou <hppiscas@163.com>
clk: s2mps11: Propagate OF provider registration failures
Geert Uytterhoeven <geert+renesas@glider.be>
clk: rs9: Add clock index range check to rs9_of_clk_get()
Karl Mehltretter <kmehltretter@gmail.com>
clk: mediatek: reset: Fix device registration kernel-doc
Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
x86/svm: Avoid sign extension of SVM_EVTINJ_VALID in 64-bit expressions
Jared McArthur <j-mcarthur@ti.com>
arm64: dts: ti: k3-j784s4-j742s2-evm-common: Set ACSPCIe refclk to MAIN_PLL2_HSDIV4 for pcie1
Nora Schiffer <nora.schiffer@ew.tq-group.com>
ARM: dts: imx7-tqma7: correctly specify PMIC voltage constraints
Sanghyun Park <sanghyun.park.cnu@gmail.com>
bpf: Fix program BTF use-after-free in sleepable programs
Fabrice Gasnier <fabrice.gasnier@foss.st.com>
ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk
Fabrice Gasnier <fabrice.gasnier@foss.st.com>
ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp157c-ev1
Fabrice Gasnier <fabrice.gasnier@foss.st.com>
ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp15 DK boards
Justin Yeh <justin.yeh@mediatek.com>
HID: i2c-hid: Unfollow the panel on shutdown
Marek Vasut <marex@nabladev.com>
ARM: dts: stm32: Drop bias-disable from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a
Brian Norris <briannorris@chromium.org>
PM: runtime: Only queue an idle check for RPM-linked suppliers
Xueqin Luo <luoxueqin@kylinos.cn>
cpuidle: teo: Do not return a disabled idle state
Alain Volmat <alain.volmat@foss.st.com>
ARM: dts: stm32: add LTDC / DCMIPP access controller for STM32MP135
Ahmad Fatoum <a.fatoum@pengutronix.de>
ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200
Ahmad Fatoum <a.fatoum@pengutronix.de>
ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200
Ahmad Fatoum <a.fatoum@pengutronix.de>
ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200
Xueqin Luo <luoxueqin@kylinos.cn>
cpuidle: menu: Do not return a disabled idle state
Christian Loehle <christian.loehle@arm.com>
cpuidle: menu: Remove single state handling
Breno Leitao <leitao@debian.org>
cpuidle: menu: Remove incorrect unlikely() annotation
Takashi Sakamoto <o-takashi@sakamocchi.jp>
firewire: core: remove unused link field in fw_packet structure
Karl Mehltretter <kmehltretter@gmail.com>
firewire: cdev: Fix FW_CDEV_IOC_CREATE_ISO_CONTEXT references in kernel-doc
Sumeet Pawnikar <sumeet4linux@gmail.com>
thermal: gov_power_allocator: Fix NULL pointer dereference in update_tz()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: glue: Fix up and adjust acpi_unbind_one()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: glue: Carry out companion lookup under bus_type_sem
Jan Kara <jack@suse.cz>
gfs2: Fix journaled truncate range end offset
Jiawen Liu <1298662399@qq.com>
memory: exynos5422-dmc: handle clock enable failures
Karl Mehltretter <kmehltretter@gmail.com>
crypto: lskcipher - preserve state across unaligned chunks
Linmao Li <lilinmao@kylinos.cn>
crypto: mxs-dcp - handle zero-length skcipher requests
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
crypto: rsassa-pkcs1 - reject undersized keys when verifying
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
crypto: rsassa-pkcs1 - reject undersized keys when signing
Ahsan Atta <ahsan.atta@intel.com>
crypto: qat - release instance on DH fallback allocation failure
Ahsan Atta <ahsan.atta@intel.com>
crypto: qat - avoid OOB read when stripping RSA leading zeros
Mohamad Raizudeen <raizudeen.kerneldev@gmail.com>
crypto: amlogic - Fix DMA memory leak in cipher error path
Eric Dumazet <edumazet@google.com>
ip_tunnel: use WRITE_ONCE in ip_tunnel_encap_setup
Eric Dumazet <edumazet@google.com>
sit: fix UAF in ipip6_tunnel_del_prl()
Luca Weiss <luca.weiss@fairphone.com>
arm64: dts: qcom: sm7225-fairphone-fp4: Disable PMK8350 PON
Linus Walleij <linusw@kernel.org>
regulator: ab8500: Propagate mode enable read errors
Linus Walleij <linusw@kernel.org>
regulator: ab8500: Test dedicated enable bits only
Linus Walleij <linusw@kernel.org>
regulator: ab8500: Treat cut 1.0 VAUX3 as fixed
Linus Walleij <linusw@kernel.org>
regulator: ab8500: Handle AB8505 VINTCORE selector 7
Linus Walleij <linusw@kernel.org>
regulator: ab8500: Add AB8505 VAUX3 3.05 V setting
Babanpreet Singh <bbnpreetsingh@gmail.com>
regulator: ab8500: Remove stale expand_register kernel-doc entry
Linus Walleij <linusw@kernel.org>
regulator: ab8500: Fix AB8505 VANA voltage selectors
Koichiro Den <den@valinux.co.jp>
PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan
Jia Wang <wangjia@ultrarisc.com>
dmaengine: dw-axi-dmac: Fix CH_CFG2 channel priority position
Jia Wang <wangjia@ultrarisc.com>
dmaengine: dw-axi-dmac: Fix LLI dump out-of-bounds access
Jia Wang <wangjia@ultrarisc.com>
dmaengine: dw-axi-dmac: Fix AXI burst length encoding
Rosen Penev <rosenp@gmail.com>
dmaengine: fsl_raid: zero CF descriptor pool allocations
Keisuke Tsukuda <catnyaaan@outlook.com>
usb: gadget: f_mass_storage: ignore class requests while inactive
Keisuke Tsukuda <catnyaaan@outlook.com>
usb: gadget: composite: avoid warning on aborted delayed status
Roland Dreier <rolanddreier@rivian.com>
firmware: arm_scmi: Fix error path leak in scmi_raw_message_send()
Roland Dreier <rolanddreier@rivian.com>
firmware: arm_scmi: Don't reuse raw xfers with async_done still armed
Roland Dreier <rolanddreier@rivian.com>
firmware: arm_scmi: Protect xfer->async_done with xfer->lock
Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
dmaengine: sprd: use clk_bulk API to fix clock imbalance
Pengpeng Hou <pengpeng@iscas.ac.cn>
usb: musb: da8xx: depopulate OF children on probe failure
Pengpeng Hou <pengpeng@iscas.ac.cn>
usb: musb: da8xx: depopulate OF children on remove
Arka Mondal <arka@arkamondal.net>
usb-storage: alauda: fix out-of-bounds zone index
Arka Mondal <arka@arkamondal.net>
usb-storage: alauda: check the return value of alauda_read_map()
Arka Mondal <arka@arkamondal.net>
usb-storage: alauda: do not do DMA from the stack
Yuho Choi <dbgh9129@gmail.com>
USB: pci-quirks: Release EHCI device reference
Jiangong.Han <jiangong.han@windriver.com>
USB: usbmon: fix null-ptr-deref in mon_bus_remove() when mon_bus_init() fails
Diego Fernando Mancera Gomez <diegomancera.dev@gmail.com>
usb: image: microtek: stop SG processing after transfer errors
Junxian Huang <huangjunxian6@hisilicon.com>
RDMA/hns: Fix GID capacity loss in 64K system
Junxian Huang <huangjunxian6@hisilicon.com>
RDMA/hns: Limit gmv_entry_num to avoid memory waste
Yuho Choi <dbgh9129@gmail.com>
PCI: xgene: Use managed clock for PCIe controller
Justin Yeh <justin.yeh@mediatek.com>
arm64: dts: mediatek: mt8188-geralt: Enlarge SCP core0 memory region
Shakeel Butt <shakeel.butt@linux.dev>
kernfs: fix up the unlocked attribute reads on the creation paths
Karl Mehltretter <kmehltretter@gmail.com>
efi/libstub: Fix efi_set_event_at() parameter documentation
Salah Triki <salah.triki@gmail.com>
iio: imu: adis16400: Check return value of spi_setup()
Matti Vaittinen <mazziesaccount@gmail.com>
iio: accel: kionix-kx022a: Fix IPOL macro name
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix use-after-free of the firmware event workqueue
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: zero out diagnostic buffer status memory
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix buffer overflow in the BSG target device map
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds phy array access on link change
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds read of event data
Ranjan Kumar <ranjan.kumar@broadcom.com>
scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix target device reference leak in device removal handshake
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds sense buffer access
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds reply frame access
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix buffer overflow when caching log data
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix target device reference leak in BSG task management
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix I/O block counter leak on admin request post failure
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests
Chandrakanth Patil <chandrakanth.patil@broadcom.com>
scsi: mpi3mr: Fix buffer overflow in BSG passthrough request copy
Linmao Li <lilinmao@kylinos.cn>
power: supply: bq2515x: Propagate charge-enable read errors
Henrik Grimler <henrik.grimler@axis.com>
dt-bindings: power: bq27xxx: bq27z561: allow interrupts property
Ryan Brue <ryanbrue.dev@gmail.com>
power: supply: bq24190_charger: use the wake irq API
hpp.iscas <hppiscas@163.com>
power: supply: mm8013: Publish the OF module alias
Karl Mehltretter <kmehltretter@gmail.com>
power: supply: mp2629: Use the full batt_impedance_compensation name in the ABI document
K Prateek Nayak <kprateek.nayak@amd.com>
cpufreq/amd-pstate-ut: Fix amd_pstate_ut_check_freq failure with 'Requested CPU Min frequency' BIOS option
Willem de Bruijn <willemb@google.com>
selftests: net: csum: filter packets by source address and port
Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
wifi: ath12k: Free allocated external IRQs on request_irq() failure
Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
wifi: ath12k: Free allocated CE IRQs on request_irq() failure
Nicolas Escande <nico.escande@gmail.com>
wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func()
Mikhail Lobanov <m.lobanov@rosalinux.ru>
wifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: utils: Adjust message printing macros for ACPI objects
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: glue: Rework the success message in acpi_device_notify()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: glue: Reduce debug noise from acpi_device_notify()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: scan: Stop calling acpi_bus_init_power() early
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: PCI: Introduce acpi_dev_get_pci_dev()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: PM: Drop parent state update from acpi_device_get_power()
Ian Gallagher <cdine@cdine.org>
ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: nau8822: keep regcache offline while supplies are off
Alexey Charkov <alchark@flipper.net>
ASoC: codecs: nau8822: add support for supply regulators
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: codecs: nau8822: convert to snd_soc_dapm_xxx()
Vinod Koul <vkoul@kernel.org>
dmaengine: zynqmp_dma: drop redundant label
Srinivas Neeli <srinivas.neeli@amd.com>
dmaengine: xilinx_dma: Move descriptors to done list based on completion bit
Srinivas Neeli <srinivas.neeli@amd.com>
dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction
Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
dmaengine: dw-axi-dmac: convert clock handling to clk_bulk API
Golla Nagendra <nagendra.golla@amd.com>
dmaengine: zynqmp_dma: Fix chan probe/remove error handling
Ruoyu Wang <ruoyuw560@gmail.com>
dmaengine: img-mdc: Fix runtime PM usage counter leak
Myeonghun Pak <mhun512@gmail.com>
dmaengine: mediatek: hsdma: fix runtime PM leak on init failure
Hongling Zeng <zenghongling@kylinos.cn>
dmaengine: at_hdmac: Fix use-after-free by proper tasklet cleanup
Hongling Zeng <zenghongling@kylinos.cn>
dmaengine: sun6i-dma: Fix use-after-free in error handling paths
Li Youhong <liyouhong@kylinos.cn>
spi: amlogic-spisg: check clk_prepare_enable() return value
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: sta32x: make power restoration transactional
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
ASoC: codecs: sta32x: convert to snd_soc_dapm_xxx()
Pengpeng Hou <pengpeng@iscas.ac.cn>
ASoC: codecs: sma1307: validate setting firmware layout
Karl Mehltretter <kmehltretter@gmail.com>
mtd: spinand: Fix spinand_manufacturer_ops kernel-doc
Mingpei CAO <caomingpei@gmail.com>
libbpf: Fix array comparison in BTF dedup
Aaron Tomlin <atomlin@atomlin.com>
perf trace: Add upper bound checks for augmented BTF struct printing
Aaron Tomlin <atomlin@atomlin.com>
perf trace: Enhance BTF type formatting to symbolise kernel function pointers
Mark Brown <broonie@kernel.org>
perf bpf: Fix up build failure due to change of btf_vlen() return type
Qiuxu Zhuo <qiuxu.zhuo@intel.com>
EDAC/i10nm: Fix Granite Rapids ADXL MC mapping
Tianyi Chen <hi@tychen.cc>
selftests/sched_ext: Handle CPU hotplug write failures
Manush Prajwal <manushprajwal555@gmail.com>
pwm: lp3943: fix NULL pointer dereference for an unconfigured channel
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt6797: fix wrong unwind order and error code in enable_clock
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8186: Fix MCK error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8186: Fix APLL enable error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8186: Fix AFE clock error handling
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8186: Fix clock handling in mux disable path
bui duc phuc <phucduc.bui@gmail.com>
ASoC: mediatek: mt8186: Fix APLL mux setting error handling
Bert Karwatzki <spasswolf@web.de>
mac80211: tx: Use info->flags in ieee80211_tx_h_select_key()
Chen-Yu Tsai <wenst@chromium.org>
pwm: mtk-disp: Fix period readback
Karl Mehltretter <kmehltretter@gmail.com>
virtio_ccw: always take irq_lock in the classic interrupt handler
Karl Mehltretter <kmehltretter@gmail.com>
virtio_ccw: fix synchronize_cbs() after interrupt fallback
Igor Belwon <igor.belwon@mentallysanemainliners.org>
arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header path
Brian Norris <briannorris@chromium.org>
arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmware
Pengpeng Hou <hppiscas@163.com>
ASoC: fs210x: report register restore errors
Pengpeng Hou <hppiscas@163.com>
ASoC: es8389: report resume restore errors
Zhang Yi <zhangyi@everest-semi.com>
ASoC: codecs: ES8389: Modify volatile_register
Pengpeng Hou <hppiscas@163.com>
ASoC: es8375: report resume restore errors
Pengpeng Hou <hppiscas@163.com>
ASoC: es8326: report resume restore errors
Karl Mehltretter <kmehltretter@gmail.com>
irqchip/gic-v3-its: Don't WARN on LPI free allocation failure
Linkai Gong <gonglinkai@kylinos.cn>
drivers/base/node: fix UAF on device_register() failure
Keguang Zhang <keguang.zhang@gmail.com>
pwm: loongson: Reload PWM configuration through counter reset
Karl Mehltretter <kmehltretter@gmail.com>
ABI: sysfs-class-infiniband: Drop the entries of the removed qib driver
Dmitry Torokhov <dmitry.torokhov@gmail.com>
gpio: crystalcove: add missing MODULE_ALIAS()
Leon Romanovsky <leon@kernel.org>
RDMA/irdma: Preserve fast-registration IOVA on 32-bit
Mark Amirkan <markdamirkan@gmail.com>
perf evsel: Validate RAW sample before byte swapping
Mark Amirkan <markdamirkan@gmail.com>
perf evsel: Validate branch stack before byte swapping
Aaron Tomlin <atomlin@atomlin.com>
perf trace: Fix error checking in btf_struct_scnprintf()
Marcel Hofmann <marcel.hofmann@ingenics-digital.com>
remoteproc: imx_rproc: Allow mappings ending at region boundary
Felix Gu <ustc.gu@gmail.com>
spi: mtk-nor: fix runtime PM usage count leak in probe error path
Dave Jiang <dave.jiang@intel.com>
ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata
Dave Jiang <dave.jiang@intel.com>
efi/cper: Read only validated fields in cper_mem_err_pack()
Dave Jiang <dave.jiang@intel.com>
ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy
Dave Jiang <dave.jiang@intel.com>
ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion
Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
ACPI: extlog: Trace CPER CXL Protocol Error Section
Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
ACPI: APEI: GHES: Add helper to copy CPER CXL protocol error info to work struct
Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
ACPI: extlog: Trace CPER PCI Express Error Section
Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
ACPI: extlog: Trace CPER Non-standard Section Body
Dave Jiang <dave.jiang@intel.com>
ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length
Dave Jiang <dave.jiang@intel.com>
ACPI: extlog: Validate elog record length before walking sections
Dave Jiang <dave.jiang@intel.com>
efi/cper: Reject an error status block length that wraps a u32
Dave Jiang <dave.jiang@intel.com>
efi/cper: Reject CPER records with an out-of-range error_data_length
Jisheng Zhang <jszhang@kernel.org>
regulator: mp886x: fix vsel_mask
Sunny Luo <sunny.luo@amlogic.com>
spi: amlogic: spisg: Fix the incorrect keep_ss of the last descriptor
Xianwei Zhao <xianwei.zhao@amlogic.com>
spi: amlogic: spisg: Fix transfer size limit and timeout handling
Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
selftests/bpf: make cmdline_contains stricter
Richard Cheng <icheng@nvidia.com>
cxl/fwctl: Propagate feature RPC delivery errors
Richard Cheng <icheng@nvidia.com>
cxl/features: Reject feature offset that overflows 16-bit field
Jared McArthur <j-mcarthur@ti.com>
arm64: dts: ti: k3-j722s-evm: Switch audio codec clock from audio_refclk1 to external clock
Maulik Shah <maulik.shah@oss.qualcomm.com>
arm64: dts: qcom: purwa: Drop the Hamoa workaround for PDC
Pengpeng Hou <pengpeng@iscas.ac.cn>
memory: brcmstb_dpfe: validate firmware section sizes
Pengpeng Hou <pengpeng@iscas.ac.cn>
irqchip/riscv-imsic: Use GENMASK for base address masks
Julius Bairaktaris <julius@bairaktaris.de>
wifi: mac80211: fix swapped fq_overlimit/fq_overmemory in aqm debugfs
Fabrice Derepas <fabrice.derepas@canonical.com>
crypto: asymmetric_keys - fix OOB read in pefile_parse_binary
Ruoyu Wang <ruoyuw560@gmail.com>
hwrng: cctrng - Fix runtime PM usage counter leak
Jérôme Pouiller <jerome.pouiller@silabs.com>
wifi: wfx: fix possible device hang during init
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: drop encap offload frames with a tainted key
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: don't send encap offload frames unencrypted
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: fix key selection for encap offload frames
Johannes Berg <johannes.berg@intel.com>
wifi: mac80211: fix unauthorised port check for encap offload
Lachlan Hodges <lachlan.hodges@morsemicro.com>
wifi: mac80211: don't seed an S1G sta's last_rate
Paul Dolan <paul.dolan.dev@gmail.com>
selftests/pidfd: fix PPID values in error message
Paul Dolan <paul.dolan.dev@gmail.com>
selftests/clone3: tighten CLONE_CLEAR_SIGHAND conflict test
Gregor Herburger <gregor.herburger@linutronix.de>
arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
Peter Robinson <pbrobinson@gmail.com>
arm64: dts: broadcom: bcm2712: adjust display status
Rob Herring (Arm) <robh@kernel.org>
arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to root level
Maíra Canal <mcanal@igalia.com>
arm64: dts: broadcom: bcm2712: Add V3D device node
Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
wifi: ath11k: unregister PM notifier on QMI init failure path
Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
wifi: ath11k: fix NULL dereference in ahb remove when QMI init incomplete
Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
wifi: ath11k: fix sporadic WLAN initialization failures
Julius Bairaktaris <julius@bairaktaris.de>
wifi: ath11k: disable interrupts during firmware crash recovery
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
wifi: ath12k: signal regd update completion when reg event is dropped
Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
clk: Use the generic OF phandle parsing in only one place
Chengchang Tang <tangchengchang@huawei.com>
RDMA/hns: Fix missing CQE when UD QP use different SL
Rosen Penev <rosenp@gmail.com>
dmaengine: fsl_raid: avoid free_q underflow in free_chan_resources
Rosen Penev <rosenp@gmail.com>
dmaengine: fsl_raid: don't invoke client callback under desc_lock
Koichiro Den <den@valinux.co.jp>
PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming
Toke Høiland-Jørgensen <toke@redhat.com>
bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively
Ionut Nechita <ionut.nechita@windriver.com>
x86/crash: Reserve elfcorehdr for CONFIG_NR_CPUS, not CONFIG_NR_CPUS_DEFAULT
Richard Zhu <hongxing.zhu@nxp.com>
arm64: dts: imx95: Avoid 32-bit PCIe window System RAM overlap
Pengpeng Hou <pengpeng@iscas.ac.cn>
remoteproc: imx_dsp: Acquire runtime PM before adding carveouts
Peng Fan <peng.fan@nxp.com>
remoteproc: imx_dsp_rproc: Drop extra space
Alexander Aring <aahringo@redhat.com>
dlm: fix variable key length lookup
Joseph Qi <joseph.qi@linux.alibaba.com>
dlm: fix buffer overflow from negative len in dlm_search_rsb_tree
Danila Chernetsov <listdansp@mail.ru>
dlm: fix NULL pointer dereference in dlm_dump_rsb_name()
Danila Chernetsov <listdansp@mail.ru>
dlm: validate lock modes in recovery messages
Vasily Gorbik <gor@linux.ibm.com>
sched/core: Don't steal a proxy-exec donor
Miklos Szeredi <mszeredi@redhat.com>
fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO
Tao Cui <cuitao@kylinos.cn>
sched_ext/scx_flatcg: Make cgv_node_less() wraparound-safe
Abdurrahman Karadag <abdurrahmankaradag19@gmail.com>
wifi: rtw88: debugfs: don't vzalloc(0) when rsvd_page is read unconfigured
Dave Jiang <dave.jiang@intel.com>
cxl/ras: Pass the PCI device's struct device to match_memdev_by_parent()
Chris Morgan <macromorgan@hotmail.com>
arm64: dts: rockchip: Correct Device Orientation on Gameforce Ace
Boris Faure <boris@fau.re>
soundwire: intel: initialise quirk_mask before reading it
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
microblaze: prevent ptrace writes to MSR and pt_mode
Alexander A. Klimov <grandmaster@al2klimov.de>
microblaze: CCF: fix refcount leak
Jerome Brunet <jbrunet@baylibre.com>
clk: fix self-consuming provider module pinning
Orgad Shaneh <orgads@gmail.com>
staging: octeon: schedule the TX cleanup tasklet every 1024th packet
Myeonghun Pak <mhun512@gmail.com>
staging: rtl8723bs: disable SDIO function on block size failure
Ethan Tidmore <ethantidmore06@gmail.com>
staging: rtl8723bs: remove unused private debug counters
Rob Barnes <robbarnes@google.com>
platform/chrome: cros_ec_proto: Fix deferred response
Hongyan Xu <getshell@seu.edu.cn>
soc: qcom: apr: clean up failed service registrations
Felix Gu <ustc.gu@gmail.com>
spi: omap2-mcspi: Remove unbalanced pm_runtime_put_sync() calls
Ruoyu Wang <ruoyuw560@gmail.com>
pwm: renesas-tpu: Fix runtime PM reference leak
David Heidelberg <david@ixit.cz>
ASoC: wcd-mbhc-v2: Fix incorrect properties names and typos
Cai Xinchen <caixinchen1@huawei.com>
lsm: don't call security_backing_file_free() multiple times
Taniya Das <taniya.das@oss.qualcomm.com>
dt-bindings: clock: qcom,milos-videocc: Add missing power-domains support
Taniya Das <taniya.das@oss.qualcomm.com>
dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support
Luca Weiss <luca.weiss@fairphone.com>
dt-bindings: clock: qcom,milos-camcc: Document interconnect path
Runyu Xiao <runyu.xiao@seu.edu.cn>
remoteproc: xlnx: Initialize mailbox work before requesting channels
Shaikh Kamaluddin <shaikhkamal2012@gmail.com>
cxl/mce: Avoid alias page retirement for corrected errors
Shujath Mohd <shujath@outlook.in>
arm64: dts: qcom: sdm845-sony-xperia-tama: Fix Bluetooth UART pinctrl
Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
remoteproc: qcom_q6v5_adsp: Fix double jiffies conversion in adsp_start()
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
dt-bindings: display: panel: samsung,s6e8aa5x01: Allow common properties
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Validate unwinding sizes against record payload
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Validate sym string NUL-termination in code load
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Validate debug entries on native (non-swap) path
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Use dirname() return value in jit_open()
Hrishikesh Suresh <hrishikesh123s@gmail.com>
perf: replace strcpy() with strncpy() in util/jitdump.c
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Free event in jit_repipe_code_move()
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Check snprintf return before computing header size
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Bounds-check debug entry byte-swap loop
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Prevent integer underflow in debug info size calculation
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Validate code_size against total_size in code load
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Fix debug_data and unwinding_data leaks
Arnaldo Carvalho de Melo <acme@redhat.com>
perf jitdump: Fix extended header read that always fails
Breno Leitao <leitao@debian.org>
kexec_file: stop the top-down search before it underflows
Rosen Penev <rosenp@gmail.com>
ARM: dts: helios4: fix spi1 location
Rosen Penev <rosenp@gmail.com>
ARM: dts: helios4: fix vbus-supply for USB2 PHY
Rosen Penev <rosenp@gmail.com>
ARM: dts: armada-388-helios4: fix vmmc property name
Rosen Penev <rosenp@gmail.com>
ARM: dts: armada-395-gp: drop unsupported SDHCI clock-frequency
Rosen Penev <rosenp@gmail.com>
ARM: dts: armada-385-clearfog-gtr: fix vmmc property name
Rosen Penev <rosenp@gmail.com>
ARM: dts: helios4: fix lm75 supply name
Pei Xiao <xiaopei01@kylinos.cn>
ata: pata_parport: Fix use-after-free in new_device_store
Matti Vaittinen <mazziesaccount@gmail.com>
iio: pressure: rohm-bm1390: Fix AVE_NUM initialization
Salah Triki <salah.triki@gmail.com>
iio: temperature: tmp117: fix calibbias cache update on I2C write failure
Esben Haabendal <esben@geanix.com>
dt-bindings: iio: light: ltr501: Add missing ltr303 compatible
Esben Haabendal <esben@geanix.com>
dt-bindings: iio: light: ltr501: Sort compatible enum array
Adi Nata <adinata.softwareengineer@gmail.com>
iio: humidity: hts221: report available values via read_avail()
Pengpeng Hou <pengpeng@iscas.ac.cn>
spi: sh-msiof: propagate setup runtime-PM errors
Chandradhar Kumar <chandradhar.2003@gmail.com>
regulator: fixed: reject incompatible platform devices
Yuan Chen <chenyuan_fl@163.com>
bpftool: Fix spurious batch file read error
Harry Wentland <harry.wentland@amd.com>
drm/vkms: Fix limited-range YCbCr to RGB conversion scaling
Tapio Reijonen <tapio.reijonen@vaisala.com>
gpio: pcf857x: implement get_direction()
Kumar Kartikeya Dwivedi <memxor@gmail.com>
bpf: Reject oversized stream read buffers
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs
Jianlin Shi <shijianlin11@foxmail.com>
bpf: Reject oversized bpf_stream_vprintk output with -E2BIG
Jianlin Shi <shijianlin11@foxmail.com>
bpf: Return partial progress from bpf_stream_read on fault
Jianlin Shi <shijianlin11@foxmail.com>
bpf: Fix stream capacity leak in staging path
Jianlin Shi <shijianlin11@foxmail.com>
bpf: Roll back stream capacity when allocation fails
Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
selftests/bpf: Allocate a larger timeout for connection
Darren Carreras <carrerasdarren@gmail.com>
libbpf: Avoid overflow in BTF.ext bounds check
Marek Vasut <marek.vasut+renesas@mailbox.org>
drm: of: Fix drm_of_get_data_lanes_count_ep() return value documentation
Andreas Kemnade <andreas@kemnade.info>
drm/omap: dsi: avoid sending bta sync all the time in writes
Tejun Heo <tj@kernel.org>
bpf: sched_ext: Mark ops argument container pointer fields as trusted
Adrián Larumbe <adrian.larumbe@collabora.com>
drm/panfrost: Prevent division by 0
Hao-Qun Huang <alvinhuang0603@gmail.com>
accel/qaic: reject BO sizes that overflow page count
Raveendra Talabattula <raveendra.talabattula@arm.com>
drm/komeda: Fix bits parsing of GLB_CORE_ID
Borislav Petkov (AMD) <bp@alien8.de>
x86/cpufeatures: Make X86_FEATURE leaf 17 Linux-specific
Tapio Reijonen <tapio.reijonen@vaisala.com>
serial: max310x: schedule tx_work directly from the IRQ handler
Alexandr <youdoit@mail.ru>
ALSA: hda/realtek: Enable mute and mic-mute LEDs on HP ENVY 17-cr0xxx
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time
Pei Xiao <xiaopei01@kylinos.cn>
comedi: dt2811: fix shift-out-of-bounds in IRQ check
Yang Zi <2959243019@qq.com>
comedi: addi_apci_3xxx: fix subdevice count underallocation
Amir Goldstein <amir73il@gmail.com>
ovl: inherit FMODE_NONOTIFY when reading directory layers
David Hildenbrand (Arm) <david@kernel.org>
mm/shmem: fix accounting of swapin-error markers
Roman Li <Roman.Li@amd.com>
drm/amd/display: Reset DET of HUBPs without a plane before outstanding updates
David Hildenbrand (Arm) <david@kernel.org>
mm/shmem: make shmem_file() check the file's inode
Bernard Pidoux <bernard.f6bvp@gmail.com>
hdlcdrv: close the hardware driver once, and only if it was opened
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: disconnect sockets under their lock when a neighbour goes away
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: clear the other half of a through route a new call takes over
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: give loopback answers LCIs that calls cannot be given
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: refuse an empty message when the Q bit is included
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: keep a socket unbound when connect() fails to autobind it
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: check the length of Restart Request and Diagnostic frames
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: change the loopback nodes under the neighbour list lock too
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: hold RTNL while a route is added or deleted
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: walk the neighbour list under its lock when a device goes down
Chris Mason <mason@kernel.org>
mm: fix deadlock of mremap() against UFFDIO_MOVE
Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
ASoC: qcom: q6apm: clear g_apm on driver removal
Alexei Solcanu <alexei.solcanu@pm.me>
hwmon: (gpd-fan) Reset both fans to automatic on duo boards
David Hildenbrand (Arm) <david@kernel.org>
fork: take mmap_lock before copying mm_struct
David Hildenbrand (Arm) <david@kernel.org>
mm/huge_memory: properly handle refcounted PUD mappings on fork
Lorenzo Stoakes (ARM) <ljs@kernel.org>
fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends
David Hildenbrand (Arm) <david@kernel.org>
mm/rmap: handle device-exclusive entries in folio_referenced_one()
Josef Bacik <josef@toxicpanda.com>
mm/filemap: read mapping->a_ops->free_folio under i_lock
David Hildenbrand (Arm) <david@kernel.org>
mm/shmem: preserve allocation errors when swapping in large entries
Cen Zhang (Microsoft) <cenzhang@linux.microsoft.com>
apparmor: fix query_data() output overlapping the lookup key
John Johansen <john.johansen@canonical.com>
apparmor: optimize current_label_crit_section() with needput
Gregory Price <gourry@gourry.net>
mm/userfaultfd: compare exact registration modes before skipping
Ian Bridges <icb@fastmail.org>
ksmbd: let the owner read and change the DACL when no ACE names it
YouYou Yu <youyouyu@amazon.com>
quota: initialize dquot cache before mounting rootfs
David Hildenbrand (Arm) <david@kernel.org>
mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names
Kuba Piecuch <jpiecuch@google.com>
sched_ext: Skip ops.set_weight() for disabled tasks
Daehyeon Ko <4ncienth@gmail.com>
sched/fair: Clear throttle state when leaving the fair class
Peter Zijlstra <peterz@infradead.org>
sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern
Peter Zijlstra <peterz@infradead.org>
sched: Re-arrange the {EN,DE}QUEUE flags
David Hildenbrand (Arm) <david@kernel.org>
mm/vma: don't leak the charge for stack growth
Lorenzo Stoakes (ARM) <ljs@kernel.org>
mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags
Jesse Zhang <Jesse.Zhang@amd.com>
drm/amdgpu: don't walk the CS chunks when allocating them failed
Guenter Roeck <linux@roeck-us.net>
hwmon: (tmp108) Fix initial conversion delay and wait until ready
Guenter Roeck <linux@roeck-us.net>
hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp()
Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
hwmon: (coretemp) Read TjMax only when refreshing the temperature
Chris Mason <mason@kernel.org>
mm/huge_memory: fix truncate racing with PMD zapping
David Hildenbrand (Arm) <david@kernel.org>
mm: fix address wraparound when scanning large folio PTEs
Aditya Sharma <adi.sharma@zohomail.in>
mm/memory: update stale locking comments for fault handlers
Chengfeng Ye <nicoyip.dev@gmail.com>
l2tp: snapshot sequencing state when building transmit headers
Fuad Tabba <fuad.tabba@linux.dev>
KVM: arm64: vgic-its: Don't map an LPI from more than one event
Lorenzo Stoakes (ARM) <ljs@kernel.org>
mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows
Jann Horn <jannh@google.com>
cipso: stop modifying live ip_options_rcu
Ian Bridges <icb@fastmail.org>
ksmbd: do not read past the DACL in the access denied debug message
Cen Zhang <zzzccc427@gmail.com>
ocfs2: validate move extents against a stable EOF
Dmitry Antipov <dmantipov@yandex.ru>
ocfs2: add extra flags check in ocfs2_ioctl_move_extents()
Qu Wenruo <wqu@suse.com>
btrfs: raid56: do not verify the content if there is no data checksum
Daejun Park <daejun7.park@samsung.com>
xfs: refuse a pNFS LAYOUTCOMMIT of a range without blocks
Prike Liang <Prike.Liang@amd.com>
drm/amdgpu/userq: wait for GPU reset before mapping or unmapping queues
Kevin Wang <kevin.wang@amd.com>
drm/amd/pm: populate unique ID for smu 13.0.7
Guenter Roeck <linux@roeck-us.net>
hwmon: (coretemp) Set nr_cores only after core_data allocation succeeds
Melissa Wen <mwen@igalia.com>
drm/amd/display: Signal PQ EOTF in FreeSync infopacket for DP HDR
Yuqiang Sun <izaiahsun@gmail.com>
ALSA: usb-audio: qcom: Check the return value of qmi_handle_init()
Xu Rao <raoxu@uniontech.com>
ALSA: usb-audio: qcom: Free QMI handle
Eva Kurchatova <eva.kurchatova@virtuozzo.com>
hugetlbfs: enforce F_SEAL_EXEC in setattr
Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
drm/amd/display: set allow_freesync before validating a new stream
Leo Liu <leo.liu@amd.com>
drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg
Gregory Price (Meta) <gourry@gourry.net>
mm/page_alloc: let the highest memory node recover from hopeless state
Johannes Weiner <hannes@cmpxchg.org>
mm: page_alloc: do not give all non-blocking requests reserve access
Myeonghun Pak <mhun512@gmail.com>
hwmon: (sht15) Stop deferred work before releasing its resources
Pan Chuang <panchuang@vivo.com>
hwmon: (sht15) Remove redundant dev_err()
Maxime Chevallier <maxime.chevallier@bootlin.com>
net: Use a dedicated flag to track disabled napi instances
Lance Yang <lance.yang@linux.dev>
khugepaged: fix readahead lock inversion in collapse_file()
Will Deacon <will@kernel.org>
tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures
Takashi Iwai <tiwai@suse.de>
ALSA: pcm: Prevent O_APPEND open on OSS streams
Takashi Iwai <tiwai@suse.de>
ALSA: pcm: Optimize cpu_latency_qos_*() calls
Junjie Cao <junjie.cao@intel.com>
Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728
Vincent Mailhol <mailhol@kernel.org>
can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices
Matt Turner <mattst88@gmail.com>
alpha: select SYSCTL_EXCEPTION_TRACE
Yufan Chen <ericterminal@gmail.com>
io_uring/eventfd: reset deferred signal state
Eric Dumazet <edumazet@kernel.org>
inet: frags: bound the wmem charge of the socket completing a reassembly
Ciro Pedrini <ciro.pedrini@gmail.com>
platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
platform/x86: hp-wmi: Order DMI board name arrays
Javier Carrasco <javier.carrasco.cruz@gmail.com>
hwmon: chipcap2: synchronize ready IRQ state
Javier Carrasco <javier.carrasco.cruz@gmail.com>
hwmon: chipcap2: serialize access to the alarm indicators
Guenter Roeck <linux@roeck-us.net>
hwmon: (chipcap2) Drop unnecessary include files
Georgia Garcia <georgia.garcia@canonical.com>
apparmor: fix profile leak when a policy load fails
John Johansen <john.johansen@canonical.com>
apparmor: constify aa_profile parameters on read-only compute paths
John Johansen <john.johansen@canonical.com>
apparmor: constify aa_perms parameters that are read-only
John Johansen <john.johansen@canonical.com>
apparmor: refactor xattr attachment, to take the file path
Jesse Zhang <Jesse.Zhang@amd.com>
drm/amdgpu: drop the gang leader reference when freeing gang jobs
Lorenzo Stoakes (ARM) <ljs@kernel.org>
mm/vma: fix expansion of VMA_MIXEDMAP_BIT VMAs
Jesse Zhang <Jesse.Zhang@amd.com>
drm/amdgpu: sign extend the addresses GEM_OP(GET_MAPPING_INFO) returns
Chao Yu <chao@kernel.org>
f2fs: fix to fetch ino via ino_of_node() under cache lock
Amir Goldstein <amir73il@gmail.com>
ovl: inherit FMODE_NONOTIFY when opening directory realfiles
Christian Brauner <brauner@kernel.org>
ovl: port ovl_dir_llseek() to cred guard
Darong Lu <zzyy19904204639@163.com>
libceph: initialize CRUSH choose argument weights
Javier Carrasco <javier.carrasco.cruz@gmail.com>
hwmon: chipcap2: disable device after hwmon teardown
Javier Carrasco <javier.carrasco.cruz@gmail.com>
hwmon: chipcap2: fix IRQ teardown ordering
HOYOUNG SEO <hy50.seo@samsung.com>
scsi: ufs: core: Change the error check sequence for auto hibern8
Guixin Liu <kanie@linux.alibaba.com>
cxl/pci: Use the Device GPF DVSEC for restricted endpoints
David Hildenbrand (Arm) <david@kernel.org>
mm/userfaultfd: wake waiters when registration modes are removed
David Hildenbrand (Arm) <david@kernel.org>
mm/userfaultfd: write-lock the VMA before waking waiters when unregistering
Ali Ahmet Memiş <aliamemis@disroot.org>
platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively
Ali Ahmet Memiş <aliamemis@disroot.org>
ACPI: utils: Add exclusive AML evaluation helpers
Ravi Hothi <ravi.hothi@oss.qualcomm.com>
ASoC: qcom: audioreach: fix module cfg blob size handling
Eklavya Singh <eklavyasingh2106@gmail.com>
ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute
Karl Mehltretter <kmehltretter@gmail.com>
ocfs2/cluster: hold a reference on the heartbeat thread
Alexey Charkov <alchark@flipper.net>
PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all()
Bjorn Helgaas <bhelgaas@google.com>
PCI/pwrctrl: slot: Rename private struct and pointers for consistency
guolingxing <guolingxing@tju.edu.cn>
btrfs: prevent deleting the wrong subvolume by ID
Josef Bacik <josef@toxicpanda.com>
pidfs: don't let PIDFD_GET_INFO miss a reaped task
Christian Brauner <brauner@kernel.org>
pidfs: prepare to drop exit_info pointer
William Palacek <William.Palacek@amd.com>
drm/amdkfd: Validate the control stack of a restored queue
Lee Jones <lee@kernel.org>
ASoC: SOF: Intel: hda-sdw-bpt: Stop active DMA before closing BPT streams
Bard Liao <yung-chuan.liao@linux.intel.com>
ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close
Rik van Riel <riel@surriel.com>
mm/memcontrol: fix stuck FLUSHING_CACHED_CHARGE bit on isolated cpus
Yao Yiqi <yaoyiqi3@huawei.com>
fbcon: Rebuild rotated font buffer on font change
Josef Bacik <josef@toxicpanda.com>
mm/shmem: hold off eviction in shmem_writeout()
Ian Bridges <icb@fastmail.org>
ksmbd: enforce the read-only share flag when creating a stream
David Hildenbrand (Arm) <david@kernel.org>
mm/ksm: fix use of a freed anon_vma at swap-in
Ian Bridges <icb@fastmail.org>
ksmbd: revert fsids on durable reconnect and replay failure
Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
9p/xen: drain response work after unbinding IRQ
Josef Bacik <josef@toxicpanda.com>
mm/hugetlb: fix endless write fault on a leftover uffd bit
Marc Zyngier <maz@kernel.org>
KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E
Eric Dumazet <edumazet@kernel.org>
inet: frags: limit the truesize of a reassembly queue
Sean Christopherson <seanjc@google.com>
KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM
-------------
Diffstat:
.gitignore | 1 -
Documentation/ABI/stable/sysfs-class-infiniband | 118 --
Documentation/ABI/testing/sysfs-bus-pci | 14 +-
Documentation/ABI/testing/sysfs-class-power-mp2629 | 2 +-
Documentation/admin-guide/LSM/LoadPin.rst | 10 +-
Documentation/admin-guide/LSM/ipe.rst | 4 +-
Documentation/admin-guide/kernel-parameters.txt | 3 +
.../bindings/arm/mediatek/mediatek,audsys.yaml | 2 +-
.../bindings/clock/mediatek,apmixedsys.yaml | 2 +-
.../bindings/clock/mediatek,topckgen.yaml | 2 +-
.../bindings/clock/qcom,milos-camcc.yaml | 27 +
.../bindings/clock/qcom,milos-videocc.yaml | 19 +
.../devicetree/bindings/display/msm/hdmi.yaml | 4 +-
.../panel/samsung,s6e8aa5x01-ams561ra01.yaml | 2 +-
.../devicetree/bindings/dma/stericsson,dma40.yaml | 14 +
.../bindings/iio/light/liteon,ltr501.yaml | 3 +-
.../interrupt-controller/chrp,open-pic.yaml | 7 +-
.../media/allwinner,sun4i-a10-video-engine.yaml | 21 +-
.../devicetree/bindings/power/supply/bq27xxx.yaml | 1 -
.../power/supply/stericsson,ab8500-charger.yaml | 76 +-
.../devicetree/bindings/vendor-prefixes.yaml | 20 +
Documentation/leds/leds-st1202.rst | 5 +
Documentation/mm/process_addrs.rst | 14 +-
Documentation/networking/netdevices.rst | 9 +
Documentation/networking/psp.rst | 8 +
Documentation/trace/histogram.rst | 3 +
Documentation/virt/hyperv/overview.rst | 12 +-
Makefile | 4 +-
arch/alpha/Kconfig | 1 +
arch/alpha/mm/fault.c | 29 +
arch/arc/Makefile | 9 +-
arch/arc/lib/Makefile | 8 +
arch/arm/boot/dts/gemini/gemini.dtsi | 2 +-
.../boot/dts/marvell/armada-385-clearfog-gtr.dtsi | 2 +-
arch/arm/boot/dts/marvell/armada-388-helios4.dts | 23 +-
arch/arm/boot/dts/marvell/armada-395-gp.dts | 1 -
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 40 +-
arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 9 +-
arch/arm/boot/dts/st/ste-ab8500.dtsi | 6 -
arch/arm/boot/dts/st/ste-ab8505.dtsi | 23 +-
arch/arm/boot/dts/st/ste-dbx5x0.dtsi | 5 -
arch/arm/boot/dts/st/ste-href-ab8500.dtsi | 104 ++
arch/arm/boot/dts/st/ste-href-ab8505.dtsi | 118 +-
arch/arm/boot/dts/st/stm32mp135.dtsi | 44 +-
arch/arm/boot/dts/st/stm32mp135f-dk.dts | 1 +
.../arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 1 +
arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts | 2 +-
arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi | 1 +
arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 2 +-
arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 2 +
arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 1 +
arch/arm/include/asm/domain.h | 17 -
arch/arm/include/asm/memory.h | 4 +-
arch/arm/include/asm/pgtable-2level-hwdef.h | 1 -
arch/arm/include/asm/pgtable-2level.h | 7 -
arch/arm/include/asm/sparsemem.h | 4 +
arch/arm/kernel/efi.c | 13 +
arch/arm/mach-mvebu/Kconfig | 4 +-
arch/arm/mach-versatile/platsmp-vexpress.c | 4 +-
arch/arm/mach-versatile/v2m.c | 4 +-
arch/arm/mm/Kconfig | 7 -
arch/arm/mm/alignment.c | 10 +-
arch/arm/mm/dma-mapping.c | 5 +-
arch/arm/mm/ioremap.c | 53 +-
arch/arm/mm/mmu.c | 76 +-
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 4 +-
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 9 +
.../boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 4 +-
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 5 +
.../boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts | 90 +-
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 33 +-
arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 14 +-
.../boot/dts/freescale/imx8mp-kontron-dl.dtso | 11 +
arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 32 +-
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 20 +-
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 4 +-
arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts | 4 +-
arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 4 +-
arch/arm64/boot/dts/freescale/imx95.dtsi | 4 +-
arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h | 2 +-
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 5 +
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 +-
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 +
arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi | 5 +
arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi | 7 +-
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 5 +
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 5 +
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 101 +-
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 8 +-
arch/arm64/boot/dts/qcom/monaco-evk.dts | 3 +-
arch/arm64/boot/dts/qcom/purwa.dtsi | 5 +
arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 4 +-
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +-
.../boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 2 +
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 4 +
arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +-
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1-crd.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi | 1 +
arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 3 +-
.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 1 +
.../qcom/x1e80100-dell-inspiron-14-plus-7441.dts | 4 +-
.../boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 1 +
.../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 1 +
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 1 +
.../boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 1 +
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 32 +-
arch/arm64/boot/dts/rockchip/rk3566-base.dtsi | 4 +
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 4 +
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 1 -
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 2 +-
.../boot/dts/rockchip/rk3588s-gameforce-ace.dts | 7 +-
.../arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 20 +
arch/arm64/boot/dts/st/stm32mp231.dtsi | 4 +-
arch/arm64/boot/dts/st/stm32mp251.dtsi | 4 +-
arch/arm64/boot/dts/ti/k3-am62-verdin-ivy.dtsi | 41 +-
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 41 +-
arch/arm64/boot/dts/ti/k3-am62a-phycore-som.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 2 +-
arch/arm64/boot/dts/ti/k3-am62d2-evm.dts | 2 +-
arch/arm64/boot/dts/ti/k3-am62p-verdin.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 2 +-
arch/arm64/boot/dts/ti/k3-am62p5-var-som.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 20 +-
.../boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi | 2 +
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/include/asm/rsi_smc.h | 2 +-
arch/arm64/kernel/pi/Makefile | 1 +
arch/arm64/kvm/config.c | 77 +
arch/arm64/kvm/sys_regs.c | 3 +
arch/arm64/kvm/vgic/vgic-its.c | 26 +-
arch/arm64/net/bpf_jit_comp.c | 32 +-
arch/m68k/apollo/dn_ints.c | 6 +
arch/m68k/mac/config.c | 31 +-
arch/microblaze/Makefile | 6 +-
arch/microblaze/include/asm/uaccess.h | 3 +-
arch/microblaze/kernel/cpu/cpuinfo.c | 1 +
arch/microblaze/kernel/ptrace.c | 3 +
arch/mips/Makefile | 22 +-
arch/mips/cavium-octeon/dma-octeon.c | 2 +-
arch/nios2/kernel/nios2_ksyms.c | 1 +
arch/powerpc/kernel/trace/ftrace_entry.S | 6 +
arch/riscv/boot/dts/sophgo/cv180x.dtsi | 2 +-
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 2 +-
arch/riscv/boot/dts/starfive/jh7100-common.dtsi | 28 +-
arch/riscv/boot/dts/starfive/jh7100.dtsi | 67 +-
arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 27 +-
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts | 6 +-
.../boot/dts/starfive/jh7110-milkv-marscm.dtsi | 6 +-
.../boot/dts/starfive/jh7110-pine64-star64.dts | 6 +-
.../jh7110-starfive-visionfive-2-lite.dtsi | 165 +++
.../dts/starfive/jh7110-starfive-visionfive-2.dtsi | 6 +-
arch/riscv/boot/dts/starfive/jh7110.dtsi | 67 +-
arch/riscv/include/asm/insn.h | 2 +-
arch/riscv/net/bpf_jit_comp64.c | 14 +-
arch/riscv/net/bpf_jit_core.c | 1 +
arch/s390/kernel/ptrace.c | 9 +-
arch/s390/kernel/uprobes.c | 2 +-
arch/sh/Kconfig | 1 +
arch/sh/boards/board-sh7785lcr.c | 2 +-
arch/sh/boot/dts/Makefile | 2 +-
arch/sh/configs/migor_defconfig | 2 +-
arch/sh/configs/sdk7786_defconfig | 2 +-
arch/sh/configs/shx3_defconfig | 2 +-
arch/sh/include/asm/uaccess_32.h | 8 +-
arch/um/include/shared/skas/stub-data.h | 9 +
arch/um/kernel/skas/syscall.c | 5 +-
arch/x86/boot/string.c | 13 +-
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/include/asm/cpufeatures.h | 5 +-
arch/x86/include/asm/cpuid/api.h | 2 +-
arch/x86/include/asm/shared/string.h | 52 +
arch/x86/include/asm/string.h | 7 +
arch/x86/include/asm/svm.h | 4 +-
arch/x86/kernel/cpu/common.c | 8 +-
arch/x86/kernel/cpu/mshyperv.c | 27 +-
arch/x86/kernel/cpu/scattered.c | 3 +
arch/x86/kernel/crash.c | 6 +-
arch/x86/kernel/fpu/xstate.c | 7 +-
arch/x86/kvm/reverse_cpuid.h | 1 -
arch/x86/kvm/svm/nested.c | 23 +-
arch/x86/kvm/svm/svm.c | 2 +
arch/x86/kvm/svm/svm.h | 2 +
arch/x86/platform/pvh/enlighten.c | 5 +-
arch/x86/power/hibernate.c | 51 +-
block/bdev.c | 12 +-
block/bfq-iosched.c | 4 +-
block/blk-cgroup.c | 19 +-
block/blk-cgroup.h | 6 +-
block/blk-flush.c | 8 +-
block/blk-iocost.c | 310 ++--
block/blk-iolatency.c | 3 +-
block/blk-map.c | 1 +
block/blk-mq-tag.c | 27 +-
block/blk-mq.c | 147 +-
block/blk-mq.h | 4 +-
block/blk-throttle.c | 25 +-
block/blk-timeout.c | 3 +-
block/blk-zoned.c | 82 +-
block/blk.h | 14 +
block/fops.c | 117 +-
block/partitions/mac.c | 4 +-
crypto/algapi.c | 23 +-
crypto/asymmetric_keys/verify_pefile.c | 5 +
crypto/lskcipher.c | 6 +-
crypto/rsassa-pkcs1.c | 4 +-
crypto/tcrypt.c | 182 ++-
drivers/accel/amdxdna/amdxdna_gem.c | 26 +-
drivers/accel/qaic/qaic_data.c | 8 +-
drivers/accel/rocket/rocket_job.c | 2 -
drivers/acpi/Kconfig | 2 +
drivers/acpi/acpi_extlog.c | 78 +
drivers/acpi/acpi_pcc.c | 20 +-
drivers/acpi/acpi_video.c | 12 +-
drivers/acpi/acpica/dsfield.c | 3 +-
drivers/acpi/acpica/evxfgpe.c | 50 +-
drivers/acpi/acpica/exfield.c | 11 +-
drivers/acpi/acpica/nsxfname.c | 1 +
drivers/acpi/apei/ghes.c | 73 +-
drivers/acpi/apei/ghes_helpers.c | 51 +-
drivers/acpi/button.c | 34 +
drivers/acpi/cppc_acpi.c | 22 +-
drivers/acpi/device_pm.c | 77 +-
drivers/acpi/fan_core.c | 9 +-
drivers/acpi/glue.c | 84 +-
drivers/acpi/numa/hmat.c | 2 +-
drivers/acpi/pci_link.c | 1 +
drivers/acpi/pci_root.c | 22 +-
drivers/acpi/platform_profile.c | 82 +-
drivers/acpi/scan.c | 40 +-
drivers/acpi/tables.c | 3 +
drivers/acpi/utils.c | 41 +
drivers/ata/ahci.c | 31 +-
drivers/ata/libahci.c | 15 +
drivers/ata/libata-core.c | 93 +-
drivers/ata/libata-scsi.c | 2 +-
drivers/ata/pata_parport/pata_parport.c | 9 +-
drivers/ata/sata_dwc_460ex.c | 5 +-
drivers/base/class.c | 4 +-
drivers/base/core.c | 7 +-
drivers/base/node.c | 17 +-
drivers/base/power/runtime.c | 6 +-
drivers/block/drbd/drbd_main.c | 1 +
drivers/block/drbd/drbd_receiver.c | 2 +
drivers/block/floppy.c | 10 +-
drivers/block/null_blk/null_blk.h | 3 +-
drivers/block/null_blk/zoned.c | 4 +-
drivers/block/rnbd/rnbd-srv-sysfs.c | 28 +-
drivers/block/rnbd/rnbd-srv.c | 36 +-
drivers/block/rnull/configfs.rs | 2 +-
drivers/block/swim.c | 287 ++--
drivers/block/swim3.c | 8 +-
drivers/block/swim_asm.S | 136 +-
drivers/block/ublk_drv.c | 9 +-
drivers/block/virtio_blk.c | 11 +-
drivers/block/xen-blkback/blkback.c | 7 +
drivers/block/zloop.c | 84 +-
drivers/bluetooth/btintel.c | 6 +-
drivers/bluetooth/btmtk.c | 88 +-
drivers/bluetooth/btmtksdio.c | 13 +-
drivers/bluetooth/btusb.c | 27 +-
drivers/bluetooth/virtio_bt.c | 4 +-
drivers/bus/arm-cci.c | 6 +-
drivers/bus/mhi/host/pci_generic.c | 5 +-
drivers/char/hw_random/cctrng.c | 7 +-
drivers/char/hw_random/intel-rng.c | 5 +-
drivers/char/hw_random/jh7110-trng.c | 39 +-
drivers/char/scx200_gpio.c | 8 +-
drivers/clk/bcm/clk-raspberrypi.c | 2 +
drivers/clk/clk-cdce925.c | 9 +-
drivers/clk/clk-lmk04832.c | 3 +
drivers/clk/clk-milbeaut.c | 10 +-
drivers/clk/clk-renesas-pcie.c | 5 +
drivers/clk/clk-s2mps11.c | 12 +-
drivers/clk/clk-si521xx.c | 2 +-
drivers/clk/clk-si5351.c | 20 +-
drivers/clk/clk.c | 51 +-
drivers/clk/clk.h | 5 +-
drivers/clk/clkdev.c | 4 +-
drivers/clk/imx/clk-composite-93.c | 11 +-
drivers/clk/mediatek/reset.h | 6 +-
drivers/clk/qcom/clk-alpha-pll.c | 9 +
drivers/clk/qcom/clk-rcg2.c | 35 +-
drivers/clk/qcom/clk-rpmh.c | 25 +-
drivers/clk/qcom/dispcc-sm8450.c | 2 +-
drivers/clk/qcom/gcc-glymur.c | 69 +-
drivers/clk/qcom/gcc-ipq5424.c | 4 +-
drivers/clk/qcom/gcc-qcs615.c | 2 +-
drivers/clk/qcom/gcc-x1e80100.c | 6 +-
drivers/clk/qcom/lpasscc-sm6115.c | 4 +-
drivers/clk/qcom/mmcc-msm8960.c | 3 +-
drivers/clk/qcom/mmcc-msm8996.c | 4 +-
drivers/clk/qcom/mmcc-sdm660.c | 2 +-
drivers/clk/starfive/clk-starfive-jh7110-sys.c | 3 +
drivers/clk/stm32/clk-stm32mp21.c | 4 +-
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 37 +-
drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 128 +-
drivers/clk/sunxi-ng/ccu_div.h | 18 +-
drivers/clk/ti/adpll.c | 1 +
drivers/clk/versatile/clk-icst.c | 4 +
drivers/clocksource/clksrc-dbx500-prcmu.c | 2 +
drivers/clocksource/timer-econet-en751221.c | 1 +
drivers/clocksource/timer-mediatek.c | 4 +-
drivers/clocksource/timer-ti-dm.c | 6 +-
drivers/comedi/drivers/addi_apci_3xxx.c | 2 +-
drivers/comedi/drivers/comedi_parport.c | 3 +-
drivers/comedi/drivers/dmm32at.c | 3 +-
drivers/comedi/drivers/dt2811.c | 2 +-
drivers/comedi/drivers/dt2814.c | 3 +-
drivers/comedi/drivers/ni_atmio16d.c | 4 +-
drivers/comedi/drivers/pcmmio.c | 3 +-
drivers/comedi/drivers/pcmuio.c | 5 +-
drivers/cpufreq/amd-pstate-ut.c | 23 +-
drivers/cpufreq/amd-pstate.c | 31 +-
drivers/cpufreq/amd-pstate.h | 14 +
drivers/cpufreq/qcom-cpufreq-hw.c | 3 +
drivers/cpufreq/sparc-us2e-cpufreq.c | 11 +-
drivers/cpufreq/sti-cpufreq.c | 4 +-
drivers/cpufreq/tegra194-cpufreq.c | 2 +-
drivers/cpuidle/governors/menu.c | 8 +-
drivers/cpuidle/governors/teo.c | 11 +
drivers/crypto/amlogic/amlogic-gxl-cipher.c | 25 +-
drivers/crypto/atmel-aes.c | 2 +
drivers/crypto/atmel-sha.c | 17 +
drivers/crypto/ccp/ccp-dev-v3.c | 4 +
drivers/crypto/ccp/ccp-dev-v5.c | 4 +
drivers/crypto/ccp/sfs.c | 9 +-
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 -
drivers/crypto/inside-secure/eip93/eip93-regs.h | 2 +-
drivers/crypto/intel/qat/qat_common/adf_init.c | 24 +-
drivers/crypto/intel/qat/qat_common/adf_isr.c | 15 +-
drivers/crypto/intel/qat/qat_common/qat_algs.c | 15 +-
.../crypto/intel/qat/qat_common/qat_asym_algs.c | 38 +-
drivers/crypto/mxs-dcp.c | 3 +
drivers/crypto/starfive/jh7110-cryp.c | 20 +-
drivers/crypto/talitos.c | 93 +-
drivers/crypto/talitos.h | 5 +-
drivers/cxl/core/core.h | 18 +-
drivers/cxl/core/edac.c | 30 +-
drivers/cxl/core/features.c | 56 +-
drivers/cxl/core/hdm.c | 68 +-
drivers/cxl/core/mce.c | 8 +-
drivers/cxl/core/pci.c | 24 +-
drivers/cxl/core/port.c | 183 ++-
drivers/cxl/core/ras.c | 45 +-
drivers/cxl/core/region.c | 15 +-
drivers/cxl/cxl.h | 33 +-
drivers/cxl/cxlpci.h | 7 +-
drivers/cxl/mem.c | 2 -
drivers/cxl/port.c | 62 +
drivers/dax/bus.c | 8 +-
drivers/dma/at_hdmac.c | 28 +-
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 37 +-
drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 5 +-
drivers/dma/fsl_raid.c | 32 +-
drivers/dma/img-mdc-dma.c | 2 +-
drivers/dma/ioat/init.c | 18 +-
drivers/dma/mediatek/mtk-hsdma.c | 26 +-
drivers/dma/mv_xor.c | 1 +
drivers/dma/plx_dma.c | 10 +-
drivers/dma/sprd-dma.c | 45 +-
drivers/dma/ste_dma40.c | 434 ++++--
drivers/dma/ste_dma40_ll.h | 2 -
drivers/dma/sun6i-dma.c | 31 +-
drivers/dma/xilinx/xilinx_dma.c | 37 +-
drivers/dma/xilinx/zynqmp_dma.c | 29 +-
drivers/dpll/zl3073x/core.h | 30 +
drivers/dpll/zl3073x/dpll.c | 149 +-
drivers/dpll/zl3073x/out.h | 17 +
drivers/dpll/zl3073x/prop.c | 82 +-
drivers/edac/i10nm_base.c | 1 +
drivers/firmware/arm_scmi/common.h | 22 +
drivers/firmware/arm_scmi/driver.c | 38 +-
drivers/firmware/arm_scmi/protocols.h | 9 +-
drivers/firmware/arm_scmi/raw_mode.c | 30 +-
drivers/firmware/cirrus/cs_dsp.c | 2 +
drivers/firmware/efi/cper.c | 51 +-
drivers/firmware/efi/libstub/efi-stub-entry.c | 4 +-
drivers/firmware/efi/libstub/efi-stub-helper.c | 10 +-
drivers/firmware/efi/libstub/efi-stub.c | 2 +-
drivers/firmware/efi/libstub/efistub.h | 4 +-
drivers/firmware/efi/libstub/fdt.c | 6 +-
drivers/firmware/efi/libstub/file.c | 8 +-
drivers/firmware/efi/libstub/kaslr.c | 2 +-
drivers/firmware/efi/libstub/mem.c | 2 +-
drivers/firmware/efi/libstub/pci.c | 2 +-
drivers/firmware/efi/libstub/random.c | 8 +-
drivers/firmware/efi/libstub/riscv-stub.c | 7 +-
drivers/firmware/efi/libstub/riscv.c | 2 +-
drivers/firmware/efi/libstub/tpm.c | 8 +-
drivers/firmware/efi/libstub/unaccepted_memory.c | 2 +-
drivers/firmware/efi/libstub/x86-stub.c | 10 +-
drivers/firmware/imx/imx-dsp.c | 6 +-
drivers/firmware/qcom/qcom_tzmem.c | 2 +-
drivers/gpio/gpio-crystalcove.c | 1 +
drivers/gpio/gpio-pcf857x.c | 16 +-
drivers/gpio/gpiolib.c | 20 +-
drivers/gpu/buddy.c | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 5 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 19 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 5 +
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 63 +-
drivers/gpu/drm/amd/amdgpu/atom.c | 82 +-
drivers/gpu/drm/amd/amdgpu/atom.h | 3 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 6 +-
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 4 +-
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 +-
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 11 +-
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 8 +-
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 12 +-
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 12 +-
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 10 +-
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 10 +-
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 10 +-
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 10 +-
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 +-
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 3 +
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 3 +
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 +
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 3 +
.../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 30 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 20 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h | 38 +-
drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +-
.../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 32 +
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h | 3 +
.../gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 3 +
.../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 20 +
.../gpu/drm/arm/display/include/malidp_product.h | 10 +-
drivers/gpu/drm/drm_of.c | 8 +-
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 3 +-
drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 16 +
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 29 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 77 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 +
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 16 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 17 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 +-
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 4 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 9 -
drivers/gpu/drm/msm/dp/dp_ctrl.c | 3 +
drivers/gpu/drm/msm/dp/dp_debug.c | 1 +
drivers/gpu/drm/msm/msm_io_utils.c | 6 +-
drivers/gpu/drm/omapdrm/dss/dsi.c | 63 +-
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_mmu.c | 11 +-
drivers/gpu/drm/panthor/panthor_gpu.c | 5 +-
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 16 +-
drivers/gpu/drm/tegra/submit.c | 12 +-
drivers/gpu/drm/tiny/appletbdrm.c | 48 +-
drivers/gpu/drm/vc4/vc4_bo.c | 3 +-
drivers/gpu/drm/vc4/vc4_drv.c | 29 -
drivers/gpu/drm/vc4/vc4_hvs.c | 10 +
drivers/gpu/drm/vc4/vc4_v3d.c | 8 +-
drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py | 87 ++
drivers/gpu/drm/vkms/tests/vkms_format_test.c | 38 +-
drivers/gpu/drm/vkms/vkms_formats.c | 55 +-
drivers/hid/hid-logitech-hidpp.c | 1 +
drivers/hid/hid-magicmouse.c | 4 +
drivers/hid/i2c-hid/i2c-hid-core.c | 11 +-
.../intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 4 +-
.../intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 2 +
.../intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 6 +-
.../intel-thc-hid/intel-quicki2c/quicki2c-hid.h | 2 +-
.../intel-thc-hid/intel-quickspi/pci-quickspi.c | 2 +
.../intel-thc-hid/intel-quickspi/quickspi-dev.h | 2 +
.../intel-thc-hid/intel-quickspi/quickspi-hid.c | 6 +-
.../intel-thc-hid/intel-quickspi/quickspi-hid.h | 2 +-
.../intel-quickspi/quickspi-protocol.c | 2 +-
drivers/hid/wacom_wac.c | 14 +-
drivers/hv/hv_common.c | 10 -
drivers/hv/vmbus_drv.c | 31 +-
drivers/hwmon/chipcap2.c | 177 ++-
drivers/hwmon/coretemp.c | 29 +-
drivers/hwmon/gpd-fan.c | 1 +
drivers/hwmon/sht15.c | 26 +-
drivers/hwmon/tmp108.c | 26 +-
drivers/hwtracing/coresight/coresight-etm.h | 4 +-
drivers/hwtracing/coresight/coresight-etm3x-core.c | 87 +-
.../hwtracing/coresight/coresight-etm3x-sysfs.c | 83 +-
drivers/hwtracing/coresight/coresight-etm4x-core.c | 9 -
drivers/hwtracing/coresight/coresight-sysfs.c | 7 +
drivers/i3c/master/mipi-i3c-hci/core.c | 12 +-
drivers/iio/accel/bma220_spi.c | 3 +-
drivers/iio/accel/kionix-kx022a.h | 2 +-
drivers/iio/dac/ad5758.c | 8 +-
drivers/iio/humidity/hts221_core.c | 106 +-
drivers/iio/imu/adis16400.c | 5 +-
drivers/iio/pressure/rohm-bm1390.c | 4 +-
drivers/iio/temperature/tmp117.c | 9 +-
drivers/infiniband/core/device.c | 7 +-
drivers/infiniband/core/lag.c | 14 +-
drivers/infiniband/core/mad.c | 2 +
drivers/infiniband/core/mad_rmpp.c | 7 +-
drivers/infiniband/core/nldev.c | 5 +-
drivers/infiniband/core/restrack.c | 3 +-
drivers/infiniband/core/sysfs.c | 9 +-
drivers/infiniband/core/uverbs_std_types_device.c | 1 +
drivers/infiniband/core/uverbs_std_types_wq.c | 2 +-
drivers/infiniband/core/verbs.c | 3 +-
drivers/infiniband/hw/bnxt_re/hw_counters.c | 6 +-
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 58 +-
drivers/infiniband/hw/bnxt_re/qplib_res.c | 9 +-
drivers/infiniband/hw/bnxt_re/qplib_sp.c | 2 +-
drivers/infiniband/hw/cxgb4/cm.c | 5 +-
drivers/infiniband/hw/cxgb4/provider.c | 5 +
drivers/infiniband/hw/efa/efa_com.c | 28 +-
drivers/infiniband/hw/hfi1/sdma.c | 3 +
drivers/infiniband/hw/hfi1/verbs.c | 4 +
drivers/infiniband/hw/hns/hns_roce_cq.c | 1 +
drivers/infiniband/hw/hns/hns_roce_device.h | 1 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 55 +-
drivers/infiniband/hw/ionic/ionic_controlpath.c | 16 +-
drivers/infiniband/hw/ionic/ionic_ibdev.c | 4 +-
drivers/infiniband/hw/irdma/ctrl.c | 14 +-
drivers/infiniband/hw/irdma/hw.c | 14 +-
drivers/infiniband/hw/irdma/main.c | 2 +
drivers/infiniband/hw/irdma/pble.c | 8 +-
drivers/infiniband/hw/irdma/type.h | 4 +-
drivers/infiniband/hw/irdma/verbs.c | 13 +-
drivers/infiniband/hw/mlx4/main.c | 4 +
drivers/infiniband/hw/mlx5/cq.c | 5 +-
drivers/infiniband/hw/mlx5/fs.c | 45 +-
drivers/infiniband/hw/mlx5/main.c | 54 +-
drivers/infiniband/hw/mlx5/odp.c | 2 +-
drivers/infiniband/hw/mlx5/qp.c | 8 +-
drivers/infiniband/hw/mlx5/qpc.c | 8 +-
drivers/infiniband/hw/mlx5/srq.c | 3 +-
drivers/infiniband/hw/mlx5/wr.c | 1 +
drivers/infiniband/hw/usnic/usnic_debugfs.c | 2 +-
drivers/infiniband/sw/rdmavt/qp.c | 2 +-
drivers/infiniband/sw/rxe/rxe_loc.h | 8 +-
drivers/infiniband/sw/rxe/rxe_mr.c | 12 +-
drivers/infiniband/sw/rxe/rxe_mw.c | 3 +
drivers/infiniband/sw/rxe/rxe_net.c | 70 +-
drivers/infiniband/sw/rxe/rxe_odp.c | 9 +-
drivers/infiniband/sw/rxe/rxe_qp.c | 10 +
drivers/infiniband/sw/rxe/rxe_recv.c | 9 +-
drivers/infiniband/sw/rxe/rxe_req.c | 11 +-
drivers/infiniband/sw/rxe/rxe_resp.c | 23 +-
drivers/infiniband/sw/rxe/rxe_verbs.h | 1 +
drivers/infiniband/sw/siw/siw_main.c | 5 +-
drivers/infiniband/sw/siw/siw_qp_tx.c | 20 +-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 +
drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
drivers/infiniband/ulp/rtrs/rtrs-clt.c | 32 +-
drivers/infiniband/ulp/srp/ib_srp.c | 9 +-
drivers/interconnect/qcom/icc-rpm.c | 11 +-
drivers/interconnect/qcom/icc-rpm.h | 4 +-
drivers/interconnect/qcom/smd-rpm.c | 8 +-
drivers/interconnect/samsung/exynos.c | 1 +
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 4 +-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +
drivers/iommu/intel/dmar.c | 71 +-
drivers/iommu/intel/iommu.c | 173 ++-
drivers/iommu/intel/iommu.h | 1 +
drivers/iommu/intel/nested.c | 2 +
drivers/iommu/iommufd/device.c | 8 +-
drivers/irqchip/irq-gic-common.c | 2 +-
drivers/irqchip/irq-gic-v3-its.c | 20 +-
drivers/irqchip/irq-gic-v3.c | 15 +-
drivers/irqchip/irq-gic.c | 4 +-
drivers/irqchip/irq-mips-gic.c | 59 +-
drivers/irqchip/irq-riscv-imsic-state.c | 21 +-
drivers/leds/led-class-flash.c | 2 +-
drivers/leds/leds-lm3692x.c | 4 +-
drivers/leds/leds-lp8860.c | 5 +-
drivers/leds/leds-pca9532.c | 9 +-
drivers/leds/leds-st1202.c | 225 ++-
drivers/mailbox/arm_mhu_db.c | 5 +-
drivers/mailbox/arm_mhuv2.c | 18 +-
drivers/mailbox/arm_mhuv3.c | 5 +-
drivers/mailbox/armada-37xx-rwtm-mailbox.c | 4 +-
drivers/mailbox/bcm-pdc-mailbox.c | 5 +-
drivers/mailbox/bcm2835-mailbox.c | 5 +-
drivers/mailbox/bcm74110-mailbox.c | 2 +-
drivers/mailbox/cv1800-mailbox.c | 2 +-
drivers/mailbox/hi6220-mailbox.c | 5 +-
drivers/mailbox/mailbox-mpfs.c | 2 -
drivers/mailbox/mailbox-sti.c | 4 +-
drivers/mailbox/pcc.c | 5 +-
drivers/mailbox/qcom-cpucp-mbox.c | 39 +-
drivers/mailbox/qcom-ipcc.c | 10 +-
drivers/mailbox/sprd-mailbox.c | 12 +-
drivers/mailbox/stm32-ipcc.c | 4 +-
drivers/mailbox/sun6i-msgbox.c | 4 +-
drivers/mailbox/tegra-hsp.c | 11 +-
drivers/mailbox/ti-msgmgr.c | 12 +-
drivers/md/dm-snap.c | 18 +-
drivers/md/dm-zone.c | 54 +-
drivers/md/dm.h | 3 +-
drivers/md/md.c | 30 +-
drivers/md/raid10.c | 3 +-
drivers/md/raid5-cache.c | 14 +-
drivers/md/raid5-ppl.c | 12 +-
drivers/md/raid5.c | 65 +-
drivers/media/i2c/ar0521.c | 1 -
drivers/media/i2c/ov5648.c | 4 +-
drivers/media/platform/qcom/iris/iris_ctrls.c | 2 +
.../platform/qcom/iris/iris_hfi_gen1_response.c | 2 +
.../platform/qcom/iris/iris_hfi_gen2_response.c | 1 +
drivers/media/platform/qcom/iris/iris_instance.h | 4 +
drivers/media/platform/qcom/iris/iris_probe.c | 2 +
drivers/media/platform/qcom/iris/iris_utils.c | 6 +
drivers/media/platform/qcom/iris/iris_utils.h | 1 +
drivers/media/platform/qcom/iris/iris_vb2.c | 6 +-
drivers/media/platform/qcom/iris/iris_vidc.c | 42 +-
drivers/media/platform/qcom/iris/iris_vpu_common.c | 2 +-
drivers/media/platform/qcom/venus/hfi_msgs.c | 3 +
drivers/memory/brcmstb_dpfe.c | 17 +-
drivers/memory/emif.c | 3 +
drivers/memory/samsung/exynos5422-dmc.c | 11 +-
drivers/mfd/da9150-core.c | 8 +-
drivers/mfd/intel_quark_i2c_gpio.c | 52 +-
drivers/mfd/rk8xx-core.c | 2 +-
drivers/misc/enclosure.c | 3 +-
drivers/misc/mei/vsc-tp.c | 17 +-
drivers/misc/nsm.c | 7 +-
drivers/mtd/mtd_blkdevs.c | 5 +
drivers/mtd/nand/raw/pl35x-nand-controller.c | 1 +
drivers/mtd/spi-nor/spansion.c | 7 -
drivers/net/amt.c | 8 +-
drivers/net/bonding/bond_sysfs.c | 4 +-
drivers/net/can/dev/skb.c | 2 +-
drivers/net/dsa/mt7530.c | 7 +-
drivers/net/dsa/mv88e6xxx/chip.c | 10 +-
drivers/net/ethernet/alacritech/slicoss.c | 2 +-
.../net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 +-
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 121 +-
drivers/net/ethernet/broadcom/asp2/bcmasp.h | 4 -
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c | 32 +-
drivers/net/ethernet/broadcom/bgmac.c | 51 +-
drivers/net/ethernet/broadcom/bnge/bnge_resc.c | 6 +-
drivers/net/ethernet/broadcom/bnge/bnge_resc.h | 9 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 83 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 7 +
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 102 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 +
drivers/net/ethernet/broadcom/tg3.c | 6 +
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 1 +
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 1 +
drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 +-
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 12 +-
drivers/net/ethernet/ibm/ibmveth.c | 670 +++++++--
drivers/net/ethernet/ibm/ibmveth.h | 5 +
drivers/net/ethernet/intel/ice/ice_lib.c | 4 +
drivers/net/ethernet/intel/ice/ice_ptp.c | 49 +-
drivers/net/ethernet/intel/ice/ice_ptp.h | 6 +-
.../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 +-
.../ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 5 +-
.../ethernet/marvell/octeontx2/nic/otx2_common.c | 5 +-
.../ethernet/marvell/octeontx2/nic/otx2_common.h | 3 +-
.../net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 10 +-
drivers/net/ethernet/marvell/octeontx2/nic/qos.c | 2 +
drivers/net/ethernet/mellanox/mlx4/intf.c | 15 +-
drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 6 +
.../mellanox/mlx5/core/en_accel/en_accel.h | 6 +
.../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 +
.../mellanox/mlx5/core/en_accel/psp_rxtx.h | 13 +
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 17 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 -
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 6 +-
.../net/ethernet/mellanox/mlx5/core/en_selftest.c | 4 +
.../mellanox/mlx5/core/steering/hws/fs_hws.c | 66 +-
.../mellanox/mlx5/core/steering/hws/fs_hws.h | 1 +
.../mellanox/mlx5/core/steering/hws/fs_hws_pools.c | 11 +-
.../mellanox/mlx5/core/steering/hws/pat_arg.c | 12 +-
.../mellanox/mlx5/core/steering/hws/pat_arg.h | 5 +
drivers/net/ethernet/meta/fbnic/fbnic.h | 7 +-
drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 78 +-
drivers/net/ethernet/meta/fbnic/fbnic_fw.h | 15 +-
drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 25 +-
drivers/net/ethernet/meta/fbnic/fbnic_netdev.h | 4 +-
drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 8 +-
drivers/net/ethernet/meta/fbnic/fbnic_rpc.c | 28 +-
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 2 +-
drivers/net/ethernet/microchip/fdma/fdma_api.c | 45 +-
drivers/net/ethernet/microchip/fdma/fdma_api.h | 20 +-
.../net/ethernet/microchip/lan966x/lan966x_fdma.c | 17 +-
.../net/ethernet/microchip/lan966x/lan966x_mac.c | 4 +-
.../net/ethernet/microchip/lan966x/lan966x_main.c | 19 +-
.../net/ethernet/microchip/lan966x/lan966x_ptp.c | 10 +-
.../microchip/sparx5/lan969x/lan969x_calendar.c | 8 +-
.../microchip/sparx5/lan969x/lan969x_fdma.c | 5 +-
.../net/ethernet/microchip/sparx5/sparx5_fdma.c | 3 +-
.../net/ethernet/microchip/sparx5/sparx5_packet.c | 15 +-
.../net/ethernet/microchip/sparx5/sparx5_psfp.c | 10 +-
drivers/net/ethernet/netronome/nfp/flower/main.h | 2 +
.../ethernet/netronome/nfp/flower/tunnel_conf.c | 24 +-
.../net/ethernet/pensando/ionic/ionic_bus_pci.c | 1 +
drivers/net/ethernet/pensando/ionic/ionic_main.c | 13 +-
drivers/net/ethernet/qlogic/qede/qede_filter.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/descs.h | 6 +-
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 25 +-
drivers/net/ethernet/stmicro/stmmac/hwif.h | 6 +-
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 61 +-
.../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 2 +-
drivers/net/ethernet/ti/am65-cpts.c | 1 +
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 86 +-
drivers/net/gtp.c | 51 +-
drivers/net/hamradio/hdlcdrv.c | 5 +-
drivers/net/ipvlan/ipvtap.c | 5 +-
drivers/net/loopback.c | 8 +-
drivers/net/macsec.c | 5 +
drivers/net/macvtap.c | 5 +-
drivers/net/phy/marvell.c | 97 +-
drivers/net/phy/qcom/at803x.c | 96 +-
drivers/net/phy/qcom/qca83xx.c | 58 +
drivers/net/phy/realtek/realtek_main.c | 2 +-
drivers/net/ppp/ppp_generic.c | 95 +-
drivers/net/ppp/pppoe.c | 8 +
drivers/net/pse-pd/si3474.c | 27 +-
drivers/net/team/team_core.c | 11 +
drivers/net/tun.c | 10 +
drivers/net/usb/cdc_mbim.c | 5 +-
drivers/net/usb/cdc_ncm.c | 7 +-
drivers/net/usb/lan78xx.c | 18 +-
drivers/net/usb/usbnet.c | 32 +-
drivers/net/veth.c | 7 +-
drivers/net/virtio_net.c | 12 +-
drivers/net/vxlan/vxlan_core.c | 2 +-
drivers/net/wireless/ath/ath10k/htt_tx.c | 12 +-
drivers/net/wireless/ath/ath11k/Kconfig | 3 +
drivers/net/wireless/ath/ath11k/ahb.c | 7 +-
drivers/net/wireless/ath/ath11k/ce.c | 2 +-
drivers/net/wireless/ath/ath11k/core.c | 11 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 19 +-
drivers/net/wireless/ath/ath11k/mac.c | 33 +-
drivers/net/wireless/ath/ath11k/mac.h | 2 +-
drivers/net/wireless/ath/ath11k/wmi.c | 9 +
.../net/wireless/ath/ath12k/debugfs_htt_stats.c | 2 +-
drivers/net/wireless/ath/ath12k/dp.c | 9 +-
drivers/net/wireless/ath/ath12k/mac.c | 21 +-
drivers/net/wireless/ath/ath12k/pci.c | 55 +-
drivers/net/wireless/ath/ath12k/wmi.c | 11 +-
drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 -
drivers/net/wireless/ath/carl9170/debug.c | 5 +-
drivers/net/wireless/broadcom/b43/debugfs.c | 2 +-
drivers/net/wireless/broadcom/b43legacy/debugfs.c | 2 +-
.../net/wireless/intel/iwlwifi/mld/low_latency.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 5 +
drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 164 ---
drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 3 -
drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 164 +++
drivers/net/wireless/marvell/mwifiex/cmdevt.c | 10 +-
drivers/net/wireless/marvell/mwifiex/fw.h | 6 +
drivers/net/wireless/marvell/mwifiex/init.c | 1 +
drivers/net/wireless/marvell/mwifiex/main.h | 1 +
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 +-
drivers/net/wireless/mediatek/mt76/channel.c | 27 +-
drivers/net/wireless/mediatek/mt76/mac80211.c | 112 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 13 +
drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 18 +-
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 13 +
drivers/net/wireless/mediatek/mt76/mt7615/usb.c | 17 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 11 +-
.../net/wireless/mediatek/mt76/mt7915/coredump.c | 7 +-
drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 6 +
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +-
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 47 +-
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h | 5 +
.../net/wireless/mediatek/mt76/mt7921/pci_mac.c | 4 +-
drivers/net/wireless/mediatek/mt76/mt7925/main.c | 50 +-
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 5 +
.../net/wireless/mediatek/mt76/mt7925/pci_mac.c | 6 +-
drivers/net/wireless/mediatek/mt76/mt792x.h | 2 +
drivers/net/wireless/mediatek/mt76/mt792x_mac.c | 6 +-
.../net/wireless/mediatek/mt76/mt7996/coredump.c | 7 +-
.../net/wireless/mediatek/mt76/mt7996/debugfs.c | 321 ++--
drivers/net/wireless/mediatek/mt76/mt7996/init.c | 6 +
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 15 +-
drivers/net/wireless/mediatek/mt76/mt7996/main.c | 127 +-
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 321 +++-
drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 31 +-
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 3 +-
drivers/net/wireless/mediatek/mt76/mt7996/regs.h | 38 +-
drivers/net/wireless/mediatek/mt76/scan.c | 36 +-
drivers/net/wireless/mediatek/mt76/tx.c | 7 +-
drivers/net/wireless/mediatek/mt76/usb.c | 16 +-
drivers/net/wireless/realtek/rtl8xxxu/core.c | 16 +-
drivers/net/wireless/realtek/rtw88/debug.c | 5 +
drivers/net/wireless/realtek/rtw88/sdio.c | 12 +
drivers/net/wireless/silabs/wfx/bh.c | 6 +-
drivers/net/wireless/silabs/wfx/bus_sdio.c | 1 +
drivers/net/wireless/silabs/wfx/main.c | 36 +-
drivers/nvdimm/pmem.c | 6 +-
drivers/nvme/host/core.c | 5 +-
drivers/nvme/host/fabrics.c | 30 +-
drivers/nvme/host/ioctl.c | 2 +-
drivers/nvme/host/multipath.c | 4 +-
drivers/nvme/host/nvme.h | 2 +-
drivers/nvme/host/tcp.c | 7 +-
drivers/nvme/host/zns.c | 10 +-
drivers/nvme/target/configfs.c | 24 +-
drivers/nvme/target/core.c | 16 +-
drivers/nvme/target/fabrics-cmd-auth.c | 9 +-
drivers/nvme/target/fabrics-cmd.c | 3 +-
drivers/nvme/target/fc.c | 15 +-
drivers/nvme/target/io-cmd-bdev.c | 29 +-
drivers/nvme/target/loop.c | 2 -
drivers/nvme/target/nvmet.h | 3 +-
drivers/nvme/target/rdma.c | 26 +-
drivers/nvme/target/tcp.c | 7 +-
drivers/nvme/target/zns.c | 12 +-
drivers/nvmem/layouts/onie-tlv.c | 1 +
drivers/nvmem/layouts/sl28vpd.c | 1 +
drivers/of/irq.c | 2 +-
drivers/opp/of.c | 2 +-
drivers/pci/controller/dwc/pci-dra7xx.c | 22 +-
drivers/pci/controller/dwc/pcie-qcom.c | 90 +-
drivers/pci/controller/dwc/pcie-rcar-gen4.c | 27 +
drivers/pci/controller/pci-aardvark.c | 31 +-
drivers/pci/controller/pci-xgene.c | 11 +-
drivers/pci/endpoint/functions/pci-epf-vntb.c | 8 +-
drivers/pci/iov.c | 25 -
drivers/pci/p2pdma.c | 59 +-
drivers/pci/pci-label.c | 92 +-
drivers/pci/pci.h | 4 -
drivers/pci/pcie/aer.c | 4 +-
drivers/pci/probe.c | 15 +-
drivers/pci/pwrctrl/slot.c | 31 +-
drivers/pci/quirks.c | 2 +-
drivers/pci/tph.c | 6 +-
drivers/pci/xen-pcifront.c | 5 +-
drivers/perf/cxl_pmu.c | 100 +-
drivers/perf/dwc_pcie_pmu.c | 11 +-
drivers/perf/marvell_cn10k_tad_pmu.c | 1 +
drivers/phy/cadence/phy-cadence-sierra.c | 11 +-
drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 59 +-
drivers/phy/hisilicon/phy-hi3670-pcie.c | 4 +-
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 19 +
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 8 +-
drivers/phy/rockchip/phy-rockchip-usbdp.c | 248 ++--
drivers/pinctrl/mediatek/pinctrl-mt7629.c | 2 +-
drivers/pinctrl/nuvoton/pinctrl-ma35.c | 8 +-
drivers/pinctrl/pinctrl-amd.c | 8 +-
drivers/pinctrl/sprd/pinctrl-sprd.c | 3 +
drivers/pinctrl/stm32/Kconfig | 2 +-
drivers/pinctrl/stm32/pinctrl-stm32.c | 3 +
drivers/pinctrl/sunplus/Kconfig | 8 +-
drivers/platform/chrome/cros_ec_proto.c | 32 +-
drivers/platform/chrome/cros_ec_proto_test.c | 158 +-
drivers/platform/chrome/cros_ec_typec.c | 104 +-
drivers/platform/cznic/turris-omnia-mcu-gpio.c | 31 +-
drivers/platform/olpc/olpc-ec.c | 2 +-
drivers/platform/x86/amd/pmc/pmc.c | 4 +
drivers/platform/x86/asus-wmi.c | 32 +
drivers/platform/x86/gpd-pocket-fan.c | 9 +-
.../platform/x86/hp/hp-bioscfg/int-attributes.c | 7 +-
.../x86/hp/hp-bioscfg/passwdobj-attributes.c | 2 +-
.../platform/x86/hp/hp-bioscfg/spmobj-attributes.c | 7 +
drivers/platform/x86/hp/hp-wmi.c | 24 +-
drivers/platform/x86/ibm_rtl.c | 8 +-
drivers/platform/x86/intel/telemetry/core.c | 4 +
drivers/platform/x86/intel/tpmi_power_domains.c | 9 +
drivers/platform/x86/intel/vsec.c | 15 +
drivers/platform/x86/lenovo/ideapad-laptop.c | 12 +-
drivers/platform/x86/msi-ec.c | 9 +
drivers/pmdomain/imx/scu-pd.c | 10 +-
drivers/power/supply/ab8500_bmdata.c | 2 +-
drivers/power/supply/ab8500_btemp.c | 28 +-
drivers/power/supply/ab8500_chargalg.c | 9 +-
drivers/power/supply/ab8500_charger.c | 402 ++++-
drivers/power/supply/ab8500_fg.c | 27 +-
drivers/power/supply/bq24190_charger.c | 39 +-
drivers/power/supply/bq2515x_charger.c | 15 +-
drivers/power/supply/bq257xx_charger.c | 2 +-
drivers/power/supply/generic-adc-battery.c | 3 +
drivers/power/supply/gpio-charger.c | 5 +-
drivers/power/supply/mm8013.c | 1 +
drivers/power/supply/qcom_battmgr.c | 27 +-
drivers/pps/generators/pps_gen.c | 10 +-
drivers/ptp/ptp_qoriq.c | 1 +
drivers/pwm/core.c | 1 +
drivers/pwm/pwm-loongson.c | 2 +
drivers/pwm/pwm-lp3943.c | 3 +
drivers/pwm/pwm-mtk-disp.c | 4 +-
drivers/pwm/pwm-renesas-tpu.c | 23 +-
drivers/regulator/ab8500.c | 159 +-
drivers/regulator/fixed.c | 4 +
drivers/regulator/irq_helpers.c | 38 +-
drivers/regulator/mp886x.c | 13 +-
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
drivers/remoteproc/imx_dsp_rproc.c | 11 +-
drivers/remoteproc/imx_rproc.c | 18 +-
drivers/remoteproc/qcom_q6v5_adsp.c | 2 +-
drivers/remoteproc/remoteproc_core.c | 3 +
drivers/remoteproc/xlnx_r5_remoteproc.c | 8 +-
drivers/rpmsg/mtk_rpmsg.c | 1 +
drivers/rpmsg/virtio_rpmsg_bus.c | 104 +-
drivers/rtc/Kconfig | 21 +
drivers/rtc/class.c | 8 +-
drivers/rtc/rtc-abx80x.c | 58 +-
drivers/rtc/rtc-bd70528.c | 5 +
drivers/rtc/rtc-ds1685.c | 20 +-
drivers/rtc/rtc-ftrtc010.c | 74 +-
drivers/rtc/rtc-mpfs.c | 4 +-
drivers/rtc/rtc-s35390a.c | 125 +-
drivers/s390/net/ism_drv.c | 3 +-
drivers/s390/virtio/virtio_ccw.c | 6 +-
drivers/scsi/ch.c | 2 +-
drivers/scsi/device_handler/scsi_dh_hp_sw.c | 4 +-
drivers/scsi/device_handler/scsi_dh_rdac.c | 10 +-
drivers/scsi/elx/libefc/efclib.c | 2 +
drivers/scsi/hisi_sas/hisi_sas.h | 3 +
drivers/scsi/hisi_sas/hisi_sas_main.c | 43 +
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 4 +
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 +-
drivers/scsi/hosts.c | 15 +
drivers/scsi/libsas/sas_task.c | 2 +-
drivers/scsi/mpi3mr/mpi3mr.h | 2 +-
drivers/scsi/mpi3mr/mpi3mr_app.c | 47 +-
drivers/scsi/mpi3mr/mpi3mr_fw.c | 17 +-
drivers/scsi/mpi3mr/mpi3mr_os.c | 100 +-
drivers/scsi/mpi3mr/mpi3mr_transport.c | 7 +
drivers/scsi/pm8001/pm8001_defs.h | 98 ++
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
drivers/scsi/pm8001/pm8001_hwi.h | 4 +-
drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
drivers/scsi/pm8001/pm80xx_hwi.h | 100 +-
drivers/scsi/scsi.c | 7 +-
drivers/scsi/scsi_debug.c | 314 ++--
drivers/scsi/scsi_lib.c | 101 +-
drivers/scsi/scsi_lib_test.c | 25 +-
drivers/scsi/scsi_priv.h | 1 +
drivers/scsi/scsi_scan.c | 81 +-
drivers/scsi/scsi_sysfs.c | 5 +-
drivers/scsi/scsi_transport_spi.c | 2 +-
drivers/scsi/sd.c | 20 +-
drivers/scsi/sd.h | 2 +-
drivers/scsi/sd_zbc.c | 20 +-
drivers/scsi/ses.c | 8 +-
drivers/scsi/st.c | 75 +
drivers/soc/qcom/apr.c | 50 +-
drivers/soc/qcom/pmic_glink.c | 3 +-
drivers/soc/qcom/pmic_pdcharger_ulog.c | 2 +-
drivers/soc/qcom/qcom-geni-se.c | 14 +-
drivers/soc/tegra/flowctrl.c | 7 +-
drivers/soundwire/intel_ace2x.c | 4 +-
drivers/soundwire/intel_auxdevice.c | 2 +-
drivers/spi/spi-amlogic-spisg.c | 43 +-
drivers/spi/spi-axi-spi-engine.c | 20 +-
drivers/spi/spi-bcm63xx-hsspi.c | 1 +
drivers/spi/spi-cs42l43.c | 8 +
drivers/spi/spi-fsl-spi.c | 22 +-
drivers/spi/spi-meson-spicc.c | 11 +-
drivers/spi/spi-mtk-nor.c | 1 +
drivers/spi/spi-mxic.c | 8 +-
drivers/spi/spi-omap2-mcspi.c | 242 ++-
drivers/spi/spi-qpic-snand.c | 30 +-
drivers/spi/spi-rockchip-sfc.c | 21 +-
drivers/spi/spi-rspi.c | 49 +-
drivers/spi/spi-sh-msiof.c | 5 +-
drivers/spi/spi-sun4i.c | 56 +-
drivers/spi/spi-tegra114.c | 49 +
drivers/spi/spi-virtio.c | 4 +-
drivers/spi/spi.c | 2 +-
drivers/spmi/spmi-pmic-arb.c | 2 +-
drivers/staging/iio/adc/ad7816.c | 33 +-
drivers/staging/media/ipu7/ipu7-isys.c | 1 +
drivers/staging/octeon/ethernet-tx.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_mlme.c | 13 -
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 3 -
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 +-
drivers/staging/rtl8723bs/core/rtw_recv.c | 24 +-
drivers/staging/rtl8723bs/hal/hal_com.c | 13 -
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 -
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 +-
drivers/staging/rtl8723bs/include/drv_types.h | 41 -
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 15 +-
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 43 +-
drivers/staging/sm750fb/sm750.c | 10 +-
drivers/thermal/gov_power_allocator.c | 7 +-
drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 8 +-
drivers/thermal/renesas/rzg3e_thermal.c | 151 +-
drivers/thermal/sprd_thermal.c | 6 +
drivers/thermal/thermal_trace.h | 4 +-
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 10 +-
drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 4 +
drivers/tty/serial/8250/8250.h | 16 +
drivers/tty/serial/8250/8250_hub6.c | 19 +-
drivers/tty/serial/8250/8250_platform.c | 9 +-
drivers/tty/serial/8250/8250_uniphier.c | 10 +-
drivers/tty/serial/8250/Kconfig | 4 +-
drivers/tty/serial/8250/Makefile | 2 +-
drivers/tty/serial/Kconfig | 1 +
drivers/tty/serial/ma35d1_serial.c | 2 +-
drivers/tty/serial/max310x.c | 686 ++++++++-
drivers/tty/serial/pmac_zilog.c | 1 +
drivers/tty/serial/serial_core.c | 4 +-
drivers/tty/serial/serial_txx9.c | 55 +-
drivers/tty/serial/sh-sci.c | 23 +-
drivers/tty/serial/sifive.c | 2 +-
drivers/ufs/core/ufshcd.c | 13 +-
drivers/usb/gadget/composite.c | 2 +-
drivers/usb/gadget/function/f_mass_storage.c | 7 +-
drivers/usb/gadget/udc/dummy_hcd.c | 4 +-
drivers/usb/host/pci-quirks.c | 1 +
drivers/usb/host/xhci-dbgtty.c | 2 +
drivers/usb/image/microtek.c | 1 +
drivers/usb/mon/mon_main.c | 3 +
drivers/usb/musb/da8xx.c | 8 +-
drivers/usb/storage/alauda.c | 95 +-
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 9 +-
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 9 +-
drivers/vfio/cdx/main.c | 10 +-
drivers/vfio/device_cdev.c | 12 +
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 10 +-
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 14 +-
drivers/vfio/pci/vfio_pci_core.c | 1 +
drivers/vfio/platform/vfio_platform_common.c | 10 +-
drivers/vfio/vfio_main.c | 7 -
drivers/vhost/vringh.c | 4 +-
drivers/video/fbdev/core/fbcon.c | 57 +
drivers/video/fbdev/gxt4500.c | 1 +
drivers/virtio/virtio.c | 2 +
drivers/virtio/virtio_pci_modern.c | 12 +-
fs/btrfs/accessors.c | 2 +-
fs/btrfs/block-group.c | 6 +-
fs/btrfs/ctree.h | 2 +-
fs/btrfs/defrag.c | 2 +-
fs/btrfs/disk-io.c | 10 +-
fs/btrfs/extent-tree.c | 3 +-
fs/btrfs/free-space-cache.c | 10 +
fs/btrfs/inode.c | 4 +-
fs/btrfs/ioctl.c | 11 +
fs/btrfs/messages.c | 5 +-
fs/btrfs/qgroup.c | 4 +-
fs/btrfs/raid56.c | 11 +-
fs/btrfs/tree-mod-log.c | 13 +-
fs/btrfs/verity.c | 31 +-
fs/btrfs/volumes.c | 266 +++-
fs/btrfs/volumes.h | 38 +
fs/btrfs/zoned.c | 8 +-
fs/ceph/addr.c | 67 +-
fs/ceph/inode.c | 2 +-
fs/ceph/super.c | 18 +-
fs/ceph/super.h | 1 -
fs/dcache.c | 2 +
fs/debugfs/file.c | 81 +-
fs/dlm/config.c | 30 +-
fs/dlm/dlm_internal.h | 5 +
fs/dlm/lock.c | 18 +-
fs/dlm/lock.h | 4 +-
fs/erofs/data.c | 5 +-
fs/eventpoll.c | 18 +-
fs/ext2/file.c | 7 +
fs/ext4/inode.c | 3 +-
fs/f2fs/node.c | 4 +-
fs/f2fs/super.c | 27 +-
fs/fs-writeback.c | 17 +-
fs/fs_pin.c | 15 +-
fs/fuse/dev.c | 26 +-
fs/fuse/file.c | 5 +-
fs/gfs2/bmap.c | 2 +-
fs/gfs2/inode.c | 2 +-
fs/hfs/btree.c | 7 +-
fs/hfsplus/btree.c | 7 +-
fs/hugetlbfs/inode.c | 6 +
fs/isofs/dir.c | 4 +-
fs/isofs/isofs.h | 11 +-
fs/isofs/joliet.c | 27 +-
fs/isofs/namei.c | 3 +-
fs/kernfs/dir.c | 92 +-
fs/kernfs/file.c | 27 +-
fs/kernfs/kernfs-internal.h | 2 +-
fs/kernfs/mount.c | 2 +-
fs/kernfs/symlink.c | 17 +-
fs/minix/inode.c | 16 +
fs/minix/minix.h | 9 +
fs/minix/namei.c | 27 +-
fs/netfs/internal.h | 32 +-
fs/nfs/client.c | 2 +-
fs/nfs/dir.c | 13 +-
fs/nfs/filelayout/filelayout.c | 5 +-
fs/nfs/flexfilelayout/flexfilelayout.c | 81 +-
fs/nfs/fs_context.c | 1 +
fs/nfs/internal.h | 31 +
fs/nfs/nfs3proc.c | 8 +
fs/nfs/nfs4client.c | 7 +-
fs/nfs/nfs4proc.c | 5 +
fs/nfs/nfs4xdr.c | 3 +-
fs/nfs/pnfs.c | 12 +-
fs/nfs/proc.c | 8 +
fs/nfs/sysfs.c | 16 +-
fs/nfs_common/nfslocalio.c | 101 +-
fs/nilfs2/namei.c | 8 +-
fs/nilfs2/recovery.c | 17 +
fs/nsfs.c | 4 +-
fs/ntfs3/attrib.c | 10 +-
fs/ntfs3/file.c | 9 +-
fs/ntfs3/frecord.c | 180 +--
fs/ntfs3/fsntfs.c | 130 +-
fs/ntfs3/inode.c | 13 +-
fs/ntfs3/ntfs_fs.h | 20 +-
fs/ntfs3/xattr.c | 8 +-
fs/ocfs2/cluster/heartbeat.c | 52 +-
fs/ocfs2/cluster/tcp.c | 8 +-
fs/ocfs2/dlmglue.c | 29 +-
fs/ocfs2/dlmglue.h | 5 +-
fs/ocfs2/export.c | 10 +-
fs/ocfs2/inode.c | 5 +-
fs/ocfs2/move_extents.c | 72 +-
fs/ocfs2/namei.c | 6 +-
fs/ocfs2/quota_local.c | 24 +
fs/ocfs2/xattr.c | 245 +++-
fs/ocfs2/xattr.h | 12 +-
fs/open.c | 1 +
fs/overlayfs/overlayfs.h | 9 +-
fs/overlayfs/readdir.c | 39 +-
fs/overlayfs/util.c | 11 +-
fs/pidfs.c | 53 +-
fs/proc/base.c | 8 +-
fs/proc/internal.h | 1 +
fs/proc/kcore.c | 8 +-
fs/proc/task_mmu.c | 9 +-
fs/pstore/ram.c | 1 +
fs/pstore/ram_core.c | 6 +
fs/quota/dquot.c | 10 +-
fs/resctrl/rdtgroup.c | 2 +-
fs/smb/server/Kconfig | 1 +
fs/smb/server/smb2pdu.c | 292 ++--
fs/smb/server/smb_common.c | 4 +-
fs/smb/server/smbacl.c | 41 +-
fs/smb/server/transport_tcp.c | 80 +-
fs/smb/server/vfs_cache.c | 15 +-
fs/smb/server/vfs_cache.h | 3 +
fs/splice.c | 43 +-
fs/sysfs/dir.c | 6 +-
fs/sysfs/file.c | 8 +-
fs/sysfs/mount.c | 10 +-
fs/sysfs/symlink.c | 7 +-
fs/sysfs/sysfs.h | 4 +-
fs/userfaultfd.c | 12 +-
fs/xattr.c | 2 +-
fs/xfs/xfs_aops.c | 2 +-
fs/xfs/xfs_file.c | 2 +-
fs/xfs/xfs_iomap.c | 20 +-
fs/xfs/xfs_iomap.h | 3 +-
fs/xfs/xfs_pnfs.c | 9 +-
include/acpi/acpi_bus.h | 9 +-
include/acpi/acpi_drivers.h | 9 +-
include/acpi/acpixf.h | 5 +
include/acpi/ghes.h | 4 +
include/asm-generic/mshyperv.h | 2 -
include/asm-generic/vmlinux.lds.h | 2 +-
include/cxl/event.h | 16 +-
include/kvm/arm_vgic.h | 1 +
include/linux/acpi.h | 24 +-
include/linux/blk-mq.h | 12 +-
include/linux/blkdev.h | 9 +-
include/linux/bpf.h | 11 +-
include/linux/clk-provider.h | 22 +-
include/linux/device-mapper.h | 10 +-
include/linux/device/class.h | 6 +-
include/linux/dibs.h | 6 +-
include/linux/etherdevice.h | 28 +
include/linux/filter.h | 9 +
include/linux/firewire.h | 1 -
include/linux/fortify-string.h | 2 -
include/linux/huge_mm.h | 5 +-
include/linux/if_bridge.h | 77 +-
include/linux/ipv6.h | 4 +
include/linux/kernfs.h | 40 +-
include/linux/kexec.h | 2 +
include/linux/kobject.h | 4 +-
include/linux/kobject_ns.h | 13 +-
include/linux/libata.h | 76 +-
include/linux/mfd/da9150/core.h | 1 +
include/linux/mm.h | 7 +
include/linux/mm_types.h | 12 +-
include/linux/mmap_lock.h | 54 +-
include/linux/mtd/spinand.h | 2 +-
include/linux/netdevice.h | 31 +-
include/linux/netfilter.h | 7 +
include/linux/nfslocalio.h | 12 +
include/linux/pci-p2pdma.h | 21 +-
include/linux/ppp_channel.h | 1 +
include/linux/quotaops.h | 5 +
include/linux/rcuref.h | 2 +-
include/linux/sched.h | 5 +-
include/linux/shmem_fs.h | 15 +-
include/linux/skbuff.h | 87 +-
include/linux/soc/ti/k3-ringacc.h | 31 +-
include/linux/sunrpc/svc_rdma.h | 2 +-
include/linux/sysfs.h | 24 +-
include/linux/userfaultfd_k.h | 10 +-
include/linux/watch_queue.h | 6 +-
include/net/bluetooth/bluetooth.h | 4 +-
include/net/bluetooth/hci_sync.h | 1 +
include/net/bluetooth/l2cap.h | 3 +-
include/net/cfg80211.h | 12 +-
include/net/cipso_ipv4.h | 11 +-
include/net/inet_frag.h | 9 +
include/net/ip.h | 2 +-
include/net/ip_vs.h | 50 +-
include/net/net_namespace.h | 8 +-
include/net/netfilter/nf_conntrack_seqadj.h | 1 +
include/net/netlabel.h | 11 +-
include/net/netns/netfilter.h | 2 +
include/net/seg6_hmac.h | 3 +-
include/net/switchdev.h | 1 +
include/scsi/scsi_cmnd.h | 7 +
include/scsi/scsi_common.h | 31 +-
include/scsi/scsi_device.h | 57 +-
include/scsi/scsi_host.h | 33 +-
include/scsi/scsi_proto.h | 65 +-
include/scsi/scsi_sense.h | 950 ++++++++++++
include/sound/aw88399.h | 624 ++++++++
include/sound/control.h | 4 +-
include/sound/core.h | 25 +-
include/sound/hda-sdw-bpt.h | 5 +-
include/sound/hda_codec.h | 6 +-
include/sound/hdaudio.h | 2 +
include/sound/pcm.h | 2 +
include/sound/pcm_oss.h | 1 +
include/sound/soc-component.h | 2 +-
include/sound/ump.h | 5 +
include/trace/events/iocost.h | 7 +-
include/trace/events/power.h | 3 +
include/trace/events/rxrpc.h | 2 +-
include/uapi/linux/firewire-cdev.h | 4 +-
include/uapi/linux/iommufd.h | 2 +-
include/vdso/math64.h | 20 +
init/main.c | 8 +-
io_uring/eventfd.c | 1 +
kernel/bpf/bpf_iter.c | 24 +-
kernel/bpf/bpf_lsm.c | 4 +-
kernel/bpf/btf.c | 27 +-
kernel/bpf/core.c | 54 +-
kernel/bpf/cpumap.c | 35 +-
kernel/bpf/devmap.c | 1 +
kernel/bpf/helpers.c | 108 +-
kernel/bpf/offload.c | 25 +-
kernel/bpf/stream.c | 64 +-
kernel/bpf/syscall.c | 43 +-
kernel/bpf/task_iter.c | 6 +-
kernel/bpf/verifier.c | 37 +-
kernel/cgroup/cpuset.c | 31 +-
kernel/cgroup/dmem.c | 4 +-
kernel/debug/kdb/kdb_io.c | 1 -
kernel/debug/kdb/kdb_main.c | 7 +-
kernel/debug/kdb/kdb_private.h | 3 +-
kernel/events/core.c | 3 +
kernel/fork.c | 32 +-
kernel/kcov.c | 35 +-
kernel/kexec_core.c | 7 +
kernel/kexec_file.c | 4 +-
kernel/module/tracking.c | 2 +-
kernel/nsproxy.c | 2 +-
kernel/profile.c | 2 +-
kernel/rcu/rcutorture.c | 2 +-
kernel/rcu/tree.c | 2 +-
kernel/rcu/tree.h | 3 +-
kernel/rcu/tree_nocb.h | 52 +-
kernel/reboot.c | 4 +-
kernel/resource_kunit.c | 3 +
kernel/sched/core.c | 60 +-
kernel/sched/ext.c | 33 +-
kernel/sched/fair.c | 4 +-
kernel/sched/idle.c | 4 +-
kernel/sched/rt.c | 2 +-
kernel/sched/sched.h | 63 +-
kernel/sched/stop_task.c | 4 +-
kernel/sched/syscalls.c | 7 +-
kernel/signal.c | 5 +-
kernel/time/timeconv.c | 6 +-
kernel/time/timer.c | 2 +
kernel/time/vsyscall.c | 26 +-
kernel/trace/bpf_trace.c | 29 +-
kernel/trace/trace_btf.c | 3 +
kernel/trace/trace_events_hist.c | 25 +-
kernel/ucount.c | 7 +-
kernel/watch_queue.c | 2 +-
kernel/watchdog_perf.c | 4 +-
lib/Kconfig.debug | 1 -
lib/bitmap-str.c | 24 +-
lib/decompress_unlz4.c | 4 +
lib/kobject.c | 10 +-
lib/kobject_uevent.c | 13 +-
lib/maple_tree.c | 43 +-
lib/seq_buf.c | 3 +-
lib/test_hmm.c | 2 +
lib/test_sysctl.c | 2 +-
lib/tests/seq_buf_kunit.c | 166 +++
lib/vdso/gettimeofday.c | 4 +-
mm/filemap.c | 29 +-
mm/gup.c | 17 +-
mm/gup_test.c | 17 +-
mm/huge_memory.c | 57 +-
mm/hugetlb.c | 22 +-
mm/internal.h | 31 +
mm/khugepaged.c | 51 +-
mm/ksm.c | 35 +-
mm/madvise.c | 6 +-
mm/memblock.c | 9 +-
mm/memcontrol.c | 6 +
mm/memory.c | 109 +-
mm/mmap.c | 8 +-
mm/mmap_lock.c | 150 +-
mm/mremap.c | 87 +-
mm/nommu.c | 2 +-
mm/oom_kill.c | 22 +-
mm/page_alloc.c | 6 +-
mm/rmap.c | 20 +-
mm/shmem.c | 62 +-
mm/slab_common.c | 4 +-
mm/userfaultfd.c | 41 +-
mm/util.c | 13 +
mm/vma.c | 58 +-
net/9p/trans_xen.c | 4 +-
net/bluetooth/6lowpan.c | 3 +-
net/bluetooth/hci_core.c | 4 +-
net/bluetooth/hci_event.c | 58 +-
net/bluetooth/hci_sync.c | 66 +-
net/bluetooth/iso.c | 3 +
net/bluetooth/l2cap_core.c | 24 +
net/bluetooth/mgmt.c | 115 +-
net/bluetooth/msft.c | 6 +
net/bpf/test_run.c | 170 ++-
net/bridge/br_mdb.c | 16 +-
net/bridge/br_multicast.c | 14 +-
net/bridge/br_netlink.c | 2 +-
net/bridge/br_private.h | 12 +
net/bridge/br_stp.c | 4 +-
net/bridge/br_stp_bpdu.c | 2 +-
net/bridge/br_switchdev.c | 23 +-
net/bridge/br_vlan.c | 7 +-
net/bridge/br_vlan_options.c | 2 +-
net/ceph/messenger_v1.c | 8 +-
net/ceph/osdmap.c | 2 +-
net/core/bpf_sk_storage.c | 7 +
net/core/dev.c | 79 +-
net/core/dev.h | 4 +
net/core/dev_addr_lists.c | 318 +++-
net/core/dev_addr_lists_test.c | 363 ++++-
net/core/dev_api.c | 3 +
net/core/dev_ioctl.c | 6 +-
net/core/filter.c | 96 +-
net/core/gro.c | 5 +-
net/core/lwtunnel.c | 6 +
net/core/net-sysfs.c | 50 +-
net/core/net_namespace.c | 8 +-
net/core/netdev-genl.c | 6 +
net/core/rtnetlink.c | 1 +
net/core/selftests.c | 2 +-
net/core/skbuff.c | 11 +-
net/core/sock.c | 3 +-
net/dcb/dcbnl.c | 2 +
net/devlink/region.c | 5 +
net/ipv4/cipso_ipv4.c | 16 +-
net/ipv4/devinet.c | 35 +-
net/ipv4/gre_offload.c | 2 +-
net/ipv4/inet_connection_sock.c | 3 +-
net/ipv4/inet_fragment.c | 66 +-
net/ipv4/ip_fragment.c | 13 +-
net/ipv4/ip_output.c | 15 +-
net/ipv4/ip_tunnel.c | 14 +-
net/ipv4/ipmr.c | 5 +
net/ipv4/syncookies.c | 12 +-
net/ipv4/tcp.c | 26 +-
net/ipv4/tcp_bic.c | 14 +-
net/ipv4/tcp_bpf.c | 1 +
net/ipv4/tcp_cubic.c | 14 +-
net/ipv4/tcp_hybla.c | 16 +-
net/ipv4/tcp_ipv4.c | 17 +-
net/ipv4/tcp_metrics.c | 20 +-
net/ipv4/tcp_offload.c | 12 +-
net/ipv6/calipso.c | 6 +-
net/ipv6/exthdrs.c | 2 +-
net/ipv6/netfilter/nf_conntrack_reasm.c | 15 +-
net/ipv6/reassembly.c | 13 +-
net/ipv6/route.c | 20 +-
net/ipv6/seg6_hmac.c | 5 +-
net/ipv6/seg6_local.c | 6 +-
net/ipv6/sit.c | 4 +-
net/ipv6/tcp_ipv6.c | 56 +-
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/cfg.c | 49 +-
net/mac80211/debugfs.c | 2 +-
net/mac80211/ieee80211_i.h | 4 +-
net/mac80211/main.c | 2 +
net/mac80211/mesh_pathtbl.c | 17 +-
net/mac80211/mlme.c | 14 +-
net/mac80211/rate.c | 1 -
net/mac80211/rx.c | 1 +
net/mac80211/s1g.c | 8 -
net/mac80211/tx.c | 216 ++-
net/mctp/route.c | 10 +-
net/mptcp/options.c | 9 +-
net/netfilter/core.c | 18 +-
net/netfilter/ipvs/ip_vs_conn.c | 8 +-
net/netfilter/ipvs/ip_vs_ctl.c | 38 +-
net/netfilter/ipvs/ip_vs_dh.c | 16 +-
net/netfilter/ipvs/ip_vs_fo.c | 2 +-
net/netfilter/ipvs/ip_vs_lblc.c | 4 +-
net/netfilter/ipvs/ip_vs_lblcr.c | 8 +-
net/netfilter/ipvs/ip_vs_lc.c | 2 +-
net/netfilter/ipvs/ip_vs_mh.c | 2 +-
net/netfilter/ipvs/ip_vs_nq.c | 2 +-
net/netfilter/ipvs/ip_vs_ovf.c | 2 +-
net/netfilter/ipvs/ip_vs_rr.c | 2 +-
net/netfilter/ipvs/ip_vs_sed.c | 4 +-
net/netfilter/ipvs/ip_vs_sh.c | 2 +-
net/netfilter/ipvs/ip_vs_sync.c | 23 +-
net/netfilter/ipvs/ip_vs_twos.c | 4 +-
net/netfilter/ipvs/ip_vs_wlc.c | 4 +-
net/netfilter/ipvs/ip_vs_wrr.c | 2 +-
net/netfilter/nf_conntrack_core.c | 5 +
net/netfilter/nf_conntrack_seqadj.c | 17 +
net/netfilter/nf_flow_table_ip.c | 4 +-
net/netfilter/nf_nat_core.c | 17 +-
net/netfilter/nf_nat_proto.c | 8 +
net/netfilter/nf_synproxy_core.c | 4 +-
net/netfilter/nfnetlink_hook.c | 77 +-
net/netfilter/nft_compat.c | 15 +
net/netfilter/nft_set_rbtree.c | 3 +-
net/netfilter/xt_dccp.c | 2 +-
net/netlabel/netlabel_kapi.c | 24 +-
net/netlink/af_netlink.c | 12 +-
net/openvswitch/actions.c | 9 +
net/openvswitch/vport-internal_dev.c | 8 +-
net/psp/psp_sock.c | 12 +
net/rds/af_rds.c | 29 +-
net/rds/bind.c | 4 +-
net/rds/ib_sysctl.c | 2 +-
net/rds/rdma_transport.c | 3 +
net/rds/rds.h | 3 +
net/rds/recv.c | 11 +-
net/rds/send.c | 9 +-
net/rds/sysctl.c | 2 +-
net/rds/tcp.c | 5 +-
net/rose/af_rose.c | 56 +-
net/rose/rose_link.c | 7 +-
net/rose/rose_loopback.c | 7 +-
net/rose/rose_route.c | 65 +-
net/rxrpc/rxperf.c | 25 +-
net/rxrpc/sendmsg.c | 17 +-
net/sched/act_api.c | 24 +-
net/sched/sch_etf.c | 1 +
net/sched/sch_gred.c | 16 +-
net/sched/sch_taprio.c | 6 +-
net/sctp/ipv6.c | 6 +-
net/sctp/sm_make_chunk.c | 24 +-
net/sctp/sm_statefuns.c | 2 +-
net/smc/smc_pnet.c | 29 +-
net/sunrpc/sysfs.c | 17 +-
net/sunrpc/xprtsock.c | 34 +-
net/switchdev/switchdev.c | 2 +-
net/tipc/bearer.c | 4 +
net/tipc/node.c | 2 +-
net/tls/tls_device.c | 21 +-
net/tls/tls_main.c | 4 +-
net/wireless/nl80211.c | 6 +-
net/wireless/reg.c | 41 +-
net/wireless/sme.c | 38 +-
net/wireless/sysfs.c | 4 +-
rust/helpers/dma.c | 11 +
rust/kernel/bitmap.rs | 17 +-
rust/kernel/clk.rs | 15 +
rust/kernel/configfs.rs | 63 +-
rust/kernel/dma.rs | 17 +
rust/kernel/id_pool.rs | 15 +-
rust/kernel/scatterlist.rs | 12 +-
samples/vfs/Makefile | 1 +
scripts/Makefile.vmlinux | 20 +-
scripts/Makefile.vmlinux_o | 2 +-
scripts/checkkconfigsymbols.py | 2 +-
scripts/checkpatch.pl | 2 +
scripts/clang-tools/run-clang-tools.py | 1 +
scripts/gdb/linux/radixtree.py | 203 ++-
scripts/gdb/linux/stackdepot.py | 2 +-
scripts/kconfig/conf.c | 19 +-
scripts/kconfig/symbol.c | 39 +-
scripts/kconfig/tests/conftest.py | 9 +-
.../kconfig/tests/randconfig_probability/Kconfig | 12 +
.../tests/randconfig_probability/__init__.py | 130 ++
scripts/kconfig/tests/savedefconfig_range/Kconfig | 60 +
.../kconfig/tests/savedefconfig_range/__init__.py | 8 +
scripts/kconfig/tests/savedefconfig_range/config | 7 +
.../tests/savedefconfig_range/expected_defconfig | 0
scripts/make_fit.py | 3 +-
security/apparmor/af_unix.c | 27 +-
security/apparmor/apparmorfs.c | 69 +-
security/apparmor/capability.c | 2 +-
security/apparmor/domain.c | 50 +-
security/apparmor/include/capability.h | 2 +-
security/apparmor/include/cred.h | 16 +-
security/apparmor/include/label.h | 2 +-
security/apparmor/include/match.h | 11 +-
security/apparmor/include/net.h | 2 +-
security/apparmor/include/perms.h | 15 +-
security/apparmor/include/policy.h | 22 +-
security/apparmor/label.c | 24 +-
security/apparmor/lib.c | 7 +-
security/apparmor/lsm.c | 64 +-
security/apparmor/match.c | 58 +-
security/apparmor/mount.c | 2 +-
security/apparmor/net.c | 8 +-
security/apparmor/policy.c | 3 +
security/apparmor/policy_ns.c | 6 +-
security/apparmor/policy_unpack.c | 11 +-
security/integrity/ima/ima_template.c | 5 +
security/ipe/audit.c | 8 -
security/security.c | 3 +-
security/selinux/netlabel.c | 5 +-
security/smack/smack_lsm.c | 14 +-
sound/core/control.c | 12 +-
sound/core/control_compat.c | 21 +-
sound/core/control_led.c | 74 +-
sound/core/ctljack.c | 1 +
sound/core/info.c | 3 +-
sound/core/init.c | 33 +-
sound/core/jack.c | 11 +-
sound/core/misc.c | 27 +
sound/core/oss/mixer_oss.c | 36 +-
sound/core/oss/pcm_oss.c | 12 +
sound/core/pcm.c | 13 +-
sound/core/pcm_compat.c | 4 +-
sound/core/pcm_lib.c | 16 +-
sound/core/pcm_local.h | 6 +
sound/core/pcm_native.c | 122 +-
sound/core/rawmidi.c | 3 +
sound/core/seq/seq_compat.c | 15 +-
sound/core/seq/seq_ump_client.c | 5 +-
sound/core/timer.c | 1 +
sound/core/ump.c | 61 +-
sound/core/vmaster.c | 10 +-
sound/drivers/aloop.c | 41 +-
sound/drivers/pcmtest.c | 28 +-
sound/hda/codecs/realtek/alc269.c | 51 +-
sound/hda/common/bind.c | 15 +-
sound/hda/common/codec.c | 4 +-
sound/hda/common/hda_controller.h | 4 -
sound/hda/common/hda_jack.h | 1 +
sound/hda/common/jack.c | 88 +-
sound/hda/controllers/intel.c | 91 +-
sound/hda/core/bus.c | 30 +-
sound/pci/oxygen/oxygen_pcm.c | 37 +-
sound/pci/via82xx.c | 11 +-
sound/sh/aica.c | 2 +-
sound/soc/amd/acp-es8336.c | 5 +-
sound/soc/amd/acp/acp-platform.c | 2 +-
sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c | 14 +-
sound/soc/amd/ps/ps-pdm-dma.c | 2 +-
sound/soc/amd/ps/ps-sdw-dma.c | 2 +-
sound/soc/amd/raven/acp3x-pcm-dma.c | 4 +-
sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 +-
sound/soc/amd/vangogh/acp5x-pcm-dma.c | 2 +-
sound/soc/amd/yc/acp6x-pdm-dma.c | 2 +-
sound/soc/atmel/atmel-i2s.c | 43 +-
sound/soc/atmel/atmel-pcm-pdc.c | 2 +
sound/soc/codecs/Kconfig | 5 +
sound/soc/codecs/Makefile | 6 +-
sound/soc/codecs/ab8500-codec.c | 560 ++-----
sound/soc/codecs/adau17x1.c | 4 +-
sound/soc/codecs/ak4642.c | 3 +-
sound/soc/codecs/aw88081.c | 2 +-
sound/soc/codecs/aw88166.c | 133 +-
sound/soc/codecs/aw88166.h | 5 -
sound/soc/codecs/aw88261.c | 2 +-
sound/soc/codecs/aw88395/aw88395.c | 2 +-
sound/soc/codecs/aw88395/aw88395_device.c | 39 +-
sound/soc/codecs/aw88395/aw88395_device.h | 8 +-
sound/soc/codecs/aw88399-lib.c | 1403 ++++++++++++++++++
sound/soc/codecs/aw88399.c | 1550 +-------------------
sound/soc/codecs/aw88399.h | 587 +-------
sound/soc/codecs/cs42l43-jack.c | 2 +-
sound/soc/codecs/cs42l43.c | 4 +-
sound/soc/codecs/cs42l56.c | 1 -
sound/soc/codecs/da732x.c | 2 +-
sound/soc/codecs/es8316.c | 4 +-
sound/soc/codecs/es8323.c | 4 +-
sound/soc/codecs/es8326.c | 38 +-
sound/soc/codecs/es8375.c | 20 +-
sound/soc/codecs/es8375.h | 2 +-
sound/soc/codecs/es8389.c | 47 +-
sound/soc/codecs/fs210x.c | 5 +-
sound/soc/codecs/mt6359-accdet.c | 50 +-
sound/soc/codecs/nau8540.c | 4 +-
sound/soc/codecs/nau8822.c | 71 +-
sound/soc/codecs/nau8822.h | 3 +
sound/soc/codecs/rt1011.c | 4 +-
sound/soc/codecs/rt1015.c | 86 +-
sound/soc/codecs/rt1016.c | 4 +-
sound/soc/codecs/rt1305.c | 4 +-
sound/soc/codecs/rt1308.c | 4 +-
sound/soc/codecs/rt1318.c | 3 +-
sound/soc/codecs/rt5616.c | 3 +-
sound/soc/codecs/rt5645.c | 7 +-
sound/soc/codecs/rt5659.c | 10 +-
sound/soc/codecs/rt5660.c | 4 +-
sound/soc/codecs/rt5663.c | 6 +-
sound/soc/codecs/rt5665.c | 4 +-
sound/soc/codecs/rt5682-sdw.c | 3 +-
sound/soc/codecs/rt711-sdca-sdw.c | 6 +-
sound/soc/codecs/rt711-sdw.c | 8 +-
sound/soc/codecs/rt712-sdca-sdw.c | 6 +-
sound/soc/codecs/rt712-sdca.c | 5 +-
sound/soc/codecs/rt721-sdca-sdw.c | 6 +-
sound/soc/codecs/rt722-sdca-sdw.c | 6 +-
sound/soc/codecs/sma1307.c | 14 +-
sound/soc/codecs/sta32x.c | 127 +-
sound/soc/codecs/sta350.c | 20 +-
sound/soc/codecs/tas2781-fmwlib.c | 6 +-
sound/soc/codecs/tlv320adc3xxx.c | 2 +-
sound/soc/codecs/tlv320aic32x4-clk.c | 68 +-
sound/soc/codecs/tlv320aic32x4-i2c.c | 21 +-
sound/soc/codecs/tlv320aic32x4-spi.c | 25 +-
sound/soc/codecs/tlv320aic32x4.c | 273 ++--
sound/soc/codecs/tlv320aic32x4.h | 6 +-
sound/soc/codecs/wcd-mbhc-v2.c | 8 +-
sound/soc/codecs/wcd937x.c | 44 +-
sound/soc/codecs/wcd939x.c | 10 +-
sound/soc/codecs/wcd939x.h | 1 -
sound/soc/codecs/wm5100.c | 2 +-
sound/soc/codecs/wm8510.c | 2 +-
sound/soc/codecs/wm8737.c | 8 +-
sound/soc/codecs/wm8750.c | 2 +-
sound/soc/codecs/wm8955.c | 2 +-
sound/soc/codecs/wm8983.c | 2 +-
sound/soc/codecs/wm8985.c | 2 +-
sound/soc/codecs/wm8990.c | 10 +-
sound/soc/codecs/wm8991.c | 10 +-
sound/soc/codecs/wm8994.c | 159 +-
sound/soc/codecs/wm8994.h | 2 +
sound/soc/codecs/wm_hubs.c | 2 +-
sound/soc/codecs/wsa883x.c | 8 +-
sound/soc/codecs/wsa884x.c | 8 +-
sound/soc/dwc/dwc-i2s.c | 6 +-
sound/soc/fsl/fsl_asrc.c | 8 +-
sound/soc/fsl/fsl_asrc_dma.c | 5 +
sound/soc/fsl/fsl_asrc_m2m.c | 4 +-
sound/soc/fsl/imx-pcm-rpmsg.c | 2 +-
sound/soc/intel/atom/sst-atom-controls.c | 38 +-
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 36 +-
sound/soc/intel/avs/pcm.c | 2 +
sound/soc/intel/avs/utils.c | 6 +-
sound/soc/intel/boards/sof_es8336.c | 2 +-
sound/soc/mediatek/common/mtk-afe-fe-dai.c | 8 +-
sound/soc/mediatek/common/mtk-soundcard-driver.c | 23 +-
sound/soc/mediatek/mt6797/mt6797-afe-clk.c | 14 +-
sound/soc/mediatek/mt8183/mt8183-afe-clk.c | 22 +-
sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 95 +-
sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 104 +-
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 24 +-
sound/soc/mediatek/mt8188/mt8188-mt6359.c | 3 +
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 139 +-
sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 90 +-
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 6 +-
sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 44 +-
sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 20 +-
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 18 +-
.../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 37 +-
sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 77 +-
sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 102 +-
sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 99 +-
sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 7 +-
sound/soc/mediatek/mt8365/mt8365-dai-i2s.c | 2 +-
sound/soc/qcom/qdsp6/q6apm.c | 1 +
sound/soc/qcom/qdsp6/topology.c | 31 +-
sound/soc/qcom/sdm845.c | 21 +-
sound/soc/renesas/rcar/msiof.c | 6 +-
sound/soc/rockchip/rk3288_hdmi_analog.c | 48 +-
sound/soc/rockchip/rockchip_i2s.c | 4 +-
sound/soc/rockchip/rockchip_sai.c | 4 +-
sound/soc/samsung/midas_wm1811.c | 14 +-
sound/soc/soc-ac97.c | 4 +-
sound/soc/soc-card-test.c | 7 +-
sound/soc/soc-component.c | 2 +-
sound/soc/soc-link.c | 2 +-
sound/soc/soc-ops.c | 10 +-
sound/soc/soc-topology-test.c | 8 +-
sound/soc/sof/amd/acp.c | 8 +-
sound/soc/sof/imx/imx-common.c | 1 +
sound/soc/sof/intel/cnl.c | 2 +-
sound/soc/sof/intel/hda-codec.c | 4 +-
sound/soc/sof/intel/hda-ipc.c | 2 +-
sound/soc/sof/intel/hda-sdw-bpt.c | 37 +-
sound/soc/xilinx/xlnx_formatter_pcm.c | 18 +-
sound/usb/6fire/control.c | 7 +
sound/usb/caiaq/device.c | 9 +-
sound/usb/caiaq/device.h | 6 +-
sound/usb/caiaq/input.c | 29 +-
sound/usb/caiaq/midi.c | 2 +
sound/usb/line6/capture.c | 3 +-
sound/usb/line6/pcm.c | 8 +-
sound/usb/mixer.c | 129 +-
sound/usb/mixer.h | 6 +-
sound/usb/mixer_quirks.c | 2 +-
sound/usb/mixer_us16x08.c | 19 +-
sound/usb/qcom/qc_audio_offload.c | 9 +
sound/usb/quirks-table.h | 2 +
sound/usb/usx2y/us122l.c | 2 +-
sound/virtio/virtio_pcm.h | 2 +
sound/virtio/virtio_pcm_msg.c | 19 +
sound/virtio/virtio_pcm_ops.c | 1 +
tools/arch/x86/include/asm/cpufeatures.h | 5 +-
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 +-
tools/bpf/bpftool/common.c | 40 +
tools/bpf/bpftool/gen.c | 81 +-
tools/bpf/bpftool/link.c | 4 +-
tools/bpf/bpftool/main.c | 16 +-
tools/bpf/bpftool/main.h | 1 +
tools/bpf/bpftool/map.c | 95 +-
tools/bpf/bpftool/prog.c | 240 +--
tools/bpf/bpftool/skeleton/profiler.bpf.c | 29 +-
tools/bpf/bpftool/tracelog.c | 2 +-
tools/build/Makefile.feature | 17 +-
tools/build/feature/Makefile | 46 +-
tools/build/feature/test-all.c | 6 +-
...bbabeltrace.c => test-babeltrace2-ctf-writer.c} | 3 +-
tools/build/feature/test-libunwind-aarch64.c | 27 -
tools/build/feature/test-libunwind-arm.c | 28 -
.../feature/test-libunwind-debug-frame-aarch64.c | 17 -
.../build/feature/test-libunwind-debug-frame-arm.c | 17 -
tools/build/feature/test-libunwind-debug-frame.c | 1 -
tools/build/feature/test-libunwind-x86.c | 28 -
tools/build/feature/test-libunwind-x86_64.c | 28 -
tools/build/feature/test-libunwind.c | 1 -
tools/cgroup/iocost_monitor.py | 7 +-
tools/cgroup/memcg_shrinker.py | 2 +-
tools/hv/vmbus_bufring.c | 6 -
tools/include/linux/types.h | 5 +
tools/include/nolibc/Makefile | 1 +
tools/include/nolibc/nolibc.h | 1 +
tools/include/nolibc/stdlib.h | 8 +-
tools/include/nolibc/sys.h | 45 -
tools/include/nolibc/sys/select.h | 103 ++
tools/include/nolibc/types.h | 49 +-
tools/lib/bpf/btf.c | 20 +-
tools/lib/bpf/libbpf.c | 12 +-
tools/lib/bpf/skel_internal.h | 64 +-
tools/lib/perf/evlist.c | 41 +-
tools/lib/perf/include/internal/evsel.h | 4 +
tools/lib/perf/mmap.c | 2 +-
tools/perf/Build | 4 +-
tools/perf/Documentation/perf-c2c.txt | 2 +-
tools/perf/Documentation/perf-check.txt | 1 -
tools/perf/Makefile.config | 53 +-
tools/perf/Makefile.perf | 44 +-
tools/perf/arch/arm/annotate/instructions.c | 1 +
tools/perf/arch/arm/tests/dwarf-unwind.c | 1 +
tools/perf/arch/arm/util/Build | 2 +-
tools/perf/arch/arm/util/auxtrace.c | 1 +
tools/perf/arch/arm/util/pmu.c | 2 -
tools/perf/arch/arm64/annotate/instructions.c | 1 +
tools/perf/arch/arm64/tests/dwarf-unwind.c | 1 +
tools/perf/arch/arm64/util/Build | 23 +-
tools/perf/arch/arm64/util/arm-spe.c | 1 +
tools/perf/arch/arm64/util/hisi-ptt.c | 1 +
tools/perf/arch/powerpc/tests/dwarf-unwind.c | 1 +
tools/perf/arch/powerpc/util/Build | 2 +-
tools/perf/arch/powerpc/util/auxtrace.c | 2 +-
tools/perf/arch/s390/util/Build | 2 +-
tools/perf/arch/s390/util/auxtrace.c | 1 +
tools/perf/arch/x86/tests/Build | 4 +-
tools/perf/arch/x86/tests/arch-tests.c | 4 -
tools/perf/arch/x86/tests/topdown.c | 197 ++-
tools/perf/arch/x86/util/Build | 6 +-
tools/perf/arch/x86/util/pmu.c | 2 -
tools/perf/arch/x86/util/topdown.c | 4 +-
tools/perf/bench/evlist-open-close.c | 1 +
tools/perf/bench/futex.c | 1 +
tools/perf/bench/pmu-scan.c | 1 +
tools/perf/bench/synthesize.c | 1 +
tools/perf/builtin-annotate.c | 3 +-
tools/perf/builtin-c2c.c | 16 +-
tools/perf/builtin-check.c | 2 +-
tools/perf/builtin-data.c | 18 +-
tools/perf/builtin-evlist.c | 3 +-
tools/perf/builtin-inject.c | 47 +-
tools/perf/builtin-mem.c | 1 +
tools/perf/builtin-record.c | 36 -
tools/perf/builtin-report.c | 5 +-
tools/perf/builtin-script.c | 43 +-
tools/perf/builtin-stat.c | 15 +-
tools/perf/builtin-trace.c | 120 +-
.../arch/x86/sierraforest/uncore-cache.json | 5 +
.../arch/x86/sierraforest/uncore-interconnect.json | 2 +
.../arch/x86/skylakex/uncore-interconnect.json | 6 +
.../arch/x86/snowridgex/uncore-cache.json | 68 +
.../arch/x86/snowridgex/uncore-interconnect.json | 10 +
tools/perf/python/perf.pyi | 672 +++++++++
tools/perf/tests/Build | 4 +-
tools/perf/tests/code-reading.c | 12 +-
tools/perf/tests/demangle-java-test.c | 1 +
tools/perf/tests/demangle-rust-v0-test.c | 1 +
tools/perf/tests/hwmon_pmu.c | 1 +
tools/perf/tests/make | 11 +-
tools/perf/tests/parse-metric.c | 1 +
tools/perf/tests/pe-file-parsing.c | 2 +-
tools/perf/tests/pfm.c | 1 +
tools/perf/tests/sample-parsing.c | 109 ++
tools/perf/tests/shell/attr.sh | 7 +-
.../tests/shell/test_perf_data_converter_ctf.sh | 104 ++
tools/perf/tests/symbols.c | 96 +-
tools/perf/ui/browsers/annotate-data.c | 2 +-
tools/perf/ui/hist.c | 1 +
tools/perf/util/Build | 28 +-
tools/perf/util/annotate-data.c | 23 +-
tools/perf/util/arm-spe-decoder/Build | 2 +-
tools/perf/util/auxtrace.c | 9 +-
tools/perf/util/auxtrace.h | 226 +--
tools/perf/util/bpf-filter.c | 29 +-
tools/perf/util/bpf-filter.h | 2 +
tools/perf/util/bpf-trace-summary.c | 1 +
tools/perf/util/bpf_counter_cgroup.c | 1 +
tools/perf/util/bpf_ftrace.c | 3 +-
tools/perf/util/bpf_map.c | 1 +
tools/perf/util/btf.c | 2 +-
tools/perf/util/cgroup.c | 1 +
tools/perf/util/cs-etm-decoder/Build | 2 +-
tools/perf/util/cs-etm.c | 12 +-
tools/perf/util/data-convert-bt.c | 33 +-
tools/perf/util/data-convert.h | 4 +-
tools/perf/util/debug.c | 2 +-
tools/perf/util/drm_pmu.c | 1 +
tools/perf/util/evsel.c | 27 +-
tools/perf/util/evswitch.c | 1 +
tools/perf/util/header.c | 24 +-
tools/perf/util/header.h | 6 +-
tools/perf/util/hisi-ptt-decoder/Build | 2 +-
tools/perf/util/intel-pt-decoder/Build | 8 +-
tools/perf/util/intel-tpebs.c | 4 +-
tools/perf/util/jitdump.c | 129 +-
tools/perf/util/kvm-stat.h | 1 +
tools/perf/util/libbfd.c | 23 +-
tools/perf/util/libbfd.h | 9 +
tools/perf/util/llvm.c | 4 +-
tools/perf/util/mem-events.c | 2 +-
tools/perf/util/mmap.c | 4 +-
tools/perf/util/parse-events.c | 4 +-
tools/perf/util/pfm.c | 1 +
tools/perf/util/pmu.c | 11 +
tools/perf/util/pmu.h | 34 +
tools/perf/util/pmus.c | 21 +-
tools/perf/util/powerpc-vpadtl.c | 1 +
tools/perf/util/print_insn.h | 1 +
tools/perf/util/python.c | 1 +
tools/perf/util/session.c | 35 +-
tools/perf/util/session.h | 3 +-
tools/perf/util/setup.py | 268 ++--
tools/perf/util/stat-shadow.c | 1 +
tools/perf/util/stat.c | 3 +-
tools/perf/util/stat.h | 3 +-
tools/perf/util/symbol.c | 40 +-
tools/perf/util/synthetic-events.h | 15 -
tools/perf/util/thread_map.c | 26 +
tools/perf/util/thread_map.h | 1 +
tools/perf/util/tool.c | 46 +-
tools/perf/util/tool.h | 10 +-
tools/perf/util/tp_pmu.c | 8 +-
tools/power/x86/turbostat/turbostat.c | 8 +-
.../x86_energy_perf_policy.c | 18 +-
tools/sched_ext/scx_flatcg.bpf.c | 2 +-
tools/testing/cxl/Kbuild | 4 +-
tools/testing/cxl/cxl_core_exports.c | 22 -
tools/testing/cxl/exports.h | 13 -
tools/testing/cxl/test/cxl.c | 21 +
tools/testing/cxl/test/mock.c | 56 +-
tools/testing/cxl/test/mock.h | 3 +
tools/testing/selftests/Makefile | 4 +-
tools/testing/selftests/acct/acct_syscall.c | 2 +-
tools/testing/selftests/alsa/conf.c | 2 +-
tools/testing/selftests/alsa/mixer-test.c | 4 +-
tools/testing/selftests/alsa/pcm-test.c | 2 +-
tools/testing/selftests/alsa/test-pcmtest-driver.c | 29 +-
tools/testing/selftests/alsa/utimer-test.c | 2 +-
tools/testing/selftests/arm64/abi/hwcap.c | 2 +-
tools/testing/selftests/arm64/abi/ptrace.c | 2 +-
tools/testing/selftests/arm64/abi/syscall-abi.c | 2 +-
tools/testing/selftests/arm64/fp/fp-ptrace.c | 2 +-
tools/testing/selftests/arm64/fp/fp-stress.c | 2 +-
tools/testing/selftests/arm64/fp/sve-probe-vls.c | 2 +-
tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 +-
tools/testing/selftests/arm64/fp/vec-syscfg.c | 2 +-
tools/testing/selftests/arm64/fp/za-ptrace.c | 2 +-
tools/testing/selftests/arm64/fp/zt-ptrace.c | 2 +-
tools/testing/selftests/arm64/gcs/gcs-stress.c | 2 +-
tools/testing/selftests/arm64/pauth/pac.c | 2 +-
tools/testing/selftests/arm64/signal/Makefile | 4 +-
tools/testing/selftests/arm64/tags/tags_test.c | 2 +-
tools/testing/selftests/bpf/network_helpers.c | 46 +-
.../bpf/prog_tests/cgroup_hierarchical_stats.c | 4 +-
.../testing/selftests/bpf/prog_tests/dmabuf_iter.c | 5 +-
tools/testing/selftests/bpf/prog_tests/empty_skb.c | 59 +-
.../selftests/bpf/prog_tests/flow_dissector.c | 2 +-
.../selftests/bpf/prog_tests/lwt_ip_encap.c | 53 +
tools/testing/selftests/bpf/prog_tests/missed.c | 8 +-
.../bpf/prog_tests/prog_tests_framework.c | 16 +-
tools/testing/selftests/bpf/prog_tests/sockopt.c | 4 +-
.../selftests/bpf/prog_tests/test_task_work.c | 2 +-
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 13 +-
.../selftests/bpf/prog_tests/uprobe_multi_test.c | 4 +-
.../testing/selftests/bpf/progs/cpumask_success.c | 6 +
tools/testing/selftests/bpf/progs/empty_skb.c | 7 +
tools/testing/selftests/bpf/progs/test_tc_link.c | 10 +
tools/testing/selftests/bpf/test_progs.c | 5 +-
tools/testing/selftests/bpf/unpriv_helpers.c | 9 +-
tools/testing/selftests/bpf/xskxceiver.c | 2 +-
tools/testing/selftests/breakpoints/Makefile | 4 +-
.../selftests/breakpoints/breakpoint_test.c | 2 +-
.../selftests/breakpoints/breakpoint_test_arm64.c | 2 +-
.../breakpoints/step_after_suspend_test.c | 2 +-
tools/testing/selftests/cachestat/test_cachestat.c | 2 +-
tools/testing/selftests/capabilities/test_execve.c | 2 +-
.../testing/selftests/capabilities/validate_cap.c | 2 +-
tools/testing/selftests/cgroup/test_core.c | 9 +-
tools/testing/selftests/cgroup/test_cpu.c | 9 +-
tools/testing/selftests/cgroup/test_cpuset.c | 9 +-
tools/testing/selftests/cgroup/test_freezer.c | 9 +-
.../testing/selftests/cgroup/test_hugetlb_memcg.c | 2 +-
tools/testing/selftests/cgroup/test_kill.c | 9 +-
tools/testing/selftests/cgroup/test_kmem.c | 9 +-
tools/testing/selftests/cgroup/test_memcontrol.c | 9 +-
tools/testing/selftests/cgroup/test_pids.c | 4 +-
tools/testing/selftests/cgroup/test_zswap.c | 240 ++-
tools/testing/selftests/clone3/clone3.c | 2 +-
.../clone3/clone3_cap_checkpoint_restore.c | 2 +-
.../selftests/clone3/clone3_clear_sighand.c | 8 +-
tools/testing/selftests/clone3/clone3_selftests.h | 2 +-
tools/testing/selftests/clone3/clone3_set_tid.c | 2 +-
tools/testing/selftests/connector/proc_filter.c | 2 +-
tools/testing/selftests/core/close_range_test.c | 2 +-
tools/testing/selftests/core/unshare_test.c | 2 +-
tools/testing/selftests/coredump/stackdump_test.c | 2 +-
.../selftests/damon/sysfs_no_op_commit_break.py | 35 +-
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c | 2 +-
tools/testing/selftests/drivers/dma-buf/udmabuf.c | 2 +-
tools/testing/selftests/drivers/net/psp.py | 56 +-
tools/testing/selftests/drivers/ntsync/ntsync.c | 2 +-
.../drivers/s390x/uvdevice/test_uvdevice.c | 2 +-
tools/testing/selftests/exec/check-exec.c | 2 +-
tools/testing/selftests/exec/execveat.c | 2 +-
tools/testing/selftests/exec/load_address.c | 2 +-
tools/testing/selftests/exec/non-regular.c | 2 +-
tools/testing/selftests/exec/null-argv.c | 2 +-
tools/testing/selftests/exec/recursion-depth.c | 2 +-
tools/testing/selftests/fchmodat2/fchmodat2_test.c | 2 +-
tools/testing/selftests/filelock/ofdlocks.c | 2 +-
.../selftests/filesystems/anon_inode_test.c | 2 +-
.../selftests/filesystems/binderfs/binderfs_test.c | 2 +-
tools/testing/selftests/filesystems/devpts_pts.c | 2 +-
.../filesystems/epoll/epoll_wakeup_test.c | 34 +-
.../selftests/filesystems/eventfd/eventfd_test.c | 2 +-
tools/testing/selftests/filesystems/fclog.c | 2 +-
.../testing/selftests/filesystems/file_stressor.c | 2 +-
.../selftests/filesystems/fuse/fusectl_test.c | 2 +-
tools/testing/selftests/filesystems/kernfs_test.c | 2 +-
.../filesystems/mount-notify/mount-notify_test.c | 2 +-
.../mount-notify/mount-notify_test_ns.c | 2 +-
.../selftests/filesystems/nsfs/iterate_mntns.c | 2 +-
.../selftests/filesystems/overlayfs/dev_in_maps.c | 2 +-
.../filesystems/overlayfs/set_layers_via_fds.c | 20 +-
.../filesystems/statmount/listmount_test.c | 2 +-
.../filesystems/statmount/statmount_test.c | 2 +-
.../filesystems/statmount/statmount_test_ns.c | 2 +-
tools/testing/selftests/filesystems/utils.c | 2 +-
tools/testing/selftests/ftrace/ftracetest | 2 +-
.../selftests/futex/functional/futex_numa_mpol.c | 2 +-
.../selftests/futex/functional/futex_priv_hash.c | 2 +-
.../selftests/futex/functional/futex_requeue.c | 2 +-
.../selftests/futex/functional/futex_requeue_pi.c | 2 +-
.../functional/futex_requeue_pi_mismatched_ops.c | 2 +-
.../functional/futex_requeue_pi_signal_restart.c | 2 +-
.../selftests/futex/functional/futex_wait.c | 2 +-
.../functional/futex_wait_private_mapped_file.c | 2 +-
.../futex/functional/futex_wait_timeout.c | 2 +-
.../functional/futex_wait_uninitialized_heap.c | 2 +-
.../futex/functional/futex_wait_wouldblock.c | 2 +-
.../selftests/futex/functional/futex_waitv.c | 2 +-
tools/testing/selftests/hid/hid_common.h | 2 +-
tools/testing/selftests/intel_pstate/aperf.c | 2 +-
tools/testing/selftests/iommu/iommufd_utils.h | 2 +-
tools/testing/selftests/ipc/Makefile | 8 +-
tools/testing/selftests/ipc/msgque.c | 2 +-
tools/testing/selftests/ir/ir_loopback.c | 2 +-
tools/testing/selftests/kcmp/kcmp_test.c | 2 +-
tools/testing/selftests/kselftest_harness.h | 2 +-
.../selftests/kselftest_harness/harness-selftest.c | 2 +-
tools/testing/selftests/landlock/audit.h | 2 +-
tools/testing/selftests/landlock/common.h | 2 +-
tools/testing/selftests/lib.mk | 3 +
.../testing/selftests/lsm/lsm_get_self_attr_test.c | 2 +-
.../testing/selftests/lsm/lsm_list_modules_test.c | 2 +-
.../testing/selftests/lsm/lsm_set_self_attr_test.c | 2 +-
.../selftests/media_tests/media_device_open.c | 2 +-
.../selftests/media_tests/media_device_test.c | 2 +-
.../selftests/membarrier/membarrier_test_impl.h | 2 +-
tools/testing/selftests/mincore/mincore_selftest.c | 4 +-
tools/testing/selftests/mm/compaction_test.c | 2 +-
tools/testing/selftests/mm/cow.c | 2 +-
tools/testing/selftests/mm/droppable.c | 2 +-
tools/testing/selftests/mm/guard-regions.c | 2 +-
tools/testing/selftests/mm/gup_longterm.c | 2 +-
tools/testing/selftests/mm/gup_test.c | 2 +-
tools/testing/selftests/mm/hmm-tests.c | 2 +-
tools/testing/selftests/mm/hugepage-mmap.c | 2 +-
tools/testing/selftests/mm/hugepage-mremap.c | 2 +-
tools/testing/selftests/mm/hugetlb-madvise.c | 2 +-
tools/testing/selftests/mm/hugetlb-read-hwpoison.c | 2 +-
tools/testing/selftests/mm/hugetlb-soft-offline.c | 2 +-
tools/testing/selftests/mm/hugetlb_dio.c | 2 +-
.../selftests/mm/hugetlb_fault_after_madv.c | 2 +-
tools/testing/selftests/mm/hugetlb_madv_vs_map.c | 2 +-
tools/testing/selftests/mm/ksm_functional_tests.c | 2 +-
tools/testing/selftests/mm/ksm_tests.c | 2 +-
tools/testing/selftests/mm/madv_populate.c | 2 +-
tools/testing/selftests/mm/map_fixed_noreplace.c | 2 +-
tools/testing/selftests/mm/map_hugetlb.c | 2 +-
tools/testing/selftests/mm/map_populate.c | 2 +-
tools/testing/selftests/mm/mdwe_test.c | 2 +-
tools/testing/selftests/mm/memfd_secret.c | 2 +-
tools/testing/selftests/mm/merge.c | 2 +-
tools/testing/selftests/mm/migration.c | 2 +-
tools/testing/selftests/mm/mkdirty.c | 2 +-
tools/testing/selftests/mm/mlock-random-test.c | 2 +-
tools/testing/selftests/mm/mlock2-tests.c | 2 +-
tools/testing/selftests/mm/mrelease_test.c | 2 +-
tools/testing/selftests/mm/mremap_dontunmap.c | 2 +-
tools/testing/selftests/mm/mremap_test.c | 2 +-
tools/testing/selftests/mm/mseal_test.c | 2 +-
tools/testing/selftests/mm/on-fault-limit.c | 2 +-
tools/testing/selftests/mm/pagemap_ioctl.c | 2 +-
tools/testing/selftests/mm/pfnmap.c | 2 +-
tools/testing/selftests/mm/pkey-helpers.h | 2 +-
tools/testing/selftests/mm/prctl_thp_disable.c | 2 +-
tools/testing/selftests/mm/process_madv.c | 2 +-
tools/testing/selftests/mm/rmap.c | 2 +-
tools/testing/selftests/mm/soft-dirty.c | 2 +-
tools/testing/selftests/mm/split_huge_page_test.c | 2 +-
tools/testing/selftests/mm/thuge-gen.c | 2 +-
tools/testing/selftests/mm/transhuge-stress.c | 2 +-
tools/testing/selftests/mm/uffd-common.h | 2 +-
tools/testing/selftests/mm/uffd-wp-mremap.c | 2 +-
tools/testing/selftests/mm/va_high_addr_switch.c | 2 +-
tools/testing/selftests/mm/virtual_address_range.c | 2 +-
tools/testing/selftests/mm/vm_util.c | 2 +-
tools/testing/selftests/mm/vm_util.h | 2 +-
.../selftests/mount_setattr/mount_setattr_test.c | 2 +-
.../move_mount_set_group_test.c | 2 +-
tools/testing/selftests/mqueue/mq_open_tests.c | 2 +-
tools/testing/selftests/mqueue/mq_perf_tests.c | 2 +-
.../mseal_system_mappings/sysmap_is_sealed.c | 4 +-
.../selftests/namespaces/file_handle_test.c | 2 +-
tools/testing/selftests/namespaces/init_ino_test.c | 2 +-
tools/testing/selftests/namespaces/nsid_test.c | 2 +-
tools/testing/selftests/nci/nci_dev.c | 2 +-
tools/testing/selftests/net/af_unix/diag_uid.c | 2 +-
tools/testing/selftests/net/af_unix/msg_oob.c | 2 +-
tools/testing/selftests/net/af_unix/scm_inq.c | 2 +-
tools/testing/selftests/net/af_unix/scm_pidfd.c | 2 +-
tools/testing/selftests/net/af_unix/scm_rights.c | 2 +-
tools/testing/selftests/net/af_unix/unix_connect.c | 2 +-
tools/testing/selftests/net/bind_timewait.c | 2 +-
tools/testing/selftests/net/bind_wildcard.c | 2 +-
tools/testing/selftests/net/can/test_raw_filter.c | 2 +-
tools/testing/selftests/net/cmsg_sender.c | 2 +-
tools/testing/selftests/net/epoll_busy_poll.c | 2 +-
tools/testing/selftests/net/gro.c | 2 +-
tools/testing/selftests/net/ip_local_port_range.c | 2 +-
tools/testing/selftests/net/ipsec.c | 2 +-
tools/testing/selftests/net/ipv6_fragmentation.c | 2 +-
tools/testing/selftests/net/lib/csum.c | 55 +-
.../selftests/net/netfilter/conntrack_dump_flush.c | 2 +-
.../selftests/net/netfilter/conntrack_vrf.sh | 25 +-
tools/testing/selftests/net/netlink-dumps.c | 2 +-
tools/testing/selftests/net/ovpn/ovpn-cli.c | 2 +-
tools/testing/selftests/net/proc_net_pktgen.c | 2 +-
tools/testing/selftests/net/psock_fanout.c | 2 +-
tools/testing/selftests/net/psock_tpacket.c | 2 +-
.../selftests/net/reuseaddr_ports_exhausted.c | 2 +-
tools/testing/selftests/net/reuseport_bpf.c | 2 +-
tools/testing/selftests/net/reuseport_bpf_numa.c | 2 +-
tools/testing/selftests/net/rxtimestamp.c | 2 +-
tools/testing/selftests/net/sk_so_peek_off.c | 2 +-
tools/testing/selftests/net/so_incoming_cpu.c | 2 +-
tools/testing/selftests/net/socket.c | 2 +-
tools/testing/selftests/net/tap.c | 2 +-
tools/testing/selftests/net/tcp_ao/lib/setup.c | 2 +-
.../selftests/net/tcp_fastopen_backup_key.c | 2 +-
tools/testing/selftests/net/tcp_mmap.c | 6 +-
tools/testing/selftests/net/tcp_port_share.c | 2 +-
tools/testing/selftests/net/tls.c | 2 +-
tools/testing/selftests/net/toeplitz.c | 2 +-
tools/testing/selftests/net/tun.c | 2 +-
tools/testing/selftests/net/txtimestamp.c | 23 +-
tools/testing/selftests/net/udpgso_bench_tx.c | 2 +-
tools/testing/selftests/nolibc/Makefile | 10 +-
tools/testing/selftests/openat2/helpers.h | 2 +-
tools/testing/selftests/openat2/openat2_test.c | 2 +-
.../testing/selftests/openat2/rename_attack_test.c | 2 +-
tools/testing/selftests/openat2/resolve_test.c | 2 +-
.../selftests/pci_endpoint/pci_endpoint_test.c | 2 +-
tools/testing/selftests/perf_events/mmap.c | 2 +-
.../testing/selftests/perf_events/remove_on_exec.c | 2 +-
.../selftests/perf_events/sigtrap_threads.c | 2 +-
.../selftests/perf_events/watermark_signal.c | 2 +-
tools/testing/selftests/pid_namespace/pid_max.c | 2 +-
.../selftests/pid_namespace/regression_enomem.c | 2 +-
tools/testing/selftests/pidfd/pidfd.h | 2 +-
tools/testing/selftests/pidfd/pidfd_bind_mount.c | 2 +-
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 2 +-
.../selftests/pidfd/pidfd_file_handle_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_getfd_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_info_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_open_test.c | 4 +-
tools/testing/selftests/pidfd/pidfd_poll_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_setattr_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_setns_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_test.c | 2 +-
tools/testing/selftests/pidfd/pidfd_wait.c | 2 +-
tools/testing/selftests/pidfd/pidfd_xattr_test.c | 2 +-
tools/testing/selftests/prctl/Makefile | 4 +-
.../selftests/prctl/set-anon-vma-name-test.c | 2 +-
tools/testing/selftests/prctl/set-process-name.c | 2 +-
tools/testing/selftests/proc/proc-maps-race.c | 2 +-
tools/testing/selftests/proc/proc-pid-vm.c | 16 +-
tools/testing/selftests/proc/proc-pidns.c | 2 +-
tools/testing/selftests/ptrace/get_set_sud.c | 2 +-
tools/testing/selftests/ptrace/get_syscall_info.c | 2 +-
tools/testing/selftests/ptrace/set_syscall_info.c | 2 +-
tools/testing/selftests/ptrace/vmaccess.c | 2 +-
tools/testing/selftests/resctrl/resctrl.h | 2 +-
tools/testing/selftests/ring-buffer/map_test.c | 2 +-
.../testing/selftests/riscv/abi/pointer_masking.c | 2 +-
tools/testing/selftests/riscv/hwprobe/cbo.c | 2 +-
tools/testing/selftests/riscv/hwprobe/hwprobe.c | 2 +-
tools/testing/selftests/riscv/hwprobe/which-cpus.c | 2 +-
tools/testing/selftests/riscv/mm/mmap_bottomup.c | 2 +-
tools/testing/selftests/riscv/mm/mmap_default.c | 2 +-
tools/testing/selftests/riscv/mm/mmap_test.h | 2 +-
.../testing/selftests/riscv/sigreturn/sigreturn.c | 2 +-
tools/testing/selftests/riscv/vector/v_initval.c | 2 +-
.../testing/selftests/riscv/vector/vstate_prctl.c | 2 +-
.../testing/selftests/rseq/basic_percpu_ops_test.c | 2 +-
tools/testing/selftests/rseq/rseq.c | 2 +-
tools/testing/selftests/rtc/rtctest.c | 2 +-
tools/testing/selftests/sched_ext/hotplug.c | 34 +-
.../testing/selftests/seccomp/seccomp_benchmark.c | 2 +-
tools/testing/selftests/seccomp/seccomp_bpf.c | 2 +-
tools/testing/selftests/sgx/main.c | 2 +-
tools/testing/selftests/signal/mangle_uc_sigmask.c | 2 +-
tools/testing/selftests/signal/sas.c | 2 +-
tools/testing/selftests/sparc64/Makefile | 4 +-
tools/testing/selftests/sparc64/drivers/adi-test.c | 2 +-
tools/testing/selftests/sync/sync_test.c | 2 +-
.../selftests/syscall_user_dispatch/sud_test.c | 2 +-
tools/testing/selftests/tdx/tdx_guest_test.c | 2 +-
.../selftests/thermal/intel/power_floor/Makefile | 12 +-
.../selftests/thermal/intel/workload_hint/Makefile | 12 +-
tools/testing/selftests/timens/timens.h | 2 +-
tools/testing/selftests/timers/adjtick.c | 2 +-
.../testing/selftests/timers/alarmtimer-suspend.c | 2 +-
tools/testing/selftests/timers/change_skew.c | 2 +-
.../testing/selftests/timers/clocksource-switch.c | 25 +-
tools/testing/selftests/timers/freq-step.c | 2 +-
.../testing/selftests/timers/inconsistency-check.c | 2 +-
tools/testing/selftests/timers/leap-a-day.c | 2 +-
tools/testing/selftests/timers/leapcrash.c | 2 +-
tools/testing/selftests/timers/mqueue-lat.c | 2 +-
tools/testing/selftests/timers/nanosleep.c | 2 +-
tools/testing/selftests/timers/nsleep-lat.c | 2 +-
tools/testing/selftests/timers/posix_timers.c | 2 +-
tools/testing/selftests/timers/raw_skew.c | 2 +-
tools/testing/selftests/timers/rtcpie.c | 2 +-
tools/testing/selftests/timers/set-2038.c | 2 +-
tools/testing/selftests/timers/set-tai.c | 2 +-
tools/testing/selftests/timers/set-timer-lat.c | 2 +-
tools/testing/selftests/timers/set-tz.c | 2 +-
tools/testing/selftests/timers/skew_consistency.c | 2 +-
tools/testing/selftests/timers/threadtest.c | 2 +-
tools/testing/selftests/timers/valid-adjtimex.c | 2 +-
tools/testing/selftests/tmpfs/bug-link-o-tmpfile.c | 2 +-
tools/testing/selftests/tty/tty_tstamp_update.c | 2 +-
tools/testing/selftests/uevent/uevent_filtering.c | 2 +-
tools/testing/selftests/user_events/abi_test.c | 2 +-
tools/testing/selftests/user_events/dyn_test.c | 2 +-
tools/testing/selftests/user_events/ftrace_test.c | 2 +-
tools/testing/selftests/user_events/perf_test.c | 2 +-
.../selftests/user_events/user_events_selftests.h | 2 +-
tools/testing/selftests/vDSO/vdso_test_abi.c | 2 +-
tools/testing/selftests/vDSO/vdso_test_chacha.c | 2 +-
.../testing/selftests/vDSO/vdso_test_correctness.c | 2 +-
tools/testing/selftests/vDSO/vdso_test_getcpu.c | 2 +-
tools/testing/selftests/vDSO/vdso_test_getrandom.c | 2 +-
.../selftests/vDSO/vdso_test_gettimeofday.c | 2 +-
.../testing/selftests/vfio/lib/include/vfio_util.h | 2 +-
tools/testing/selftests/vfio/lib/vfio_pci_device.c | 2 +-
tools/testing/selftests/vfio/lib/vfio_pci_driver.c | 2 +-
.../testing/selftests/vfio/vfio_dma_mapping_test.c | 2 +-
.../selftests/vfio/vfio_iommufd_setup_test.c | 2 +-
.../testing/selftests/vfio/vfio_pci_device_test.c | 2 +-
.../testing/selftests/vfio/vfio_pci_driver_test.c | 2 +-
tools/testing/selftests/x86/Makefile | 1 +
.../testing/selftests/x86/corrupt_xstate_header.c | 2 +-
tools/testing/selftests/x86/helpers.h | 2 +-
tools/testing/selftests/x86/lam.c | 2 +-
tools/testing/selftests/x86/syscall_numbering.c | 2 +-
tools/testing/selftests/x86/test_mremap_vdso.c | 2 +-
tools/testing/selftests/x86/test_vsyscall.c | 2 +-
tools/testing/selftests/x86/xstate.h | 2 +-
tools/testing/shared/linux.c | 4 +-
tools/testing/vma/vma.c | 8 +-
tools/testing/vma/vma_internal.h | 2 +-
tools/thermal/tmon/tmon.c | 2 +-
usr/gen_init_cpio.c | 1 +
2244 files changed, 32687 insertions(+), 15852 deletions(-)
^ permalink raw reply [flat|nested] 884+ messages in thread
* [PATCH 6.18 0001/2151] KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
@ 2026-11-18 14:28 ` Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0002/2151] inet: frags: limit the truesize of a reassembly queue Greg Kroah-Hartman
` (881 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:28 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bill Wendling, Stefan Teodorescu,
Sean Christopherson, Paolo Bonzini, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Christopherson <seanjc@google.com>
[ Upstream commit 053621535f014085c935879582dd3b65964a0dce ]
When doing RSM to L2, validate L1's state after copying it back into vmcb01
from SMRAM, as SMRAM is carved out of guest memory, i.e. is writable by the
guest. Failure to validate L1's state is especially problematic for inputs
to MMU context, as KVM can end up with impossible CR4 vs. EFER state. E.g.
without the recent hardening FNAME(walk_addr_generic), a guest can trigger:
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in arch/x86/kvm/mmu/paging_tmpl.h:435:15
index 3 is out of range for type 'u32 [2]'
CPU: 3 UID: 0 PID: 92 Comm: CPU 1/KVM Not tainted 7.3.0-rc1 #2 PREEMPT(lazy)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x5f/0x90
dump_stack+0x10/0x18
ubsan_epilogue+0x9/0x39
__ubsan_handle_out_of_bounds.cold+0x50/0x55
paging32_walk_addr_generic+0x889/0x970
paging32_page_fault+0x79/0xa60
kvm_mmu_do_page_fault+0x125/0x270
kvm_mmu_page_fault+0x88/0x7b0
npf_interception+0xc8/0x220 [kvm_amd]
svm_invoke_exit_handler+0x16d/0x1d0 [kvm_amd]
svm_handle_exit+0xb7/0x160 [kvm_amd]
vcpu_enter_guest+0x428/0x16a0
kvm_arch_vcpu_ioctl_run+0x479/0x920
kvm_vcpu_ioctl+0x316/0xb00
__x64_sys_ioctl+0xa3/0x100
x64_sys_call+0x281/0x23d0
do_syscall_64+0xba/0x550
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x79bb30deb04b
</TASK>
---[ end trace ]---
Fixes: 37be407b2ce8 ("KVM: nSVM: Fix L1 state corruption upon return from SMM")
Cc: stable@vger.kernel.org
Reported-by: Bill Wendling <morbo@google.com>
Reported-by: Stefan Teodorescu <fane@google.com>
Tested-by: Stefan Teodorescu <fane@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20261022021046.295001-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[ sashal: adapted nested-state validation to existing helper APIs and explicit mapping cleanup via unmap_save. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/kvm/svm/nested.c | 23 ++++++++++++++++-------
arch/x86/kvm/svm/svm.c | 2 ++
arch/x86/kvm/svm/svm.h | 2 ++
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 49cc457a4c370..feb39e0e1be8b 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -1732,6 +1732,21 @@ static void nested_copy_vmcb_cache_to_control(struct vmcb_control_area *dst,
/* 'clean' and 'hv_enlightenments' are not changed by KVM */
}
+bool nested_svm_check_vmcb01_save(struct kvm_vcpu *vcpu,
+ struct vmcb_save_area *save)
+{
+ struct vmcb_save_area_cached save_cached;
+
+ if (!(save->cr0 & X86_CR0_PG) ||
+ !(save->cr0 & X86_CR0_PE) ||
+ (save->rflags & X86_EFLAGS_VM) ||
+ ((save->efer & EFER_LMA) && !(save->efer & EFER_LME)))
+ return false;
+
+ __nested_copy_vmcb_save_to_cache(&save_cached, save);
+ return __nested_vmcb_check_save(vcpu, &save_cached);
+}
+
static int svm_get_nested_state(struct kvm_vcpu *vcpu,
struct kvm_nested_state __user *user_kvm_nested_state,
u32 user_data_size)
@@ -1808,7 +1823,6 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
&user_kvm_nested_state->data.svm[0];
struct vmcb_control_area *ctl;
struct vmcb_save_area *save;
- struct vmcb_save_area_cached save_cached;
struct vmcb_ctrl_area_cached ctl_cached;
unsigned long cr0;
int ret;
@@ -1876,12 +1890,7 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,
* Validate host state saved from before VMRUN (see
* nested_svm_check_permissions).
*/
- __nested_copy_vmcb_save_to_cache(&save_cached, save);
- if (!(save->cr0 & X86_CR0_PG) ||
- !(save->cr0 & X86_CR0_PE) ||
- (save->rflags & X86_EFLAGS_VM) ||
- ((save->efer & EFER_LMA) && !(save->efer & EFER_LME)) ||
- !__nested_vmcb_check_save(vcpu, &save_cached))
+ if (!nested_svm_check_vmcb01_save(vcpu, save))
goto out_free;
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 16022d518ff3f..518cb53b6c448 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -4891,6 +4891,8 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
*/
svm_copy_vmrun_state(&svm->vmcb01.ptr->save, map_save.hva + 0x400);
+ if (!nested_svm_check_vmcb01_save(vcpu, &svm->vmcb01.ptr->save))
+ goto unmap_save;
/*
* Enter the nested guest now
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index f8ea26ba71423..367529a7482c6 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -797,6 +797,8 @@ void nested_copy_vmcb_save_to_cache(struct vcpu_svm *svm,
struct vmcb_save_area *save);
void nested_sync_control_from_vmcb02(struct vcpu_svm *svm);
void nested_vmcb02_compute_g_pat(struct vcpu_svm *svm);
+bool nested_svm_check_vmcb01_save(struct kvm_vcpu *vcpu,
+ struct vmcb_save_area *save);
void svm_switch_vmcb(struct vcpu_svm *svm, struct kvm_vmcb_info *target_vmcb);
extern struct kvm_x86_nested_ops svm_nested_ops;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0002/2151] inet: frags: limit the truesize of a reassembly queue
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0001/2151] KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM Greg Kroah-Hartman
@ 2026-11-18 14:28 ` Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0003/2151] KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E Greg Kroah-Hartman
` (880 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:28 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kyle Zeng, Florian Westphal,
Eric Dumazet, Ido Schimmel, Jiayuan Chen, Wang Zhan, Paolo Abeni,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@kernel.org>
[ Upstream commit 3ae20e4697eb969104fe4b1e98a675f0100382b6 ]
The truesize of fragments in a reassembly queue is only bounded by
the per netns ipfrag_high_thresh sysctl, which has no upper limit.
inet_frag_reasm_finish() sums the truesize of all fragments in an int.
If this sum reaches 2^32, it wraps, and the final sk_wmem_alloc
adjustment of the socket owning the reassembled skb can cancel its own
reference, leading to a use-after-free of this socket.
This can be triggered from an unprivileged user/network namespace,
raising ipfrag_high_thresh and using padded TUN packets, which keep
a large truesize after being trimmed by ip_rcv_core().
Track the sum of the truesize of fragments in each queue, and refuse
a fragment that would make it bigger than INT_MAX / 2. Callers kill
the queue on this error. This bound is far above the needs of
legitimate traffic.
Fixes: 18685451fc4e ("inet: inet_defrag: prevent sk release while still in use")
Cc: stable@vger.kernel.org
Reported-by: Kyle Zeng <kylebot@openai.com>
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Tested-by: Wang Zhan <wang.zhan@smartx.com>
Link: https://patch.msgid.link/20261030081225.2575462-1-edumazet@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ sashal: Adjusted context for the absence of IPFRAG_MIXED_SECPATH and secpath_equal(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/inet_frag.h | 9 +++++++++
net/ipv4/inet_fragment.c | 5 +++++
2 files changed, 14 insertions(+)
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 365925c9d2628..6aea2d1ac376f 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -79,6 +79,7 @@ struct frag_v6_compare_key {
* @tstamp_type: stamp has a mono delivery time (EDT)
* @flags: fragment queue flags
* @max_size: maximum received fragment size
+ * @truesize: sum of the truesize of queued fragments
* @fqdir: pointer to struct fqdir
* @rcu: rcu head for freeing deferall
*/
@@ -100,6 +101,7 @@ struct inet_frag_queue {
u8 tstamp_type;
__u8 flags;
u16 max_size;
+ unsigned int truesize;
struct fqdir *fqdir;
struct rcu_head rcu;
};
@@ -171,6 +173,13 @@ extern const u8 ip_frag_ecn_table[16];
#define IPFRAG_OK 0
#define IPFRAG_DUP 1
#define IPFRAG_OVERLAP 2
+#define IPFRAG_TOOBIG 4
+
+/* Max sum of the truesize of fragments in a queue. This keeps the sums
+ * done in inet_frag_reasm_prepare() and inet_frag_reasm_finish() well
+ * below INT_MAX. Legitimate traffic stays far below this limit.
+ */
+#define INET_FRAG_MAX_TRUESIZE (INT_MAX / 2)
int inet_frag_queue_insert(struct inet_frag_queue *q, struct sk_buff *skb,
int offset, int end);
void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 21f7bf9ea5ba2..436b8737b2b66 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -337,6 +337,7 @@ void inet_frag_queue_flush(struct inet_frag_queue *q,
q->rb_fragments = RB_ROOT;
q->fragments_tail = NULL;
q->last_run_head = NULL;
+ q->truesize = 0;
}
EXPORT_SYMBOL(inet_frag_queue_flush);
@@ -443,6 +444,9 @@ int inet_frag_queue_insert(struct inet_frag_queue *q, struct sk_buff *skb,
{
struct sk_buff *last = q->fragments_tail;
+ if (skb->truesize > INET_FRAG_MAX_TRUESIZE - q->truesize)
+ return IPFRAG_TOOBIG;
+
/* An IP fragment is never a GSO packet, but an untrusted source
* (virtio_net_hdr) may have attached GSO metadata to it. Do not let
* that reach the reassembled skb, whose head keeps the first
@@ -507,6 +511,7 @@ int inet_frag_queue_insert(struct inet_frag_queue *q, struct sk_buff *skb,
if (offset)
nf_reset_ct(skb);
+ q->truesize += skb->truesize;
return IPFRAG_OK;
}
EXPORT_SYMBOL(inet_frag_queue_insert);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0003/2151] KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0001/2151] KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0002/2151] inet: frags: limit the truesize of a reassembly queue Greg Kroah-Hartman
@ 2026-11-18 14:28 ` Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0004/2151] mm/hugetlb: fix endless write fault on a leftover uffd bit Greg Kroah-Hartman
` (879 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:28 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mark Brown, Fuad Tabba,
Lorenzo Stoakes (ARM), Marc Zyngier, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Zyngier <maz@kernel.org>
[ Upstream commit 68c11eed4f8097ef1b71c30679e96eb654df29e0 ]
KVM uses the VM's ID registers as the source of truth for what the
guest has, but userspace can expose S1PIE or S1POE without the features
they imply. As per the architecture, both imply TCR2 and ATS1A, and
S1POE also implies HPDS. With TCR2 hidden, the world switch skips
PIR_EL1, PIRE0_EL1 and POR_EL1 while KVM doesn't trap them, so the guest
accesses registers that are neither trapped nor switched. Under VHE,
that leaks values between guests. On nVHE and hVHE, pKVM included, the
host kernel resumes with the guest's PIR_EL1 and PIRE0_EL1.
On first run, clear S1PIE and S1POE from the VM's ID registers when the
features they imply are missing, before anything derives state from
them. The guest and userspace then see neither feature, and the guest's
accesses to their registers UNDEF.
Fixes: 70ed7238297fb ("KVM: arm64: Sanitise ID_AA64MMFR3_EL1")
Fixes: d4a89e5aee23e ("KVM: arm64: Expose S1PIE to guests")
Reported-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20260930-arm64-gcs-v21-2-3556644cd927@kernel.org
Link: https://lore.kernel.org/r/8633u229lq.wl-maz@kernel.org
Cc: stable@vger.kernel.org
Co-developed-by: Fuad Tabba <fuad.tabba@linux.dev>
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Link: https://patch.msgid.link/20261020064306.1542865-1-fuad.tabba@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
[ sashal: adapted dependency enforcement for the missing struct resx and existing per-vCPU initialization layout ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/kvm/config.c | 77 +++++++++++++++++++++++++++++++
arch/arm64/kvm/sys_regs.c | 3 ++
3 files changed, 81 insertions(+)
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index b7334f98deaac..2c5a573d708d1 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -1598,6 +1598,7 @@ static inline bool kvm_arch_has_irq_bypass(void)
return true;
}
+void kvm_idregs_enforce_dependencies(struct kvm *kvm);
void compute_fgu(struct kvm *kvm, enum fgt_group_id fgt);
void get_reg_fixed_bits(struct kvm *kvm, enum vcpu_sysreg reg, u64 *res0, u64 *res1);
void check_feature_map(void);
diff --git a/arch/arm64/kvm/config.c b/arch/arm64/kvm/config.c
index cd3e34389c08d..86bef6b455369 100644
--- a/arch/arm64/kvm/config.c
+++ b/arch/arm64/kvm/config.c
@@ -56,6 +56,7 @@ struct reg_feat_map_desc {
const struct reg_bits_to_feat_map feat_map;
const struct reg_bits_to_feat_map *bit_feat_map;
const unsigned int bit_feat_map_sz;
+ const unsigned int idreg_idx;
};
#define __NEEDS_FEAT_3(m, f, w, id, fld, lim) \
@@ -126,6 +127,21 @@ struct reg_feat_map_desc {
.bit_feat_map_sz = ARRAY_SIZE(m), \
}
+/*
+ * Declare the dependency between the features advertised in an id
+ * register, and the set of other features they depend on. This
+ * generates a struct reg_feat_map_desc.
+ */
+#define DECLARE_IDREG_FEAT_MAP(n, r, m, f) \
+ struct reg_feat_map_desc n = { \
+ .name = #r, \
+ .feat_map = NEEDS_FEAT(~(r##_RES0 | \
+ r##_RES1), f), \
+ .bit_feat_map = m, \
+ .bit_feat_map_sz = ARRAY_SIZE(m), \
+ .idreg_idx = IDREG_IDX(SYS_##r), \
+ }
+
#define FEAT_SPE ID_AA64DFR0_EL1, PMSVer, IMP
#define FEAT_BRBE ID_AA64DFR0_EL1, BRBE, IMP
#define FEAT_TRC_SR ID_AA64DFR0_EL1, TraceVer, IMP
@@ -200,6 +216,7 @@ struct reg_feat_map_desc {
#define FEAT_ASID2 ID_AA64MMFR4_EL1, ASID2, IMP
#define FEAT_MEC ID_AA64MMFR3_EL1, MEC, IMP
#define FEAT_HAFT ID_AA64MMFR1_EL1, HAFDBS, HAFT
+#define FEAT_HPDS ID_AA64MMFR1_EL1, HPDS, IMP
#define FEAT_BTI ID_AA64PFR1_EL1, BT, IMP
#define FEAT_ExS ID_AA64MMFR0_EL1, EXS, IMP
#define FEAT_IESB ID_AA64MMFR2_EL1, IESB, IMP
@@ -271,6 +288,25 @@ static bool feat_anerr(struct kvm *kvm)
kvm_has_feat(kvm, ID_AA64MMFR3_EL1, SNERR, FEAT_ANERR));
}
+/*
+ * S1PIE and S1POE imply TCR2 and ATS1A, and S1POE also implies HPDS, but
+ * userspace can set them independently.
+ */
+static bool feat_s1pie(struct kvm *kvm)
+{
+ return (kvm_has_feat(kvm, FEAT_S1PIE) &&
+ kvm_has_feat(kvm, FEAT_TCR2) &&
+ kvm_has_feat(kvm, FEAT_ATS1A));
+}
+
+static bool feat_s1poe(struct kvm *kvm)
+{
+ return (kvm_has_feat(kvm, FEAT_S1POE) &&
+ kvm_has_feat(kvm, FEAT_TCR2) &&
+ kvm_has_feat(kvm, FEAT_ATS1A) &&
+ kvm_has_feat(kvm, FEAT_HPDS));
+}
+
static bool feat_sme_smps(struct kvm *kvm)
{
/*
@@ -1176,6 +1212,14 @@ static const struct reg_bits_to_feat_map mdcr_el2_feat_map[] = {
static const DECLARE_FEAT_MAP(mdcr_el2_desc, MDCR_EL2,
mdcr_el2_feat_map, FEAT_AA64EL2);
+static const struct reg_bits_to_feat_map id_aa64mmfr3_el1_feat_map[] = {
+ NEEDS_FEAT(ID_AA64MMFR3_EL1_S1PIE, feat_s1pie),
+ NEEDS_FEAT(ID_AA64MMFR3_EL1_S1POE, feat_s1poe),
+};
+
+static const DECLARE_IDREG_FEAT_MAP(id_aa64mmfr3_el1_desc, ID_AA64MMFR3_EL1,
+ id_aa64mmfr3_el1_feat_map, FEAT_AA64EL1);
+
static void __init check_feat_map(const struct reg_bits_to_feat_map *map,
int map_size, u64 res0, const char *str)
{
@@ -1221,6 +1265,39 @@ void __init check_feature_map(void)
check_reg_desc(&mdcr_el2_desc);
}
+static const struct reg_feat_map_desc *idreg_feat_maps[] = {
+ &id_aa64mmfr3_el1_desc,
+};
+
+static bool idreg_apply_deps(struct kvm *kvm, const struct reg_feat_map_desc *r)
+{
+ u64 res0 = 0;
+ u64 val;
+
+ for (int i = 0; i < r->bit_feat_map_sz; i++) {
+ if ((r->bit_feat_map[i].flags & CALL_FUNC) &&
+ !r->bit_feat_map[i].match(kvm))
+ res0 |= reg_feat_map_bits(&r->bit_feat_map[i]);
+ }
+
+ val = kvm->arch.id_regs[r->idreg_idx];
+ kvm->arch.id_regs[r->idreg_idx] &= ~res0;
+
+ return val != kvm->arch.id_regs[r->idreg_idx];
+}
+
+void kvm_idregs_enforce_dependencies(struct kvm *kvm)
+{
+ bool again;
+
+ do {
+ again = false;
+
+ for (int i = 0; i < ARRAY_SIZE(idreg_feat_maps); i++)
+ again |= idreg_apply_deps(kvm, idreg_feat_maps[i]);
+ } while (again);
+}
+
static bool idreg_feat_match(struct kvm *kvm, const struct reg_bits_to_feat_map *map)
{
u64 regval = kvm->arch.id_regs[map->regidx];
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index bf8b6d5990088..bd5c6f16bacbc 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -5619,6 +5619,9 @@ int kvm_finalize_sys_regs(struct kvm_vcpu *vcpu)
guard(mutex)(&kvm->arch.config_lock);
+ if (!kvm_vm_has_ran_once(kvm))
+ kvm_idregs_enforce_dependencies(kvm);
+
/*
* This hacks into the ID registers, so only perform it when the
* first vcpu runs, or the kvm_set_vm_id_reg() helper will scream.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0004/2151] mm/hugetlb: fix endless write fault on a leftover uffd bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (2 preceding siblings ...)
2026-11-18 14:28 ` [PATCH 6.18 0003/2151] KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E Greg Kroah-Hartman
@ 2026-11-18 14:28 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0005/2151] 9p/xen: drain response work after unbinding IRQ Greg Kroah-Hartman
` (878 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:28 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik, David Hildenbrand (Arm),
Mike Rapoport (Microsoft), Andrew Morton, Chris Mason,
Lorenzo Stoakes (ARM), Lance Yang, Liam R. Howlett,
Vlastimil Babka, Jann Horn, Pedro Falcato, Muchun Song,
Oscar Salvador, Miaohe Lin, Naoya Horiguchi, Adam Litke,
Mel Gorman, Rik van Riel, Peter Xu, Kiryl Shutsemau, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josef Bacik <josef@toxicpanda.com>
[ Upstream commit f61e1cf15fb44f9cf89d43d8ef01f926322bb1c4 ]
hugetlb_fault() resolves the uffd bit on a write fault only if the VMA is
registered for userfaultfd write protection, and hugetlb_wp() bails out
for any entry with the uffd bit set assuming hugetlb_fault() has already
resolved it.
When a read-only hugetlb entry with the uffd bit set is mapped in a VMA
that is not registered for uffd-wp, a write fault to it never makes
progress. If the access comes from the kernel, e.g. read(2) from
/dev/zero into such page, the task spins in the page fault handler,
ignores SIGKILL and keeps holding the locks taken by the system call.
Such entries should not exist, but an unprivileged user can create them,
for example with MADV_DONTNEED of a page protected with UFFDIO_RWPROTECT
or with UFFDIO_COPY in MODE_WP racing with UFFDIO_UNREGISTER.
Clear the uffd bit when the VMA is not registered for uffd-wp and let the
fault proceed to hugetlb_wp(), like do_wp_page() does for regular pages.
Note that a FOLL_FORCE write to a page protected with UFFDIO_RWPROTECT in
a private VMA that was made PROT_NONE now drops the RWP protection of
that page.
Original fix generated by an LLM and sent in private by Josef.
[rppt@kernel.org: massage commit message]
[david@kernel.org: convert comment into a TODO]
Link: https://lore.kernel.org/20261015-urgent_fixes-v1-6-42796911043b@kernel.org
Fixes: 60d5b473d61b ("mm/hugetlb: fix uffd wr-protection for CoW optimization path")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Chris Mason <mason@kernel.org>
Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Rik van Riel <riel@surriel.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Kiryl Shutsemau <kas@kernel.org>
Cc: <stable@vger.kernel.org>
[ sashal: retained the older huge_pte_uffd_wp() and huge_pte_clear_uffd_wp() helper names. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/hugetlb.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a8da4cb7ad10f..32daea7b157fa 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6860,15 +6860,19 @@ vm_fault_t hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_ptl;
/* Handle userfault-wp first, before trying to lock more pages */
- if (userfaultfd_wp(vma) && huge_pte_uffd_wp(huge_ptep_get(mm, vmf.address, vmf.pte)) &&
+ if (huge_pte_uffd_wp(huge_ptep_get(mm, vmf.address, vmf.pte)) &&
(flags & FAULT_FLAG_WRITE) && !huge_pte_write(vmf.orig_pte)) {
- if (!userfaultfd_wp_async(vma)) {
+ if (userfaultfd_wp(vma) && !userfaultfd_wp_async(vma)) {
spin_unlock(vmf.ptl);
hugetlb_vma_unlock_read(vma);
mutex_unlock(&hugetlb_fault_mutex_table[hash]);
return handle_userfault(&vmf, VM_UFFD_WP);
}
+ /*
+ * TODO: fix all cases where uffd PTE bits remain in VMAs that
+ * are no longer registered with uffd.
+ */
vmf.orig_pte = huge_pte_clear_uffd_wp(vmf.orig_pte);
set_huge_pte_at(mm, vmf.address, vmf.pte, vmf.orig_pte,
huge_page_size(hstate_vma(vma)));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0005/2151] 9p/xen: drain response work after unbinding IRQ
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (3 preceding siblings ...)
2026-11-18 14:28 ` [PATCH 6.18 0004/2151] mm/hugetlb: fix endless write fault on a leftover uffd bit Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0006/2151] ksmbd: revert fsids on durable reconnect and replay failure Greg Kroah-Hartman
` (877 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yizhou Zhao, Yuxiang Yang, Ao Wang,
Xuewei Feng, Qi Li, Ke Xu, Dominique Martinet, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
[ Upstream commit 7b6f2e3c29fb4d76f1e4973280792eabbd526602 ]
commit ea4f1009408e ("9p/xen : Fix use after free bug in
xen_9pfs_front_remove due to race condition") added cancel_work_sync()
to keep xen_9pfs_front_free() from freeing a ring while
p9_xen_response() is still running.
The work is currently drained before the event channel IRQ is unbound.
That leaves a race window where xen_9pfs_front_event_handler() can run
after cancel_work_sync() returns and queue p9_xen_response() again. The
following unbind_from_irqhandler() synchronizes with the IRQ handler, but
it does not cancel work that the handler already queued. The teardown
can then free the ring and private data while the response work remains
pending, and the worker later dereferences ring->priv and priv->client.
Unbind the event channel IRQ before draining the work. Once the IRQ is
unbound, no new response work can be queued by the backend event channel,
and cancel_work_sync() waits for any work that was queued before or
during the unbind. It is then safe to release the ring resources.
Fixes: ea4f1009408e ("9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition")
Cc: stable@vger.kernel.org
Reported-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Reported-by: Yuxiang Yang <yangyx22@mails.tsinghua.edu.cn>
Reported-by: Ao Wang <wangao@seu.edu.cn>
Reported-by: Xuewei Feng <fengxw06@126.com>
Reported-by: Qi Li <qli01@tsinghua.edu.cn>
Reported-by: Ke Xu <xuke@tsinghua.edu.cn>
Assisted-by: GLM:GLM-5.1
Signed-off-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Message-ID: <20260609155202.1706-1-zhaoyz24@mails.tsinghua.edu.cn>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/9p/trans_xen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 67f464acf6171..ef9bac5f4a24a 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -288,12 +288,12 @@ static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv)
for (i = 0; i < XEN_9PFS_NUM_RINGS; i++) {
struct xen_9pfs_dataring *ring = &priv->rings[i];
- cancel_work_sync(&ring->work);
-
if (!priv->rings[i].intf)
break;
if (priv->rings[i].irq > 0)
unbind_from_irqhandler(priv->rings[i].irq, ring);
+ cancel_work_sync(&ring->work);
+
if (priv->rings[i].data.in) {
for (j = 0;
j < (1 << priv->rings[i].intf->ring_order);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0006/2151] ksmbd: revert fsids on durable reconnect and replay failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (4 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0005/2151] 9p/xen: drain response work after unbinding IRQ Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0007/2151] mm/ksm: fix use of a freed anon_vma at swap-in Greg Kroah-Hartman
` (876 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ian Bridges, Namjae Jeon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Bridges <icb@fastmail.org>
[ Upstream commit 539223f18026448f67d33d09719c355b91db7fd0 ]
On a durable handle reconnect or a request replay, smb2_open() switches
to the SMB user's fsids before calling ksmbd_vfs_getattr(). If that call
fails, the code jumps to err_out2 and skips ksmbd_revert_fsids() at
err_out1. The user's credentials then stay installed on the shared ksmbd
worker. Later work on that worker, including other users' requests, runs
with the first user's fsuid, fsgid and supplementary groups.
ksmbd_free_work_struct() also warns, because work->saved_cred is still
set.
Jump to err_out1 instead. No path is held at this point, so skipping the
path_put() at err_out is correct.
Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2")
Fixes: bb8bf7eb13b5 ("ksmbd: add SMB3 request replay support")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
[ sashal: omitted the hunk for the absent dh_info.replay branch ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/smb2pdu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index ec4c54c9c6dc9..6ad50aab3dfcb 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -3125,7 +3125,7 @@ int smb2_open(struct ksmbd_work *work)
rc = ksmbd_vfs_getattr(&fp->filp->f_path, &stat);
if (rc)
- goto err_out2;
+ goto err_out1;
goto reconnected_fp;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0007/2151] mm/ksm: fix use of a freed anon_vma at swap-in
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (5 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0006/2151] ksmbd: revert fsids on durable reconnect and replay failure Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0008/2151] ksmbd: enforce the read-only share flag when creating a stream Greg Kroah-Hartman
` (875 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Mason, Lorenzo Stoakes (ARM),
Xu Xin, Muhammad Usama Anjum, David Hildenbrand (Arm),
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e ]
A folio read from a swap slot previously shared by KSM can remain in the
swap cache after the process that first mapped it exits. Its anon_vma
can then be freed, so ksm_might_need_to_copy() must not dereference it
to compare roots.
Doing so can result in some false-positives, resulting in the reverse
mapping missing the new folio mapping, preventing migration and reclaim.
SLAB_TYPESAFE_BY_RCU allows individual anon_vma objects to be reused
immediately after freeing. A stale pointer can then refer to another
anon_vma whose root matches, even though the target VMA is not linked
to that anon_vma.
Move the anonymous rmap compatibility checks into
folio_anon_rmap_compatible(). Keep the page-index check and compare the
folio's anon_vma pointer against the VMA's own anon_vma and root first.
If neither matches, bite the bullet and walk the VMA's anon_vma_chain.
The VMA keeps these anon_vmas alive, and finding a match guarantees that
reverse mapping can find the new mapping.
Lorenzo Stoakes says in a private discussion:
"This isn't quite equivalent to the existing check.
Every anon_vma in an anon_vma_chain shares the same root, but if you
split a VMA then fork both of them like this:
VMA A
/ \ <split>
VMA B VMA C
\ /
root <- anon_vma 1
----^ ^---- <fork>
/ parent \
anon_vma 2 anon_vma 3
| |
VMA D VMA E
VMA's D and E both get their own new
anon_vma's such that:
VMA D: anon_vma 2 -> anon_vma 1 -> root
VMA E: anon_vma 3 -> anon_vma 1 -> root
And if you found a folio referencing anon_vma 2, the existing check:
anon_vma->root == vma->anon-vma->root
Would be true for VMA's B, C, D & E.
However after your change it'd be true for VMA D only, as it's the only
one with anon_vma 2 in its anon_vma_chain.
Whether or not that could actually happen in practice... 🙂 I don't
know.
[...] after your change it'd be true for VMA D only, as it's the only
one with anon_vma 2 in its anon_vma_chain. [...] I would [...] say that
you are making the test stricter but more correct.
"
If this affects performance when KSM was never even involved, we could
just track whether KSM ever merged anything and just skip these checks.
There isn't really a lot we can do otherwise: for mapped folios we might
be able to use folio_get_anon_vma(), but for unmapped folios there really
is no easy way to see if the anon_vma is still valid.
Document the (confusing) lifetime requirements of folio_anon_vma().
Fixes: ba6f0ff3981e ("ksm: fix ksm swapin time optimization")
Cc: stable@vger.kernel.org
Reported-by: Chris Mason <mason@kernel.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Acked-by: Xu Xin <xu.xin@linux.dev>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-40-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Replaced linear_anon_page_index() with linear_page_index() and omitted the unavailable vma_assert_stabilised() assertion. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/ksm.c | 35 ++++++++++++++++++++++++++++++-----
mm/util.c | 13 +++++++++++++
2 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/mm/ksm.c b/mm/ksm.c
index bcaca6e99b1ce..78dc717633818 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -3080,11 +3080,39 @@ void __ksm_exit(struct mm_struct *mm)
trace_ksm_exit(mm);
}
+static bool folio_anon_rmap_compatible(const struct folio *folio,
+ struct vm_area_struct *vma, unsigned long addr)
+{
+ const struct anon_vma *anon_vma = folio_anon_vma(folio);
+ struct anon_vma_chain *avc;
+
+ VM_WARN_ON_ONCE_FOLIO(!folio_test_locked(folio), folio);
+ VM_WARN_ON_ONCE_FOLIO(folio_test_large(folio), folio);
+ VM_WARN_ON_ONCE_FOLIO(folio_test_ksm(folio), folio);
+
+ if (!anon_vma)
+ return true;
+ if (folio->index != linear_page_index(vma, addr))
+ return false;
+
+ /*
+ * Careful: anon_vma might have been freed, so we cannot safely
+ * dereference it. Add a fast path before we walk the anon_vma chain.
+ */
+ if (anon_vma == vma->anon_vma || anon_vma == vma->anon_vma->root)
+ return true;
+
+ list_for_each_entry(avc, &vma->anon_vma_chain, same_vma) {
+ if (avc->anon_vma == anon_vma)
+ return true;
+ }
+ return false;
+}
+
struct folio *ksm_might_need_to_copy(struct folio *folio,
struct vm_area_struct *vma, unsigned long addr)
{
struct page *page = folio_page(folio, 0);
- struct anon_vma *anon_vma = folio_anon_vma(folio);
struct folio *new_folio;
if (folio_test_large(folio))
@@ -3094,10 +3122,7 @@ struct folio *ksm_might_need_to_copy(struct folio *folio,
if (folio_stable_node(folio) &&
!(ksm_run & KSM_RUN_UNMERGE))
return folio; /* no need to copy it */
- } else if (!anon_vma) {
- return folio; /* no need to copy it */
- } else if (folio->index == linear_page_index(vma, addr) &&
- anon_vma->root == vma->anon_vma->root) {
+ } else if (folio_anon_rmap_compatible(folio, vma, addr)) {
return folio; /* still no need to copy it */
}
if (PageHWPoison(page))
diff --git a/mm/util.c b/mm/util.c
index 31a59c038ba0a..ec9239b1ea1e2 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -668,6 +668,19 @@ void *vcalloc_noprof(size_t n, size_t size)
}
EXPORT_SYMBOL(vcalloc_noprof);
+/**
+ * folio_anon_vma - Get a folio's raw anon_vma pointer.
+ * @folio: The folio.
+ *
+ * The returned pointer may be stale for an unmapped folio. The caller
+ * must ensure the anon_vma stays alive before dereferencing it. A folio
+ * reference or lock alone is insufficient; use folio_get_anon_vma() when
+ * the anon_vma's lifetime is not otherwise protected. Note that
+ * folio_get_anon_vma() is only useful for folios that are still mapped.
+ *
+ * Return: The raw anon_vma pointer for an anonymous, non-KSM folio, or
+ * %NULL otherwise.
+ */
struct anon_vma *folio_anon_vma(const struct folio *folio)
{
unsigned long mapping = (unsigned long)folio->mapping;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0008/2151] ksmbd: enforce the read-only share flag when creating a stream
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (6 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0007/2151] mm/ksm: fix use of a freed anon_vma at swap-in Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0009/2151] mm/shmem: hold off eviction in shmem_writeout() Greg Kroah-Hartman
` (874 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ian Bridges, Namjae Jeon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Bridges <icb@fastmail.org>
[ Upstream commit 09139429fab3a5114c18d7c15fb161511d4d66c9 ]
When a share is read-only, smb2_open() rejects opens that would create
or truncate a file. Creating a named stream on an existing file with
streams_xattr sets neither O_CREAT nor O_TRUNC, so it passes this check,
and smb2_set_stream_name_xattr() then creates the stream. On a Time
Machine share, opening a missing AFP_AfpInfo stream also writes one. A
user who can write a file at the filesystem level can therefore add
streams to it through a read-only share.
Do not create a stream or synthesize AFP_AfpInfo when the share is not
writable. Existing streams still open normally, and a missing stream
opened with FILE_OPEN still returns STATUS_OBJECT_NAME_NOT_FOUND.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Fixes: eaff8e924f60 ("ksmbd: synthesize empty AFP_AfpInfo xattr on first probe")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
[ sashal: Omitted the AFP_AfpInfo creation guard because automatic creation on Time Machine shares is absent. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/smb2pdu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 6ad50aab3dfcb..55d4727facc51 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -2567,6 +2567,9 @@ static noinline int smb2_set_stream_name_xattr(const struct path *path,
return -EBADF;
}
+ if (!test_tree_conn_flag(fp->tcon, KSMBD_TREE_CONN_FLAG_WRITABLE))
+ return -EACCES;
+
rc = ksmbd_vfs_setxattr(idmap, path, xattr_stream_name, NULL, 0, 0, false);
if (rc < 0)
pr_err("Failed to store XATTR stream name :%d\n", rc);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0009/2151] mm/shmem: hold off eviction in shmem_writeout()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (7 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0008/2151] ksmbd: enforce the read-only share flag when creating a stream Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0010/2151] fbcon: Rebuild rotated font buffer on font change Greg Kroah-Hartman
` (873 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik, Pedro Falcato,
Kiryl Shutsemau (Meta), Nhat Pham, Baolin Wang,
Gregory Price (Meta), David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josef Bacik <josef@toxicpanda.com>
[ Upstream commit 8f59173b5ca358bf4d1017b44da3cbe6faa80daf ]
Once shmem_writeout() has moved the folio from the page cache to the
swap cache, the folio lock no longer keeps the inode alive: truncation
and eviction find a swap entry, free it and do not wait for anybody.
That did not matter as long as swap_writeout() was the last thing the
function did. But since it puts the folio back when swap_writeout()
returns AOP_WRITEPAGE_ACTIVATE, it uses the mapping and the inode
afterwards:
reclaim last close of an unlinked file
shmem_writeout()
shmem_delete_from_page_cache()
swap_writeout()
zswap_store() fails shmem_evict_inode()
writeback is disabled shmem_truncate_range()
return AOP_WRITEPAGE_ACTIVATE shmem_free_swap()
destroy_inode()
... RCU grace period, freed
shmem_add_to_page_cache(mapping)
xas_lock_irq() <- use after free
swap_writeout() behaves that way if zswap is enabled, cannot take the
folio and the memcg or one of its ancestors has memory.zswap.writeback
set to 0.
shmem_unuse() already added infrastructure to deal with that.
Reuse info->stop_eviction to protect the inode during writeout. Increment
it before removing the folio from the page cache, and decrement it after
swap_writeout() and any attempted reinsertion and inode accounting.
In shmem_evict_inode(), wait for the counter to reach zero even if
swapoff has already removed the inode from the swap list. Add some helpers
to make the code easier to digest.
There is a known remaining issue with two swapoffs racing, and the empty
list check not being able to detect that race. That will be addressed
separately later.
Fix generated by an LLM and sent by Josef Bacik in private.
Fixes: 6344a6d9ce13 ("mm/shmem: writeout free swap if swap_writeout() reactivates")
Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Acked-by: Pedro Falcato <pfalcato@suse.de>
Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Tested-by: Baolin Wang <baolin.wang@linux.alibaba.com>
[ david: code cleanups; improve description ]
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Link: https://patch.msgid.link/20261029-fixes_shmem-v4-6-392fc715d8f6@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: inlined upstream eviction helpers at their call sites to avoid adding new functions ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/shmem.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 5ce1c0ddf8cde..6828611bcdfe0 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1411,16 +1411,21 @@ static void shmem_evict_inode(struct inode *inode)
}
spin_unlock(&sbinfo->shrinklist_lock);
}
- while (!list_empty(&info->swaplist)) {
- /* Wait while shmem_unuse() is scanning this inode... */
+ /*
+ * Writeout may still use the inode after swapoff has removed it
+ * from the swaplist, so always wait at least once.
+ */
+ do {
wait_var_event(&info->stop_eviction,
!atomic_read(&info->stop_eviction));
+ if (list_empty(&info->swaplist))
+ break;
spin_lock(&shmem_swaplist_lock);
/* ...but beware of the race if we peeked too early */
if (!atomic_read(&info->stop_eviction))
list_del_init(&info->swaplist);
spin_unlock(&shmem_swaplist_lock);
- }
+ } while (!list_empty(&info->swaplist));
}
simple_xattrs_free(&info->xattrs, sbinfo->max_inodes ? &freed : NULL);
@@ -1685,6 +1690,13 @@ int shmem_writeout(struct folio *folio, struct swap_iocb **plug,
spin_unlock(&shmem_swaplist_lock);
}
+ /*
+ * Once the folio has left the page cache, its lock no longer
+ * keeps the inode from being evicted and freed: hold eviction
+ * off, in case the folio has to be put back below.
+ */
+ atomic_inc(&info->stop_eviction);
+
swap_shmem_alloc(folio->swap, nr_pages);
shmem_delete_from_page_cache(folio, swp_to_radix_entry(folio->swap));
@@ -1692,6 +1704,8 @@ int shmem_writeout(struct folio *folio, struct swap_iocb **plug,
error = swap_writeout(folio, plug);
if (error != AOP_WRITEPAGE_ACTIVATE) {
/* folio has been unlocked */
+ if (atomic_dec_and_test(&info->stop_eviction))
+ wake_up_var(&info->stop_eviction);
return error;
}
@@ -1708,6 +1722,8 @@ int shmem_writeout(struct folio *folio, struct swap_iocb **plug,
shmem_recalc_inode(inode, 0, -nr_pages);
swap_free_nr(folio->swap, nr_pages);
}
+ if (atomic_dec_and_test(&info->stop_eviction))
+ wake_up_var(&info->stop_eviction);
/*
* The swap_cache_del_folio() below could be left for
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0010/2151] fbcon: Rebuild rotated font buffer on font change
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (8 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0009/2151] mm/shmem: hold off eviction in shmem_writeout() Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0011/2151] mm/memcontrol: fix stuck FLUSHING_CACHED_CHARGE bit on isolated cpus Greg Kroah-Hartman
` (872 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yao Yiqi, Thomas Zimmermann,
Helge Deller, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yao Yiqi <yaoyiqi3@huawei.com>
[ Upstream commit e4b6b865d45d8dafb6c6f28c8a993a5b4431d25a ]
fbcon_rotate_font() caches a rotated copy of the console font in
par->rotated.buf. The buffer is sized from the font's width, height
and charcount, and is rebuilt in fbcon_init(), fbcon_switch() and
fbcon_modechanged(), but not in fbcon_do_set_font().
When the font is changed through KDFONTOP, the new geometry is
installed and vc_resize() redraws before the buffer is rebuilt. The
rotated putcs/cursor ops then index the old buffer with the new cell
size; KASAN reports a slab-out-of-bounds read in soft_cursor().
Rebuild the buffer for the visible console before the redraw, as the
other callers do: select the console's blitting state with
set_blitting_type() (which also uploads the new font's map on
tile-blitting hardware), then rebuild. Background consoles keep
their rebuild at fbcon_switch() time, as the buffer is shared per
framebuffer and must not be updated for a console that is not being
displayed.
To ensure a correct rollback when the rebuild or the following
vc_resize() fails, save the rotated font state, clear it before
rebuilding, and restore it in the error path of
fbcon_do_set_font().
Fixes: 6cc50e1c5b57 ("[PATCH] fbcon: Console Rotation - Add support to rotate font bitmap")
Cc: stable@vger.kernel.org
Signed-off-by: Yao Yiqi <yaoyiqi3@huawei.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
[ sashal: adapted rotated font cache handling to the older fbcon_par layout and font reference-counting API ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/core/fbcon.c | 57 ++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 903823c9ce567..51860796f4364 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -2430,6 +2430,12 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
int resize, ret, old_userfont, old_width, old_height, old_charcount;
u8 *old_data = vc->vc_font.data;
unsigned short old_hi_font_mask = vc->vc_hi_font_mask;
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
+ u8 *saved_fontdata = NULL, *saved_fontbuffer = NULL;
+ u32 saved_fd_size = 0;
+ int saved_cur_rotate = 0;
+ bool rotated_saved = false;
+#endif
resize = (w != vc->vc_font.width) || (h != vc->vc_font.height);
vc->vc_font.data = (void *)(p->fontdata = data);
@@ -2449,6 +2455,33 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
else if (!vc->vc_hi_font_mask && charcount == 512)
set_vc_hi_font(vc, true);
+ /*
+ * Select the console's blitting state and update the rotated font buffer
+ * to match the new font, so that the rendering below does not use a
+ * cache that was built for the old font. Clear the cached state so
+ * the rebuild allocates a fresh buffer; the old state is kept until
+ * the font change can no longer fail.
+ */
+ if (con_is_visible(vc)) {
+ set_blitting_type(vc, info);
+ if (par->rotate_font) {
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
+ saved_fontdata = par->fontdata;
+ saved_fontbuffer = par->fontbuffer;
+ saved_fd_size = par->fd_size;
+ saved_cur_rotate = par->cur_rotate;
+ par->fontdata = NULL;
+ par->fontbuffer = NULL;
+ par->fd_size = 0;
+ par->cur_rotate = 0;
+ rotated_saved = true;
+#endif
+ ret = par->rotate_font(info, vc);
+ if (ret)
+ goto err_out;
+ }
+ }
+
if (resize) {
int cols, rows;
@@ -2465,11 +2498,28 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
update_screen(vc);
}
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
+ if (rotated_saved)
+ kfree(saved_fontbuffer);
+#endif
if (old_userfont && (--REFCOUNT(old_data) == 0))
kfree(old_data - FONT_EXTRA_WORDS * sizeof(int));
return 0;
err_out:
+#ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
+ /*
+ * Drop the buffer built for the new font and restore the saved
+ * state.
+ */
+ if (rotated_saved) {
+ kfree(par->fontbuffer);
+ par->fontdata = saved_fontdata;
+ par->fontbuffer = saved_fontbuffer;
+ par->fd_size = saved_fd_size;
+ par->cur_rotate = saved_cur_rotate;
+ }
+#endif
p->fontdata = old_data;
vc->vc_font.data = old_data;
@@ -2489,6 +2539,13 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
else if (!old_hi_font_mask && vc->vc_hi_font_mask)
set_vc_hi_font(vc, false);
+ /*
+ * Re-select the blitting type, which re-uploads the font map on
+ * tile-blitting hardware.
+ */
+ if (con_is_visible(vc))
+ set_blitting_type(vc, info);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0011/2151] mm/memcontrol: fix stuck FLUSHING_CACHED_CHARGE bit on isolated cpus
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (9 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0010/2151] fbcon: Rebuild rotated font buffer on font change Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0012/2151] ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close Greg Kroah-Hartman
` (871 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Michal Hocko, Shakeel Butt,
Rik van Riel, Andrew Morton, Johannes Weiner, Muchun Song,
Roman Gushchin, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rik van Riel <riel@surriel.com>
[ Upstream commit d2f28a1a652e0a43f6f63de9b4e4d8d5f2716803 ]
When drain_all_stock() sets FLUSHING_CACHED_CHARGE before checking
isolation, schedule_drain_work() can drop the work in a separate RCU
critical section, and housekeeping_update()'s synchronize_rcu() can race
that second check, leaving the flag set.
drain_local_stock() only clears the bit for work that ran, so the flag
remains set and the stock is never drained again.
Have schedule_drain_work() return whether the work was queued, and clear
FLUSHING_CACHED_CHARGE in drain_all_stock() when the remote CPU is
isolated, so future drains can retry.
Link: https://lore.kernel.org/20260828135036.7d44361f@fangorn
Fixes: 6a792697a53a ("memcg: do not drain charge pcp caches on remote isolated cpus")
Suggested-by: Michal Hocko <mhocko@suse.com>
Suggested-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: <stable@vger.kernel.org>
[ sashal: Adapted the schedule_drain_work() changes to the direct isolation checks in drain_all_stock() because the helper is absent. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/memcontrol.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3ce613dab616e..bb267287b460e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2016,6 +2016,9 @@ void drain_all_stock(struct mem_cgroup *root_memcg)
drain_local_memcg_stock(&memcg_st->work);
else if (!cpu_is_isolated(cpu))
schedule_work_on(cpu, &memcg_st->work);
+ else
+ clear_bit(FLUSHING_CACHED_CHARGE,
+ &memcg_st->flags);
}
if (!test_bit(FLUSHING_CACHED_CHARGE, &obj_st->flags) &&
@@ -2026,6 +2029,9 @@ void drain_all_stock(struct mem_cgroup *root_memcg)
drain_local_obj_stock(&obj_st->work);
else if (!cpu_is_isolated(cpu))
schedule_work_on(cpu, &obj_st->work);
+ else
+ clear_bit(FLUSHING_CACHED_CHARGE,
+ &obj_st->flags);
}
}
migrate_enable();
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0012/2151] ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (10 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0011/2151] mm/memcontrol: fix stuck FLUSHING_CACHED_CHARGE bit on isolated cpus Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0013/2151] ASoC: SOF: Intel: hda-sdw-bpt: Stop active DMA before closing BPT streams Greg Kroah-Hartman
` (870 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bard Liao, Péter Ujfalusi,
Liam Girdwood, Pierre-Louis Bossart, Vinod Koul, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bard Liao <yung-chuan.liao@linux.intel.com>
[ Upstream commit 992eb0dfbc4f594d60ae57974efa835bfac34d1e ]
Resetting the PCMSyCM registers is required for Intel SoundWire stream. The
same procedure is done in sdw_hda_dai_hw_params() for the normal
SoundWire stream, too.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20260730012518.2180906-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 348bc756d912 ("ASoC: SOF: Intel: hda-sdw-bpt: Stop active DMA before closing BPT streams")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/soundwire/intel_ace2x.c | 4 +++-
include/sound/hda-sdw-bpt.h | 5 +++--
sound/soc/sof/intel/hda-sdw-bpt.c | 31 ++++++++++++++++++++++++++++---
3 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/drivers/soundwire/intel_ace2x.c b/drivers/soundwire/intel_ace2x.c
index f0e0a79b30b0e..c1ea420bc11ff 100644
--- a/drivers/soundwire/intel_ace2x.c
+++ b/drivers/soundwire/intel_ace2x.c
@@ -192,6 +192,7 @@ static int intel_ace2x_bpt_open_stream(struct sdw_intel *sdw, struct sdw_slave *
__func__, str_read_write(command), ret);
ret1 = hda_sdw_bpt_close(cdns->dev->parent, /* PCI device */
+ sdw->instance,
sdw->bpt_ctx.bpt_tx_stream, &sdw->bpt_ctx.dmab_tx_bdl,
sdw->bpt_ctx.bpt_rx_stream, &sdw->bpt_ctx.dmab_rx_bdl);
if (ret1 < 0)
@@ -226,7 +227,8 @@ static void intel_ace2x_bpt_close_stream(struct sdw_intel *sdw, struct sdw_slave
struct sdw_cdns *cdns = &sdw->cdns;
int ret;
- ret = hda_sdw_bpt_close(cdns->dev->parent /* PCI device */, sdw->bpt_ctx.bpt_tx_stream,
+ ret = hda_sdw_bpt_close(cdns->dev->parent /* PCI device */, sdw->instance,
+ sdw->bpt_ctx.bpt_tx_stream,
&sdw->bpt_ctx.dmab_tx_bdl, sdw->bpt_ctx.bpt_rx_stream,
&sdw->bpt_ctx.dmab_rx_bdl);
if (ret < 0)
diff --git a/include/sound/hda-sdw-bpt.h b/include/sound/hda-sdw-bpt.h
index f649549b75d52..330cda50f100c 100644
--- a/include/sound/hda-sdw-bpt.h
+++ b/include/sound/hda-sdw-bpt.h
@@ -27,7 +27,7 @@ int hda_sdw_bpt_send_async(struct device *dev, struct hdac_ext_stream *bpt_tx_st
int hda_sdw_bpt_wait(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
struct hdac_ext_stream *bpt_rx_stream);
-int hda_sdw_bpt_close(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
+int hda_sdw_bpt_close(struct device *dev, int link_id, struct hdac_ext_stream *bpt_tx_stream,
struct snd_dma_buffer *dmab_tx_bdl, struct hdac_ext_stream *bpt_rx_stream,
struct snd_dma_buffer *dmab_rx_bdl);
#else
@@ -56,7 +56,8 @@ static inline int hda_sdw_bpt_wait(struct device *dev, struct hdac_ext_stream *b
return -EOPNOTSUPP;
}
-static inline int hda_sdw_bpt_close(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
+static inline int hda_sdw_bpt_close(struct device *dev, int link_id,
+ struct hdac_ext_stream *bpt_tx_stream,
struct snd_dma_buffer *dmab_tx_bdl,
struct hdac_ext_stream *bpt_rx_stream,
struct snd_dma_buffer *dmab_rx_bdl)
diff --git a/sound/soc/sof/intel/hda-sdw-bpt.c b/sound/soc/sof/intel/hda-sdw-bpt.c
index ff5abccf0d88b..4e5c99413c750 100644
--- a/sound/soc/sof/intel/hda-sdw-bpt.c
+++ b/sound/soc/sof/intel/hda-sdw-bpt.c
@@ -297,7 +297,8 @@ int hda_sdw_bpt_open(struct device *dev, int link_id, struct hdac_ext_stream **b
__func__, ret);
close:
- ret1 = hda_sdw_bpt_close(dev, *bpt_tx_stream, dmab_tx_bdl, *bpt_rx_stream, dmab_rx_bdl);
+ ret1 = hda_sdw_bpt_close(dev, link_id, *bpt_tx_stream, dmab_tx_bdl,
+ *bpt_rx_stream, dmab_rx_bdl);
if (ret1 < 0)
dev_err(dev, "%s: hda_sdw_bpt_close failed: %d\n",
__func__, ret1);
@@ -422,14 +423,38 @@ int hda_sdw_bpt_wait(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
}
EXPORT_SYMBOL_NS(hda_sdw_bpt_wait, "SND_SOC_SOF_INTEL_HDA_SDW_BPT");
-int hda_sdw_bpt_close(struct device *dev, struct hdac_ext_stream *bpt_tx_stream,
+int hda_sdw_bpt_close(struct device *dev, int link_id, struct hdac_ext_stream *bpt_tx_stream,
struct snd_dma_buffer *dmab_tx_bdl, struct hdac_ext_stream *bpt_rx_stream,
struct snd_dma_buffer *dmab_rx_bdl)
{
+ struct snd_sof_dev *sdev = dev_get_drvdata(dev);
int ret;
int ret1;
- ret = hda_sdw_bpt_dma_deprepare(dev, bpt_rx_stream, dmab_rx_bdl);
+ /*
+ * In the case of SoundWire we need to reset the PCMSyCM registers.
+ * Need to continue depreparing the DMA buffers even if this fails.
+ */
+ ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id,
+ 0, /* PDI0 */
+ 0, 0, SNDRV_PCM_STREAM_PLAYBACK);
+ if (ret < 0)
+ dev_err(dev, "%s: hdac_bus_eml_sdw_map_stream_ch failed %d for PDI0\n",
+ __func__, ret);
+
+ ret1 = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id,
+ 1, /* PDI1 */
+ 0, 0, SNDRV_PCM_STREAM_CAPTURE);
+ if (ret1 < 0) {
+ dev_err(dev, "%s: hdac_bus_eml_sdw_map_stream_ch failed %d for PDI1\n",
+ __func__, ret1);
+ if (!ret)
+ ret = ret1;
+ }
+
+ ret1 = hda_sdw_bpt_dma_deprepare(dev, bpt_rx_stream, dmab_rx_bdl);
+ if (!ret)
+ ret = ret1;
ret1 = hda_sdw_bpt_dma_deprepare(dev, bpt_tx_stream, dmab_tx_bdl);
if (!ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0013/2151] ASoC: SOF: Intel: hda-sdw-bpt: Stop active DMA before closing BPT streams
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (11 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0012/2151] ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0014/2151] drm/amdkfd: Validate the control stack of a restored queue Greg Kroah-Hartman
` (869 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lee Jones, Peter Ujfalusi,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lee Jones <lee@kernel.org>
[ Upstream commit 348bc756d912dd8f47fd36c167075717951a515e ]
When sdw_enable_stream() fails in intel_ace2x_bpt_send_async() after
hda_sdw_bpt_send_async() has already started the TX and RX DMA streams,
intel_ace2x_bpt_close_stream() invokes hda_sdw_bpt_close() directly
without calling hda_sdw_bpt_wait(). As a result,
hda_sdw_bpt_dma_deprepare() tears down the DMA buffers and BDL while
the DMA hardware is still running.
Disable any running TX or RX BPT DMA stream at the start of
hda_sdw_bpt_close() before unmapping channels and depreparing DMA
resources.
Fixes: 4c1ce9f37d8a ("soundwire: intel_ace2x: add BPT send_async/wait callbacks")
Closes: https://sashiko.dev/#/bug/linux-ff0012de-abdd-4796-875e-b1fbbf47235f
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20261030104840.3361217-6-lee@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/intel/hda-sdw-bpt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/sof/intel/hda-sdw-bpt.c b/sound/soc/sof/intel/hda-sdw-bpt.c
index 4e5c99413c750..5eaa2e0563c16 100644
--- a/sound/soc/sof/intel/hda-sdw-bpt.c
+++ b/sound/soc/sof/intel/hda-sdw-bpt.c
@@ -431,6 +431,12 @@ int hda_sdw_bpt_close(struct device *dev, int link_id, struct hdac_ext_stream *b
int ret;
int ret1;
+ if (bpt_rx_stream && hdac_stream(bpt_rx_stream)->running)
+ hda_sdw_bpt_dma_disable(dev, bpt_rx_stream);
+
+ if (bpt_tx_stream && hdac_stream(bpt_tx_stream)->running)
+ hda_sdw_bpt_dma_disable(dev, bpt_tx_stream);
+
/*
* In the case of SoundWire we need to reset the PCMSyCM registers.
* Need to continue depreparing the DMA buffers even if this fails.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0014/2151] drm/amdkfd: Validate the control stack of a restored queue
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (12 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0013/2151] ASoC: SOF: Intel: hda-sdw-bpt: Stop active DMA before closing BPT streams Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0015/2151] pidfs: prepare to drop exit_info pointer Greg Kroah-Hartman
` (868 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, William Palacek, Alex Deucher,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: William Palacek <William.Palacek@amd.com>
[ Upstream commit 90d91a192751cd9a7d9d2286299bc72ec1c28179 ]
kfd_criu_restore_queue() takes the control stack size from the
checkpoint image without the topology check create-queue does in
kfd_queue_acquire_buffers(), which restore stopped calling in
commit 1cafa8b29e02 ("drm/amdkfd: Don't acquire buffers
during CRIU queue restore."). An image size of 0x300000 is accepted and
sizes the MQD allocation, and 0xFFFFFFFF trips a page allocator warning
in kmalloc().
restore_mqd() also keeps the image's cp_hqd_cntl_stack_size,
cp_hqd_cntl_stack_offset and cp_hqd_wg_state_offset. With offset > size
or wave state offset < size, get_wave_state() returns wrapped sizes.
Take the per-XCC size from topology, 0 for queues without a control
stack, and reject larger images. In restore_mqd(), set the size to it
and bound both offsets as init_mqd() does.
Fixes: 626f7b3190b4 ("drm/amdkfd: CRIU add queues support")
Fixes: 42c6c48214b7 ("drm/amdkfd: CRIU checkpoint and restore queue mqds")
Signed-off-by: William Palacek <William.Palacek@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 92249023caee17bfc6f29c71d6aaa5f2298cf507)
Cc: stable@vger.kernel.org
[ sashal: inlined the upstream helper into four existing restore functions to avoid adding a new function ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 3 ++
.../gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c | 3 ++
.../gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 3 ++
.../gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 3 ++
.../amd/amdkfd/kfd_process_queue_manager.c | 30 +++++++++++++------
5 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
index 4a621791da230..99fdbf666c87d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
@@ -293,6 +293,9 @@ static void restore_mqd(struct mqd_manager *mm, void **mqd,
addr = mqd_mem_obj->gpu_addr;
memcpy(m, mqd_src, sizeof(*m));
+ m->cp_hqd_cntl_stack_size = qp->ctl_stack_size;
+ m->cp_hqd_cntl_stack_offset = min(m->cp_hqd_cntl_stack_offset, qp->ctl_stack_size);
+ m->cp_hqd_wg_state_offset = max(m->cp_hqd_wg_state_offset, qp->ctl_stack_size);
*mqd = m;
if (gart_addr)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
index ca90454b01acc..2f4caf637a065 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
@@ -344,6 +344,9 @@ static void restore_mqd(struct mqd_manager *mm, void **mqd,
addr = mqd_mem_obj->gpu_addr;
memcpy(m, mqd_src, sizeof(*m));
+ m->cp_hqd_cntl_stack_size = qp->ctl_stack_size;
+ m->cp_hqd_cntl_stack_offset = min(m->cp_hqd_cntl_stack_offset, qp->ctl_stack_size);
+ m->cp_hqd_wg_state_offset = max(m->cp_hqd_wg_state_offset, qp->ctl_stack_size);
*mqd = m;
if (gart_addr)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
index f0e7a7244a33f..e7bb62a0ac7e1 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
@@ -429,6 +429,9 @@ static void restore_mqd(struct mqd_manager *mm, void **mqd,
addr = mqd_mem_obj->gpu_addr;
memcpy(m, mqd_src, sizeof(*m));
+ m->cp_hqd_cntl_stack_size = qp->ctl_stack_size;
+ m->cp_hqd_cntl_stack_offset = min(m->cp_hqd_cntl_stack_offset, qp->ctl_stack_size);
+ m->cp_hqd_wg_state_offset = max(m->cp_hqd_wg_state_offset, qp->ctl_stack_size);
*mqd = m;
if (gart_addr)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
index f0de0893bc597..ae3bd2bb410a5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
@@ -305,6 +305,9 @@ static void restore_mqd(struct mqd_manager *mm, void **mqd,
addr = mqd_mem_obj->gpu_addr;
memcpy(m, mqd_src, sizeof(*m));
+ m->cp_hqd_cntl_stack_size = qp->ctl_stack_size;
+ m->cp_hqd_cntl_stack_offset = min(m->cp_hqd_cntl_stack_offset, qp->ctl_stack_size);
+ m->cp_hqd_wg_state_offset = max(m->cp_hqd_wg_state_offset, qp->ctl_stack_size);
*mqd = m;
if (gart_addr)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index 6f3cfb9245c4a..b2a0caa7e1ca0 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -26,6 +26,7 @@
#include <linux/list.h>
#include "kfd_device_queue_manager.h"
#include "kfd_priv.h"
+#include "kfd_topology.h"
#include "kfd_kernel_queue.h"
#include "amdgpu_amdkfd.h"
#include "amdgpu_reset.h"
@@ -968,7 +969,7 @@ int kfd_criu_checkpoint_queues(struct kfd_process *p,
}
static void set_queue_properties_from_criu(struct queue_properties *qp,
- struct kfd_criu_queue_priv_data *q_data, uint32_t num_xcc)
+ struct kfd_criu_queue_priv_data *q_data)
{
qp->is_interop = false;
qp->queue_percent = q_data->q_percent;
@@ -981,11 +982,6 @@ static void set_queue_properties_from_criu(struct queue_properties *qp,
qp->eop_ring_buffer_size = q_data->eop_ring_buffer_size;
qp->ctx_save_restore_area_address = q_data->ctx_save_restore_area_address;
qp->ctx_save_restore_area_size = q_data->ctx_save_restore_area_size;
- if (q_data->type == KFD_QUEUE_TYPE_COMPUTE)
- qp->ctl_stack_size = q_data->ctl_stack_size / num_xcc;
- else
- qp->ctl_stack_size = q_data->ctl_stack_size;
-
qp->type = q_data->type;
qp->format = q_data->format;
}
@@ -997,6 +993,7 @@ int kfd_criu_restore_queue(struct kfd_process *p,
{
uint8_t *mqd, *ctl_stack, *q_extra_data = NULL;
struct kfd_criu_queue_priv_data *q_data;
+ struct kfd_topology_device *topo_dev;
struct kfd_process_device *pdd;
uint64_t q_extra_data_size;
struct queue_properties qp;
@@ -1033,6 +1030,24 @@ int kfd_criu_restore_queue(struct kfd_process *p,
goto exit;
}
+ memset(&qp, 0, sizeof(qp));
+ set_queue_properties_from_criu(&qp, q_data);
+
+ /* Per-XCC control stack size from topology, as create-queue requires */
+ if (qp.type == KFD_QUEUE_TYPE_COMPUTE && pdd->dev->kfd->cwsr_enabled) {
+ topo_dev = kfd_topology_device_by_id(pdd->dev->id);
+ if (!topo_dev) {
+ ret = -EINVAL;
+ goto exit;
+ }
+ qp.ctl_stack_size = topo_dev->node_props.ctl_stack_size;
+ }
+
+ if (q_data->ctl_stack_size > (u64)qp.ctl_stack_size * NUM_XCC(pdd->dev->xcc_mask)) {
+ ret = -EINVAL;
+ goto exit;
+ }
+
*priv_data_offset += sizeof(*q_data);
q_extra_data_size = (uint64_t)q_data->ctl_stack_size + q_data->mqd_size;
@@ -1062,9 +1077,6 @@ int kfd_criu_restore_queue(struct kfd_process *p,
mqd = q_extra_data;
ctl_stack = mqd + q_data->mqd_size;
- memset(&qp, 0, sizeof(qp));
- set_queue_properties_from_criu(&qp, q_data, NUM_XCC(pdd->dev->xcc_mask));
-
ret = kfd_queue_acquire_buffers(pdd, &qp);
if (ret) {
pr_debug("failed to acquire user queue buffers for CRIU\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0015/2151] pidfs: prepare to drop exit_info pointer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (13 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0014/2151] drm/amdkfd: Validate the control stack of a restored queue Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0016/2151] pidfs: dont let PIDFD_GET_INFO miss a reaped task Greg Kroah-Hartman
` (867 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander Mikhalitsyn, Oleg Nesterov,
Christian Brauner, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <brauner@kernel.org>
[ Upstream commit ad6e3ea683ef4086cdf3d2ec40cb3f6e62edb945 ]
There will likely be more info that we need to store in struct
pidfs_attr. We need to make sure that some of the information such as
exit info or coredump info that consists of multiple bits is either
available completely or not at all, but never partially. Currently we
use a pointer that we assign to. That doesn't scale. We can't waste a
pointer for each mulit-part information struct we want to expose. Use a
bitmask instead.
Link: https://patch.msgid.link/20251028-work-coredump-signal-v1-6-ca449b7b7aa0@kernel.org
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Stable-dep-of: 172658cf6009 ("pidfs: don't let PIDFD_GET_INFO miss a reaped task")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/pidfs.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/pidfs.c b/fs/pidfs.c
index 4341492b91e12..d2afc85b9df37 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -49,7 +49,12 @@ struct pidfs_exit_info {
__u32 coredump_mask;
};
+enum pidfs_attr_mask_bits {
+ PIDFS_ATTR_BIT_EXIT = 0,
+};
+
struct pidfs_attr {
+ unsigned long attr_mask;
struct simple_xattrs *xattrs;
struct pidfs_exit_info __pei;
struct pidfs_exit_info *exit_info;
@@ -325,8 +330,8 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
attr = READ_ONCE(pid->attr);
if (mask & PIDFD_INFO_EXIT) {
- exit_info = READ_ONCE(attr->exit_info);
- if (exit_info) {
+ if (test_bit(PIDFS_ATTR_BIT_EXIT, &attr->attr_mask)) {
+ smp_rmb();
kinfo.mask |= PIDFD_INFO_EXIT;
#ifdef CONFIG_CGROUPS
kinfo.cgroupid = exit_info->cgroupid;
@@ -681,7 +686,8 @@ void pidfs_exit(struct task_struct *tsk)
exit_info->exit_code = tsk->exit_code;
/* Ensure that PIDFD_GET_INFO sees either all or nothing. */
- smp_store_release(&attr->exit_info, &attr->__pei);
+ smp_wmb();
+ set_bit(PIDFS_ATTR_BIT_EXIT, &attr->attr_mask);
}
#ifdef CONFIG_COREDUMP
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0016/2151] pidfs: dont let PIDFD_GET_INFO miss a reaped task
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (14 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0015/2151] pidfs: prepare to drop exit_info pointer Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0017/2151] btrfs: prevent deleting the wrong subvolume by ID Greg Kroah-Hartman
` (866 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josef Bacik <josef@toxicpanda.com>
[ Upstream commit 172658cf600904ff6121e240f69a0ccb36e65d6b ]
PIDFD_GET_INFO describes the task while there is one, and with
PIDFD_INFO_EXIT its exit status once it has been reaped. pidfd_info()
looks at the two in the wrong order and can miss both:
pidfd_info() release_task()
PIDFS_ATTR_BIT_EXIT is not set
pidfs_exit()
__unhash_process()
get_pid_task() == NULL
goto copy_out
The ioctl succeeds with neither PIDFD_INFO_PID nor PIDFD_INFO_EXIT in the
mask. If the task is unhashed a little later, after get_pid_task(), its
pid reads as 0 and the ioctl fails with -ESRCH, although the caller asked
for the exit information and it is available by now.
The second case does not even need an exit. When a sub-thread execs,
de_thread() hands the leader's pid over to it and releases the old leader.
A caller that got hold of the old leader reports the tid of the sub-thread
as the pid, or -ESRCH for a process that is alive.
Look up the task first. pidfs_exit() runs before the task is unhashed, so
a caller that finds no task finds the exit information; this needs a
barrier on both sides because taking tasklist_lock does not order the
store in pidfs_exit() against the one in detach_pid(). And start over if
the task no longer owns the pid when all the fields have been read: then
there is either exit information or another task.
Go by the pid for that check and for the pid we report, not by
->thread_pid of the task. exchange_tids() moves the pid to the exec'ing
thread before it updates ->thread_pid of either task. A caller that
finds the new leader in between would read the old tid of the sub-thread
from ->thread_pid, and a check of ->thread_pid would restart until the
exec'ing thread gets to its store. On PREEMPT_RT that thread can be
preempted with tasklist_lock held and can't move to another CPU. If the
RT task that preempted it calls PIDFD_GET_INFO, the ioctl spins until
the exec'ing thread gets the CPU back, and that never happens if the
exec'ing thread is an RT task of lower priority.
Christian Brauner <brauner@kernel.org> says:
Go by @pid instead of ->thread_pid of the task for the reported pid and
for the restart check.
Fixes: 7477d7dce48a ("pidfs: allow to retrieve exit information")
Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info")
Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
[ sashal: inlined the RCU-protected ownership check in pidfd_info() instead of adding pidfs_task_owns_pid() ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/pidfs.c | 41 +++++++++++++++++++++++++++++++++++------
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/fs/pidfs.c b/fs/pidfs.c
index d2afc85b9df37..a014db891aaa8 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -309,6 +309,7 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
struct user_namespace *user_ns;
struct pidfs_attr *attr;
const struct cred *c;
+ bool task_owns_pid;
__u64 mask;
BUILD_BUG_ON(sizeof(struct pidfd_info) != PIDFD_INFO_SIZE_VER1);
@@ -329,6 +330,17 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
return -EREMOTE;
attr = READ_ONCE(pid->attr);
+ exit_info = &attr->__pei;
+again:
+ /*
+ * Look for the task first. pidfs_exit() records the exit information
+ * before the task is unhashed, so if the task is gone the information
+ * is there.
+ */
+ task = get_pid_task(pid, PIDTYPE_PID);
+ if (!task)
+ smp_rmb(); /* pairs with smp_mb__after_atomic() in pidfs_exit() */
+
if (mask & PIDFD_INFO_EXIT) {
if (test_bit(PIDFS_ATTR_BIT_EXIT, &attr->attr_mask)) {
smp_rmb();
@@ -346,7 +358,6 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
kinfo.coredump_mask = READ_ONCE(attr->__pei.coredump_mask);
}
- task = get_pid_task(pid, PIDTYPE_PID);
if (!task) {
/*
* If the task has already been reaped, only exit
@@ -404,16 +415,29 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg)
* task might return as soon as the copy_to_user finishes, but that's ok
* and userspace expects that might happen and can act accordingly, so
* this is just best-effort. What we can do however is checking that all
- * the fields are set correctly, or return ESRCH to avoid providing
- * incomplete information. */
+ * the fields are set correctly, to avoid providing incomplete
+ * information.
+ */
kinfo.ppid = task_ppid_nr_ns(task, NULL);
kinfo.tgid = task_tgid_vnr(task);
- kinfo.pid = task_pid_vnr(task);
+ kinfo.pid = pid_vnr(pid);
kinfo.mask |= PIDFD_INFO_PID;
- if (kinfo.pid == 0 || kinfo.tgid == 0)
- return -ESRCH;
+ /*
+ * The task was reaped, or lost @pid to a sub-thread that called exec,
+ * while we were looking at it. Start over: there is exit information
+ * now, or a new task. Don't go by ->thread_pid, exchange_tids()
+ * updates it only after it has moved @pid.
+ */
+ scoped_guard(rcu)
+ task_owns_pid = pid_task(pid, PIDTYPE_PID) == task;
+ if (!task_owns_pid || kinfo.tgid == 0) {
+ put_task_struct(task);
+ task = NULL;
+ memset(&kinfo, 0, sizeof(kinfo));
+ goto again;
+ }
copy_out:
/*
@@ -688,6 +712,11 @@ void pidfs_exit(struct task_struct *tsk)
/* Ensure that PIDFD_GET_INFO sees either all or nothing. */
smp_wmb();
set_bit(PIDFS_ATTR_BIT_EXIT, &attr->attr_mask);
+ /*
+ * Whoever sees that the task is unhashed must see the bit, see
+ * pidfd_info(). Taking tasklist_lock does not order the two stores.
+ */
+ smp_mb__after_atomic();
}
#ifdef CONFIG_COREDUMP
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0017/2151] btrfs: prevent deleting the wrong subvolume by ID
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (15 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0016/2151] pidfs: dont let PIDFD_GET_INFO miss a reaped task Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0018/2151] PCI/pwrctrl: slot: Rename private struct and pointers for consistency Greg Kroah-Hartman
` (865 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Qu Wenruo, guolingxing, David Sterba,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: guolingxing <guolingxing@tju.edu.cn>
[ Upstream commit 1960146913b31b288ed2cd607d103ee3b41681d4 ]
When deleting a subvolume by ID, btrfs_ioctl_snap_destroy() first
resolves the requested ID to a name, then looks up that name again
under the parent directory lock.
A concurrent rename can change which subvolume is associated with
the name between these operations. Since the deletion path does not
verify the ID of the resolved subvolume, it can delete a different
subvolume while leaving the requested one intact.
This was reproduced by repeatedly exchanging the names of two
subvolumes using renameat2(RENAME_EXCHANGE) while deleting one of
them by ID. The wrong subvolume was deleted in 9 out of 14 independent
tests.
Fix this by checking that the resolved subvolume ID matches the
requested ID while holding the parent directory lock. Return -EAGAIN
on a mismatch so that userspace can retry the operation instead of
being told that the requested subvolume does not exist.
Fixes: 949964c92843 ("btrfs: add new BTRFS_IOC_SNAP_DESTROY_V2 ioctl")
CC: stable@vger.kernel.org
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: guolingxing <guolingxing@tju.edu.cn>
Signed-off-by: David Sterba <dsterba@suse.com>
[ sashal: Replaced goto out_end_removing with goto out_dput to use the existing cleanup path. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/btrfs/ioctl.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9a8902012ae6d..84305ed0dc70e 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2413,6 +2413,17 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
inode = d_inode(dentry);
dest = BTRFS_I(inode)->root;
+
+ /*
+ * A concurrent rename may have changed which subvolume the name
+ * refers to. Verify that the resolved ID still matches the requested ID.
+ */
+ if (destroy_v2 && (vol_args2->flags & BTRFS_SUBVOL_SPEC_BY_ID) &&
+ btrfs_root_id(dest) != vol_args2->subvolid) {
+ ret = -EAGAIN;
+ goto out_dput;
+ }
+
if (!capable(CAP_SYS_ADMIN)) {
/*
* Regular user. Only allow this with a special mount
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0018/2151] PCI/pwrctrl: slot: Rename private struct and pointers for consistency
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (16 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0017/2151] btrfs: prevent deleting the wrong subvolume by ID Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0019/2151] PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all() Greg Kroah-Hartman
` (864 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bjorn Helgaas, Manivannan Sadhasivam,
Bartosz Golaszewski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Helgaas <bhelgaas@google.com>
[ Upstream commit e40d16e6c23994b28894179b87f9747edd63062a ]
Previously the pwrseq, tc9563, and slot pwrctrl drivers used different
naming conventions for their private data structs and pointers to them,
which makes patches hard to read.
Rename structs, variables, and functions to reduce boiler-plate and start
with "slot":
struct pci_pwrctrl_slot_data -> struct slot_pwrctrl
struct pci_pwrctrl ctx -> struct pci_pwrctrl pwrctrl
pci_pwrctrl_slot_probe() -> slot_pwrctrl_probe()
pci_pwrctrl_slot_of_match[] -> slot_pwrctrl_of_match[]
pci_pwrctrl_slot_driver -> slot_pwrctrl_driver
devm_pci_pwrctrl_slot_power_off() -> devm_slot_pwrctrl_power_off()
No functional change intended.
[bhelgaas: move "slot" to beginning, also rename functions, etc]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260115-pci-pwrctrl-rework-v5-2-9d26da3ce903@oss.qualcomm.com
Stable-dep-of: ee450e3a2d33 ("PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/pwrctrl/slot.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/pci/pwrctrl/slot.c b/drivers/pci/pwrctrl/slot.c
index 3320494b62d89..51de1eecdb26b 100644
--- a/drivers/pci/pwrctrl/slot.c
+++ b/drivers/pci/pwrctrl/slot.c
@@ -13,23 +13,23 @@
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
-struct pci_pwrctrl_slot_data {
- struct pci_pwrctrl ctx;
+struct slot_pwrctrl {
+ struct pci_pwrctrl pwrctrl;
struct regulator_bulk_data *supplies;
int num_supplies;
};
-static void devm_pci_pwrctrl_slot_power_off(void *data)
+static void devm_slot_pwrctrl_power_off(void *data)
{
- struct pci_pwrctrl_slot_data *slot = data;
+ struct slot_pwrctrl *slot = data;
regulator_bulk_disable(slot->num_supplies, slot->supplies);
regulator_bulk_free(slot->num_supplies, slot->supplies);
}
-static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
+static int slot_pwrctrl_probe(struct platform_device *pdev)
{
- struct pci_pwrctrl_slot_data *slot;
+ struct slot_pwrctrl *slot;
struct device *dev = &pdev->dev;
struct clk *clk;
int ret;
@@ -53,7 +53,7 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
return ret;
}
- ret = devm_add_action_or_reset(dev, devm_pci_pwrctrl_slot_power_off,
+ ret = devm_add_action_or_reset(dev, devm_slot_pwrctrl_power_off,
slot);
if (ret)
return ret;
@@ -64,31 +64,31 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
"Failed to enable slot clock\n");
}
- pci_pwrctrl_init(&slot->ctx, dev);
+ pci_pwrctrl_init(&slot->pwrctrl, dev);
- ret = devm_pci_pwrctrl_device_set_ready(dev, &slot->ctx);
+ ret = devm_pci_pwrctrl_device_set_ready(dev, &slot->pwrctrl);
if (ret)
return dev_err_probe(dev, ret, "Failed to register pwrctrl driver\n");
return 0;
}
-static const struct of_device_id pci_pwrctrl_slot_of_match[] = {
+static const struct of_device_id slot_pwrctrl_of_match[] = {
{
.compatible = "pciclass,0604",
},
{ }
};
-MODULE_DEVICE_TABLE(of, pci_pwrctrl_slot_of_match);
+MODULE_DEVICE_TABLE(of, slot_pwrctrl_of_match);
-static struct platform_driver pci_pwrctrl_slot_driver = {
+static struct platform_driver slot_pwrctrl_driver = {
.driver = {
.name = "pci-pwrctrl-slot",
- .of_match_table = pci_pwrctrl_slot_of_match,
+ .of_match_table = slot_pwrctrl_of_match,
},
- .probe = pci_pwrctrl_slot_probe,
+ .probe = slot_pwrctrl_probe,
};
-module_platform_driver(pci_pwrctrl_slot_driver);
+module_platform_driver(slot_pwrctrl_driver);
MODULE_AUTHOR("Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>");
MODULE_DESCRIPTION("Generic PCI Power Control driver for PCI Slots");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0019/2151] PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (17 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0018/2151] PCI/pwrctrl: slot: Rename private struct and pointers for consistency Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0020/2151] ocfs2/cluster: hold a reference on the heartbeat thread Greg Kroah-Hartman
` (863 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexey Charkov, Bjorn Helgaas,
Bartosz Golaszewski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Charkov <alchark@flipper.net>
[ Upstream commit ee450e3a2d334c7e6383d8a55ad2d53b3822bacc ]
of_regulator_bulk_get_all() allocates the consumers array and returns it to
the caller, who is expected to free it at an appropriate time. PCI pwrctrl
never did, leading to a memory leak.
Add an explicit kfree() for the consumers array.
Fixes: 75996c92f4de ("PCI/pwrctrl: Add pwrctrl driver for PCI slots")
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260930-pci-pwrctrl-kfree-v1-1-f09bbffd8da3@flipper.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/pwrctrl/slot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/pwrctrl/slot.c b/drivers/pci/pwrctrl/slot.c
index 51de1eecdb26b..35bbf8a380415 100644
--- a/drivers/pci/pwrctrl/slot.c
+++ b/drivers/pci/pwrctrl/slot.c
@@ -25,6 +25,7 @@ static void devm_slot_pwrctrl_power_off(void *data)
regulator_bulk_disable(slot->num_supplies, slot->supplies);
regulator_bulk_free(slot->num_supplies, slot->supplies);
+ kfree(slot->supplies);
}
static int slot_pwrctrl_probe(struct platform_device *pdev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0020/2151] ocfs2/cluster: hold a reference on the heartbeat thread
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (18 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0019/2151] PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all() Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0021/2151] ocfs2/heartbeat: serialize concurrent writes to a regions dev attribute Greg Kroah-Hartman
` (862 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Andrew Morton,
Sashiko, Joseph Qi, Mark Fasheh, Joel Becker, Cen Zhang,
Junxiao Bi, Heming Zhao, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit aa2e38aabaae87236290e486a2b77cfa3adfbebe ]
Since commit 688bc88e2046 ("ocfs2/cluster: keep heartbeat local node
stable"), o2hb_thread() leaves its loop and returns when the local node
changes, for example after "echo 0 > node/<name>/local". The thread was
started with kthread_run() and nothing holds a reference to its
task_struct, so the task is freed once it exits, while reg->hr_task still
points to it.
Reading the region's pid attribute then reads the freed task, and removing
the region calls kthread_stop() on it:
BUG: KASAN: slab-use-after-free in o2hb_region_pid_show+0xb3/0xc0
refcount_t: addition on 0; use-after-free.
Oops: Oops: 0000 [#1] SMP KASAN NOPTI
RIP: 0010:kthread_stop+0xb1/0x390
The thread could already return by itself before, when heartbeat start was
aborted or on an unclean stop, but the local node change makes it
reachable from userspace at any time.
Create the thread, take a reference on it and only then wake it, so the
reference cannot race with the thread exiting. Drop it with
kthread_stop_put().
Link: https://lore.kernel.org/20260923010149.14391-1-kmehltretter@gmail.com
Fixes: 688bc88e2046 ("ocfs2/cluster: keep heartbeat local node stable")
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260616074931.3774929-1-zzzccc427%40gmail.com
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Assisted-by: LLM
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Cen Zhang <zzzccc427@gmail.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Heming Zhao <heming.zhao@suse.com>
Stable-dep-of: 0a8f258c0f01 ("ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ocfs2/cluster/heartbeat.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 0888c44f677c1..ec7e87c065742 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1958,18 +1958,22 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
atomic_set(®->hr_unsteady_iterations, (live_threshold * 3));
o2hb_set_region_stopping(reg, false);
- hb_task = kthread_run(o2hb_thread, reg, "o2hb-%s",
- reg->hr_item.ci_name);
+ hb_task = kthread_create(o2hb_thread, reg, "o2hb-%s",
+ reg->hr_item.ci_name);
if (IS_ERR(hb_task)) {
ret = PTR_ERR(hb_task);
mlog_errno(ret);
goto out;
}
+ /* The thread may exit on its own, so pin it before it can run. */
+ get_task_struct(hb_task);
spin_lock(&o2hb_live_lock);
reg->hr_task = hb_task;
spin_unlock(&o2hb_live_lock);
+ wake_up_process(hb_task);
+
ret = wait_event_interruptible(o2hb_steady_queue,
atomic_read(®->hr_steady_iterations) == 0 ||
reg->hr_node_deleted);
@@ -2014,7 +2018,7 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
spin_unlock(&o2hb_live_lock);
if (hb_task)
- kthread_stop(hb_task);
+ kthread_stop_put(hb_task);
o2hb_unmap_slot_data(reg);
@@ -2208,7 +2212,7 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group,
spin_unlock(&o2hb_live_lock);
if (hb_task)
- kthread_stop(hb_task);
+ kthread_stop_put(hb_task);
if (o2hb_global_heartbeat_active()) {
spin_lock(&o2hb_live_lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0021/2151] ocfs2/heartbeat: serialize concurrent writes to a regions dev attribute
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (19 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0020/2151] ocfs2/cluster: hold a reference on the heartbeat thread Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0022/2151] ASoC: qcom: audioreach: fix module cfg blob size handling Greg Kroah-Hartman
` (861 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eklavya Singh, Andrew Morton,
syzbot+5d4e96acd0febccb5e87, Joseph Qi, Mark Fasheh, Joel Becker,
Heming Zhao, Deepanshu Kartikey, Cen Zhang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eklavya Singh <eklavyasingh2106@gmail.com>
[ Upstream commit 0a8f258c0f012314c36b9e4818cdc0178c68f891 ]
o2hb_region_dev_store() checks reg->hr_bdev_file to see if the region
is already started, but nothing stops two writers from doing that at
the same time. configfs only serializes writes through the same open
file, so two processes that each open the dev attribute can both get
past the check:
A: hr_bdev_file is NULL, opens file A, sets hr_bdev_file = A
B: hr_bdev_file is NULL, opens file B, sets hr_bdev_file = B
A: start fails, fput(hr_bdev_file) drops B, sets it to NULL
B: start fails, fput(NULL)
Both calls also use the same hr_slots, hr_slot_data and hr_tmp_block,
so the error paths can free the slot data twice.
syzbot hit the fput(NULL) with an unbound loop device, where every
start fails with -EIO. With four threads doing the same thing on a
KASAN kernel I get both crashes within a second:
BUG: KASAN: double-free in o2hb_unmap_slot_data+0x14d/0x2f0
BUG: kernel NULL pointer dereference, address: 0000000000000158
Add a mutex to the region and hold it in dev_store(), in the
block_bytes, start_block and blocks stores, and in dev_show(), since
they all look at hr_bdev_file. dev_store() cleans up with goto, so it
takes the mutex in a small wrapper rather than with guard(). The mutex
is dropped while dev_store() waits for the heartbeat to become steady,
which takes seconds, so a read of dev doesn't stall behind a start.
hr_bdev_file is already set at that point, so other writers still get
-EINVAL, and the cleanup after the wait retakes the mutex.
With the patch the same test ran for 10 minutes with lockdep on and
nothing was reported. So did a second one, with a working loop device,
that interrupts starts during the wait while other threads read and
write the attributes.
Link: https://lore.kernel.org/20261020212339.46591-1-eklavyasingh2106@gmail.com
Fixes: a7f6a5fb4bde ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem")
Signed-off-by: Eklavya Singh <eklavyasingh2106@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: <syzbot+5d4e96acd0febccb5e87@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=5d4e96acd0febccb5e87
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Heming Zhao <heming.zhao@suse.com>
Cc: Deepanshu Kartikey <kartikey406@gmail.com>
Cc: Cen Zhang <zzzccc427@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ocfs2/cluster/heartbeat.c | 40 ++++++++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index ec7e87c065742..6672dab217956 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -269,6 +269,8 @@ struct o2hb_region {
struct list_head hr_handler_list;
/* Serializes timeout arming against failed-start and teardown. */
struct mutex hr_arming_mutex;
+ /* Serializes the dev, block_bytes, start_block and blocks attributes. */
+ struct mutex hr_dev_mutex;
bool hr_stopping;
/* last hb status, 0 for success, other value for error. */
@@ -1666,6 +1668,7 @@ static ssize_t o2hb_region_block_bytes_store(struct config_item *item,
unsigned long block_bytes;
unsigned int block_bits;
+ guard(mutex)(®->hr_dev_mutex);
if (reg->hr_bdev_file)
return -EINVAL;
@@ -1695,6 +1698,7 @@ static ssize_t o2hb_region_start_block_store(struct config_item *item,
char *p = (char *)page;
ssize_t ret;
+ guard(mutex)(®->hr_dev_mutex);
if (reg->hr_bdev_file)
return -EINVAL;
@@ -1721,6 +1725,7 @@ static ssize_t o2hb_region_blocks_store(struct config_item *item,
char *p = (char *)page;
int ret;
+ guard(mutex)(®->hr_dev_mutex);
if (reg->hr_bdev_file)
return -EINVAL;
@@ -1738,10 +1743,12 @@ static ssize_t o2hb_region_blocks_store(struct config_item *item,
static ssize_t o2hb_region_dev_show(struct config_item *item, char *page)
{
+ struct o2hb_region *reg = to_o2hb_region(item);
unsigned int ret = 0;
- if (to_o2hb_region(item)->hr_bdev_file)
- ret = sprintf(page, "%pg\n", reg_bdev(to_o2hb_region(item)));
+ guard(mutex)(®->hr_dev_mutex);
+ if (reg->hr_bdev_file)
+ ret = sprintf(page, "%pg\n", reg_bdev(reg));
return ret;
}
@@ -1859,11 +1866,9 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg)
* this is acting as commit; we set up all of hr_bdev_file and hr_task or
* nothing
*/
-static ssize_t o2hb_region_dev_store(struct config_item *item,
- const char *page,
- size_t count)
+static ssize_t __o2hb_region_dev_store(struct o2hb_region *reg,
+ const char *page, size_t count)
{
- struct o2hb_region *reg = to_o2hb_region(item);
struct task_struct *hb_task;
long fd;
int sectsize;
@@ -1871,6 +1876,8 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
ssize_t ret = -EINVAL;
int live_threshold;
+ lockdep_assert_held(®->hr_dev_mutex);
+
if (reg->hr_bdev_file)
return -EINVAL;
@@ -1974,9 +1981,15 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
wake_up_process(hb_task);
+ /*
+ * Don't hold hr_dev_mutex across the wait, which can take seconds.
+ * hr_bdev_file is already set, so other writers still get -EINVAL.
+ */
+ mutex_unlock(®->hr_dev_mutex);
ret = wait_event_interruptible(o2hb_steady_queue,
atomic_read(®->hr_steady_iterations) == 0 ||
reg->hr_node_deleted);
+ mutex_lock(®->hr_dev_mutex);
if (ret) {
atomic_set(®->hr_steady_iterations, 0);
reg->hr_aborted_start = 1;
@@ -2028,6 +2041,20 @@ static ssize_t o2hb_region_dev_store(struct config_item *item,
return ret;
}
+static ssize_t o2hb_region_dev_store(struct config_item *item,
+ const char *page,
+ size_t count)
+{
+ struct o2hb_region *reg = to_o2hb_region(item);
+ ssize_t ret;
+
+ mutex_lock(®->hr_dev_mutex);
+ ret = __o2hb_region_dev_store(reg, page, count);
+ mutex_unlock(®->hr_dev_mutex);
+
+ return ret;
+}
+
static ssize_t o2hb_region_pid_show(struct config_item *item, char *page)
{
struct o2hb_region *reg = to_o2hb_region(item);
@@ -2130,6 +2157,7 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g
INIT_LIST_HEAD(®->hr_all_item);
mutex_init(®->hr_arming_mutex);
+ mutex_init(®->hr_dev_mutex);
reg->hr_stopping = true;
INIT_DELAYED_WORK(®->hr_write_timeout_work, o2hb_write_timeout);
INIT_DELAYED_WORK(®->hr_nego_timeout_work, o2hb_nego_timeout);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0022/2151] ASoC: qcom: audioreach: fix module cfg blob size handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (20 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0021/2151] ocfs2/heartbeat: serialize concurrent writes to a regions dev attribute Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0023/2151] ACPI: utils: Add exclusive AML evaluation helpers Greg Kroah-Hartman
` (860 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ravi Hothi, Srinivas Kandagatla,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ravi Hothi <ravi.hothi@oss.qualcomm.com>
[ Upstream commit e21fb64a8c4aecae31ec63f994423ac944705c3e ]
audioreach_get_module_priv_data() passes mod_array->size, a byte count,
as the element count of the __le32 data[] flex array. The allocation and
the copy are four times too large, and the memcpy() can read past the end
of the topology firmware buffer. The size is also never checked against
the private data it must lie within, and a zero size makes the loop spin
forever.
Convert the size to a word count, bound the blob by the remaining private
data and reject a zero size. Also check the returned pointer before
storing it in mod->data, as an error pointer there is dereferenced when
the graph is opened.
Fixes: c7ed4c2debfd ("ASoC: qcom: audioreach: add support for static calibration")
Cc: stable@vger.kernel.org
Signed-off-by: Ravi Hothi <ravi.hothi@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20261023171316.819857-2-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
[ sashal: Adjusted declaration context to retain the existing non-const mod_array pointer. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/qcom/qdsp6/topology.c | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index f8d3bb83e3b0d..93e40a05920f7 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -312,22 +312,37 @@ static struct audioreach_module_priv_data *audioreach_get_module_priv_data(
for (sz = 0; sz < le32_to_cpu(private->size); ) {
struct snd_soc_tplg_vendor_array *mod_array;
+ u32 array_size;
mod_array = (struct snd_soc_tplg_vendor_array *)((u8 *)private->array + sz);
+ array_size = le32_to_cpu(mod_array->size);
+
if (le32_to_cpu(mod_array->type) == SND_SOC_AR_TPLG_MODULE_CFG_TYPE) {
struct audioreach_module_priv_data *pdata;
+ u32 nwords;
+
+ /* size is the byte count of the __le32 data[] */
+ nwords = array_size / sizeof(__le32);
+
+ /* the blob must lie within the private data */
+ if (sizeof(*pdata) + (u64)array_size >
+ le32_to_cpu(private->size) - sz)
+ return ERR_PTR(-EINVAL);
- pdata = kzalloc(struct_size(pdata, data, le32_to_cpu(mod_array->size)),
- GFP_KERNEL);
+ pdata = kzalloc_flex(*pdata, data, nwords);
if (!pdata)
return ERR_PTR(-ENOMEM);
- memcpy(pdata, ((u8 *)private->data + sz), struct_size(pdata, data,
- le32_to_cpu(mod_array->size)));
+ memcpy(pdata, ((u8 *)private->data + sz),
+ struct_size(pdata, data, nwords));
return pdata;
}
- sz = sz + le32_to_cpu(mod_array->size);
+ /* a zero size would never advance the walk */
+ if (!array_size)
+ return ERR_PTR(-EINVAL);
+
+ sz = sz + array_size;
}
return NULL;
@@ -611,6 +626,12 @@ static int audioreach_widget_load_module_common(struct snd_soc_component *compon
return mod ? PTR_ERR(mod) : -ENODEV;
mod->data = audioreach_get_module_priv_data(&tplg_w->priv);
+ if (IS_ERR(mod->data)) {
+ int rc = PTR_ERR(mod->data);
+
+ mod->data = NULL;
+ return rc;
+ }
dobj = &w->dobj;
dobj->private = mod;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0023/2151] ACPI: utils: Add exclusive AML evaluation helpers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (21 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0022/2151] ASoC: qcom: audioreach: fix module cfg blob size handling Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0024/2151] platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively Greg Kroah-Hartman
` (859 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki,
Ali Ahmet Memiş, Rong Zhang, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ali Ahmet Memiş <aliamemis@disroot.org>
[ Upstream commit 80892972ff23bf0b9049230ef0931b34163aaed3 ]
ACPICA drops the interpreter lock while AML waits, for example around EC
accesses, so two methods can run interleaved.
Some firmware relies on methods not interleaving, for instance by
switching an EC page selector without taking the AML mutex that the
other users of that page hold.
Add acpi_evaluate_object_exclusive(), acpi_evaluate_integer_exclusive()
and acpi_execute_simple_method_exclusive() which serialize the
evaluation under a global mutex, for callers that are known to be
affected.
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/all/CAJZ5v0gS4agVUkCO6M=VW4Wi2y1-s+k23bpzmX9aAZ0Rsv4z9Q@mail.gmail.com/
Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org>
Reviewed-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20261018122220.678822-2-aliamemis@disroot.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: f91c2cd6dbce ("platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/utils.c | 41 +++++++++++++++++++++++++++++++++++++++++
include/acpi/acpi_bus.h | 7 +++++++
2 files changed, 48 insertions(+)
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 526563a0d1886..92e977fb56570 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/types.h>
@@ -243,6 +244,28 @@ acpi_extract_package(union acpi_object *package,
EXPORT_SYMBOL(acpi_extract_package);
+static DEFINE_MUTEX(acpi_exclusive_eval_lock);
+
+/**
+ * acpi_evaluate_object_exclusive - Evaluate an object without interleaving
+ * @handle: ACPI handle of the object or its scope.
+ * @pathname: Path of the object relative to @handle.
+ * @arguments: Arguments to pass, or NULL.
+ * @buffer: Buffer for the return value, or NULL.
+ *
+ * Same as acpi_evaluate_object(), but serialized with other exclusive
+ * evaluations. Use it only for methods known to break when interleaved.
+ */
+acpi_status acpi_evaluate_object_exclusive(acpi_handle handle, acpi_string pathname,
+ struct acpi_object_list *arguments,
+ struct acpi_buffer *buffer)
+{
+ guard(mutex)(&acpi_exclusive_eval_lock);
+
+ return acpi_evaluate_object(handle, pathname, arguments, buffer);
+}
+EXPORT_SYMBOL_GPL(acpi_evaluate_object_exclusive);
+
acpi_status
acpi_evaluate_integer(acpi_handle handle,
acpi_string pathname,
@@ -277,6 +300,16 @@ acpi_evaluate_integer(acpi_handle handle,
EXPORT_SYMBOL(acpi_evaluate_integer);
+acpi_status acpi_evaluate_integer_exclusive(acpi_handle handle, acpi_string pathname,
+ struct acpi_object_list *arguments,
+ unsigned long long *data)
+{
+ guard(mutex)(&acpi_exclusive_eval_lock);
+
+ return acpi_evaluate_integer(handle, pathname, arguments, data);
+}
+EXPORT_SYMBOL_GPL(acpi_evaluate_integer_exclusive);
+
int acpi_get_local_u64_address(acpi_handle handle, u64 *addr)
{
acpi_status status;
@@ -685,6 +718,14 @@ acpi_status acpi_execute_simple_method(acpi_handle handle, char *method,
}
EXPORT_SYMBOL(acpi_execute_simple_method);
+acpi_status acpi_execute_simple_method_exclusive(acpi_handle handle, char *method, u64 arg)
+{
+ guard(mutex)(&acpi_exclusive_eval_lock);
+
+ return acpi_execute_simple_method(handle, method, arg);
+}
+EXPORT_SYMBOL_GPL(acpi_execute_simple_method_exclusive);
+
/**
* acpi_evaluate_ej0: Evaluate _EJ0 method for hotplug operations
* @handle: ACPI device handle
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 66fc14f869cb9..53aad501458f8 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -30,6 +30,12 @@ acpi_status
acpi_evaluate_integer(acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments, unsigned long long *data);
+acpi_status acpi_evaluate_object_exclusive(acpi_handle handle, acpi_string pathname,
+ struct acpi_object_list *arguments,
+ struct acpi_buffer *buffer);
+acpi_status acpi_evaluate_integer_exclusive(acpi_handle handle, acpi_string pathname,
+ struct acpi_object_list *arguments,
+ unsigned long long *data);
bool acpi_evaluate_reference(acpi_handle handle, acpi_string pathname,
struct acpi_object_list *arguments,
struct acpi_handle_list *list);
@@ -46,6 +52,7 @@ acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code,
bool acpi_has_method(acpi_handle handle, char *name);
acpi_status acpi_execute_simple_method(acpi_handle handle, char *method,
u64 arg);
+acpi_status acpi_execute_simple_method_exclusive(acpi_handle handle, char *method, u64 arg);
acpi_status acpi_evaluate_ej0(acpi_handle handle);
acpi_status acpi_evaluate_lck(acpi_handle handle, int lock);
acpi_status acpi_evaluate_reg(acpi_handle handle, u8 space_id, u32 function);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0024/2151] platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (22 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0023/2151] ACPI: utils: Add exclusive AML evaluation helpers Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0025/2151] mm/userfaultfd: write-lock the VMA before waking waiters when unregistering Greg Kroah-Hartman
` (858 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ali Ahmet Memiş, Rong Zhang,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ali Ahmet Memiş <aliamemis@disroot.org>
[ Upstream commit f91c2cd6dbcedf52e227b2eea8d7b99ecbac7552 ]
On some Lenovo IdeaPad and Yoga models, the battery _BIX takes the EC
AML mutex and then calls the serialized RDER through RDIF, while GBMD
calls RDER first and then takes the EC mutex. When the two run
interleaved they deadlock until the mutex acquisition in RDER times
out, and GBMD returns garbage that is reported as both charge types
being enabled.
Evaluate all methods with the exclusive helpers, so that GBMD never runs
interleaved with the battery methods.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221065
Link: https://lore.kernel.org/all/58586fa666f09c209f9d7fe8c692a8bdda6d4410.camel@rong.moe/
Signed-off-by: Ali Ahmet Memiş <aliamemis@disroot.org>
Reviewed-by: Rong Zhang <i@rong.moe>
Cc: All applicable <stable@vger.kernel.org> # 80892972ff23 ACPI: utils: Add exclusive AML evaluation helpers
Link: https://patch.msgid.link/20261018122348.679126-1-aliamemis@disroot.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/lenovo/ideapad-laptop.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index fcebfbaf04605..690311eb930d1 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -285,12 +285,16 @@ static void ideapad_shared_exit(struct ideapad_private *priv)
#define IDEAPAD_EC_POLL_MIN_US 150
#define IDEAPAD_EC_POLL_MAX_US 300
+/*
+ * On some models GBMD and the battery _BIX take the EC mutex and a
+ * serialized method in opposite order, so evaluate all methods exclusively.
+ */
static int eval_int(acpi_handle handle, const char *name, unsigned long *res)
{
unsigned long long result;
acpi_status status;
- status = acpi_evaluate_integer(handle, (char *)name, NULL, &result);
+ status = acpi_evaluate_integer_exclusive(handle, (char *)name, NULL, &result);
if (ACPI_FAILURE(status))
return -EIO;
@@ -312,7 +316,7 @@ static int eval_int_with_arg(acpi_handle handle, const char *name, unsigned long
in_obj.type = ACPI_TYPE_INTEGER;
in_obj.integer.value = arg;
- status = acpi_evaluate_integer(handle, (char *)name, ¶ms, &result);
+ status = acpi_evaluate_integer_exclusive(handle, (char *)name, ¶ms, &result);
if (ACPI_FAILURE(status))
return -EIO;
@@ -324,7 +328,7 @@ static int eval_int_with_arg(acpi_handle handle, const char *name, unsigned long
static int exec_simple_method(acpi_handle handle, const char *name, unsigned long arg)
{
- acpi_status status = acpi_execute_simple_method(handle, (char *)name, arg);
+ acpi_status status = acpi_execute_simple_method_exclusive(handle, (char *)name, arg);
return ACPI_FAILURE(status) ? -EIO : 0;
}
@@ -382,7 +386,7 @@ static int eval_vpcw(acpi_handle handle, unsigned long cmd, unsigned long data)
in_obj[1].type = ACPI_TYPE_INTEGER;
in_obj[1].integer.value = data;
- status = acpi_evaluate_object(handle, "VPCW", ¶ms, NULL);
+ status = acpi_evaluate_object_exclusive(handle, "VPCW", ¶ms, NULL);
if (ACPI_FAILURE(status))
return -EIO;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0025/2151] mm/userfaultfd: write-lock the VMA before waking waiters when unregistering
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (23 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0024/2151] platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0026/2151] mm/userfaultfd: wake waiters when registration modes are removed Greg Kroah-Hartman
` (857 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik,
Mike Rapoport (Microsoft), Lorenzo Stoakes (ARM),
Suren Baghdasaryan, Muhammad Usama Anjum, David Hildenbrand (Arm),
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit 35f7ecd55ce7e51cb6d5ef49e6dd51f3c80f61e4 ]
userfaultfd_unregister() wakes pending missing faults before clearing the
VMA's userfaultfd registration. With per-VMA fault locking, holding
mmap_lock for write does not prevent another fault from queuing after
the wakeup but before userfaultfd_clear_vma() write-locks the VMA. That
waiter can then remain asleep indefinitely.
Call vma_start_write() before waking waiters. Existing fault handlers
queue themselves before dropping the VMA read lock, and new readers are
excluded until mmap_write_unlock().
Fixes: 29a22b9e08d7 ("mm: handle userfaults under VMA lock")
Cc: stable@vger.kernel.org
Reported-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-23-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Adjusted the patch location because userfaultfd_unregister() remains in its original file before the upstream consolidation. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/userfaultfd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 7e40eb9131bd7..2b4e83cc0cb9e 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -1524,6 +1524,9 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
start = vma->vm_start;
vma_end = min(end, vma->vm_end);
+ /* Prevent new userfaults from being queued after the wakeup. */
+ vma_start_write(vma);
+
if (userfaultfd_missing(vma)) {
/*
* Wake any concurrent pending userfault while
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0026/2151] mm/userfaultfd: wake waiters when registration modes are removed
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (24 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0025/2151] mm/userfaultfd: write-lock the VMA before waking waiters when unregistering Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0027/2151] cxl/pci: Use the Device GPF DVSEC for restricted endpoints Greg Kroah-Hartman
` (856 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregory Price (Meta),
Mike Rapoport (Microsoft), Lorenzo Stoakes (ARM),
Muhammad Usama Anjum, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit 4eee9c389b072e161549d46dcb1ae10b0222717e ]
UFFDIO_REGISTER can replace MISSING or MINOR tracking without waking
faults that are already queued. For example, switching an anonymous
range from MISSING to WP leaves a missing-fault waiter asleep until
userspace explicitly wakes it.
When a registration change removes a UFFD mode, wake waiters in the
affected interval after updating the VMA. The VMA is write-locked at
this point, so no new faults can queue under the old modes and woken
threads cannot retry until mmap_write_unlock(). Waiters for retained
modes in the same interval may also wake and refault.
The hang reproduces for MISSING-to-WP and MINOR-to-MISSING transitions,
with both read and unread fault events.
Fixes: 63b2d4174c4a ("userfaultfd: wp: add the writeprotect API to userfaultfd ioctl")
Cc: stable@vger.kernel.org
Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-25-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: replaced the upstream wakeup wrapper with a direct cross-file wake_userfault() call using a shared range structure ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/userfaultfd.c | 9 ++-------
include/linux/userfaultfd_k.h | 8 ++++++++
mm/userfaultfd.c | 12 ++++++++++++
3 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 2b4e83cc0cb9e..02ff11cf42bd8 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -71,11 +71,6 @@ struct userfaultfd_wait_queue {
bool waken;
};
-struct userfaultfd_wake_range {
- unsigned long start;
- unsigned long len;
-};
-
/* internal indication that UFFD_API ioctl was successfully executed */
#define UFFD_FEATURE_INITIALIZED (1u << 31)
@@ -1191,8 +1186,8 @@ static void __wake_userfault(struct userfaultfd_ctx *ctx,
spin_unlock_irq(&ctx->fault_pending_wqh.lock);
}
-static __always_inline void wake_userfault(struct userfaultfd_ctx *ctx,
- struct userfaultfd_wake_range *range)
+void wake_userfault(struct userfaultfd_ctx *ctx,
+ struct userfaultfd_wake_range *range)
{
unsigned seq;
bool need_wakeup;
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h
index 796a380664bd8..d65effb5cbff2 100644
--- a/include/linux/userfaultfd_k.h
+++ b/include/linux/userfaultfd_k.h
@@ -78,6 +78,14 @@ struct userfaultfd_ctx {
struct mm_struct *mm;
};
+struct userfaultfd_wake_range {
+ unsigned long start;
+ unsigned long len;
+};
+
+void wake_userfault(struct userfaultfd_ctx *ctx,
+ struct userfaultfd_wake_range *range);
+
extern vm_fault_t handle_userfault(struct vm_fault *vmf, unsigned long reason);
/* A combined operation mode + behavior flags. */
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index e4a0cb3ad838a..d5467692e8c3b 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -2063,6 +2063,8 @@ int userfaultfd_register_range(struct userfaultfd_ctx *ctx,
prev = vma;
for_each_vma_range(vmi, vma, end) {
+ const bool any_mode_removed = vma->vm_flags & __VM_UFFD_FLAGS & ~vm_flags;
+
cond_resched();
VM_WARN_ON_ONCE(!vma_can_userfault(vma, vm_flags, wp_async));
@@ -2097,6 +2099,16 @@ int userfaultfd_register_range(struct userfaultfd_ctx *ctx,
*/
userfaultfd_set_ctx(vma, ctx, vm_flags);
+ /* Retry faults for removed modes while the VMA is write-locked. */
+ if (any_mode_removed) {
+ struct userfaultfd_wake_range range = {
+ .start = start,
+ .len = vma_end - start,
+ };
+
+ wake_userfault(ctx, &range);
+ }
+
if (is_vm_hugetlb_page(vma) && uffd_disable_huge_pmd_share(vma))
hugetlb_unshare_all_pmds(vma);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0027/2151] cxl/pci: Use the Device GPF DVSEC for restricted endpoints
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (25 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0026/2151] mm/userfaultfd: wake waiters when registration modes are removed Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0028/2151] scsi: ufs: core: Change the error check sequence for auto hibern8 Greg Kroah-Hartman
` (855 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guixin Liu, Jonathan Cameron,
Dave Jiang, Alison Schofield, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guixin Liu <kanie@linux.alibaba.com>
[ Upstream commit d2654fa0d841fa36ffa76577f83a2810d643ae19 ]
cxl_gpf_get_dvsec() picks between the Port and the Device GPF DVSEC
from the PCIe type of the given device, and only a plain endpoint
counts as a device. A restricted CXL device is an endpoint too, but
it falls into the port case and is probed for the Port GPF DVSEC
instead of the Device GPF DVSEC.
On an RCD, dirty shutdown tracking therefore never arms: the DVSEC
lookup in cxl_nvdimm_arm_dirty_shutdown_tracking() fails, the dirty
shutdown count stays invalid, and the warning complains about a
missing Port GPF DVSEC on a device.
Treat restricted endpoints as devices.
Fixes: 36aace15d9bd ("cxl/pci: Drop the parameter is_port of cxl_gpf_get_dvsec()")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20261008034619.28059-2-kanie@linux.alibaba.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
[ sashal: Replaced the unavailable is_cxl_restricted() helper call with the equivalent pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_END comparison. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index 48c1f3854b799..d2ee7d853f1fd 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -819,7 +819,8 @@ u16 cxl_gpf_get_dvsec(struct device *dev)
return 0;
pdev = to_pci_dev(dev);
- if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ENDPOINT)
+ if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ENDPOINT ||
+ pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_END)
is_port = false;
dvsec = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0028/2151] scsi: ufs: core: Change the error check sequence for auto hibern8
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (26 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0027/2151] cxl/pci: Use the Device GPF DVSEC for restricted endpoints Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0029/2151] hwmon: chipcap2: fix IRQ teardown ordering Greg Kroah-Hartman
` (854 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, HOYOUNG SEO, Stanley Jhu, Bean Huo,
Bart Van Assche, Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: HOYOUNG SEO <hy50.seo@samsung.com>
[ Upstream commit 6b2ff2b3eafa381db9b4c8a6ed98b353b2a09f39 ]
Auto-hibern8 enter and exit are performed by the host controller without a
UIC command, and the auto-hibern8 idle timer only runs while no UIC command
is outstanding. An auto-hibern8 error (IS.UHES or IS.UHXS) is therefore
usually reported while hba->active_uic_cmd is NULL.
Since commit fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl()
easier to analyze"), ufshcd_uic_cmd_compl() returns early when
hba->active_uic_cmd is NULL, before ufshcd_is_auto_hibern8_error() is
called. Such auto-hibern8 errors are no longer recorded in hba->errors, so
ufshcd_check_errors() is not called for them and the error handler is not
scheduled.
Check for auto-hibern8 errors before checking for an active UIC command, as
was done before that commit, but keep returning early when there is no
active UIC command so that a NULL cmd is never dereferenced. Only report
the missing UIC command if no auto-hibern8 error was found.
Fixes: fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze")
Cc: stable@vger.kernel.org # v6.13+
Signed-off-by: HOYOUNG SEO <hy50.seo@samsung.com>
Reviewed-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20261027110357.3649301-1-hy50.seo@samsung.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
[ sashal: used host_lock directly because it is already a pointer ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/ufs/core/ufshcd.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index d595072f7c0a4..572c0510d6bb4 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5581,15 +5581,22 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status)
{
irqreturn_t retval = IRQ_NONE;
struct uic_command *cmd;
+ bool ah8_err;
guard(spinlock_irqsave)(hba->host->host_lock);
+
+ /*
+ * Auto-hibern8 is performed without a UIC command, so check for
+ * auto-hibern8 errors before checking for an active UIC command.
+ */
+ ah8_err = ufshcd_is_auto_hibern8_error(hba, intr_status);
+ if (ah8_err)
+ hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);
+
cmd = hba->active_uic_cmd;
if (!cmd)
goto unlock;
- if (ufshcd_is_auto_hibern8_error(hba, intr_status))
- hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);
-
if (intr_status & UIC_COMMAND_COMPL) {
cmd->argument2 |= ufshcd_get_uic_cmd_result(hba);
cmd->argument3 = ufshcd_get_dme_attr_val(hba);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0029/2151] hwmon: chipcap2: fix IRQ teardown ordering
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (27 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0028/2151] scsi: ufs: core: Change the error check sequence for auto hibern8 Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0030/2151] hwmon: chipcap2: disable device after hwmon teardown Greg Kroah-Hartman
` (853 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Javier Carrasco, Guenter Roeck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
[ Upstream commit d2a66c515d7730fd453485ffb306c412f1f46d72 ]
The threaded IRQs are currently requested before the hwmon device
is registered. Since devres releases resources in reverse order,
the hwmon device is unregistered before the IRQs are freed during
driver teardown. An IRQ may therefore still run after the hwmon
device has been released and access the stale data->hwmon pointer.
Separate IRQ discovery from IRQ registration so that the IRQ numbers
and alarm visibility flags are initialized before registering the
hwmon device while the IRQs are released before the hwmon device
during devres cleanup.
Fixes: 3af350929e75 ("hwmon: Add support for Amphenol ChipCap 2")
Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20261014-chipcap2_locks-v3-5-27ebfc2c5b9e@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reuse the existing IRQ helpers for discovery and ready IRQ registration,
and request alarm IRQs directly from probe after hwmon registration. This
keeps the number of helper functions unchanged. Omit the unrelated label
property read because label support is absent.
Stable-dep-of: 4724ac5556ce ("hwmon: chipcap2: disable device after hwmon teardown")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/chipcap2.c | 69 ++++++++++++++++++++--------------------
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c
index 5f4b0fd535af8..8ba706ecd4012 100644
--- a/drivers/hwmon/chipcap2.c
+++ b/drivers/hwmon/chipcap2.c
@@ -636,60 +636,41 @@ static int cc2_write(struct device *dev, enum hwmon_sensor_types type, u32 attr,
}
}
-static int cc2_request_ready_irq(struct cc2_data *data, struct device *dev)
+static int cc2_request_data_ready(struct cc2_data *data, struct device *dev)
{
int ret = 0;
- data->irq_ready = fwnode_irq_get_byname(dev_fwnode(dev), "ready");
- if (data->irq_ready == -EPROBE_DEFER)
- return data->irq_ready;
- if (data->irq_ready > 0) {
- init_completion(&data->complete);
+ if (data->irq_ready > 0)
ret = devm_request_threaded_irq(dev, data->irq_ready, NULL,
cc2_ready_interrupt,
IRQF_ONESHOT |
IRQF_TRIGGER_RISING,
dev_name(dev), data);
- }
return ret;
}
-static int cc2_request_alarm_irqs(struct cc2_data *data, struct device *dev)
+static int cc2_get_irqs(struct cc2_data *data, struct device *dev)
{
- int ret = 0;
+ data->irq_ready = fwnode_irq_get_byname(dev_fwnode(dev), "ready");
+ if (data->irq_ready == -EPROBE_DEFER)
+ return data->irq_ready;
+ if (data->irq_ready > 0)
+ init_completion(&data->complete);
data->irq_low = fwnode_irq_get_byname(dev_fwnode(dev), "low");
if (data->irq_low == -EPROBE_DEFER)
return data->irq_low;
- if (data->irq_low > 0) {
- ret = devm_request_threaded_irq(dev, data->irq_low, NULL,
- cc2_low_interrupt,
- IRQF_ONESHOT |
- IRQF_TRIGGER_RISING,
- dev_name(dev), data);
- if (ret)
- return ret;
-
+ if (data->irq_low > 0)
data->rh_alarm.low_alarm_visible = true;
- }
data->irq_high = fwnode_irq_get_byname(dev_fwnode(dev), "high");
if (data->irq_high == -EPROBE_DEFER)
return data->irq_high;
- if (data->irq_high > 0) {
- ret = devm_request_threaded_irq(dev, data->irq_high, NULL,
- cc2_high_interrupt,
- IRQF_ONESHOT |
- IRQF_TRIGGER_RISING,
- dev_name(dev), data);
- if (ret)
- return ret;
-
+ if (data->irq_high > 0)
data->rh_alarm.high_alarm_visible = true;
- }
- return ret;
+ return 0;
}
static const struct hwmon_channel_info *cc2_info[] = {
@@ -735,13 +716,13 @@ static int cc2_probe(struct i2c_client *client)
return dev_err_probe(dev, PTR_ERR(data->regulator),
"Failed to get regulator\n");
- ret = cc2_request_ready_irq(data, dev);
+ ret = cc2_get_irqs(data, dev);
if (ret)
- return dev_err_probe(dev, ret, "Failed to request ready irq\n");
+ return dev_err_probe(dev, ret, "Failed to get IRQs\n");
- ret = cc2_request_alarm_irqs(data, dev);
+ ret = cc2_request_data_ready(data, dev);
if (ret)
- return dev_err_probe(dev, ret, "Failed to request alarm irqs\n");
+ return dev_err_probe(dev, ret, "Failed to request ready irq\n");
data->hwmon = devm_hwmon_device_register_with_info(dev, client->name,
data, &cc2_chip_info,
@@ -750,6 +731,26 @@ static int cc2_probe(struct i2c_client *client)
return dev_err_probe(dev, PTR_ERR(data->hwmon),
"Failed to register hwmon device\n");
+ if (data->irq_low > 0) {
+ ret = devm_request_threaded_irq(dev, data->irq_low, NULL,
+ cc2_low_interrupt,
+ IRQF_ONESHOT |
+ IRQF_TRIGGER_RISING,
+ dev_name(dev), data);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to request alarm irqs\n");
+ }
+
+ if (data->irq_high > 0) {
+ ret = devm_request_threaded_irq(dev, data->irq_high, NULL,
+ cc2_high_interrupt,
+ IRQF_ONESHOT |
+ IRQF_TRIGGER_RISING,
+ dev_name(dev), data);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to request alarm irqs\n");
+ }
+
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0030/2151] hwmon: chipcap2: disable device after hwmon teardown
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (28 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0029/2151] hwmon: chipcap2: fix IRQ teardown ordering Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0031/2151] libceph: initialize CRUSH choose argument weights Greg Kroah-Hartman
` (852 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Javier Carrasco, Guenter Roeck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
[ Upstream commit 4724ac5556ce63f01a3f5d61fc7fcc20f4ddef3f ]
cc2_remove() disables the device while the device-managed hwmon device is
still registered. A concurrent sysfs callback can then enable the device
after it has been disabled during removal.
Register a device-managed disable action before registering the hwmon
device, so devres unregisters the hwmon device before disabling the
physical device.
Fixes: 3af350929e75 ("hwmon: Add support for Amphenol ChipCap 2")
Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20261014-chipcap2_locks-v3-6-27ebfc2c5b9e@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/chipcap2.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c
index 8ba706ecd4012..6026514a763d1 100644
--- a/drivers/hwmon/chipcap2.c
+++ b/drivers/hwmon/chipcap2.c
@@ -167,6 +167,11 @@ static void cc2_disable(struct cc2_data *data)
data->regulator_enabled = false;
}
+static void cc2_disable_action(void *data)
+{
+ cc2_disable(data);
+}
+
static int cc2_cmd_response_diagnostic(struct device *dev, u8 status)
{
int resp;
@@ -720,6 +725,10 @@ static int cc2_probe(struct i2c_client *client)
if (ret)
return dev_err_probe(dev, ret, "Failed to get IRQs\n");
+ ret = devm_add_action_or_reset(dev, cc2_disable_action, data);
+ if (ret)
+ return ret;
+
ret = cc2_request_data_ready(data, dev);
if (ret)
return dev_err_probe(dev, ret, "Failed to request ready irq\n");
@@ -754,13 +763,6 @@ static int cc2_probe(struct i2c_client *client)
return 0;
}
-static void cc2_remove(struct i2c_client *client)
-{
- struct cc2_data *data = i2c_get_clientdata(client);
-
- cc2_disable(data);
-}
-
static const struct i2c_device_id cc2_id[] = {
{ "cc2d23" },
{ "cc2d23s" },
@@ -793,7 +795,6 @@ static struct i2c_driver cc2_driver = {
.of_match_table = cc2_of_match,
},
.probe = cc2_probe,
- .remove = cc2_remove,
.id_table = cc2_id,
};
module_i2c_driver(cc2_driver);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0031/2151] libceph: initialize CRUSH choose argument weights
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (29 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0030/2151] hwmon: chipcap2: disable device after hwmon teardown Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0032/2151] ovl: port ovl_dir_llseek() to cred guard Greg Kroah-Hartman
` (851 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vega, Darong Lu, Ren Wei,
Alex Markuze, Ilya Dryomov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Darong Lu <zzyy19904204639@163.com>
[ Upstream commit c3a995ff0782587789333c621e1f6bd5e574371e ]
Initialize the CRUSH choose argument weight-set array before decoding so
entries start in a defined state while the decoder fills them.
Cc: stable@vger.kernel.org
Fixes: 5cf9c4a9959b ("libceph, crush: per-pool crush_choose_arg_map for crush_do_rule()")
Reported-by: Vega <vega@nebusec.ai>
Assisted-by: LLM
Signed-off-by: Darong Lu <zzyy19904204639@163.com>
Signed-off-by: Ren Wei <weir@nebusec.ai>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
[ sashal: Used kcalloc() instead of kzalloc_objs() to match the existing kmalloc_array() call. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/ceph/osdmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 803514a1bc7ce..fdb8c398f5ecd 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -320,7 +320,7 @@ static int decode_choose_arg(void **p, void *end, struct crush_choose_arg *arg)
if (arg->weight_set_size) {
u32 i;
- arg->weight_set = kmalloc_array(arg->weight_set_size,
+ arg->weight_set = kcalloc(arg->weight_set_size,
sizeof(*arg->weight_set),
GFP_NOIO);
if (!arg->weight_set)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0032/2151] ovl: port ovl_dir_llseek() to cred guard
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (30 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0031/2151] libceph: initialize CRUSH choose argument weights Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0033/2151] ovl: inherit FMODE_NONOTIFY when opening directory realfiles Greg Kroah-Hartman
` (850 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Amir Goldstein, Christian Brauner,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <brauner@kernel.org>
[ Upstream commit 5517646e14d18768ee72ae2f4320826f2169329a ]
Use the scoped ovl cred guard.
Link: https://patch.msgid.link/20251117-work-ovl-cred-guard-v4-26-b31603935724@kernel.org
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Stable-dep-of: 323899b4ed23 ("ovl: inherit FMODE_NONOTIFY when opening directory realfiles")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/overlayfs/readdir.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 9ccbf78389f82..7fa4fecf15360 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -959,14 +959,8 @@ static loff_t ovl_dir_llseek(struct file *file, loff_t offset, int origin)
static struct file *ovl_dir_open_realfile(const struct file *file,
const struct path *realpath)
{
- struct file *res;
- const struct cred *old_cred;
-
- old_cred = ovl_override_creds(file_inode(file)->i_sb);
- res = ovl_path_open(realpath, O_RDONLY | (file->f_flags & O_LARGEFILE));
- ovl_revert_creds(old_cred);
-
- return res;
+ with_ovl_creds(file_inode(file)->i_sb)
+ return ovl_path_open(realpath, O_RDONLY | (file->f_flags & O_LARGEFILE));
}
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0033/2151] ovl: inherit FMODE_NONOTIFY when opening directory realfiles
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (31 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0032/2151] ovl: port ovl_dir_llseek() to cred guard Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0034/2151] f2fs: fix to fetch ino via ino_of_node() under cache lock Greg Kroah-Hartman
` (849 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christian Brauner (Amutable),
Edvard Conrad, Amir Goldstein, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amir Goldstein <amir73il@gmail.com>
[ Upstream commit 323899b4ed233d5b6e2fc160c16fbf39cf0317da ]
When fanotify hands a listener an fd for a permission event on an
overlay directory, ovl_dir_open_realfile() opens the real directory via
dentry_open(), not backing_file_open(), so the lower open could still
raise FS_OPEN_PERM and deadlock a listener that also marks the backing
filesystem.
Export dentry_open_nonotify() and call it from ovl_path_open_realfile()
when the overlay user file must not generate events. Ordinary
ovl_path_open() callers are unchanged.
Reported-by: Christian Brauner (Amutable) <brauner@kernel.org>
Closes: https://lore.kernel.org/all/20261030-welpen-anbinden-nullen-b2432cee1d10@brauner/
Fixes: 130fdbc3d1f99 ("ovl: pass correct flags for opening real directory")
Cc: stable@vger.kernel.org
Tested-by: Edvard Conrad <edvard@tuta.io>
Link: https://lore.kernel.org/ltp/P5Iny41--F-9@tuta.io/
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/open.c | 1 +
fs/overlayfs/overlayfs.h | 9 ++++++++-
fs/overlayfs/readdir.c | 3 ++-
fs/overlayfs/util.c | 11 ++++++++++-
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/fs/open.c b/fs/open.c
index 3d64372ecc675..3d5ff8f58d5c9 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1143,6 +1143,7 @@ struct file *dentry_open_nonotify(const struct path *path, int flags,
}
return f;
}
+EXPORT_SYMBOL_GPL(dentry_open_nonotify);
/**
* dentry_create - Create and open a file
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index 6268db46483e7..7bd69773f33c9 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -524,7 +524,14 @@ void ovl_dir_modified(struct dentry *dentry, bool impurity);
u64 ovl_inode_version_get(struct inode *inode);
bool ovl_is_whiteout(struct dentry *dentry);
bool ovl_path_is_whiteout(struct ovl_fs *ofs, const struct path *path);
-struct file *ovl_path_open(const struct path *path, int flags);
+struct file *ovl_path_open_realfile(const struct file *user_file,
+ const struct path *path, int flags);
+
+static inline struct file *ovl_path_open(const struct path *path, int flags)
+{
+ return ovl_path_open_realfile(NULL, path, flags);
+}
+
int ovl_copy_up_start(struct dentry *dentry, int flags);
void ovl_copy_up_end(struct dentry *dentry);
bool ovl_already_copied_up(struct dentry *dentry, int flags);
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 7fa4fecf15360..3c8fe45b06f12 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -960,7 +960,8 @@ static struct file *ovl_dir_open_realfile(const struct file *file,
const struct path *realpath)
{
with_ovl_creds(file_inode(file)->i_sb)
- return ovl_path_open(realpath, O_RDONLY | (file->f_flags & O_LARGEFILE));
+ return ovl_path_open_realfile(file, realpath,
+ O_RDONLY | (file->f_flags & O_LARGEFILE));
}
/*
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
index 19f4fe7b98f29..f75e8009fb15f 100644
--- a/fs/overlayfs/util.c
+++ b/fs/overlayfs/util.c
@@ -659,7 +659,8 @@ bool ovl_path_is_whiteout(struct ovl_fs *ofs, const struct path *path)
ovl_path_check_xwhiteout_xattr(ofs, path);
}
-struct file *ovl_path_open(const struct path *path, int flags)
+struct file *ovl_path_open_realfile(const struct file *user_file,
+ const struct path *path, int flags)
{
struct inode *inode = d_inode(path->dentry);
struct mnt_idmap *real_idmap = mnt_idmap(path->mnt);
@@ -687,6 +688,14 @@ struct file *ovl_path_open(const struct path *path, int flags)
if (inode_owner_or_capable(real_idmap, inode))
flags |= O_NOATIME;
+ /*
+ * Directory opens use dentry_open() here, not backing_file_open().
+ * Inherit FMODE_NONOTIFY from a fanotify permission fd so a listener
+ * that also watches the real filesystem does not deadlock.
+ */
+ if (user_file && FMODE_FSNOTIFY_NONE(user_file->f_mode))
+ return dentry_open_nonotify(path, flags, current_cred());
+
return dentry_open(path, flags, current_cred());
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0034/2151] f2fs: fix to fetch ino via ino_of_node() under cache lock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (32 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0033/2151] ovl: inherit FMODE_NONOTIFY when opening directory realfiles Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0035/2151] drm/amdgpu: sign extend the addresses GEM_OP(GET_MAPPING_INFO) returns Greg Kroah-Hartman
` (848 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Chao Yu, Jaegeuk Kim,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chao Yu <chao@kernel.org>
[ Upstream commit cd6d8b1891395b681f2060916a4b83880b765698 ]
In f2fs_writeback_node_caches(), it's better to fetch ino via ino_of_node()
under cache lock, otherwise, node cache content may become stale after cache
is unlocked due to racing w/ truncation.
Commit 493b9dc8b52c ("f2fs: cache: use node cache") fixes similar issue in
f2fs_flush_inline_data() introduced in commit 34c061ad85a2 ("f2fs: Avoid double
lock for cp_rwsem during checkpoint").
Cc: stable@kernel.org
Fixes: 2049d4fcb057 ("f2fs: avoid multiple node page writes due to inline_data")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[ sashal: adapted cache-entry handling to folio-based handling in f2fs_sync_node_pages() ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/f2fs/node.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index ad59d52f17aeb..25e6e3c4bf01b 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2167,9 +2167,11 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,
/* flush inline_data */
if (folio_test_f2fs_inline(folio)) {
+ nid_t ino = ino_of_node(folio);
+
folio_clear_f2fs_inline(folio);
folio_unlock(folio);
- flush_inline_data(sbi, ino_of_node(folio));
+ flush_inline_data(sbi, ino);
goto lock_node;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0035/2151] drm/amdgpu: sign extend the addresses GEM_OP(GET_MAPPING_INFO) returns
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (33 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0034/2151] f2fs: fix to fetch ino via ino_of_node() under cache lock Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0036/2151] mm/vma: fix expansion of VMA_MIXEDMAP_BIT VMAs Greg Kroah-Hartman
` (847 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christian König, Jesse Zhang,
Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jesse Zhang <Jesse.Zhang@amd.com>
[ Upstream commit 37cfaaa6b5e9448ef786342d470d0e0b8eb89fa6 ]
GEM_VA takes the GPU virtual addresses above the VA hole sign extended,
like the rest of the UAPI, but GET_MAPPING_INFO reports them without the
upper bits, so they land in the hole. Mappings in the upper half of the
address space can't be recreated or removed with what it returns. On
navi31:
MAP at 0xffff800100000000 -> 0
GET_MAPPING_INFO -> addr 0x800100000000
UNMAP at 0x800100000000 -> -EINVAL
Sign extend the addresses before handing them out.
Fixes: 4d82724f7f2b ("drm/amdgpu: Add mapping info option for GEM_OP ioctl")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9d5524a339390da9145b19bfb40da45640332fb3)
Cc: stable@vger.kernel.org
[ sashal: Omitted the unused adev declaration because amdgpu_gmc_sign_extend() is an inline function with fixed address limits. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 3b03157faa7e8..d9548f97986ea 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -1118,7 +1118,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
amdgpu_vm_bo_va_for_each_valid_mapping(bo_va, mapping) {
if (num_mappings < args->num_entries) {
- vm_entries[num_mappings].addr = mapping->start * AMDGPU_GPU_PAGE_SIZE;
+ vm_entries[num_mappings].addr =
+ amdgpu_gmc_sign_extend(mapping->start * AMDGPU_GPU_PAGE_SIZE);
vm_entries[num_mappings].size = (mapping->last - mapping->start + 1) * AMDGPU_GPU_PAGE_SIZE;
vm_entries[num_mappings].offset = mapping->offset;
vm_entries[num_mappings].flags = mapping->flags;
@@ -1128,7 +1129,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
amdgpu_vm_bo_va_for_each_invalid_mapping(bo_va, mapping) {
if (num_mappings < args->num_entries) {
- vm_entries[num_mappings].addr = mapping->start * AMDGPU_GPU_PAGE_SIZE;
+ vm_entries[num_mappings].addr =
+ amdgpu_gmc_sign_extend(mapping->start * AMDGPU_GPU_PAGE_SIZE);
vm_entries[num_mappings].size = (mapping->last - mapping->start + 1) * AMDGPU_GPU_PAGE_SIZE;
vm_entries[num_mappings].offset = mapping->offset;
vm_entries[num_mappings].flags = mapping->flags;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0036/2151] mm/vma: fix expansion of VMA_MIXEDMAP_BIT VMAs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (34 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0035/2151] drm/amdgpu: sign extend the addresses GEM_OP(GET_MAPPING_INFO) returns Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0037/2151] drm/amdgpu: drop the gang leader reference when freeing gang jobs Greg Kroah-Hartman
` (846 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lorenzo Stoakes (ARM), Andrew Morton,
Luiz Capitulino, Vlastimil Babka (SUSE), Pedro Falcato,
Liam R. Howlett, Jann Horn, Jakub Matěna, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes (ARM) <ljs@kernel.org>
[ Upstream commit 8146c6478224d8f6395c6b08a19c344a56d79867 ]
Commit ca3d76b0aa80 ("mm: add merging after mremap resize") combined
merging with expansion of mremap()'d VMAs, however it also unintentionally
disallowed the expansion of unmergeable VMAs.
Previously it was possible to expand a mixed mapping which mremap() had
already ensured was a legal expansion.
This is clearly seen in the mremap() logic, as it checks
vma_is_fixed_mapping() to determine legality of an expansion rather than
vma_can_merge().
Additionally, copy_vma() allows for a failed merge to result in a new VMA
being instantiated if MREMAP_MAYMOVE is specified.
However, this is not attempted, as a failure in vma_merge_extend() is
assumed to be an -ENOMEM failure.
Since vma_merge_extend() is used exclusively by mremap() to perform a merge
and/or expansion, resolve the issue by invoking vma_expand() for
unmergeable VMAs there.
Explicitly assert that the VMA is both non-fixed and a mixed mapping.
This provides double insurance against broken changes in future.
Note that khugepaged_enter_vma() (which vma_merge_new_range() runs) is
redundant in this case, as a mixed mapping is not subject to khugepaged.
Also update the VMA userland tests to add a required predicate.
Link: https://lore.kernel.org/20261023-vma-expansion-fix-v1-1-6142baf1f46b@kernel.org
Fixes: ca3d76b0aa80 ("mm: add merging after mremap resize")
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Luiz Capitulino <luizcap@redhat.com>
Closes: https://lore.kernel.org/all/20261023023106.515365-1-luizcap@redhat.com/
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Jann Horn <jannh@google.com>
Cc: Jakub Matěna <matenajakub@gmail.com>
Cc: <stable@vger.kernel.org>
[ sashal: replaced newer VMA helpers with equivalent vm_flags checks using the existing is_vm_hugetlb_page() helper ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/vma.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/mm/vma.c b/mm/vma.c
index 0d4f344956642..574585a800fc8 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -1775,12 +1775,28 @@ struct vm_area_struct *vma_merge_extend(struct vma_iterator *vmi,
struct vm_area_struct *vma,
unsigned long delta)
{
- VMG_VMA_STATE(vmg, vmi, vma, vma, vma->vm_end, vma->vm_end + delta);
+ const bool can_merge = !(vma->vm_flags & (VM_PFNMAP | VM_DONTEXPAND |
+ VM_MIXEDMAP)) &&
+ !is_vm_hugetlb_page(vma);
+ const unsigned long start =
+ can_merge ? vma->vm_end : vma->vm_start;
+ VMG_VMA_STATE(vmg, vmi, vma, vma, start, vma->vm_end + delta);
- vmg.next = vma_iter_next_rewind(vmi, NULL);
vmg.middle = NULL; /* We use the VMA to populate VMG fields only. */
- return vma_merge_new_range(&vmg);
+ if (can_merge) {
+ vmg.next = vma_iter_next_rewind(vmi, NULL);
+ return vma_merge_new_range(&vmg);
+ }
+
+ /* Mixed mappings are permitted to be expanded, not merged. */
+ VM_WARN_ON_ONCE(vma->vm_flags & (VM_PFNMAP | VM_DONTEXPAND));
+ VM_WARN_ON_ONCE(!(vma->vm_flags & VM_MIXEDMAP));
+ vma_prev(vmi); /* Reposition to start of VMA. */
+ vmg.target = vma;
+ if (vma_expand(&vmg))
+ return NULL;
+ return vma;
}
void unlink_file_vma_batch_init(struct unlink_vma_file_batch *vb)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0037/2151] drm/amdgpu: drop the gang leader reference when freeing gang jobs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (35 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0036/2151] mm/vma: fix expansion of VMA_MIXEDMAP_BIT VMAs Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0038/2151] apparmor: refactor xattr attachment, to take the file path Greg Kroah-Hartman
` (845 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christian König, Jesse Zhang,
Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jesse Zhang <Jesse.Zhang@amd.com>
[ Upstream commit c1584e10a7deb655438f21867b2b7a356a9aaf9f ]
Every job of a gang except the leader holds a reference to the
scheduled fence of the leader in job->gang_submit. Only
amdgpu_job_free(), used for jobs which never ran, drops it, so for every
gang submission which completes the scheduler fence of the leader, and
with it its hardware fence, is leaked. amdgpu_job_free() in turn checks
for the leader only after drm_sched_job_cleanup() cleared the scheduler
fence, so a leader freed there drops a reference it never took.
On navi31, 100 submissions of a GFX + COMPUTE gang grow the slab cache
drm_sched_fence is merged into by 60 to 180 objects each time, while
100 GFX only submissions don't.
Use amdgpu_job_free() for the jobs the scheduler frees too, and check
for the gang leader there before drm_sched_job_cleanup() clears the
scheduler fence. As the scheduler clears the entity of the jobs it
picked up, check for the scheduler fence instead to tell whether the job
needs cleaning up.
Keep freeing the remaining IBs with amdgpu_job_free_resources() after
drm_sched_job_cleanup(), so that it frees them with the hardware fence or
right away and not with the scheduler fence, which nobody signals for
jobs aborted after drm_sched_job_arm(), like a CS returning -EAGAIN.
v2: unify amdgpu_job_free() and amdgpu_job_free_cb() (Christian), don't
free the remaining IBs with the scheduler fence
v3: drop the comments (Christian)
v4: free the IBs with amdgpu_job_free_resources() again (Christian)
Fixes: 68ce8b242242 ("drm/amdgpu: add gang submit backend v2")
Fixes: f7d66fb2ea43 ("drm/amdgpu: cleanup scheduler job initialization v2")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit df4d6d404d44bbc8fc850bc7f9f136a25dabf180)
Cc: stable@vger.kernel.org
[ sashal: Adjusted amdgpu_job_free_cb() context for embedded hardware fences instead of separately allocated fences. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index ffc720d189007..d013fd68b1b14 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -264,17 +264,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job)
static void amdgpu_job_free_cb(struct drm_sched_job *s_job)
{
- struct amdgpu_job *job = to_amdgpu_job(s_job);
-
- drm_sched_job_cleanup(s_job);
-
- amdgpu_sync_free(&job->explicit_sync);
-
- /* only put the hw fence if has embedded fence */
- if (!job->hw_fence.base.ops)
- kfree(job);
- else
- dma_fence_put(&job->hw_fence.base);
+ amdgpu_job_free(to_amdgpu_job(s_job));
}
void amdgpu_job_set_gang_leader(struct amdgpu_job *job,
@@ -295,13 +285,14 @@ void amdgpu_job_set_gang_leader(struct amdgpu_job *job,
void amdgpu_job_free(struct amdgpu_job *job)
{
- if (job->base.entity)
+ if (job->gang_submit != &job->base.s_fence->scheduled)
+ dma_fence_put(job->gang_submit);
+
+ if (job->base.s_fence)
drm_sched_job_cleanup(&job->base);
amdgpu_job_free_resources(job);
amdgpu_sync_free(&job->explicit_sync);
- if (job->gang_submit != &job->base.s_fence->scheduled)
- dma_fence_put(job->gang_submit);
if (!job->hw_fence.base.ops)
kfree(job);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0038/2151] apparmor: refactor xattr attachment, to take the file path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (36 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0037/2151] drm/amdgpu: drop the gang leader reference when freeing gang jobs Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0039/2151] apparmor: constify aa_perms parameters that are read-only Greg Kroah-Hartman
` (844 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Georgia Garcia, John Johansen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Johansen <john.johansen@canonical.com>
[ Upstream commit 812aa0aa67d50c251d9788f1d225438e747507f0 ]
The full bprm does not need to be passed into xattrs_match, so only
pass in the path, and propagate the change backup the call stack until
bprm is actually needed.
Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Stable-dep-of: ce94927fa417 ("apparmor: fix profile leak when a policy load fails")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/apparmor/domain.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 8e478ac99ff6d..57e886b8ef461 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -303,28 +303,31 @@ static int change_profile_perms(struct aa_profile *profile,
/**
* aa_xattrs_match - check whether a file matches the xattrs defined in profile
- * @bprm: binprm struct for the process to validate
+ * @path: path for file being matched (NOT NULL)
* @profile: profile to match against (NOT NULL)
* @state: state to start match in
*
* Returns: number of extended attributes that matched, or < 0 on error
*/
-static int aa_xattrs_match(const struct linux_binprm *bprm,
+static int aa_xattrs_match(const struct path *path,
struct aa_profile *profile, aa_state_t state)
{
+ AA_BUG(!path);
+ AA_BUG(!profile);
+
int i;
struct dentry *d;
char *value = NULL;
struct aa_attachment *attach = &profile->attach;
int size, value_size = 0, ret = attach->xattr_count;
- if (!bprm || !attach->xattr_count)
+ if (!attach->xattr_count)
return 0;
might_sleep();
/* transition from exec match to xattr set */
state = aa_dfa_outofband_transition(attach->xmatch->dfa, state);
- d = bprm->file->f_path.dentry;
+ d = path->dentry;
for (i = 0; i < attach->xattr_count; i++) {
size = vfs_getxattr_alloc(&nop_mnt_idmap, d, attach->xattrs[i],
@@ -372,7 +375,7 @@ static int aa_xattrs_match(const struct linux_binprm *bprm,
/**
* find_attach - do attachment search for unconfined processes
- * @bprm: binprm structure of transitioning task
+ * @path: path of file in question (NOT NULL)
* @ns: the current namespace (NOT NULL)
* @head: profile list to walk (NOT NULL)
* @name: to match against (NOT NULL)
@@ -387,7 +390,7 @@ static int aa_xattrs_match(const struct linux_binprm *bprm,
*
* Returns: label or NULL if no match found
*/
-static struct aa_label *find_attach(const struct linux_binprm *bprm,
+static struct aa_label *find_attach(const struct path *path,
struct aa_ns *ns, struct list_head *head,
const char *name, const char **info)
{
@@ -395,6 +398,7 @@ static struct aa_label *find_attach(const struct linux_binprm *bprm,
bool conflict = false;
struct aa_profile *profile, *candidate = NULL;
+ AA_BUG(!path);
AA_BUG(!name);
AA_BUG(!head);
@@ -434,13 +438,13 @@ static struct aa_label *find_attach(const struct linux_binprm *bprm,
if (count < candidate_len)
continue;
- if (bprm && attach->xattr_count) {
+ if (attach->xattr_count) {
long rev = READ_ONCE(ns->revision);
if (!aa_get_profile_not0(profile))
goto restart;
rcu_read_unlock();
- ret = aa_xattrs_match(bprm, profile,
+ ret = aa_xattrs_match(path, profile,
state);
rcu_read_lock();
aa_put_profile(profile);
@@ -556,7 +560,7 @@ struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
/**
* x_to_label - get target label for a given xindex
* @profile: current profile (NOT NULL)
- * @bprm: binprm structure of transitioning task
+ * @path: path of file in question
* @name: name to lookup (NOT NULL)
* @xindex: index into x transition table
* @lookupname: returns: name used in lookup if one was specified (NOT NULL)
@@ -567,7 +571,7 @@ struct aa_label *x_table_lookup(struct aa_profile *profile, u32 xindex,
* Returns: refcounted label or NULL if not found available
*/
static struct aa_label *x_to_label(struct aa_profile *profile,
- const struct linux_binprm *bprm,
+ const struct path *path,
const char *name, u32 xindex,
const char **lookupname,
const char **info)
@@ -598,11 +602,11 @@ static struct aa_label *x_to_label(struct aa_profile *profile,
case AA_X_NAME:
if (xindex & AA_X_CHILD)
/* released by caller */
- new = find_attach(bprm, ns, &profile->base.profiles,
+ new = find_attach(path, ns, &profile->base.profiles,
name, info);
else
/* released by caller */
- new = find_attach(bprm, ns, &ns->base.profiles,
+ new = find_attach(path, ns, &ns->base.profiles,
name, info);
*lookupname = name;
break;
@@ -690,7 +694,7 @@ static struct aa_label *profile_transition(const struct cred *subj_cred,
}
if (profile_unconfined(profile)) {
- new = find_attach(bprm, profile->ns,
+ new = find_attach(&bprm->file->f_path, profile->ns,
&profile->ns->base.profiles, name, &info);
/* info set -> something unusual that we should report
* Currently this is only conflicting attachments, but other
@@ -720,8 +724,8 @@ static struct aa_label *profile_transition(const struct cred *subj_cred,
state = aa_str_perms(rules->file, state, name, cond, &perms);
if (perms.allow & MAY_EXEC) {
/* exec permission determine how to transition */
- new = x_to_label(profile, bprm, name, perms.xindex, &target,
- &info);
+ new = x_to_label(profile, &bprm->file->f_path, name,
+ perms.xindex, &target, &info);
if (new && new->proxy == profile->label.proxy && info) {
/* Force audit on conflicting attachment fallback
* Because perms is never used again after this audit
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0039/2151] apparmor: constify aa_perms parameters that are read-only
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (37 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0038/2151] apparmor: refactor xattr attachment, to take the file path Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0040/2151] apparmor: constify aa_profile parameters on read-only compute paths Greg Kroah-Hartman
` (843 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, John Johansen, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Johansen <john.johansen@canonical.com>
[ Upstream commit e3bc982007fe5e704c6a7f5a189502ece056f68d ]
Several functions take a struct aa_perms * argument that is only ever
read from and never modified through the pointer. Mark those parameters
const struct aa_perms * to document intent and let the compiler enforce
that the permission set is not mutated.
The converted functions are:
- aa_check_perms()
- aa_do_perms()
- do_perms() (af_inet)
- match_label() (af_unix)
- verify_perm()
- aa_perms_accum() / aa_perms_accum_raw() (@addend only)
No functional change.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Assisted-by: Claude:claude-opus-4.8
Stable-dep-of: ce94927fa417 ("apparmor: fix profile leak when a policy load fails")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/apparmor/af_unix.c | 2 +-
security/apparmor/include/net.h | 2 +-
security/apparmor/include/perms.h | 11 ++++++-----
security/apparmor/lib.c | 2 +-
security/apparmor/net.c | 2 +-
security/apparmor/policy_unpack.c | 2 +-
6 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/security/apparmor/af_unix.c b/security/apparmor/af_unix.c
index aa2b31d5598cd..7ba775017586b 100644
--- a/security/apparmor/af_unix.c
+++ b/security/apparmor/af_unix.c
@@ -172,7 +172,7 @@ static aa_state_t match_to_peer(struct aa_policydb *policy, aa_state_t state,
static aa_state_t match_label(struct aa_profile *profile,
struct aa_ruleset *rule, aa_state_t state,
u32 request, struct aa_profile *peer,
- struct aa_perms *p,
+ const struct aa_perms *p,
struct apparmor_audit_data *ad)
{
AA_BUG(!profile);
diff --git a/security/apparmor/include/net.h b/security/apparmor/include/net.h
index 0d0b0ce427238..021a35b94bd7e 100644
--- a/security/apparmor/include/net.h
+++ b/security/apparmor/include/net.h
@@ -86,7 +86,7 @@ extern struct aa_sfs_entry aa_sfs_entry_network[];
extern struct aa_sfs_entry aa_sfs_entry_networkv9[];
int aa_do_perms(struct aa_profile *profile, struct aa_policydb *policy,
- aa_state_t state, u32 request, struct aa_perms *p,
+ aa_state_t state, u32 request, const struct aa_perms *p,
struct apparmor_audit_data *ad);
/* passing in state returned by XXX_mediates_AF() */
aa_state_t aa_match_to_prot(struct aa_policydb *policy, aa_state_t state,
diff --git a/security/apparmor/include/perms.h b/security/apparmor/include/perms.h
index 37a3781b99a08..695d9b0572d4f 100644
--- a/security/apparmor/include/perms.h
+++ b/security/apparmor/include/perms.h
@@ -105,7 +105,7 @@ extern struct aa_perms allperms;
* @addend: perms struct to add to @accum
*/
static inline void aa_perms_accum_raw(struct aa_perms *accum,
- struct aa_perms *addend)
+ const struct aa_perms *addend)
{
accum->deny |= addend->deny;
accum->allow &= addend->allow & ~addend->deny;
@@ -132,7 +132,7 @@ static inline void aa_perms_accum_raw(struct aa_perms *accum,
* @addend: perms struct to add to @accum
*/
static inline void aa_perms_accum(struct aa_perms *accum,
- struct aa_perms *addend)
+ const struct aa_perms *addend)
{
accum->deny |= addend->deny;
accum->allow &= addend->allow & ~accum->deny;
@@ -208,12 +208,13 @@ void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
u32 chrsmask, const char * const *names, u32 namesmask);
void aa_apply_modes_to_perms(struct aa_profile *profile,
struct aa_perms *perms);
-void aa_perms_accum(struct aa_perms *accum, struct aa_perms *addend);
-void aa_perms_accum_raw(struct aa_perms *accum, struct aa_perms *addend);
+void aa_perms_accum(struct aa_perms *accum, const struct aa_perms *addend);
+void aa_perms_accum_raw(struct aa_perms *accum, const struct aa_perms *addend);
void aa_profile_match_label(struct aa_profile *profile,
struct aa_ruleset *rules, struct aa_label *label,
int type, u32 request, struct aa_perms *perms);
-int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
+int aa_check_perms(struct aa_profile *profile, const struct aa_perms *perms,
u32 request, struct apparmor_audit_data *ad,
void (*cb)(struct audit_buffer *, void *));
#endif /* __AA_PERM_H */
+
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c
index 5d53c15e46a9e..3b982770c4ceb 100644
--- a/security/apparmor/lib.c
+++ b/security/apparmor/lib.c
@@ -415,7 +415,7 @@ void aa_profile_match_label(struct aa_profile *profile,
* error code will indicate whether there was an explicit deny
* with a positive value.
*/
-int aa_check_perms(struct aa_profile *profile, struct aa_perms *perms,
+int aa_check_perms(struct aa_profile *profile, const struct aa_perms *perms,
u32 request, struct apparmor_audit_data *ad,
void (*cb)(struct audit_buffer *, void *))
{
diff --git a/security/apparmor/net.c b/security/apparmor/net.c
index cf590dd08540c..73a272576d5d6 100644
--- a/security/apparmor/net.c
+++ b/security/apparmor/net.c
@@ -166,7 +166,7 @@ void audit_net_cb(struct audit_buffer *ab, void *va)
/* standard permission lookup pattern - supports early bailout */
int aa_do_perms(struct aa_profile *profile, struct aa_policydb *policy,
aa_state_t state, u32 request,
- struct aa_perms *p, struct apparmor_audit_data *ad)
+ const struct aa_perms *p, struct apparmor_audit_data *ad)
{
struct aa_perms perms;
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 391665c27ede1..8dc2adedc7ae1 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -1257,7 +1257,7 @@ static bool verify_dfa_accept_index(struct aa_dfa *dfa, int table_size)
return true;
}
-static bool verify_perm(struct aa_perms *perm)
+static bool verify_perm(const struct aa_perms *perm)
{
/* TODO: allow option to just force the perms into a valid state */
if (perm->allow & perm->deny)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0040/2151] apparmor: constify aa_profile parameters on read-only compute paths
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (38 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0039/2151] apparmor: constify aa_perms parameters that are read-only Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0041/2151] apparmor: fix profile leak when a policy load fails Greg Kroah-Hartman
` (842 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, John Johansen, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Johansen <john.johansen@canonical.com>
[ Upstream commit 08066bcdeed037a99c47f7c8456cf30ee3055048 ]
A number of functions take a struct aa_profile * argument that is only
ever read from: they compute DFA matches or apply the profile's mode
flags without modifying the profile, taking a reference on it, or
touching its embedded label. Mark those parameters const struct
aa_profile * to document intent and let the compiler enforce it.
The converted functions are the permission "compute" path plus a few
pure readers:
- aa_apply_modes_to_perms(), aa_profile_match_label()
- AUDIT_MODE()
- aa_label_match() and its match_component()/label_compound_match()/
label_components_match() helpers (label.c)
- match_component()/label_compound_match()/label_components_match()/
label_match()/change_profile_perms()/aa_xattrs_match() (domain.c)
- match_iface()/match_addr_iface()/match_addr_iface_label()/
skb_match_to_sk()/skb_match_to_cmd() (af_inet.c)
- aa_profile_capget(), path_flags(), profile_query_cb()
The remaining aa_profile * parameters cannot be made const: the audit
path stores &profile->label into the owned, refcounted
apparmor_audit_data.subj_label/peer fields, and the domain/lifecycle
paths take references on the profile's embedded label
(aa_get_label()/aa_get_newest_label()/aa_get_profile()) or write
profile fields.
No functional change.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Assisted-by: Claude:claude-opus-4.8
Stable-dep-of: ce94927fa417 ("apparmor: fix profile leak when a policy load fails")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/apparmor/apparmorfs.c | 3 ++-
security/apparmor/capability.c | 2 +-
security/apparmor/domain.c | 16 ++++++++--------
security/apparmor/include/capability.h | 2 +-
security/apparmor/include/label.h | 2 +-
security/apparmor/include/perms.h | 4 ++--
security/apparmor/include/policy.h | 2 +-
security/apparmor/label.c | 10 +++++-----
security/apparmor/lib.c | 5 +++--
security/apparmor/mount.c | 2 +-
10 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 4dfca0c6e938d..7db41581b7b21 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -690,7 +690,8 @@ static const struct file_operations aa_fs_ns_revision_fops = {
.release = ns_revision_release,
};
-static void profile_query_cb(struct aa_profile *profile, struct aa_perms *perms,
+static void profile_query_cb(const struct aa_profile *profile,
+ struct aa_perms *perms,
const char *match_str, size_t match_len)
{
struct aa_ruleset *rules = profile->label.rules[0];
diff --git a/security/apparmor/capability.c b/security/apparmor/capability.c
index b9ea6bc45c1a7..2f3c6c84358de 100644
--- a/security/apparmor/capability.c
+++ b/security/apparmor/capability.c
@@ -191,7 +191,7 @@ int aa_capable(const struct cred *subj_cred, struct aa_label *label,
return error;
}
-kernel_cap_t aa_profile_capget(struct aa_profile *profile)
+kernel_cap_t aa_profile_capget(const struct aa_profile *profile)
{
struct aa_ruleset *rules = profile->label.rules[0];
aa_state_t state;
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 57e886b8ef461..1bfd36d8dfde2 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -90,8 +90,8 @@ static int may_change_ptraced_domain(const struct cred *to_cred,
* If a subns profile is not to be matched should be prescreened with
* visibility test.
*/
-static inline aa_state_t match_component(struct aa_profile *profile,
- struct aa_profile *tp,
+static inline aa_state_t match_component(const struct aa_profile *profile,
+ const struct aa_profile *tp,
bool stack, aa_state_t state)
{
struct aa_ruleset *rules = profile->label.rules[0];
@@ -126,7 +126,7 @@ static inline aa_state_t match_component(struct aa_profile *profile,
* @perms should be preinitialized with allperms OR a previous permission
* check to be stacked.
*/
-static int label_compound_match(struct aa_profile *profile,
+static int label_compound_match(const struct aa_profile *profile,
struct aa_label *label, bool stack,
aa_state_t state, bool inview, u32 request,
struct aa_perms *perms)
@@ -188,7 +188,7 @@ static int label_compound_match(struct aa_profile *profile,
* @perms should be preinitialized with allperms OR a previous permission
* check to be stacked.
*/
-static int label_components_match(struct aa_profile *profile,
+static int label_components_match(const struct aa_profile *profile,
struct aa_label *label, bool stack,
aa_state_t start, bool inview, u32 request,
struct aa_perms *perms)
@@ -252,7 +252,7 @@ static int label_components_match(struct aa_profile *profile,
*
* Returns: the state the match finished in, may be the none matching state
*/
-static int label_match(struct aa_profile *profile, struct aa_label *label,
+static int label_match(const struct aa_profile *profile, struct aa_label *label,
bool stack, aa_state_t state, bool inview, u32 request,
struct aa_perms *perms)
{
@@ -286,7 +286,7 @@ static int label_match(struct aa_profile *profile, struct aa_label *label,
* currently only matches full label A//&B//&C or individual components A, B, C
* not arbitrary combinations. Eg. A//&B, C
*/
-static int change_profile_perms(struct aa_profile *profile,
+static int change_profile_perms(const struct aa_profile *profile,
struct aa_label *target, bool stack,
u32 request, aa_state_t start,
struct aa_perms *perms)
@@ -310,7 +310,7 @@ static int change_profile_perms(struct aa_profile *profile,
* Returns: number of extended attributes that matched, or < 0 on error
*/
static int aa_xattrs_match(const struct path *path,
- struct aa_profile *profile, aa_state_t state)
+ const struct aa_profile *profile, aa_state_t state)
{
AA_BUG(!path);
AA_BUG(!profile);
@@ -318,7 +318,7 @@ static int aa_xattrs_match(const struct path *path,
int i;
struct dentry *d;
char *value = NULL;
- struct aa_attachment *attach = &profile->attach;
+ const struct aa_attachment *attach = &profile->attach;
int size, value_size = 0, ret = attach->xattr_count;
if (!attach->xattr_count)
diff --git a/security/apparmor/include/capability.h b/security/apparmor/include/capability.h
index 1ddcec2d1160d..ec4bf70e3410b 100644
--- a/security/apparmor/include/capability.h
+++ b/security/apparmor/include/capability.h
@@ -36,7 +36,7 @@ struct aa_caps {
extern struct aa_sfs_entry aa_sfs_entry_caps[];
-kernel_cap_t aa_profile_capget(struct aa_profile *profile);
+kernel_cap_t aa_profile_capget(const struct aa_profile *profile);
int aa_capable(const struct cred *subj_cred, struct aa_label *label,
int cap, unsigned int opts);
diff --git a/security/apparmor/include/label.h b/security/apparmor/include/label.h
index 75c49e713a749..42fcff72e1899 100644
--- a/security/apparmor/include/label.h
+++ b/security/apparmor/include/label.h
@@ -346,7 +346,7 @@ static inline const char *aa_label_str_split(const char *str)
struct aa_perms;
struct aa_ruleset;
-int aa_label_match(struct aa_profile *profile, struct aa_ruleset *rules,
+int aa_label_match(const struct aa_profile *profile, struct aa_ruleset *rules,
struct aa_label *label, aa_state_t state, bool subns,
u32 request, struct aa_perms *perms);
diff --git a/security/apparmor/include/perms.h b/security/apparmor/include/perms.h
index 695d9b0572d4f..5cc0b3c0225a9 100644
--- a/security/apparmor/include/perms.h
+++ b/security/apparmor/include/perms.h
@@ -206,11 +206,11 @@ void aa_audit_perm_names(struct audit_buffer *ab, const char * const *names,
u32 mask);
void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
u32 chrsmask, const char * const *names, u32 namesmask);
-void aa_apply_modes_to_perms(struct aa_profile *profile,
+void aa_apply_modes_to_perms(const struct aa_profile *profile,
struct aa_perms *perms);
void aa_perms_accum(struct aa_perms *accum, const struct aa_perms *addend);
void aa_perms_accum_raw(struct aa_perms *accum, const struct aa_perms *addend);
-void aa_profile_match_label(struct aa_profile *profile,
+void aa_profile_match_label(const struct aa_profile *profile,
struct aa_ruleset *rules, struct aa_label *label,
int type, u32 request, struct aa_perms *perms);
int aa_check_perms(struct aa_profile *profile, const struct aa_perms *perms,
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index 2eaa1bee31bc0..69e6c93d2ff04 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -408,7 +408,7 @@ static inline void aa_put_profile(struct aa_profile *p)
kref_put(&p->label.count.count, aa_label_kref);
}
-static inline int AUDIT_MODE(struct aa_profile *profile)
+static inline int AUDIT_MODE(const struct aa_profile *profile)
{
if (aa_g_audit != AUDIT_NORMAL)
return aa_g_audit;
diff --git a/security/apparmor/label.c b/security/apparmor/label.c
index 667f20363ebf1..d0610e9d7961a 100644
--- a/security/apparmor/label.c
+++ b/security/apparmor/label.c
@@ -1253,9 +1253,9 @@ struct aa_label *aa_label_merge(struct aa_label *a, struct aa_label *b,
* If a subns profile is not to be matched should be prescreened with
* visibility test.
*/
-static inline aa_state_t match_component(struct aa_profile *profile,
+static inline aa_state_t match_component(const struct aa_profile *profile,
struct aa_ruleset *rules,
- struct aa_profile *tp,
+ const struct aa_profile *tp,
aa_state_t state)
{
const char *ns_name;
@@ -1287,7 +1287,7 @@ static inline aa_state_t match_component(struct aa_profile *profile,
* @perms should be preinitialized with allperms OR a previous permission
* check to be stacked.
*/
-static int label_compound_match(struct aa_profile *profile,
+static int label_compound_match(const struct aa_profile *profile,
struct aa_ruleset *rules,
struct aa_label *label,
aa_state_t state, bool inview, u32 request,
@@ -1343,7 +1343,7 @@ static int label_compound_match(struct aa_profile *profile,
* @perms should be preinitialized with allperms OR a previous permission
* check to be stacked.
*/
-static int label_components_match(struct aa_profile *profile,
+static int label_components_match(const struct aa_profile *profile,
struct aa_ruleset *rules,
struct aa_label *label, aa_state_t start,
bool inview, u32 request,
@@ -1402,7 +1402,7 @@ static int label_components_match(struct aa_profile *profile,
*
* Returns: the state the match finished in, may be the none matching state
*/
-int aa_label_match(struct aa_profile *profile, struct aa_ruleset *rules,
+int aa_label_match(const struct aa_profile *profile, struct aa_ruleset *rules,
struct aa_label *label, aa_state_t state, bool inview,
u32 request, struct aa_perms *perms)
{
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c
index 3b982770c4ceb..3a65dc82fd8eb 100644
--- a/security/apparmor/lib.c
+++ b/security/apparmor/lib.c
@@ -358,7 +358,8 @@ void aa_audit_perm_mask(struct audit_buffer *ab, u32 mask, const char *chrs,
*
* TODO: split into profile and ns based flags for when accumulating perms
*/
-void aa_apply_modes_to_perms(struct aa_profile *profile, struct aa_perms *perms)
+void aa_apply_modes_to_perms(const struct aa_profile *profile,
+ struct aa_perms *perms)
{
switch (AUDIT_MODE(profile)) {
case AUDIT_ALL:
@@ -383,7 +384,7 @@ void aa_apply_modes_to_perms(struct aa_profile *profile, struct aa_perms *perms)
perms->prompt = ALL_PERMS_MASK;
}
-void aa_profile_match_label(struct aa_profile *profile,
+void aa_profile_match_label(const struct aa_profile *profile,
struct aa_ruleset *rules,
struct aa_label *label,
int type, u32 request, struct aa_perms *perms)
diff --git a/security/apparmor/mount.c b/security/apparmor/mount.c
index 31f792817643c..f2cf3ec853e7d 100644
--- a/security/apparmor/mount.c
+++ b/security/apparmor/mount.c
@@ -278,7 +278,7 @@ static int do_match_mnt(struct aa_policydb *policy, aa_state_t start,
}
-static int path_flags(struct aa_profile *profile, const struct path *path)
+static int path_flags(const struct aa_profile *profile, const struct path *path)
{
AA_BUG(!profile);
AA_BUG(!path);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0041/2151] apparmor: fix profile leak when a policy load fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (39 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0040/2151] apparmor: constify aa_profile parameters on read-only compute paths Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0042/2151] hwmon: (chipcap2) Drop unnecessary include files Greg Kroah-Hartman
` (841 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Georgia Garcia, John Johansen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Georgia Garcia <georgia.garcia@canonical.com>
[ Upstream commit ce94927fa4173fcc1eca27bdc65a140064c8f1e6 ]
The error paths of aa_replace_profiles() and aa_unpack() do not break
the refcount cycle between label and proxy. They just aa_put_profile()
the new profiles, which drops the label refcount from 2 to 1, and the
proxy keeps the profile alive. Every failed atomic policy load
(e.g. "profile can not be replaced", or a later profile in the blob
failing to unpack) leaks every new profile in the set, along with its
proxy, rules and its loaddata reference.
The leak is usually not visible from userspace, because the raw_data
directory for a failed load is not created, but it becomes visible
when the blob is deduplicated onto an existing loaddata, which then
keeps its policy/raw_data/<rev> directory forever.
Add aa_put_unpublished_profile(), which drops the profile's own proxy
before putting the profile, and use it on those error paths. The
proxy of an unpacked profile is always freshly allocated and not
referenced by anything else before the profile is published, so
putting it is safe.
Fixes: 637f688dc3dc ("apparmor: switch from profiles to using labels on contexts")
Cc: stable@vger.kernel.org
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/apparmor/include/policy.h | 20 ++++++++++++++++++++
security/apparmor/policy.c | 3 +++
security/apparmor/policy_unpack.c | 4 +++-
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index 69e6c93d2ff04..50dcf0147ae2b 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -408,6 +408,26 @@ static inline void aa_put_profile(struct aa_profile *p)
kref_put(&p->label.count.count, aa_label_kref);
}
+/**
+ * aa_put_unpublished_profile - put a profile that was never made visible
+ * @p: profile (MAYBE NULL)
+ *
+ * A newly allocated profile and its proxy reference each other
+ * (proxy->label holds a label refcount). That cycle is normally broken
+ * when the profile is replaced or removed, which redirects the proxy.
+ * A profile that is discarded before being added to the policy tree
+ * never goes through either path, so break the cycle here, otherwise
+ * the profile, its proxy and its rawdata are leaked.
+ */
+static inline void aa_put_unpublished_profile(struct aa_profile *p)
+{
+ if (p && p->label.proxy) {
+ aa_put_proxy(p->label.proxy);
+ p->label.proxy = NULL;
+ }
+ aa_put_profile(p);
+}
+
static inline int AUDIT_MODE(const struct aa_profile *profile)
{
if (aa_g_audit != AUDIT_NORMAL)
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index 230d8428b4d31..e582df9327037 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -1434,6 +1434,9 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
}
list_for_each_entry_safe(ent, tmp, &lh, list) {
list_del_init(&ent->list);
+ /* new was never added to the policy tree */
+ aa_put_unpublished_profile(ent->new);
+ ent->new = NULL;
aa_load_ent_free(ent);
}
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index 8dc2adedc7ae1..3e16612d2284e 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -1556,11 +1556,13 @@ int aa_unpack(struct aa_loaddata *udata, struct list_head *lh,
fail_profile:
kfree(ns_name);
- aa_put_profile(profile);
+ aa_put_unpublished_profile(profile);
fail:
list_for_each_entry_safe(ent, tmp, lh, list) {
list_del_init(&ent->list);
+ aa_put_unpublished_profile(ent->new);
+ ent->new = NULL;
aa_load_ent_free(ent);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0042/2151] hwmon: (chipcap2) Drop unnecessary include files
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (40 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0041/2151] apparmor: fix profile leak when a policy load fails Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0043/2151] hwmon: chipcap2: serialize access to the alarm indicators Greg Kroah-Hartman
` (840 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Guenter Roeck, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 4c8d758d4ebff3780d09599f2c8db5d6af3ca2af ]
The driver does not perform any locking, does not execute or use any sleep
related functionality, and does not allocate memory. Drop the unnecessary
include files.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Stable-dep-of: 8c02722be2ca ("hwmon: chipcap2: synchronize ready IRQ state")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/chipcap2.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c
index 6026514a763d1..6d564199729ce 100644
--- a/drivers/hwmon/chipcap2.c
+++ b/drivers/hwmon/chipcap2.c
@@ -82,7 +82,6 @@ struct cc2_data {
struct completion complete;
struct device *hwmon;
struct i2c_client *client;
- struct mutex dev_access_lock; /* device access lock */
struct regulator *regulator;
const char *name;
int irq_ready;
@@ -575,8 +574,6 @@ static int cc2_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
{
struct cc2_data *data = dev_get_drvdata(dev);
- guard(mutex)(&data->dev_access_lock);
-
switch (type) {
case hwmon_temp:
return cc2_measurement(data, type, val);
@@ -617,8 +614,6 @@ static int cc2_write(struct device *dev, enum hwmon_sensor_types type, u32 attr,
if (val < 0 || val > CC2_RH_MAX)
return -EINVAL;
- guard(mutex)(&data->dev_access_lock);
-
switch (attr) {
case hwmon_humidity_min:
cmd = CC2_W_ALARM_L_ON;
@@ -712,8 +707,6 @@ static int cc2_probe(struct i2c_client *client)
i2c_set_clientdata(client, data);
- mutex_init(&data->dev_access_lock);
-
data->client = client;
data->regulator = devm_regulator_get_exclusive(dev, "vdd");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0043/2151] hwmon: chipcap2: serialize access to the alarm indicators
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (41 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0042/2151] hwmon: (chipcap2) Drop unnecessary include files Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0044/2151] hwmon: chipcap2: synchronize ready IRQ state Greg Kroah-Hartman
` (839 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Javier Carrasco, Guenter Roeck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
[ Upstream commit bed5f0c075eb99442fca6a61c009a32752eceda2 ]
low_alarm and high_alarm are accessed from the threaded interrupt
handlers and from sysfs without any locking, which can lead to lost
alarms.
Add a mutex to serialize the access to the alarm indicators and to
process_irqs, which the handlers use to decide whether an interrupt
belongs to an ongoing operation.
Fixes: 3af350929e75 ("hwmon: Add support for Amphenol ChipCap 2")
Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20261014-chipcap2_locks-v3-10-27ebfc2c5b9e@gmail.com
[groeck: Dropped obsolete 'Assisted-by: tag]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Stable-dep-of: 8c02722be2ca ("hwmon: chipcap2: synchronize ready IRQ state")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/chipcap2.c | 58 +++++++++++++++++++++++++---------------
1 file changed, 37 insertions(+), 21 deletions(-)
diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c
index 6d564199729ce..8dca9d1e9945d 100644
--- a/drivers/hwmon/chipcap2.c
+++ b/drivers/hwmon/chipcap2.c
@@ -20,6 +20,7 @@
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
+#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/unaligned.h>
#include <linux/regulator/consumer.h>
@@ -88,6 +89,8 @@ struct cc2_data {
int irq_low;
int irq_high;
bool process_irqs;
+ /* protects process_irqs and the alarm indicators */
+ struct mutex irq_lock;
bool regulator_enabled;
};
@@ -119,7 +122,8 @@ static int cc2_enable(struct cc2_data *data)
/* exclusive regulator, check in case a disable failed */
if (data->regulator_enabled) {
- data->process_irqs = true;
+ scoped_guard(mutex, &data->irq_lock)
+ data->process_irqs = true;
return 0;
}
@@ -134,7 +138,8 @@ static int cc2_enable(struct cc2_data *data)
usleep_range(CC2_STARTUP_TIME_US, CC2_STARTUP_TIME_US + 125);
- data->process_irqs = true;
+ scoped_guard(mutex, &data->irq_lock)
+ data->process_irqs = true;
return 0;
}
@@ -151,7 +156,8 @@ static void cc2_disable(struct cc2_data *data)
synchronize_irq(data->irq_high);
/* ignore alarms triggered by voltage toggling when powering up */
- data->process_irqs = false;
+ scoped_guard(mutex, &data->irq_lock)
+ data->process_irqs = false;
/* exclusive regulator, check in case an enable failed */
if (!data->regulator_enabled)
@@ -507,10 +513,12 @@ static irqreturn_t cc2_low_interrupt(int irq, void *data)
{
struct cc2_data *cc2 = data;
- if (cc2->process_irqs) {
- hwmon_notify_event(cc2->hwmon, hwmon_humidity,
- hwmon_humidity_min_alarm, 0);
- cc2->rh_alarm.low_alarm = true;
+ scoped_guard(mutex, &cc2->irq_lock) {
+ if (cc2->process_irqs) {
+ hwmon_notify_event(cc2->hwmon, hwmon_humidity,
+ hwmon_humidity_min_alarm, 0);
+ cc2->rh_alarm.low_alarm = true;
+ }
}
return IRQ_HANDLED;
@@ -520,10 +528,12 @@ static irqreturn_t cc2_high_interrupt(int irq, void *data)
{
struct cc2_data *cc2 = data;
- if (cc2->process_irqs) {
- hwmon_notify_event(cc2->hwmon, hwmon_humidity,
- hwmon_humidity_max_alarm, 0);
- cc2->rh_alarm.high_alarm = true;
+ scoped_guard(mutex, &cc2->irq_lock) {
+ if (cc2->process_irqs) {
+ hwmon_notify_event(cc2->hwmon, hwmon_humidity,
+ hwmon_humidity_max_alarm, 0);
+ cc2->rh_alarm.high_alarm = true;
+ }
}
return IRQ_HANDLED;
@@ -539,11 +549,13 @@ static int cc2_humidity_min_alarm_status(struct cc2_data *data, long *val)
if (ret < 0)
return ret;
- if (data->rh_alarm.low_alarm) {
- *val = (measurement < min_hyst) ? 1 : 0;
- data->rh_alarm.low_alarm = *val;
- } else {
- *val = 0;
+ scoped_guard(mutex, &data->irq_lock) {
+ if (data->rh_alarm.low_alarm) {
+ *val = (measurement < min_hyst) ? 1 : 0;
+ data->rh_alarm.low_alarm = *val;
+ } else {
+ *val = 0;
+ }
}
return 0;
@@ -559,11 +571,13 @@ static int cc2_humidity_max_alarm_status(struct cc2_data *data, long *val)
if (ret < 0)
return ret;
- if (data->rh_alarm.high_alarm) {
- *val = (measurement > max_hyst) ? 1 : 0;
- data->rh_alarm.high_alarm = *val;
- } else {
- *val = 0;
+ scoped_guard(mutex, &data->irq_lock) {
+ if (data->rh_alarm.high_alarm) {
+ *val = (measurement > max_hyst) ? 1 : 0;
+ data->rh_alarm.high_alarm = *val;
+ } else {
+ *val = 0;
+ }
}
return 0;
@@ -707,6 +721,8 @@ static int cc2_probe(struct i2c_client *client)
i2c_set_clientdata(client, data);
+ mutex_init(&data->irq_lock);
+
data->client = client;
data->regulator = devm_regulator_get_exclusive(dev, "vdd");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0044/2151] hwmon: chipcap2: synchronize ready IRQ state
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (42 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0043/2151] hwmon: chipcap2: serialize access to the alarm indicators Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0045/2151] platform/x86: hp-wmi: Order DMI board name arrays Greg Kroah-Hartman
` (838 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Javier Carrasco, Guenter Roeck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
[ Upstream commit 8c02722be2caa6604a837b81faeaba78250eda4a ]
The ready IRQ handler can race with reinit_completion() in the enable
path. In particular, a handler from an earlier operation can complete
the completion after it is reset for a new operation.
Use irq_lock to serialize access to the completion and process_irqs.
Disable IRQ processing and synchronize any running handler before resetting
the completion for a new operation.
Fixes: 3af350929e75 ("hwmon: Add support for Amphenol ChipCap 2")
Cc: stable@vger.kernel.org
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20261014-chipcap2_locks-v3-11-27ebfc2c5b9e@gmail.com
[groeck: Dropped obsolete 'Assisted-by: tag]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/chipcap2.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/hwmon/chipcap2.c b/drivers/hwmon/chipcap2.c
index 8dca9d1e9945d..2bbb707cc1f5a 100644
--- a/drivers/hwmon/chipcap2.c
+++ b/drivers/hwmon/chipcap2.c
@@ -120,6 +120,16 @@ static int cc2_enable(struct cc2_data *data)
{
int ret;
+ if (data->irq_ready > 0) {
+ scoped_guard(mutex, &data->irq_lock)
+ data->process_irqs = false;
+
+ synchronize_irq(data->irq_ready);
+
+ scoped_guard(mutex, &data->irq_lock)
+ reinit_completion(&data->complete);
+ }
+
/* exclusive regulator, check in case a disable failed */
if (data->regulator_enabled) {
scoped_guard(mutex, &data->irq_lock)
@@ -127,9 +137,6 @@ static int cc2_enable(struct cc2_data *data)
return 0;
}
- /* clear any pending completion */
- try_wait_for_completion(&data->complete);
-
ret = regulator_enable(data->regulator);
if (ret < 0)
return ret;
@@ -159,6 +166,9 @@ static void cc2_disable(struct cc2_data *data)
scoped_guard(mutex, &data->irq_lock)
data->process_irqs = false;
+ if (data->irq_ready > 0)
+ synchronize_irq(data->irq_ready);
+
/* exclusive regulator, check in case an enable failed */
if (!data->regulator_enabled)
return;
@@ -503,8 +513,10 @@ static irqreturn_t cc2_ready_interrupt(int irq, void *data)
{
struct cc2_data *cc2 = data;
- if (cc2->process_irqs)
- complete(&cc2->complete);
+ scoped_guard(mutex, &cc2->irq_lock) {
+ if (cc2->process_irqs)
+ complete(&cc2->complete);
+ }
return IRQ_HANDLED;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0045/2151] platform/x86: hp-wmi: Order DMI board name arrays
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (43 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0044/2151] hwmon: chipcap2: synchronize ready IRQ state Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0046/2151] platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support Greg Kroah-Hartman
` (837 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ilpo Järvinen, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[ Upstream commit 68779adbabdbb1891ba4d9b8c7d3be99ed5e0b3d ]
The hp-wmi driver has a number of arrays that are getting new entries
and all/most entries have been added to the end of the array. As a
result, the numerical order is mixed up in a few entries.
Reorder the array entries. Split lines for each two leading chars to
make the arrays easier to read.
Add also trailing commas.
Link: https://patch.msgid.link/20251128120215.4450-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Stable-dep-of: d35a1ea827a2 ("platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/hp/hp-wmi.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index f92bb3dca2e30..9a9ff35c3b954 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -123,12 +123,16 @@ static struct thermal_profile_params *active_thermal_profile_params;
* contains "PerformanceControl".
*/
static const char * const omen_thermal_profile_boards[] = {
- "84DA", "84DB", "84DC", "8574", "8575", "860A", "87B5", "8572", "8573",
- "8600", "8601", "8602", "8605", "8606", "8607", "8746", "8747", "8749",
- "874A", "8603", "8604", "8748", "886B", "886C", "878A", "878B", "878C",
- "88C8", "88CB", "8786", "8787", "8788", "88D1", "88D2", "88F4", "88FD",
- "88F5", "88F6", "88F7", "88FE", "88FF", "8900", "8901", "8902", "8912",
- "8917", "8918", "8949", "894A", "89EB", "8BAD", "8A42", "8A15"
+ "84DA", "84DB", "84DC",
+ "8572", "8573", "8574", "8575",
+ "8600", "8601", "8602", "8603", "8604", "8605", "8606", "8607", "860A",
+ "8746", "8747", "8748", "8749", "874A", "8786", "8787", "8788", "878A",
+ "878B", "878C", "87B5",
+ "886B", "886C", "88C8", "88CB", "88D1", "88D2", "88F4", "88F5", "88F6",
+ "88F7", "88FD", "88FE", "88FF",
+ "8900", "8901", "8902", "8912", "8917", "8918", "8949", "894A", "89EB",
+ "8A15", "8A42",
+ "8BAD",
};
/* DMI Board names of Omen laptops that are specifically set to be thermal
@@ -136,7 +140,8 @@ static const char * const omen_thermal_profile_boards[] = {
* the get system design information WMI call returns
*/
static const char * const omen_thermal_profile_force_v0_boards[] = {
- "8607", "8746", "8747", "8749", "874A", "8748"
+ "8607",
+ "8746", "8747", "8748", "8749", "874A",
};
/* DMI board names of Omen laptops that have a thermal profile timer which will
@@ -144,12 +149,13 @@ static const char * const omen_thermal_profile_force_v0_boards[] = {
* "balanced" when reaching zero.
*/
static const char * const omen_timed_thermal_profile_boards[] = {
- "8BAD", "8A42", "8A15"
+ "8A15", "8A42",
+ "8BAD",
};
/* DMI Board names of Victus 16-d1xxx laptops */
static const char * const victus_thermal_profile_boards[] = {
- "8A25"
+ "8A25",
};
/* DMI Board names of Victus 16-r and Victus 16-s laptops */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0046/2151] platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (44 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0045/2151] platform/x86: hp-wmi: Order DMI board name arrays Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0047/2151] inet: frags: bound the wmem charge of the socket completing a reassembly Greg Kroah-Hartman
` (836 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ciro Pedrini, Ilpo Järvinen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ciro Pedrini <ciro.pedrini@gmail.com>
[ Upstream commit d35a1ea827a2efaea7fb059ffafefae7c13b9556 ]
The HP OMEN 17-ck1xxx (board 8A17) isn't in omen_thermal_profile_boards,
so hp-wmi uses the generic thermal profile query. The firmware only
stores that value and never acts on it, so the EC stays in its default
mode and the CPU is held at 45 W whatever profile is selected.
The board uses the OMEN interface (mode byte at EC 0x95, thermal policy
v1) and also needs the timed profile quirk: without it, the EC drops
back to the default mode about two minutes after each profile change.
Add 8A17 to omen_thermal_profile_boards and
omen_timed_thermal_profile_boards.
With this, all three profiles work and sustained package power under
load goes from 45 W to 56-79 W.
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ciro Pedrini <ciro.pedrini@gmail.com>
Link: https://patch.msgid.link/20260925205226.883724-1-ciro.pedrini@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[ sashal: adjusted board-list context to account for missing 8A18 and 8A43 entries ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/hp/hp-wmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 9a9ff35c3b954..71b246378d39f 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -131,7 +131,7 @@ static const char * const omen_thermal_profile_boards[] = {
"886B", "886C", "88C8", "88CB", "88D1", "88D2", "88F4", "88F5", "88F6",
"88F7", "88FD", "88FE", "88FF",
"8900", "8901", "8902", "8912", "8917", "8918", "8949", "894A", "89EB",
- "8A15", "8A42",
+ "8A15", "8A17", "8A42",
"8BAD",
};
@@ -149,7 +149,7 @@ static const char * const omen_thermal_profile_force_v0_boards[] = {
* "balanced" when reaching zero.
*/
static const char * const omen_timed_thermal_profile_boards[] = {
- "8A15", "8A42",
+ "8A15", "8A17", "8A42",
"8BAD",
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0047/2151] inet: frags: bound the wmem charge of the socket completing a reassembly
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (45 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0046/2151] platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0048/2151] io_uring/eventfd: reset deferred signal state Greg Kroah-Hartman
` (835 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Paolo Abeni, Eric Dumazet,
Ido Schimmel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@kernel.org>
[ Upstream commit b71c101bbb9814d163c00234d43c41f0a17907d4 ]
When a socket owned fragment completes a reassembly queue,
inet_frag_reasm_prepare() and inet_frag_reasm_finish() charge the
truesize of all other fragments to its sk_wmem_alloc. These fragments
were orphaned when queued, and might have been sent by someone else,
for instance padded TUN packets.
Commit 3ae20e4697eb ("inet: frags: limit the truesize of a reassembly
queue") bounds this charge to INT_MAX / 2 per queue, but a socket can
complete several queues while the reassembled skbs are still alive,
for instance held in a qdisc. sk_wmem_alloc can then go past INT_MAX,
refcount_add() saturates it with a WARN, and the socket is leaked.
This is reachable from an unprivileged user/network namespace, by
raising ipfrag_high_thresh.
Refuse the reassembly if the charge would push sk_wmem_alloc above
2 * sk_sndbuf, the bound ip_append_data() uses, plus 4MB of slack for
fragments inflated by a refragmentation with a small MTU, and never
above INT_MAX / 2. The cap matters for tun sockets, which use
sk_sndbuf = INT_MAX, and whose skbs are still owned when act_ct or
openvswitch reassemble them at ingress.
Several queues can complete at the same time on different cpus for
the same socket, so the charge is reserved with a cmpxchg() loop in
inet_frag_reasm_prepare(), before it modifies the queue, and settled
in inet_frag_reasm_finish(). Move the size checks of ip_frag_reasm(),
ip6_frag_reasm() and nf_ct_frag6_reasm() before
inet_frag_reasm_prepare(), using the first fragment which becomes the
head, so that a successful inet_frag_reasm_prepare() is always followed
by inet_frag_reasm_finish(). All callers already kill the queue when
inet_frag_reasm_prepare() returns NULL.
Found by code inspection (AI review), not reproduced.
Fixes: 18685451fc4e ("inet: inet_defrag: prevent sk release while still in use")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Closes: https://lore.kernel.org/netdev/24feda7d-ae49-45af-9596-2cc5f149f28e@redhat.com/
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20261104122927.1033747-1-edumazet@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/ipv4/inet_fragment.c | 61 ++++++++++++++++++++++---
net/ipv4/ip_fragment.c | 13 ++++--
net/ipv6/netfilter/nf_conntrack_reasm.c | 13 ++++--
net/ipv6/reassembly.c | 13 ++++--
4 files changed, 78 insertions(+), 22 deletions(-)
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 436b8737b2b66..4d55444a6f30f 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -17,6 +17,7 @@
#include <linux/rtnetlink.h>
#include <linux/slab.h>
#include <linux/rhashtable.h>
+#include <linux/sizes.h>
#include <net/sock.h>
#include <net/inet_frag.h>
@@ -516,6 +517,43 @@ int inet_frag_queue_insert(struct inet_frag_queue *q, struct sk_buff *skb,
}
EXPORT_SYMBOL(inet_frag_queue_insert);
+/* When a socket owned fragment completes a queue, the truesize of all
+ * other fragments is charged to its sk_wmem_alloc, although they were
+ * orphaned when queued and possibly sent by someone else.
+ * Bound this like ip_append_data() bounds the memory a socket can
+ * allocate (2 * sk_sndbuf), plus slack for fragments inflated by a
+ * refragmentation using a small MTU. Otherwise, several reassembled skbs
+ * alive at the same time can saturate sk_wmem_alloc, and leak the socket.
+ *
+ * Several queues can complete at the same time for the same socket,
+ * and some sockets (tun) use sk_sndbuf = INT_MAX. The charge is reserved
+ * with a cmpxchg() loop, a refcount_t has no helper for this.
+ */
+#define INET_FRAG_WMEM_SLACK SZ_4M
+
+static bool inet_frag_wmem_reserve(struct sock *sk, unsigned int charge)
+{
+ u64 limit = 2ULL * READ_ONCE(sk->sk_sndbuf) + INET_FRAG_WMEM_SLACK;
+ int old = refcount_read(&sk->sk_wmem_alloc);
+
+ limit = min_t(u64, limit, INET_FRAG_MAX_TRUESIZE);
+ do {
+ if (old <= 0 || (u64)old + charge > limit)
+ return false;
+ } while (!atomic_try_cmpxchg(&sk->sk_wmem_alloc.refs, &old,
+ old + charge));
+
+ return true;
+}
+
+static void inet_frag_wmem_adjust(struct sock *sk, int delta)
+{
+ if (delta >= 0)
+ refcount_add(delta, &sk->sk_wmem_alloc);
+ else
+ WARN_ON_ONCE(refcount_sub_and_test(-delta, &sk->sk_wmem_alloc));
+}
+
void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
struct sk_buff *parent)
{
@@ -527,6 +565,11 @@ void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
int delta;
if (sk && is_skb_wmem(skb)) {
+ /* skb->truesize is already charged to sk, and is part of
+ * q->truesize. inet_frag_reasm_finish() settles the charge.
+ */
+ if (!inet_frag_wmem_reserve(sk, q->truesize - skb->truesize))
+ return NULL;
/* TX: skb->sk might have been passed as argument to
* dst->output and must remain valid until tx completes.
*
@@ -604,17 +647,18 @@ void *inet_frag_reasm_prepare(struct inet_frag_queue *q, struct sk_buff *skb,
out_restore_sk:
if (orig_truesize) {
- int ts_delta = head->truesize - orig_truesize;
-
/* if this reassembled skb is fragmented later,
* fraglist skbs will get skb->sk assigned from head->sk,
* and each frag skb will be released via sock_wfree.
- *
- * Update sk_wmem_alloc.
*/
head->sk = sk;
head->destructor = destructor;
- refcount_add(ts_delta, &sk->sk_wmem_alloc);
+ /* On failure, head stays in the queue and will be freed
+ * with the queue: only charge its truesize.
+ */
+ if (!nextp)
+ inet_frag_wmem_adjust(sk, (int)head->truesize -
+ (int)q->truesize);
}
return nextp;
@@ -625,7 +669,6 @@ void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head,
void *reasm_data, bool try_coalesce)
{
struct sock *sk = is_skb_wmem(head) ? head->sk : NULL;
- const unsigned int head_truesize = head->truesize;
struct sk_buff **nextp = reasm_data;
struct rb_node *rbn;
struct sk_buff *fp;
@@ -690,8 +733,12 @@ void inet_frag_reasm_finish(struct inet_frag_queue *q, struct sk_buff *head,
head->tstamp = q->stamp;
head->tstamp_type = q->tstamp_type;
+ /* After inet_frag_reasm_prepare(), q->truesize is charged to sk.
+ * sum_truesize also includes what it added (skb_unclone() and
+ * frag_list clone).
+ */
if (sk)
- refcount_add(sum_truesize - head_truesize, &sk->sk_wmem_alloc);
+ inet_frag_wmem_adjust(sk, sum_truesize - (int)q->truesize);
}
EXPORT_SYMBOL(inet_frag_reasm_finish);
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index c790d2f494870..03e19a29df05e 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -412,16 +412,19 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,
goto out_fail;
}
+ /* Check the size on the first fragment, which will become the head:
+ * inet_frag_reasm_finish() must follow inet_frag_reasm_prepare().
+ */
+ len = ip_hdrlen(skb_rb_first(&qp->q.rb_fragments)) + qp->q.len;
+ err = -E2BIG;
+ if (len > 65535)
+ goto out_oversize;
+
/* Make the one we just received the head. */
reasm_data = inet_frag_reasm_prepare(&qp->q, skb, prev_tail);
if (!reasm_data)
goto out_nomem;
- len = ip_hdrlen(skb) + qp->q.len;
- err = -E2BIG;
- if (len > 65535)
- goto out_oversize;
-
inet_frag_reasm_finish(&qp->q, skb, reasm_data,
ip_frag_coalesce_ok(qp));
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 599c49bf0a0af..02341c64baaa6 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -330,11 +330,10 @@ static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
if (unlikely(ecn == 0xff))
goto err;
- reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
- if (!reasm_data)
- goto err;
-
- payload_len = -skb_network_offset(skb) -
+ /* Check the size on the first fragment, which will become the head:
+ * inet_frag_reasm_finish() must follow inet_frag_reasm_prepare().
+ */
+ payload_len = -skb_network_offset(skb_rb_first(&fq->q.rb_fragments)) -
sizeof(struct ipv6hdr) + fq->q.len -
sizeof(struct frag_hdr);
if (payload_len > IPV6_MAXPLEN) {
@@ -343,6 +342,10 @@ static int nf_ct_frag6_reasm(struct frag_queue *fq, struct sk_buff *skb,
goto err;
}
+ reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
+ if (!reasm_data)
+ goto err;
+
/* We have to remove fragment header from datagram and to relocate
* header in order to calculate ICV correctly. */
skb_network_header(skb)[fq->nhoffset] = skb_transport_header(skb)[0];
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index c10a8a9d607e8..a5e0cec45974a 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -271,16 +271,19 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *skb,
if (unlikely(ecn == 0xff))
goto out_fail;
- reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
- if (!reasm_data)
- goto out_oom;
-
- payload_len = -skb_network_offset(skb) -
+ /* Check the size on the first fragment, which will become the head:
+ * inet_frag_reasm_finish() must follow inet_frag_reasm_prepare().
+ */
+ payload_len = -skb_network_offset(skb_rb_first(&fq->q.rb_fragments)) -
sizeof(struct ipv6hdr) + fq->q.len -
sizeof(struct frag_hdr);
if (payload_len > IPV6_MAXPLEN)
goto out_oversize;
+ reasm_data = inet_frag_reasm_prepare(&fq->q, skb, prev_tail);
+ if (!reasm_data)
+ goto out_oom;
+
/* We have to remove fragment header from datagram and to relocate
* header in order to calculate ICV correctly. */
nhoff = fq->nhoffset;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0048/2151] io_uring/eventfd: reset deferred signal state
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (46 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0047/2151] inet: frags: bound the wmem charge of the socket completing a reassembly Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0049/2151] alpha: select SYSCTL_EXCEPTION_TRACE Greg Kroah-Hartman
` (834 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yufan Chen, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yufan Chen <ericterminal@gmail.com>
[ Upstream commit 04fe9aeb4f3c0999e6715385664c677469dfd8f4 ]
Recursive eventfd wakeups must defer io_uring eventfd signaling because
eventfd_signal_mask() rejects reentry from eventfd wakeup handlers. The
io_ev_fd ops bit tracks an outstanding deferred signal so that the same
rcu_head is not queued twice.
That bit is only set today. Once the first deferred callback runs, later
recursive notifications still see the bit set and skip queueing another
deferred signal. This can leave new completions without a matching
eventfd wake after the first recursive deferral.
Clear the pending bit before issuing the deferred signal. If the wakeup
path recurses while the callback runs, a new signal can be queued for
the next RCU grace period while the current callback keeps its reference
until it returns.
Signed-off-by: Yufan Chen <ericterminal@gmail.com>
Fixes: 60b6c075e8eb ("io_uring/eventfd: move to more idiomatic RCU free usage")
Link: https://patch.msgid.link/20260503175710.37209-1-yufan.chen@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
io_uring/eventfd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/io_uring/eventfd.c b/io_uring/eventfd.c
index 7a57dd88304a6..89b6e0f67e559 100644
--- a/io_uring/eventfd.c
+++ b/io_uring/eventfd.c
@@ -43,6 +43,7 @@ static void io_eventfd_do_signal(struct rcu_head *rcu)
{
struct io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu);
+ atomic_andnot(BIT(IO_EVENTFD_OP_SIGNAL_BIT), &ev_fd->ops);
eventfd_signal_mask(ev_fd->cq_ev_fd, EPOLL_URING_WAKE);
io_eventfd_put(ev_fd);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0049/2151] alpha: select SYSCTL_EXCEPTION_TRACE
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (47 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0048/2151] io_uring/eventfd: reset deferred signal state Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0050/2151] can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices Greg Kroah-Hartman
` (833 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matt Turner, Magnus Lindholm,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matt Turner <mattst88@gmail.com>
[ Upstream commit e517a172b77601839e1c52ac4303602e285804bb ]
Report unhandled user faults the way other architectures do, and hook up
the debug.exception-trace sysctl that controls the reporting.
The message gives the faulting address, the PC and the user stack
pointer, and is rate limited.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Link: https://lore.kernel.org/r/20260905-arch-kconfig-options-v2-v2-17-83e8245761a2@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/alpha/Kconfig | 1 +
arch/alpha/mm/fault.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 80367f2cf821c..de8d272b4a35d 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -39,6 +39,7 @@ config ALPHA
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
select MMU_GATHER_NO_RANGE
select SPARSEMEM_EXTREME if SPARSEMEM
+ select SYSCTL_EXCEPTION_TRACE
select ZONE_DMA
help
The Alpha is a 64-bit general-purpose processor designed and
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 53e170e965915..63a24afa7a155 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -28,8 +28,32 @@
#include <linux/uaccess.h>
#include <linux/perf_event.h>
+#include <asm/pal.h>
+
extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *);
+int show_unhandled_signals = 1;
+
+static void
+show_signal_msg(struct pt_regs *regs, unsigned long address, int signo,
+ const char *desc)
+{
+ const char *level;
+
+ if (!show_unhandled_signals || !unhandled_signal(current, signo))
+ return;
+ if (!printk_ratelimit())
+ return;
+
+ /* Losing init is fatal, so shout about it. */
+ level = task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG;
+
+ printk("%s%s[%d]: %s at %016lx pc %016lx sp %016lx\n",
+ level, current->comm, task_pid_nr(current), desc,
+ address, regs->pc, rdusp());
+ print_vma_addr(KERN_CONT " in ", regs->pc);
+ printk(KERN_CONT "\n");
+}
/*
* Force a new ASN for a task.
@@ -223,6 +247,8 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
mmap_read_unlock(mm);
/* Send a sigbus, regardless of whether we were in kernel
or user mode. */
+ if (user_mode(regs))
+ show_signal_msg(regs, address, SIGBUS, "bus error");
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address);
if (!user_mode(regs))
goto no_context;
@@ -244,6 +270,9 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
return;
do_sigsegv:
+ show_signal_msg(regs, address, SIGSEGV,
+ si_code == SEGV_MAPERR ? "unmapped access"
+ : "access violation");
force_sig_fault(SIGSEGV, si_code, (void __user *) address);
return;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0050/2151] can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (48 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0049/2151] alpha: select SYSCTL_EXCEPTION_TRACE Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0051/2151] Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728 Greg Kroah-Hartman
` (832 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vincent Mailhol, stable,
Marc Kleine-Budde, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Mailhol <mailhol@kernel.org>
[ Upstream commit 0fce44e29fce4b07642491b098afb41bd571e4f2 ]
Sending a PF_PACKET bypasses the CAN framework logic and can directly
reach a CAN driver's xmit() function. The PF_PACKET framework only
checks that skb->len does not exceed the net_device MTU.
For a CAN device that is not CAN XL capable, anything above CANFD_MTU
(72 bytes) is therefore dropped before it reaches the driver. However,
CAN XL frames are variable length. can_is_canxl_skb() accepts lengths in
the range CANXL_HDR_SIZE + CANXL_MIN_DLEN up to CANXL_MTU, i.e. 13 to
2060 bytes.
As a result, an ETH_P_CANXL skb with a length between 13 and 72 bytes
can pass both the MTU and the can_dropped_invalid_skb() checks.
A driver that does not support CAN XL will interpret canxl_frame->flags
as a length because of the overlap with can_frame->len. And because
CANXL_XLF is set, the resulting length is between 128 and 255. For
drivers that do not check can_frame->len before copying can_frame->data,
as most drivers do, this results in a buffer overflow of up to 247
bytes.
Drop ETH_P_CANXL skbs if the device does not have the CAN_CAP_XL
capability. Keep can_is_canxl_skb() for the validation of CAN XL skbs.
Closes: https://sashiko.dev/#/patchset/20260731-master-v5-0-5b27029dee20@qq.com?part=1
Fixes: fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames")
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Link: https://patch.msgid.link/20260731-drop_canxl_frames-v1-1-7387b70353b3@kernel.org
Cc: stable@kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[ sashal: Replaced can_cap_enabled(dev, CAN_CAP_XL) with can_is_canxl_dev_mtu(dev->mtu) because the capability API is unavailable. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/can/dev/skb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/dev/skb.c b/drivers/net/can/dev/skb.c
index 6fb1f9b2a9e20..b643995fc5369 100644
--- a/drivers/net/can/dev/skb.c
+++ b/drivers/net/can/dev/skb.c
@@ -354,7 +354,7 @@ bool can_dropped_invalid_skb(struct net_device *dev, struct sk_buff *skb)
break;
case ETH_P_CANXL:
- if (!can_is_canxl_skb(skb))
+ if (!can_is_canxl_dev_mtu(dev->mtu) || !can_is_canxl_skb(skb))
goto inval_skb;
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0051/2151] Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (49 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0050/2151] can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0052/2151] ALSA: pcm: Optimize cpu_latency_qos_*() calls Greg Kroah-Hartman
` (831 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andy Tsvetinskiy, Junjie Cao,
Luiz Augusto von Dentz, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junjie Cao <junjie.cao@intel.com>
[ Upstream commit df5e35f1663abc2702cf9f9e7eba024129ac5df1 ]
Commit 5ead2063611a ("Bluetooth: btrtl: fix RTL8761B/BU broken LE
extended scan") set HCI_QUIRK_BROKEN_EXT_SCAN on every RTL8761B, and
commit ca0583c24661 ("Bluetooth: btusb: limit RTL8761B BROKEN_EXT_SCAN
quirk to 0bda:a728") kept it on 0bda:a728 on the assumption that the
USB id separates dongles with broken extended scan from those with a
broken legacy scan path. It does not. An 0bda:a728 unit (RTL8761BUV,
fw 0xdfc6d922) on 6.18.51 fails the same way the UB500 and 0bda:8771
did: LE Set Scan Enable (0x200c) times out with -110 and btusb resets
the device. With the flag removed from the table entry, scanning works
on that unit.
Two dongles with the same USB id need opposite settings, so the device
table cannot key the quirk either. The costs are not symmetric. Without
the quirk, the unit it was written for gets -EBUSY on LE Set Extended
Scan Enable (0x2042) while a connection is up. With it, 0x200c times
out and btusb resets the device on three reported units, two of them in
a re-enumeration loop.
Remove the flag and the table entry. 0bda:a728 matches the generic
Realtek entry again and runs without the quirk, as before v7.2.
Reported-by: Andy Tsvetinskiy <andrew.tsvetinskiy@gmail.com>
Closes: https://lore.kernel.org/all/CAE4bxw+ofDFVx0aTHqCrzns9oP1CRQDm_wzeyHPeMBYOhSpcuA@mail.gmail.com/
Fixes: 5ead2063611a ("Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan")
Fixes: ca0583c24661 ("Bluetooth: btusb: limit RTL8761B BROKEN_EXT_SCAN quirk to 0bda:a728")
Cc: stable@vger.kernel.org
Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
[ sashal: Adapted the patch to the Bluetooth USB driver's original source filename. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/bluetooth/btusb.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5b8b71efffac9..1ee552949b95f 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -67,7 +67,6 @@ static struct usb_driver btusb_driver;
#define BTUSB_INTEL_NO_WBS_SUPPORT BIT(26)
#define BTUSB_ACTIONS_SEMI BIT(27)
#define BTUSB_BARROT BIT(28)
-#define BTUSB_BROKEN_EXT_SCAN BIT(29)
static const struct usb_device_id btusb_table[] = {
/*
@@ -633,10 +632,6 @@ static const struct usb_device_id quirks_table[] = {
{ USB_DEVICE(0x0489, 0xe130), .driver_info = BTUSB_REALTEK |
BTUSB_WIDEBAND_SPEECH },
- /* Realtek 8761BU Bluetooth devices */
- { USB_DEVICE(0x0bda, 0xa728), .driver_info = BTUSB_REALTEK |
- BTUSB_BROKEN_EXT_SCAN },
-
/* Realtek Bluetooth devices */
{ USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
.driver_info = BTUSB_REALTEK },
@@ -4349,9 +4344,6 @@ static int btusb_probe(struct usb_interface *intf,
if (id->driver_info & BTUSB_INVALID_LE_STATES)
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_LE_STATES);
- if (id->driver_info & BTUSB_BROKEN_EXT_SCAN)
- hci_set_quirk(hdev, HCI_QUIRK_BROKEN_EXT_SCAN);
-
if (id->driver_info & BTUSB_DIGIANSWER) {
data->cmdreq_type = USB_TYPE_VENDOR;
hci_set_quirk(hdev, HCI_QUIRK_RESET_ON_CLOSE);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0052/2151] ALSA: pcm: Optimize cpu_latency_qos_*() calls
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (50 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0051/2151] Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728 Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0053/2151] ALSA: pcm: Prevent O_APPEND open on OSS streams Greg Kroah-Hartman
` (830 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Takashi Iwai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 9f6f4e97fd53908aecb0979507d9ff10a22288eb ]
We have a few cpu_latency_qos_*() calls in PCM callbacks, but they
seem suboptimal in a few aspects:
- We call them at each time when the hw_params changed, but explicitly
do remove and (re-)add; this could be
cpu_latency_qos_update_request(), instead
- The setup of cpu_latency_qos_*() doesn't have to be in hw_params at
all; it's not the place where the actual parameters are set up, but
rather better at the prepare callback.
- The hw_free calls cpu_latency_qos_remove_request() unconditionally,
which may be poking a WARNING when it wasn't queued.
For addressing the issues above, this patch cleans up and reorganize
the cpu_latency_qos_*() calls in the PCM core by a couple helper
functions. Now, they are set up at prepare callback, and cleared at
hw_free and release callbacks via the new helpers.
Link: https://patch.msgid.link/20261002150420.879056-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stable-dep-of: 9017bc3d13da ("ALSA: pcm: Prevent O_APPEND open on OSS streams")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/core/pcm_native.c | 35 +++++++++++++++++++++++++----------
1 file changed, 25 insertions(+), 10 deletions(-)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 553fad5300e10..7dab7ba130c0b 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -751,11 +751,32 @@ EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
#define is_oss_stream(substream) false
#endif
+static void pcm_qos_req_clear(struct snd_pcm_substream *substream)
+{
+ if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
+ cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
+}
+
+static void pcm_qos_req_update(struct snd_pcm_substream *substream, int usecs)
+{
+ if (usecs < 0) {
+ pcm_qos_req_clear(substream);
+ return;
+ }
+
+ if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
+ cpu_latency_qos_update_request(&substream->latency_pm_qos_req,
+ usecs);
+ else
+ cpu_latency_qos_add_request(&substream->latency_pm_qos_req,
+ usecs);
+}
+
static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
struct snd_pcm_runtime *runtime;
- int err, usecs;
+ int err;
unsigned int bits;
snd_pcm_uframes_t frames;
@@ -862,12 +883,6 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
snd_pcm_timer_resolution_change(substream);
snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP);
- if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
- cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
- usecs = period_to_usecs(runtime);
- if (usecs >= 0)
- cpu_latency_qos_add_request(&substream->latency_pm_qos_req,
- usecs);
err = 0;
_error:
if (err) {
@@ -944,7 +959,7 @@ static int snd_pcm_hw_free(struct snd_pcm_substream *substream)
goto unlock;
result = do_hw_free(substream);
snd_pcm_set_state(substream, SNDRV_PCM_STATE_OPEN);
- cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
+ pcm_qos_req_clear(substream);
unlock:
snd_pcm_buffer_access_unlock(runtime);
return result;
@@ -1972,6 +1987,7 @@ static int snd_pcm_do_prepare(struct snd_pcm_substream *substream,
err = substream->ops->prepare(substream);
if (err < 0)
return err;
+ pcm_qos_req_update(substream, period_to_usecs(substream->runtime));
return snd_pcm_do_reset(substream, state);
}
@@ -2762,8 +2778,7 @@ void snd_pcm_release_substream(struct snd_pcm_substream *substream)
substream->ops->close(substream);
substream->hw_opened = 0;
}
- if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
- cpu_latency_qos_remove_request(&substream->latency_pm_qos_req);
+ pcm_qos_req_clear(substream);
if (substream->pcm_release) {
substream->pcm_release(substream);
substream->pcm_release = NULL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0053/2151] ALSA: pcm: Prevent O_APPEND open on OSS streams
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (51 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0052/2151] ALSA: pcm: Optimize cpu_latency_qos_*() calls Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0054/2151] tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures Greg Kroah-Hartman
` (829 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bo Cao, Takashi Iwai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 9017bc3d13da0ea4e63be618c87143a7b69185e6 ]
ALSA PCM core accepts to re-use the existing stream when O_APPEND is
passed, and it's been used for dmix, etc. However, this mode isn't
supposed to be used for OSS: the OSS stream allows re-configuration
via its hw_params/hw_refine procedure even while it's being mmapped,
so it implies the usage of only a single stream. Because of this
assumption, the sanity check is skipped for OSS streams, and if user
may attach to an existing OSS stream with O_APPEND, it may result in a
UAF of the mapped pages which could be used as a privilege escalation
exploit.
For addressing it, this patch simply prohibits the O_APPEND behavior
on the OSS stream. O_APPEND is never used for OSS layer itself, so
this can't break for the right applications.
Fixes: 0df63e44c3e3 ("[ALSA] Add O_APPEND flag support to PCM")
Cc: stable@vger.kernel.org
Reported-by: Bo Cao <treebacker@foxmail.com>
Link: https://lore.kernel.org/tencent_E90BB4F086165FAA3313723567A5C675EA06@qq.com
Link: https://patch.msgid.link/20261103155844.120838-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/core/pcm.c | 2 ++
sound/core/pcm_local.h | 6 ++++++
sound/core/pcm_native.c | 6 ------
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 0b512085eb63f..a723b1e566077 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -921,6 +921,8 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
return -ENODEV;
if (! SUBSTREAM_BUSY(substream))
return -EBADFD;
+ if (is_oss_stream(substream))
+ return -EINVAL;
substream->ref_count++;
*rsubstream = substream;
return 0;
diff --git a/sound/core/pcm_local.h b/sound/core/pcm_local.h
index ecb21697ae3a4..4b134d435c24f 100644
--- a/sound/core/pcm_local.h
+++ b/sound/core/pcm_local.h
@@ -80,4 +80,10 @@ static inline void snd_pcm_dma_buffer_sync(struct snd_pcm_substream *substream,
snd_dma_buffer_sync(snd_pcm_get_dma_buf(substream), mode);
}
+#if IS_ENABLED(CONFIG_SND_PCM_OSS)
+#define is_oss_stream(substream) ((substream)->oss.oss)
+#else
+#define is_oss_stream(substream) false
+#endif
+
#endif /* __SOUND_CORE_PCM_LOCAL_H */
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 7dab7ba130c0b..79b49d8e6a87c 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -745,12 +745,6 @@ int snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
}
EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
-#if IS_ENABLED(CONFIG_SND_PCM_OSS)
-#define is_oss_stream(substream) ((substream)->oss.oss)
-#else
-#define is_oss_stream(substream) false
-#endif
-
static void pcm_qos_req_clear(struct snd_pcm_substream *substream)
{
if (cpu_latency_qos_request_active(&substream->latency_pm_qos_req))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0054/2151] tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (52 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0053/2151] ALSA: pcm: Prevent O_APPEND open on OSS streams Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0055/2151] khugepaged: fix readahead lock inversion in collapse_file() Greg Kroah-Hartman
` (828 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arnd Bergmann,
Arnaldo Carvalho de Melo, David Matlack, Will Deacon, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will@kernel.org>
[ Upstream commit 10a47fb67340bca274276faf855d7d460afd9a7a ]
The arm64 UAPI exposes some 128-bit integer types to represent things
such as fpsimd registers in the sigcontext. In preparation for defining
these using the '__u128' typedef implemented by uapi/linux/types.h, copy
that typedef over to the private linux/types.h header used by the tools
directory.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Matlack <dmatlack@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/include/linux/types.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h
index 4928e33d44ac4..bf3e47bd5448f 100644
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -23,6 +23,11 @@ typedef enum {
__GFP_HIGH
} gfp_t;
+#ifdef __SIZEOF_INT128__
+typedef __signed__ __int128 __s128 __attribute__((aligned(16)));
+typedef unsigned __int128 __u128 __attribute__((aligned(16)));
+#endif
+
/*
* We define u64 as uint64_t for every architecture
* so that we can print it with "%"PRIx64 without getting warnings.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0055/2151] khugepaged: fix readahead lock inversion in collapse_file()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (53 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0054/2151] tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0056/2151] net: Use a dedicated flag to track disabled napi instances Greg Kroah-Hartman
` (827 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+16bf7cd0ebeb1de93aa5,
Lance Yang, Pedro Falcato, David Hildenbrand (Arm), Zi Yan,
Baolin Wang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lance Yang <lance.yang@linux.dev>
[ Upstream commit eadce52a9ef657d561b3e76c9b5f178bd99735f5 ]
collapse_file() can call page_cache_sync_readahead() while still holding
source folios locked. If truncate holds mapping->invalidate_lock
exclusively and waits for one of those folios, readahead waits for
invalidate_lock and neither side can make progress.
We need to release those folio locks before starting readahead. On a page
cache miss, roll back first, populate the collapse range, and retry once.
Doing readahead after rollback avoids an extra pass when all folios are
already present. If another miss occurs on retry, give up rather than keep
retrying while truncate or reclaim removes folios.
Keep page_cache_sync_readahead() and wait for read I/O with
filemap_lock_folio(), releasing each folio before moving to the next. The
existing uptodate check during collapse still handles read errors.
Shmem uses shmem_get_folio() for swapin and fallocated folios without
taking mapping->invalidate_lock, so it is unaffected.
Reported-by: syzbot+16bf7cd0ebeb1de93aa5@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=16bf7cd0ebeb1de93aa5
Fixes: 730633f0b7f9 ("mm: Protect operations adding pages to page cache with invalidate_lock")
Cc: stable@vger.kernel.org
Signed-off-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://patch.msgid.link/20261026152013.10511-1-lance.yang@linux.dev
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/khugepaged.c | 49 +++++++++++++++++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 12 deletions(-)
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 6bff1096de7d8..6fa4d9b7e0129 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1868,6 +1868,8 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
XA_STATE_ORDER(xas, &mapping->i_pages, start, HPAGE_PMD_ORDER);
int nr_none = 0, result = SCAN_SUCCEED;
bool is_shmem = shmem_file(file);
+ bool do_readahead = false;
+ bool readahead_done = false;
VM_BUG_ON(!IS_ENABLED(CONFIG_READ_ONLY_THP_FOR_FS) && !is_shmem);
VM_BUG_ON(start & (HPAGE_PMD_NR - 1));
@@ -1879,6 +1881,10 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
mapping_set_update(&xas, mapping);
+retry:
+ result = SCAN_SUCCEED;
+ do_readahead = false;
+ xas_set_order(&xas, start, HPAGE_PMD_ORDER);
__folio_set_locked(new_folio);
if (is_shmem)
__folio_set_swapbacked(new_folio);
@@ -1943,17 +1949,9 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
}
} else { /* !is_shmem */
if (!folio || xa_is_value(folio)) {
- xas_unlock_irq(&xas);
- page_cache_sync_readahead(mapping, &file->f_ra,
- file, index,
- end - index);
- /* drain lru cache to help folio_isolate_lru() */
- lru_add_drain();
- folio = filemap_lock_folio(mapping, index);
- if (IS_ERR(folio)) {
- result = SCAN_FAIL;
- goto xa_unlocked;
- }
+ do_readahead = !readahead_done;
+ result = SCAN_FAIL;
+ goto xa_locked;
} else if (folio_test_dirty(folio)) {
/*
* khugepaged only works on read-only fd,
@@ -2095,7 +2093,10 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
* in do_dentry_open() truncating the page cache. This is
* particularly important if there are dirty folios in transit.
*/
- filemap_invalidate_lock_shared(mapping);
+ if (!filemap_invalidate_trylock_shared(mapping)) {
+ result = SCAN_FAIL;
+ goto rollback;
+ }
filemap_nr_thps_inc(mapping);
/*
* Paired with the fence in do_dentry_open() -> get_write_access()
@@ -2296,6 +2297,30 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
new_folio->mapping = NULL;
folio_unlock(new_folio);
+
+ /* Readahead may take invalidate_lock; source folios are unlocked. */
+ if (do_readahead) {
+ for (index = start; index < end;) {
+ folio = filemap_lock_folio(mapping, index);
+ if (IS_ERR(folio)) {
+ page_cache_sync_readahead(mapping, &file->f_ra,
+ file, index, end - index);
+ folio = filemap_lock_folio(mapping, index);
+ if (IS_ERR(folio)) {
+ result = SCAN_FAIL;
+ goto out_put;
+ }
+ }
+ index = folio_next_index(folio);
+ folio_unlock(folio);
+ folio_put(folio);
+ }
+ /* Drain the local LRU batch before retrying isolation. */
+ lru_add_drain();
+ readahead_done = true;
+ goto retry;
+ }
+out_put:
folio_put(new_folio);
out:
VM_BUG_ON(!list_empty(&pagelist));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0056/2151] net: Use a dedicated flag to track disabled napi instances
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (54 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0055/2151] khugepaged: fix readahead lock inversion in collapse_file() Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0057/2151] hwmon: (sht15) Remove redundant dev_err() Greg Kroah-Hartman
` (826 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Machon, Maxime Chevallier,
Jakub Kicinski, Chris J Arges, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
commit 8dc87fc5d6a0eb337744737008177342a708bf36 upstream.
Trying to disable the napi threaded state while the napi instance is
disabled will hang forever in napi_stop_kthread(), as it waits for
NAPIF_STATE_SCHED_THREADED to clear.
This won't happen until the next ____napi_schedule() call, which won't
happen as it's disabled.
This happens in 2 instances :
- Drivers that create but don't use napi instances (stmmac's rxtx napi
for AF_XDP for example), here it's a driver bug
- Drivers that create their napi instances in .probe(). Here, setting
threaded off while the interface is down will hang :
ip link set eth0 down
echo 1 > /sys/class/net/eth0/threaded
echo 0 > /sys/class/net/eth0/threaded
-> hang
Checking on netif_running() isn't enough, as napi instances may be
transiently disabled when changing the MTU for example, let's use a
dedicated flag to track if the instance is disabled.
This allows immediately disabling the kthread when the instance is
disabled.
This was tested on mvpp2 (probe-time napi_add) and stmmac.
[ Backport: omit threaded busy-poll state handling, which is not present
in 6.18.y. ]
Fixes: 689883de94dd ("net: stop napi kthreads when THREADED napi is disabled")
Tested-by: Daniel Machon <daniel.machon@microchip.com>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261029153130.121204-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Chris J Arges <carges@cloudflare.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/netdevice.h | 2 ++
net/core/dev.c | 14 ++++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7be5b78b2bff7..e272d0006c6bd 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -431,6 +431,7 @@ enum {
NAPI_STATE_THREADED, /* The poll is performed inside its own thread*/
NAPI_STATE_SCHED_THREADED, /* Napi is currently scheduled in threaded mode */
NAPI_STATE_HAS_NOTIFIER, /* Napi has an IRQ notifier */
+ NAPI_STATE_DISABLED, /* NAPI is disabled */
};
enum {
@@ -445,6 +446,7 @@ enum {
NAPIF_STATE_THREADED = BIT(NAPI_STATE_THREADED),
NAPIF_STATE_SCHED_THREADED = BIT(NAPI_STATE_SCHED_THREADED),
NAPIF_STATE_HAS_NOTIFIER = BIT(NAPI_STATE_HAS_NOTIFIER),
+ NAPIF_STATE_DISABLED = BIT(NAPI_STATE_DISABLED),
};
enum gro_result {
diff --git a/net/core/dev.c b/net/core/dev.c
index 673223065b955..95126e2360792 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7127,6 +7127,12 @@ static void napi_stop_kthread(struct napi_struct *napi)
{
unsigned long val, new;
+ /* Instance is disabled, we can immediately stop the kthread */
+ if (test_bit(NAPI_STATE_DISABLED, &napi->state)) {
+ clear_bit(NAPI_STATE_THREADED, &napi->state);
+ goto stop;
+ }
+
/* Wait until the napi STATE_THREADED is unset. */
while (true) {
val = READ_ONCE(napi->state);
@@ -7156,6 +7162,7 @@ static void napi_stop_kthread(struct napi_struct *napi)
msleep(20);
}
+stop:
kthread_stop(napi->thread);
napi->thread = NULL;
}
@@ -7541,6 +7548,7 @@ void netif_napi_add_weight_locked(struct net_device *dev,
napi->list_owner = -1;
set_bit(NAPI_STATE_SCHED, &napi->state);
set_bit(NAPI_STATE_NPSVC, &napi->state);
+ set_bit(NAPI_STATE_DISABLED, &napi->state);
netif_napi_dev_list_add(dev, napi);
/* default settings from sysfs are applied to all NAPIs. any per-NAPI
@@ -7577,7 +7585,8 @@ void napi_disable_locked(struct napi_struct *n)
val = READ_ONCE(n->state);
}
- new = val | NAPIF_STATE_SCHED | NAPIF_STATE_NPSVC;
+ new = val | NAPIF_STATE_SCHED | NAPIF_STATE_NPSVC |
+ NAPIF_STATE_DISABLED;
new &= ~(NAPIF_STATE_THREADED | NAPIF_STATE_PREFER_BUSY_POLL);
} while (!try_cmpxchg(&n->state, &val, new));
@@ -7620,7 +7629,8 @@ void napi_enable_locked(struct napi_struct *n)
do {
BUG_ON(!test_bit(NAPI_STATE_SCHED, &val));
- new = val & ~(NAPIF_STATE_SCHED | NAPIF_STATE_NPSVC);
+ new = val & ~(NAPIF_STATE_SCHED | NAPIF_STATE_NPSVC |
+ NAPIF_STATE_DISABLED);
if (n->dev->threaded && n->thread)
new |= NAPIF_STATE_THREADED;
} while (!try_cmpxchg(&n->state, &val, new));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0057/2151] hwmon: (sht15) Remove redundant dev_err()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (55 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0056/2151] net: Use a dedicated flag to track disabled napi instances Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0058/2151] hwmon: (sht15) Stop deferred work before releasing its resources Greg Kroah-Hartman
` (825 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pan Chuang, Guenter Roeck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pan Chuang <panchuang@vivo.com>
[ Upstream commit b8ffbb950dffbcf810ba41e776516cf3438bbe25 ]
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() automatically logs detailed
error messages on failure. Remove the now-redundant driver-specific
dev_err() call.
Signed-off-by: Pan Chuang <panchuang@vivo.com>
Link: https://lore.kernel.org/r/20260720063745.309331-7-panchuang@vivo.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Stable-dep-of: 5eab1e7f7ed1 ("hwmon: (sht15) Stop deferred work before releasing its resources")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/sht15.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 3d55047e9baf9..48bcd362c4808 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -981,10 +981,8 @@ static int sht15_probe(struct platform_device *pdev)
IRQF_TRIGGER_FALLING,
"sht15 data",
data);
- if (ret) {
- dev_err(&pdev->dev, "failed to get irq for data line\n");
+ if (ret)
goto err_release_reg;
- }
disable_irq_nosync(gpiod_to_irq(data->data));
ret = sht15_connection_reset(data);
if (ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0058/2151] hwmon: (sht15) Stop deferred work before releasing its resources
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (56 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0057/2151] hwmon: (sht15) Remove redundant dev_err() Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0059/2151] mm: page_alloc: do not give all non-blocking requests reserve access Greg Kroah-Hartman
` (824 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak,
Guenter Roeck, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit 5eab1e7f7ed12893f3864fe46ffcd5a41a752d6a ]
The IRQ handler and regulator notifier can leave work pending after a
measurement or notification completes. Neither work item is drained before
its resources are released on removal or probe failure.
Disable read_work before freeing the IRQ, since the worker can re-enable
it. Use request_irq()/free_irq() for explicit teardown. Unregister the
regulator notifier before cancelling update_supply_work and disabling the
regulator. Apply the same ordering to probe failures.
Fixes: 251eb40f5ccd ("hwmon: sht15 humidity sensor driver")
Cc: stable@vger.kernel.org
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20261024014044.27853-1-mhun512@gmail.com
[groeck: Dropped obsolete 'Assisted-by: tag]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/sht15.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 48bcd362c4808..8af2336052b0e 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -31,6 +31,7 @@
#include <linux/bitrev.h>
#include <linux/gpio/consumer.h>
#include <linux/of.h>
+#include <linux/workqueue.h>
/* Commands */
#define SHT15_MEASURE_TEMP 0x03
@@ -976,25 +977,22 @@ static int sht15_probe(struct platform_device *pdev)
goto err_release_reg;
}
- ret = devm_request_irq(&pdev->dev, gpiod_to_irq(data->data),
- sht15_interrupt_fired,
- IRQF_TRIGGER_FALLING,
- "sht15 data",
- data);
+ ret = request_irq(gpiod_to_irq(data->data), sht15_interrupt_fired,
+ IRQF_TRIGGER_FALLING, "sht15 data", data);
if (ret)
goto err_release_reg;
disable_irq_nosync(gpiod_to_irq(data->data));
ret = sht15_connection_reset(data);
if (ret)
- goto err_release_reg;
+ goto err_free_irq;
ret = sht15_soft_reset(data);
if (ret)
- goto err_release_reg;
+ goto err_free_irq;
ret = sysfs_create_group(&pdev->dev.kobj, &sht15_attr_group);
if (ret) {
dev_err(&pdev->dev, "sysfs create failed\n");
- goto err_release_reg;
+ goto err_free_irq;
}
data->hwmon_dev = hwmon_device_register(data->dev);
@@ -1007,9 +1005,13 @@ static int sht15_probe(struct platform_device *pdev)
err_release_sysfs_group:
sysfs_remove_group(&pdev->dev.kobj, &sht15_attr_group);
+err_free_irq:
+ disable_work_sync(&data->read_work);
+ free_irq(gpiod_to_irq(data->data), data);
err_release_reg:
if (!IS_ERR(data->reg)) {
regulator_unregister_notifier(data->reg, &data->nb);
+ cancel_work_sync(&data->update_supply_work);
regulator_disable(data->reg);
}
return ret;
@@ -1023,12 +1025,16 @@ static void sht15_remove(struct platform_device *pdev)
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&pdev->dev.kobj, &sht15_attr_group);
+ disable_work_sync(&data->read_work);
+ free_irq(gpiod_to_irq(data->data), data);
+
ret = sht15_soft_reset(data);
if (ret)
dev_err(&pdev->dev, "Failed to reset device (%pe)\n", ERR_PTR(ret));
if (!IS_ERR(data->reg)) {
regulator_unregister_notifier(data->reg, &data->nb);
+ cancel_work_sync(&data->update_supply_work);
regulator_disable(data->reg);
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0059/2151] mm: page_alloc: do not give all non-blocking requests reserve access
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (57 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0058/2151] hwmon: (sht15) Stop deferred work before releasing its resources Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0060/2151] mm/page_alloc: let the highest memory node recover from hopeless state Greg Kroah-Hartman
` (823 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Johannes Weiner, Andrew Morton,
Sashiko, Balbir Singh, Vlastimil Babka (SUSE),
Matthew Wilcox (Oracle), Salvatore Dipietro, Christoph Hellwig,
Dave Chinner, Matt Fleming, Mel Gorman, Michal Hocko,
Suren Baghdasaryan, Brendan Jackman, Zi Yan, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Weiner <hannes@cmpxchg.org>
[ Upstream commit 6ee3d87b940848aaed5d4e8d005c5f674bf2637a ]
Patch series "mm: page_alloc: fix reserve access for non-blocking
requests", v2.
Two fixes for how non-blocking allocations interact with the highatomic
reserve. There are prerequisites for Salvatore's "mm/page_alloc: avoid
direct reclaim and compaction for costly __GFP_NORETRY allocations" [0].
Patch 1 narrows which requests may physically take highatomic pages,
patch 2 narrows which requests may count them in their watermark check.
Both are prerequisites for Salvatore's patch: it clears
__GFP_DIRECT_RECLAIM for costly __GFP_NORETRY requests, which turns every
large page cache folio allocation that reaches the slowpath into a
non-blocking one. Without patch 1, those requests may fall back to the
highatomic freelists reserved for atomic requests. Without patch 2, they
count the free highatomic pages in their watermark check while being
served from regular memory, so they can consume regular high-order blocks
below the min watermark by the size of the reserve. GFP_NOWAIT requests
hit both paths today, so these are existing problems worthy of their own
stable backports; but Salvatore's patch would widen them significantly.
Patch 2 reproduction: a GFP_NOWAIT burst under memory pressure can drain
regular free memory to zero while the highatomic reserve sits idle.
Measured on a 32G box with an anonymous working set, swap, and a full 290M
reserve, three synthetic bursts drove the 28G Normal zone's regular free
memory to 28M, 0.8M and 0.6M against a 60M min watermark. Swapout failed
its swap table allocation inside reclaim, reclaim scanned 13M pages to
free 200k, and page faults stalled for tens to hundreds of milliseconds.
With the fix the burst stops at the min watermark and nothing else
happens. This was found in review and reproduced synthetically; it has
not been observed in production.
GFP_ATOMIC order-0 requests have a milder version of the same problem:
They are entitled to the reserve but are served regular memory first, so
the fix there has to change the watermark check and the freelist order
together. Salvatore's change doesn't interact with this, though; fixing
that is left for a separate patch.
This patch (of 2):
281dd25c1a01 ("mm/page_alloc: let GFP_ATOMIC order-0 allocs access
highatomic reserves") accidentally gave all non-blocking allocation
requests access to highatomic reserves, which includes GFP_NOWAIT and
other sites clearing __GFP_DIRECT_RECLAIM.
While this improved atomic request success rate, it's unintentionally
broad and can actually worsen highatomic requests by squandering the
reserves on requests that don't need it.
There are concurrent efforts to clear __GFP_DIRECT_RECLAIM altogether
for costly order __GFP_NORETRY requests, which would then also fall
into this exemption and deplete reserves even faster.
What GFP_ATOMIC has over the others is __GFP_HIGH, which
alloc_flags_slowpath() translates to ALLOC_MIN_RESERVE.
Narrow the exemption to contexts that have both ALLOC_NON_BLOCK |
ALLOC_MIN_RESERVE.
Link: https://lore.kernel.org/20261001082152.2879289-1-dipiets@amazon.it [0]
Link: https://lore.kernel.org/linux-mm/arFBWvzXPYrKuIYi@cmpxchg.org/ [1]
Link: https://lore.kernel.org/linux-mm/20261001082152.2879289-1-dipiets@amazon.it/ [2]
Link: https://lore.kernel.org/20261028171719.2043421-1-hannes@cmpxchg.org
Link: https://lore.kernel.org/20261028171719.2043421-2-hannes@cmpxchg.org
Fixes: 281dd25c1a01 ("mm/page_alloc: let GFP_ATOMIC order-0 allocs access highatomic reserves")
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260904115629.3993331-1-dipiets@amazon.it
Acked-by: Balbir Singh <balbirs@nvidia.com>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Salvatore Dipietro <dipiets@amazon.it>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dave Chinner <dgc@kernel.org>
Cc: Matt Fleming <matt@readmodwrite.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Brendan Jackman <brendan.jackman@linux.dev>
Cc: Zi Yan <ziy@nvidia.com>
Cc: <stable@vger.kernel.org>
[ sashal: placed ALLOC_MASK_ATOMIC in the existing internal header because the dedicated allocator header is absent ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/internal.h | 3 +++
mm/page_alloc.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/mm/internal.h b/mm/internal.h
index e0adafc45c8c3..e36c46e865956 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1315,6 +1315,9 @@ unsigned int reclaim_clean_pages_from_list(struct zone *zone,
/* Flags that allow allocations below the min watermark. */
#define ALLOC_RESERVES (ALLOC_NON_BLOCK|ALLOC_MIN_RESERVE|ALLOC_HIGHATOMIC|ALLOC_OOM)
+/* Flags that mean GFP_ATOMIC */
+#define ALLOC_MASK_ATOMIC (ALLOC_NON_BLOCK|ALLOC_MIN_RESERVE)
+
enum ttu_flags;
struct tlbflush_unmap_batch;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2685e570bf7de..bce50449902cb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3241,7 +3241,9 @@ struct page *rmqueue_buddy(struct zone *preferred_zone, struct zone *zone,
* reserves as failing now is worse than failing a
* high-order atomic allocation in the future.
*/
- if (!page && (alloc_flags & (ALLOC_OOM|ALLOC_NON_BLOCK)))
+ if (!page &&
+ ((alloc_flags & ALLOC_OOM) ||
+ (alloc_flags & ALLOC_MASK_ATOMIC) == ALLOC_MASK_ATOMIC))
page = __rmqueue_smallest(zone, order, MIGRATE_HIGHATOMIC);
if (!page) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0060/2151] mm/page_alloc: let the highest memory node recover from hopeless state
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (58 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0059/2151] mm: page_alloc: do not give all non-blocking requests reserve access Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0061/2151] drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg Greg Kroah-Hartman
` (822 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregory Price (Meta), Andrew Morton,
Zi Yan, Vlastimil Babka (SUSE), Suren Baghdasaryan, Michal Hocko,
Brendan Jackman, Johannes Weiner, Chanwon Park, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregory Price (Meta) <gourry@gourry.net>
[ Upstream commit 83367658a01087375ede31ae343c99da03f72ac8 ]
free_frozen_page_commit() clears a hopeless node's kswapd failures once
its zone recovers above the high watermark, but only if another memory
node exists for allocations to fall back to.
The test `next_memory_node(nid) < MAX_NUMNODES` finds only memory nodes
with a higher id. The highest-numbered memory node therefore never
recovers on this path, and its kswapd stays disabled until reclaim on that
node makes progress and balances it, or demotion is re-enabled.
In many cases, direct reclaim many never fully run against a lower node
(CXL/kmem), and that means its kswapd can end up full disabled in rare
situations.
To reproduce, fill the highest memory node with bound, non-THP anonymous
memory and no swap until kswapd gives up, then free it: /proc/zoneinfo
keeps showing node_unreclaimable 1 for that node. A lower node recovers.
Count the memory nodes instead. Adding first_memory_node != nid to the
existing test would also work, but a count says directly what the check
means: some other memory node exists.
Link: https://lore.kernel.org/20261019184850.3427905-1-gourry@gourry.net
Fixes: e7a5f249e6db ("mm: re-enable kswapd when memory pressure subsides or demotion is toggled")
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Brendan Jackman <brendan.jackman@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Chanwon Park <flyinrm@gmail.com>
Cc: <stable@vger.kernel.org>
[ sashal: Retained direct atomic accesses to kswapd_failures because the upstream helpers are unavailable. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bce50449902cb..2578475dd5d3f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2938,7 +2938,7 @@ static void free_frozen_page_commit(struct zone *zone,
* kswapd work again by resetting kswapd_failures.
*/
if (atomic_read(&pgdat->kswapd_failures) >= MAX_RECLAIM_RETRIES &&
- next_memory_node(pgdat->node_id) < MAX_NUMNODES)
+ num_node_state(N_MEMORY) > 1)
atomic_set(&pgdat->kswapd_failures, 0);
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0061/2151] drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (59 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0060/2151] mm/page_alloc: let the highest memory node recover from hopeless state Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0062/2151] drm/amd/display: set allow_freesync before validating a new stream Greg Kroah-Hartman
` (821 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Leo Liu, Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leo Liu <leo.liu@amd.com>
[ Upstream commit a56c2536c399d57a9bb1c02fd411e0c25859af3b ]
When hw_init() fails, amdgpu_device_ip_fini_early() skips hw_fini()
because status.hw was never set. For VCN, UVD (including UVD ENC), VCE,
and JPEG, hw_fini() is where cancel_delayed_work_sync() is called. Any
idle work queued during the partial hw_init() is therefore left pending
after sw_fini() frees the adev state the handler touches.
Cancel the idle work in each hw_init() error path, immediately before
returning the error, so that hw_fini() remains the sole cancel site on
the normal teardown path with no duplication.
Link: https://github.com/ROCm/amdgpu/issues/234
Fixes: 416e1fab4752 ("drm/amdgpu: drop redundant cancel_delayed_work_sync call")
Assisted-by: Claude:Claude-Sonnet-4.6
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7ff2327fde029e97d0050fcb94e3f4063c318547)
Cc: stable@vger.kernel.org
[ sashal: Retained existing DRM_INFO() logging context and omitted hunks for four absent drivers. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 +++-
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 6 +++++-
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 11 +++++++++--
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 8 ++++++--
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 12 ++++++++++--
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 12 ++++++++++--
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 10 +++++++++-
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 10 +++++++++-
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 10 +++++++++-
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 10 +++++++++-
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 +++++++++-
25 files changed, 150 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
index 1e214b493402c..8c61bf518c64c 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
@@ -159,11 +159,15 @@ static int jpeg_v2_0_hw_init(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = ip_block->adev;
struct amdgpu_ring *ring = adev->jpeg.inst->ring_dec;
+ int r;
adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
(adev->doorbell_index.vcn.vcn_ring0_1 << 1), 0);
- return amdgpu_ring_test_helper(ring);
+ r = amdgpu_ring_test_helper(ring);
+ if (r)
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
index 13a6e24c624a2..863b04a774f8f 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
@@ -221,10 +221,14 @@ static int jpeg_v2_5_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
index af231d093a3ce..0c5ebc1be2064 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
@@ -174,11 +174,15 @@ static int jpeg_v3_0_hw_init(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = ip_block->adev;
struct amdgpu_ring *ring = adev->jpeg.inst->ring_dec;
+ int r;
adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
(adev->doorbell_index.vcn.vcn_ring0_1 << 1), 0);
- return amdgpu_ring_test_helper(ring);
+ r = amdgpu_ring_test_helper(ring);
+ if (r)
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
index 90582066e6a1a..c4e3d78085165 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
@@ -204,10 +204,14 @@ static int jpeg_v4_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
index 4521465506682..143aa97db9fe0 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
@@ -417,12 +417,16 @@ static int jpeg_v4_0_3_hw_init(struct amdgpu_ip_block *ip_block)
VCN_JPEG_DB_CTRL__EN_MASK);
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
}
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
index 3f61d5367d946..2e15214525ff3 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c
@@ -231,10 +231,14 @@ static int jpeg_v4_0_5_hw_init(struct amdgpu_ip_block *ip_block)
ring = adev->jpeg.inst[i].ring_dec;
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
index c696a0dea32ce..166f5ca1d0100 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
@@ -172,9 +172,13 @@ static int jpeg_v5_0_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
index de9ca229479e8..de1675c8b8c4b 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
@@ -289,11 +289,15 @@ static int jpeg_v5_0_1_hw_init(struct amdgpu_ip_block *ip_block)
VCN_JPEG_DB_CTRL__EN_MASK);
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
index ccb6572891136..e3c2ebd53591e 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
@@ -710,7 +710,9 @@ static int uvd_v3_1_hw_init(struct amdgpu_ip_block *ip_block)
amdgpu_ring_commit(ring);
done:
- if (!r)
+ if (r)
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+ else
DRM_INFO("UVD initialized successfully.\n");
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index d7302938e6662..181f1f9ffef8c 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -198,7 +198,9 @@ static int uvd_v4_2_hw_init(struct amdgpu_ip_block *ip_block)
amdgpu_ring_commit(ring);
done:
- if (!r)
+ if (r)
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+ else
DRM_INFO("UVD initialized successfully.\n");
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
index 71409ad8b7ed1..102842ed12346 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
@@ -190,7 +190,9 @@ static int uvd_v5_0_hw_init(struct amdgpu_ip_block *ip_block)
amdgpu_ring_commit(ring);
done:
- if (!r)
+ if (r)
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+ else
DRM_INFO("UVD initialized successfully.\n");
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index ceb94bbb03a48..a91d50ed6a5e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -513,7 +513,9 @@ static int uvd_v6_0_hw_init(struct amdgpu_ip_block *ip_block)
}
done:
- if (!r) {
+ if (r) {
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+ } else {
if (uvd_v6_0_enc_support(adev))
DRM_INFO("UVD and UVD ENC initialized successfully.\n");
else
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
index 1f8866f3f63c7..24f9d20b44cf9 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
@@ -581,7 +581,9 @@ static int uvd_v7_0_hw_init(struct amdgpu_ip_block *ip_block)
}
}
done:
- if (!r)
+ if (r)
+ cancel_delayed_work_sync(&adev->uvd.idle_work);
+ else
DRM_INFO("UVD and UVD ENC initialized successfully.\n");
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
index bee3e904a6bc7..12a8eb48a1a65 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
@@ -473,12 +473,16 @@ static int vce_v2_0_hw_init(struct amdgpu_ip_block *ip_block)
for (i = 0; i < adev->vce.num_rings; i++) {
r = amdgpu_ring_test_helper(&adev->vce.ring[i]);
if (r)
- return r;
+ goto error;
}
DRM_INFO("VCE initialized successfully.\n");
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->vce.idle_work);
+ return r;
}
static int vce_v2_0_hw_fini(struct amdgpu_ip_block *ip_block)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index 9c4c782c99aa1..66eee0565bb66 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -477,12 +477,16 @@ static int vce_v3_0_hw_init(struct amdgpu_ip_block *ip_block)
for (i = 0; i < adev->vce.num_rings; i++) {
r = amdgpu_ring_test_helper(&adev->vce.ring[i]);
if (r)
- return r;
+ goto error;
}
DRM_INFO("VCE initialized successfully.\n");
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->vce.idle_work);
+ return r;
}
static int vce_v3_0_hw_fini(struct amdgpu_ip_block *ip_block)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index 335bda64ff5bc..984a963b8f48a 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
@@ -528,12 +528,16 @@ static int vce_v4_0_hw_init(struct amdgpu_ip_block *ip_block)
for (i = 0; i < adev->vce.num_rings; i++) {
r = amdgpu_ring_test_helper(&adev->vce.ring[i]);
if (r)
- return r;
+ goto error;
}
DRM_INFO("VCE initialized successfully.\n");
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->vce.idle_work);
+ return r;
}
static int vce_v4_0_hw_fini(struct amdgpu_ip_block *ip_block)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
index a316797875a8f..3e87504e0d422 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
@@ -252,18 +252,25 @@ static int vcn_v1_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error_vcn;
for (i = 0; i < adev->vcn.inst[0].num_enc_rings; ++i) {
ring = &adev->vcn.inst->ring_enc[i];
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error_vcn;
}
ring = adev->jpeg.inst->ring_dec;
r = amdgpu_ring_test_helper(ring);
+ if (r)
+ goto error_both;
+ return 0;
+error_both:
+ cancel_delayed_work_sync(&adev->jpeg.idle_work);
+error_vcn:
+ cancel_delayed_work_sync(&adev->vcn.inst[0].idle_work);
return r;
}
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index 0442bfcfd384d..a8bead3124ccf 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -293,7 +293,7 @@ static int vcn_v2_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
//Disable vcn decode for sriov
if (amdgpu_sriov_vf(adev))
@@ -303,10 +303,14 @@ static int vcn_v2_0_hw_init(struct amdgpu_ip_block *ip_block)
ring = &adev->vcn.inst->ring_enc[i];
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
return 0;
+
+error:
+ cancel_delayed_work_sync(&adev->vcn.inst->idle_work);
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
index 8b8184fe6764b..ea85196f02e5a 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
@@ -482,18 +482,26 @@ static int vcn_v2_5_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
for (i = 0; i < adev->vcn.inst[j].num_enc_rings; ++i) {
ring = &adev->vcn.inst[j].ring_enc[i];
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
}
return r;
+
+error:
+ for (i = 0; i <= j; i++) {
+ if (adev->vcn.harvest_config & (1 << i))
+ continue;
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ }
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index c042ae868c970..b29d829f0bd4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -416,18 +416,26 @@ static int vcn_v3_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
for (j = 0; j < adev->vcn.inst[i].num_enc_rings; ++j) {
ring = &adev->vcn.inst[i].ring_enc[j];
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
}
return 0;
+
+error:
+ while (i >= 0) {
+ if (!(adev->vcn.harvest_config & (1 << i)))
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ i--;
+ }
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index 633c563ed5136..4bc3b710acd37 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -348,11 +348,19 @@ static int vcn_v4_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
return 0;
+
+error:
+ while (i >= 0) {
+ if (!(adev->vcn.harvest_config & (1 << i)))
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ i--;
+ }
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
index 88d1139e931e2..890033d6e1588 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
@@ -360,11 +360,19 @@ static int vcn_v4_0_3_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
return r;
+
+error:
+ while (i >= 0) {
+ if (!(adev->vcn.harvest_config & (1 << i)))
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ i--;
+ }
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
index 1571cc5a148c8..6ab0f903630c6 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
@@ -302,10 +302,18 @@ static int vcn_v4_0_5_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
return 0;
+
+error:
+ while (i >= 0) {
+ if (!(adev->vcn.harvest_config & (1 << i)))
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ i--;
+ }
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
index d5f49fa33bee4..99ed503f9a59e 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
@@ -266,10 +266,18 @@ static int vcn_v5_0_0_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
return 0;
+
+error:
+ while (i >= 0) {
+ if (!(adev->vcn.harvest_config & (1 << i)))
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ i--;
+ }
+ return r;
}
/**
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
index 972d4a7147a12..6e180191c2d6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
@@ -324,11 +324,19 @@ static int vcn_v5_0_1_hw_init(struct amdgpu_ip_block *ip_block)
r = amdgpu_ring_test_helper(ring);
if (r)
- return r;
+ goto error;
}
}
return 0;
+
+error:
+ while (i >= 0) {
+ if (!(adev->vcn.harvest_config & (1 << i)))
+ cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
+ i--;
+ }
+ return r;
}
/**
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0062/2151] drm/amd/display: set allow_freesync before validating a new stream
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (60 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0061/2151] drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0063/2151] hugetlbfs: enforce F_SEAL_EXEC in setattr Greg Kroah-Hartman
` (820 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josh Kasten, Mikhail Gavrilov,
Alex Hung, Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
[ Upstream commit ab18dd3061eb2d92e60c8bbf9a435c25962e449f ]
After resume from S3, DC enables SubVP on a single FreeSync display at
a high refresh rate, although dcn32_allow_subvp_high_refresh_rate() is
meant to keep SubVP off that configuration ("For single display cases,
freesync must be disabled"). On an RX 7900 XTX driving a FreeSync TV
at 3840x2160@120, amdgpu_dm_capabilities reports sub-viewport disabled
after boot and enabled after "rtcwake -m mem", and the memory clock
starts switching. It stays that way until a later commit re-validates
the state; a CRTC gamma change (toggling Night Light) turns SubVP off
again.
The policy reads dc_stream_state::allow_freesync while the new state
is validated, but amdgpu_dm sets that field only in
amdgpu_dm_update_freesync_state_on_stream(), on the first flip after
the commit. A stream created by a modeset is therefore validated as
if FreeSync were off. On resume, dm_destroy_cached_state() drops the
streams and forces a modeset, so the resumed state is validated
without FreeSync.
Set allow_freesync in amdgpu_dm_get_freesync_config_for_crtc(), which
atomic check calls for every active CRTC and which already writes
ignore_msa_timing_param to the stream. It uses vrr_supported, the
condition the flip-time value is derived from. With this change the
same TV keeps SubVP disabled across "rtcwake -m mem".
On this machine SubVP is also what exposes the single-frame scanout
corruption reported in the thread linked below, so the FreeSync
setting stopped working as a workaround after every suspend.
Fixes: 87f0c16e0eeb ("drm/amd/display: Enable SubVP for high refresh rate displays")
Link: https://lore.kernel.org/all/20260829010525.29935-1-mikhail.v.gavrilov@gmail.com/
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5714#note_3736349
Tested-by: Josh Kasten <jkasten@gmail.com>
Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 29793918b0eb63b6810b248a906f87dd79b70be5)
Cc: stable@vger.kernel.org
[ sashal: Applied the unchanged addition to get_freesync_config_for_crtc(), since the FreeSync helper extraction and renaming are absent. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a77b55ff9321f..40ac1a33326fa 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -11350,6 +11350,14 @@ static void get_freesync_config_for_crtc(
vrefresh >= aconnector->min_vfreq &&
vrefresh <= aconnector->max_vfreq;
+ /*
+ * DC reads allow_freesync while validating the new state, for example
+ * to keep SubVP off a single FreeSync display, but it is otherwise set
+ * only on the first flip after the commit. Set it here, so that a
+ * stream created by this commit is not validated without it.
+ */
+ new_crtc_state->stream->allow_freesync = new_crtc_state->vrr_supported;
+
if (new_crtc_state->vrr_supported) {
new_crtc_state->stream->ignore_msa_timing_param = true;
fs_vid_mode = new_crtc_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0063/2151] hugetlbfs: enforce F_SEAL_EXEC in setattr
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (61 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0062/2151] drm/amd/display: set allow_freesync before validating a new stream Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0064/2151] ALSA: usb-audio: qcom: Free QMI handle Greg Kroah-Hartman
` (819 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eva Kurchatova, Pedro Falcato,
Kiryl Shutsemau (Meta), Zi Yan, Gregory Price (Meta), Muchun Song,
Oscar Salvador, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
[ Upstream commit b7f570e7cea761ec7eb4a3a9557a3a082d14e88c ]
F_SEAL_EXEC is enforced by shmem_setattr(), but hugetlbfs_setattr() does
not check it. As a result, fchmod() can change the execute bits of a
sealed hugetlbfs memfd.
Use memfd_check_seals_mode() in hugetlbfs_setattr() to reject changes
to execute bits when F_SEAL_EXEC is set.
This also fixes the memfd_test hugetlbfs SEAL-EXEC subtest, where
fchmod() incorrectly succeeded after applying F_SEAL_EXEC.
Fixes: 6fd7353829ca ("mm/memfd: add F_SEAL_EXEC")
Cc: stable@vger.kernel.org
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Link: https://patch.msgid.link/20260629180247.2343229-1-eva.kurchatova@virtuozzo.com
Acked-by: Pedro Falcato <pfalcato@suse.de>
Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
[ david: use common helper; fixup Fixes:; check only regular files ]
Acked-by: Oscar Salvador <osalvador@suse.de>
Link: https://patch.msgid.link/20261029-fixes_shmem-v4-5-392fc715d8f6@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Replaced the unavailable memfd_check_seals_mode() helper with its equivalent inline condition. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/hugetlbfs/inode.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 34ed9966f2ea8..f866dbe4c198f 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -854,6 +854,12 @@ static int hugetlbfs_setattr(struct mnt_idmap *idmap,
if (error)
return error;
+ if (S_ISREG(inode->i_mode) && (ia_valid & ATTR_MODE)) {
+ if ((info->seals & F_SEAL_EXEC) &&
+ ((inode->i_mode ^ attr->ia_mode) & 0111))
+ return -EPERM;
+ }
+
trace_hugetlbfs_setattr(inode, dentry, attr);
if (ia_valid & ATTR_SIZE) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0064/2151] ALSA: usb-audio: qcom: Free QMI handle
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (62 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0063/2151] hugetlbfs: enforce F_SEAL_EXEC in setattr Greg Kroah-Hartman
@ 2026-11-18 14:29 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0065/2151] ALSA: usb-audio: qcom: Check the return value of qmi_handle_init() Greg Kroah-Hartman
` (818 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:29 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Xu Rao, Takashi Iwai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xu Rao <raoxu@uniontech.com>
[ Upstream commit b8ff1f3578f83dedf5feb796d97a3f67c1bea58f ]
qc_usb_audio_probe() allocates svc->uaudio_svc_hdl separately from the
uaudio_qmi_svc object.
qmi_handle_release() releases the resources owned by an initialized QMI
handle, but does not free the memory containing the struct qmi_handle
itself. The probe error path and the remove path currently release the
handle and then free svc, losing the last pointer to the separately
allocated handle.
This leaks one struct qmi_handle on each affected probe unwind and on
each successful probe/remove cycle.
Free the handle after qmi_handle_release() in both paths.
Signed-off-by: Xu Rao <raoxu@uniontech.com>
Link: https://patch.msgid.link/9108EC860F3F87DF+20260623071308.2549182-1-raoxu@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stable-dep-of: a3cf5ebab5f1 ("ALSA: usb-audio: qcom: Check the return value of qmi_handle_init()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/usb/qcom/qc_audio_offload.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_offload.c
index da2759f2ee866..62a57b8d171b8 100644
--- a/sound/usb/qcom/qc_audio_offload.c
+++ b/sound/usb/qcom/qc_audio_offload.c
@@ -1994,6 +1994,7 @@ static int qc_usb_audio_probe(struct auxiliary_device *auxdev,
release_qmi:
qc_usb_audio_cleanup_qmi_dev();
qmi_handle_release(svc->uaudio_svc_hdl);
+ kfree(svc->uaudio_svc_hdl);
free_svc:
kfree(svc);
@@ -2018,6 +2019,7 @@ static void qc_usb_audio_remove(struct auxiliary_device *auxdev)
qc_usb_audio_cleanup_qmi_dev();
qmi_handle_release(svc->uaudio_svc_hdl);
+ kfree(svc->uaudio_svc_hdl);
kfree(svc);
uaudio_svc = NULL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0065/2151] ALSA: usb-audio: qcom: Check the return value of qmi_handle_init()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (63 preceding siblings ...)
2026-11-18 14:29 ` [PATCH 6.18 0064/2151] ALSA: usb-audio: qcom: Free QMI handle Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0066/2151] drm/amd/display: Signal PQ EOTF in FreeSync infopacket for DP HDR Greg Kroah-Hartman
` (817 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yuqiang Sun, Takashi Iwai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuqiang Sun <izaiahsun@gmail.com>
[ Upstream commit a3cf5ebab5f1db9e6f751e2a08df05a84f37ea57 ]
qc_usb_audio_probe() overwrites the return value of qmi_handle_init()
with that of qmi_add_server() without checking it. When
qmi_handle_init() fails, it has already freed the receive buffer and
destroyed the workqueue, and qmi->sock may hold an error pointer. If
QRTR is not available, qmi_handle_init() returns -EPROBE_DEFER and
qmi->sock is ERR_PTR(-EAFNOSUPPORT), so qmi_add_server() passes it to
kernel_sendmsg():
BUG: unable to handle page fault for address: ffffffffffffffb7
RIP: 0010:selinux_socket_sendmsg+0xa0/0x590
Call Trace:
security_socket_sendmsg+0x29/0x50
__sock_sendmsg+0x43/0x150
kernel_sendmsg+0xd6/0x180
qmi_send_new_server+0x1b8/0x2b0
qmi_add_server+0x165/0x200
qc_usb_audio_probe+0xf4/0x2e0
really_probe+0x2b4/0x850
Had the probe gone on, the error and remove paths would call
qmi_handle_release() on the half-initialized handle, which destroys the
workqueue and frees the receive buffer a second time.
Return the error from qmi_handle_init(), so that -EPROBE_DEFER defers
the probe, and check qmi_add_server() as well.
The bug was found with kbound, a static analysis prototype for
ownership mismatches at kernel interfaces, on v7.2.12; it is present in
mainline.
Build-tested with x86_64 and arm64 allmodconfig (W=1, sparse): no new
warnings. Run-tested on QEMU (x86_64, KVM) with KASAN and kmemleak, with
the driver built in and a test module that registers the
q6usb.qc-usb-audio-offload auxiliary device. Without QRTR, the probe
crashes as above without this patch; with it the device is deferred and
removing it again reports nothing. With QRTR the probe succeeds, and
removal reports nothing either.
Fixes: 326bbc348298 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support")
Cc: stable@vger.kernel.org
Signed-off-by: Yuqiang Sun <izaiahsun@gmail.com>
Link: https://patch.msgid.link/20261102035237.56253-1-izaiahsun@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/usb/qcom/qc_audio_offload.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_offload.c
index 62a57b8d171b8..3a0a0d8f4654b 100644
--- a/sound/usb/qcom/qc_audio_offload.c
+++ b/sound/usb/qcom/qc_audio_offload.c
@@ -1975,8 +1975,13 @@ static int qc_usb_audio_probe(struct auxiliary_device *auxdev,
QMI_UAUDIO_STREAM_REQ_MSG_V01_MAX_MSG_LEN,
&uaudio_svc_ops_options,
&uaudio_stream_req_handlers);
+ if (ret)
+ goto free_qmi_hdl;
+
ret = qmi_add_server(svc->uaudio_svc_hdl, UAUDIO_STREAM_SERVICE_ID_V01,
UAUDIO_STREAM_SERVICE_VERS_V01, 0);
+ if (ret)
+ goto release_qmi_hdl;
uaudio_svc = svc;
@@ -1993,7 +1998,9 @@ static int qc_usb_audio_probe(struct auxiliary_device *auxdev,
release_qmi:
qc_usb_audio_cleanup_qmi_dev();
+release_qmi_hdl:
qmi_handle_release(svc->uaudio_svc_hdl);
+free_qmi_hdl:
kfree(svc->uaudio_svc_hdl);
free_svc:
kfree(svc);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0066/2151] drm/amd/display: Signal PQ EOTF in FreeSync infopacket for DP HDR
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (64 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0065/2151] ALSA: usb-audio: qcom: Check the return value of qmi_handle_init() Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0067/2151] hwmon: (coretemp) Set nr_cores only after core_data allocation succeeds Greg Kroah-Hartman
` (816 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pierre-Loup A. Griffais, Melissa Wen,
Alex Hung, Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Melissa Wen <mwen@igalia.com>
[ Upstream commit 81f923b065801c7d30042bcda31ccb9449b4f58b ]
Commit c2791297013e ("drm/amd/display: Add color bit info to freesync
infoframe") created the app_tf interface for FreeSync HDR and commit
c21a764a98cb ("drm/amd/display: Send PQ bit in AMD VSIF") used it to set
PB9 bit 5 (PQ EOTF) in v2/v3 AMD Freesync infopacket. However, Linux
never made use of this interface: DM ignores what userspace sets
regarding HDR and always passes TRANSFER_FUNC_UNKNOWN as app_tf, so the
PQ bit is never set in the infopacket received by the eDP panel.
Check the EOTF in the HDR static metadata and set the PQ bit in Freesync
infopacket for DP accordingly. This fixes gray-washed HDR on KDE/GNOME
on Framework 13 Pro AI 9 HX 370 (DCN 3.5) and may fix similar issues on
other VRR-capable panels that advertise Replay in its AMD VSDB.
It doesn't affect color/EOTF bits on infopackets for SDR and native
HDMI.
Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/3200
Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit b318f3e13dd73781404670d3b3c6cf2177e0119c)
Cc: stable@vger.kernel.org
[ sashal: Inlined dm_dp_in_hdr_mode() checks into the existing static update_freesync_state_on_stream() function. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 40ac1a33326fa..d3ec5c11abb18 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9440,6 +9440,8 @@ static void remove_stream(struct amdgpu_device *adev,
acrtc->enabled = false;
}
+#define DP_HDR_SDP_EOTF_IDX 2
+
static void update_freesync_state_on_stream(
struct amdgpu_display_manager *dm,
struct dm_crtc_state *new_crtc_state,
@@ -9455,6 +9457,8 @@ static void update_freesync_state_on_stream(
bool pack_sdp_v1_3 = false;
struct amdgpu_dm_connector *aconn;
enum vrr_packet_type packet_type = PACKET_TYPE_VRR;
+ enum color_transfer_func app_tf;
+ const struct dc_info_packet *hdr;
if (!new_stream)
return;
@@ -9506,12 +9510,18 @@ static void update_freesync_state_on_stream(
&new_stream->adaptive_sync_infopacket);
}
+ hdr = &new_stream->hdr_static_metadata;
+ app_tf = dc_is_dp_signal(new_stream->signal) && hdr->valid &&
+ hdr->sb[DP_HDR_SDP_EOTF_IDX] == HDMI_EOTF_SMPTE_ST2084 ?
+ TRANSFER_FUNC_PQ2084 :
+ TRANSFER_FUNC_UNKNOWN;
+
mod_freesync_build_vrr_infopacket(
dm->freesync_module,
new_stream,
&vrr_params,
packet_type,
- TRANSFER_FUNC_UNKNOWN,
+ app_tf,
&vrr_infopacket,
pack_sdp_v1_3);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0067/2151] hwmon: (coretemp) Set nr_cores only after core_data allocation succeeds
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (65 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0066/2151] drm/amd/display: Signal PQ EOTF in FreeSync infopacket for DP HDR Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0068/2151] drm/amd/pm: populate unique ID for smu 13.0.7 Greg Kroah-Hartman
` (815 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Asaf Nuri Bertizlioğlu,
Guenter Roeck, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 95638f1f05ced75a82e83f610cd01b636d2a21b1 ]
In init_temp_data(), pdata->nr_cores is populated from
topology_num_cores_per_package() before allocating pdata->core_data. If
that allocation fails, init_temp_data() returns NULL with
pdata->core_data still NULL and pdata->nr_cores set to a positive value.
coretemp_add_core() logs the error without failing coretemp_cpu_online(),
so the CPU still comes online with pdata->hwmon_dev registered. When the
CPU is later taken offline (or the module is unloaded),
coretemp_cpu_offline() calls get_temp_data(pd, cpu), which loops up to
pdata->nr_cores and dereferences the NULL pdata->core_data pointer.
Store the core count in a local variable and assign pdata->nr_cores only
after pdata->core_data is allocated, preserving the invariant that
pdata->nr_cores is zero whenever pdata->core_data is NULL.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Fixes: 1a793caf6f69 ("hwmon: (coretemp) Use dynamic allocated memory for core temp_data")
Cc: stable@vger.kernel.org
Tested-by: Asaf Nuri Bertizlioğlu <ycistak@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[ sashal: Used NUM_REAL_CORES and kcalloc() instead of topology_num_cores_per_package() and kzalloc_objs(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/coretemp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 25a9cf8feb311..03b40d643dccf 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -491,11 +491,13 @@ init_temp_data(struct platform_data *pdata, unsigned int cpu, int pkg_flag)
* Will replace hardcoded NUM_REAL_CORES with actual per package core count
* when this information becomes available.
*/
- pdata->nr_cores = NUM_REAL_CORES;
- pdata->core_data = kcalloc(pdata->nr_cores, sizeof(struct temp_data *),
+ int nr_cores = NUM_REAL_CORES;
+
+ pdata->core_data = kcalloc(nr_cores, sizeof(struct temp_data *),
GFP_KERNEL);
if (!pdata->core_data)
return NULL;
+ pdata->nr_cores = nr_cores;
}
tdata = kzalloc(sizeof(struct temp_data), GFP_KERNEL);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0068/2151] drm/amd/pm: populate unique ID for smu 13.0.7
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (66 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0067/2151] hwmon: (coretemp) Set nr_cores only after core_data allocation succeeds Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0069/2151] drm/amdgpu/userq: wait for GPU reset before mapping or unmapping queues Greg Kroah-Hartman
` (814 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kevin Wang, Kenneth Feng,
Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kevin Wang <kevin.wang@amd.com>
[ Upstream commit 079f9103d9cde68fb2ccc414e94520f43ee102de ]
The smu 13.0.7 backend does not register get_unique_id, leaving
adev->unique_id at zero and KFD topology without the stable GPU
identifier consumed by HIP.
The failure is observed at:
auto ierr = hipDeviceGetUuid(&uuid, 0);
Fixes: 113cc31dde66 ("drm/amd/pm: add SMU_13_0_7 ppt_funcs for SMU_13_0_7")
Signed-off-by: Kevin Wang <kevin.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5e2585daaf8336d9ce1bf52e55a9b7a8cdbf625b)
Cc: stable@vger.kernel.org
[ sashal: Moved the callback before smu_v13_0_7_ppt_funcs because the surrounding upstream functions are absent. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
index 9947b3f6bb5fb..5df28b89cb696 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
@@ -2836,6 +2836,25 @@ static int smu_v13_0_7_update_pcie_parameters(struct smu_context *smu,
return ret;
}
+static void smu_v13_0_7_get_unique_id(struct smu_context *smu)
+{
+ SmuMetricsExternal_t metrics_external;
+ SmuMetrics_t *metrics = &metrics_external.SmuMetrics;
+ struct amdgpu_device *adev = smu->adev;
+ u32 upper32 = 0, lower32 = 0;
+ int ret;
+
+ ret = smu_cmn_get_metrics_table(smu, &metrics_external, false);
+ if (ret)
+ goto out;
+
+ upper32 = metrics->PublicSerialNumberUpper;
+ lower32 = metrics->PublicSerialNumberLower;
+
+out:
+ adev->unique_id = ((u64)upper32 << 32) | lower32;
+}
+
static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
.get_allowed_feature_mask = smu_v13_0_7_get_allowed_feature_mask,
.set_default_dpm_table = smu_v13_0_7_set_default_dpm_table,
@@ -2905,6 +2924,7 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
.enable_uclk_shadow = smu_v13_0_enable_uclk_shadow,
.set_wbrf_exclusion_ranges = smu_v13_0_set_wbrf_exclusion_ranges,
.interrupt_work = smu_v13_0_interrupt_work,
+ .get_unique_id = smu_v13_0_7_get_unique_id,
};
void smu_v13_0_7_set_ppt_funcs(struct smu_context *smu)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0069/2151] drm/amdgpu/userq: wait for GPU reset before mapping or unmapping queues
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (67 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0068/2151] drm/amd/pm: populate unique ID for smu 13.0.7 Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0070/2151] xfs: refuse a pNFS LAYOUTCOMMIT of a range without blocks Greg Kroah-Hartman
` (813 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Prike Liang, Vitaly Prosyak,
Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prike Liang <Prike.Liang@amd.com>
[ Upstream commit 623507b8f4fe24851b2f1cb2c177f8ae3c8584b8 ]
The user queue map and unmap helpers talk to the MES, but only the
create path holds reset_domain->sem around them. The eviction, restore,
destroy and suspend paths can submit to the MES while a GPU reset is in
progress:
WARNING: amdgpu_device.c:928 at amdgpu_device_skip_hw_access+0x73/0x90 [amdgpu]
Workqueue: events amdgpu_eviction_fence_suspend_worker [amdgpu]
Call Trace:
amdgpu_mm_wdoorbell64+0x20/0x70 [amdgpu]
mes_v11_0_ring_set_wptr+0x71/0x80 [amdgpu]
amdgpu_ring_commit+0x5b/0xa0 [amdgpu]
mes_v11_0_submit_pkt_and_poll_completion.constprop.0+0x207/0x520 [amdgpu]
mes_v11_0_remove_hw_queue+0xd9/0x100 [amdgpu]
mes_userq_unmap+0xc3/0x140 [amdgpu]
amdgpu_userq_unmap_helper+0x67/0x280 [amdgpu]
amdgpu_userq_evict+0x52/0xf0 [amdgpu]
amdgpu_eviction_fence_suspend_worker+0x55/0xe0 [amdgpu]
Take the semaphore for read in the helpers instead, around both the MES
call and the queue state check and update. The reset changes the queue
state from amdgpu_userq_pre_reset()/post_reset(), so every caller now
waits for a running reset and acts on the state it left behind.
Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit e6a8b8588f43bd4d7054ac47cccc35f56ad2df90)
Cc: stable@vger.kernel.org
[ sashal: left amdgpu_userq_create() unchanged because the outer reset semaphore lock was already absent ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index a0bf7c82b83b6..0b3502f3f1e23 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -27,6 +27,7 @@
#include <linux/pm_runtime.h>
#include "amdgpu.h"
+#include "amdgpu_reset.h"
#include "amdgpu_vm.h"
#include "amdgpu_userq.h"
#include "amdgpu_userq_fence.h"
@@ -148,6 +149,8 @@ amdgpu_userq_unmap_helper(struct amdgpu_userq_mgr *uq_mgr,
adev->userq_funcs[queue->queue_type];
int r = 0;
+ /* The reset changes the queue state and the MES is unusable meanwhile */
+ guard(rwsem_read)(&adev->reset_domain->sem);
if ((queue->state == AMDGPU_USERQ_STATE_MAPPED) ||
(queue->state == AMDGPU_USERQ_STATE_PREEMPTED)) {
r = userq_funcs->unmap(uq_mgr, queue);
@@ -168,6 +171,8 @@ amdgpu_userq_map_helper(struct amdgpu_userq_mgr *uq_mgr,
adev->userq_funcs[queue->queue_type];
int r = 0;
+ /* The reset changes the queue state and the MES is unusable meanwhile */
+ guard(rwsem_read)(&adev->reset_domain->sem);
if (queue->state == AMDGPU_USERQ_STATE_UNMAPPED) {
r = userq_funcs->map(uq_mgr, queue);
if (r) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0070/2151] xfs: refuse a pNFS LAYOUTCOMMIT of a range without blocks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (68 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0069/2151] drm/amdgpu/userq: wait for GPU reset before mapping or unmapping queues Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0071/2151] btrfs: raid56: do not verify the content if there is no data checksum Greg Kroah-Hartman
` (812 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daejun Park, Christoph Hellwig,
Carlos Maiolino, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daejun Park <daejun7.park@samsung.com>
[ Upstream commit bcf0b7f18ad11e1d410e82ffef678705eff0a317 ]
A client can commit a hole in a LAYOUTCOMMIT, because nfsd does not
check the extents against its layouts. xfs_iomap_write_unwritten() then
allocates written blocks there. A large hole overruns the block
reservation and shuts XFS down. A small one exposes stale data.
Refuse such a range with -EIO, using XFS_BMAPI_CONVERT_ONLY.
Link: https://lore.kernel.org/r/20261014130834.GB15773@lst.de
Fixes: 527851124d10 ("xfs: implement pNFS export operations")
Cc: stable@vger.kernel.org
Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
[ sashal: Moved the completion-call change to the existing address-space operations code because ioend handling had not been split into a separate file. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/xfs/xfs_aops.c | 2 +-
fs/xfs/xfs_file.c | 2 +-
fs/xfs/xfs_iomap.c | 20 +++++++++++++++++---
fs/xfs/xfs_iomap.h | 3 ++-
fs/xfs/xfs_pnfs.c | 9 ++++++++-
5 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 4c9afca35fefa..03f432a7938c4 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -156,7 +156,7 @@ xfs_end_ioend(
else if (ioend->io_flags & IOMAP_IOEND_SHARED)
error = xfs_reflink_end_cow(ip, offset, size);
else if (ioend->io_flags & IOMAP_IOEND_UNWRITTEN)
- error = xfs_iomap_write_unwritten(ip, offset, size, false);
+ error = xfs_iomap_write_unwritten(ip, offset, size, false, 0);
if (!error &&
!(ioend->io_flags & IOMAP_IOEND_DIRECT) &&
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 2702fef2c90cd..e00b6c2b7af06 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -584,7 +584,7 @@ xfs_dio_write_end_io(
* they are converted.
*/
if (flags & IOMAP_DIO_UNWRITTEN) {
- error = xfs_iomap_write_unwritten(ip, offset, size, true);
+ error = xfs_iomap_write_unwritten(ip, offset, size, true, 0);
goto out;
}
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index c7dea4242e8bf..b235dac8f79dc 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -619,7 +619,8 @@ xfs_iomap_write_unwritten(
xfs_inode_t *ip,
xfs_off_t offset,
xfs_off_t count,
- bool update_isize)
+ bool update_isize,
+ uint32_t bmapi_flags)
{
xfs_mount_t *mp = ip->i_mount;
xfs_fileoff_t offset_fsb;
@@ -681,8 +682,21 @@ xfs_iomap_write_unwritten(
*/
nimaps = 1;
error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb,
- XFS_BMAPI_CONVERT, resblks, &imap,
- &nimaps);
+ XFS_BMAPI_CONVERT | bmapi_flags,
+ resblks, &imap, &nimaps);
+ if (error == -ENOSR && (bmapi_flags & XFS_BMAPI_CONVERT_ONLY)) {
+ /*
+ * Nothing was mapped: the rest of the range starts
+ * with a hole or a delalloc extent. Nothing was
+ * changed either, but xfs_iext_count_extend() may
+ * have logged the inode, and cancelling a dirty
+ * transaction shuts the filesystem down. Commit it,
+ * as xfs_alloc_file_space() does on -ENOSR.
+ */
+ error = xfs_trans_commit(tp);
+ xfs_iunlock(ip, XFS_ILOCK_EXCL);
+ return error ? error : -EIO;
+ }
if (error)
goto error_on_bmapi_transaction;
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h
index ebcce7d494468..7d9fc86fd5567 100644
--- a/fs/xfs/xfs_iomap.h
+++ b/fs/xfs/xfs_iomap.h
@@ -15,7 +15,8 @@ struct xfs_zone_alloc_ctx;
int xfs_iomap_write_direct(struct xfs_inode *ip, xfs_fileoff_t offset_fsb,
xfs_fileoff_t count_fsb, unsigned int flags,
struct xfs_bmbt_irec *imap, u64 *sequence);
-int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, xfs_off_t, bool);
+int xfs_iomap_write_unwritten(struct xfs_inode *ip, xfs_off_t offset,
+ xfs_off_t count, bool update_isize, uint32_t bmapi_flags);
xfs_fileoff_t xfs_iomap_eof_align_last_fsb(struct xfs_inode *ip,
xfs_fileoff_t end_fsb);
diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
index 298fdc9e9f1c3..1409ef8ce2be9 100644
--- a/fs/xfs/xfs_pnfs.c
+++ b/fs/xfs/xfs_pnfs.c
@@ -324,7 +324,14 @@ xfs_fs_commit_blocks(
(end - 1) >> PAGE_SHIFT);
WARN_ON_ONCE(error);
- error = xfs_iomap_write_unwritten(ip, start, length, false);
+ /*
+ * A client may only write to blocks that a layout handed out,
+ * and xfs_fs_map_blocks() allocates blocks for any hole in a
+ * write layout, so refuse to allocate blocks for a hole or a
+ * delalloc extent in the committed range.
+ */
+ error = xfs_iomap_write_unwritten(ip, start, length, false,
+ XFS_BMAPI_CONVERT_ONLY);
if (error)
goto out_drop_iolock;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0071/2151] btrfs: raid56: do not verify the content if there is no data checksum
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (69 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0070/2151] xfs: refuse a pNFS LAYOUTCOMMIT of a range without blocks Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0072/2151] ocfs2: add extra flags check in ocfs2_ioctl_move_extents() Greg Kroah-Hartman
` (811 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bartosz Fenski, Filipe Manana,
Qu Wenruo, David Sterba, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <wqu@suse.com>
[ Upstream commit d00b85308abee300dfb7e1ac642f38bab9ec7492 ]
[BUG]
There is a bug report that fio can fail to sync the data on a degraded
RAID56 mount:
# mkfs.btrfs -m raid1 -d raid5 -f $dev1 $dev2 $dev3
# mount $dev1 $mnt
# btrfs balance start -d $mnt
# umount $mnt
# btrfs dev scan -u $dev2
# wipefs -fa $dev2
# mount -o degraded $dev1 $mnt
# fio --name=degraded-write --directory=$mnt --rw=randwrite --fdatasync=4 \
--bs=4k --size=512M --randrepeat=1
The run will fail at fsync:
fio: io_u error on file /mnt/btrfs/degraded-write.0.0: Input/output error: datasync offset=142254080, buflen=0
fio: pid=2064, err=5/file:io_u.c:2008, func=io_u error, error=Input/output error
[CAUSE]
With extra debug output, it shows the problem pretty well:
rbio=2876243968 faila=0 sectornr=0
rbio=2876243968 error=0-15 csum=2 bio=15
The first line shows the rbio's full stripe logical, and stripe/sector
number when verify_one_sector() failed.
The second line shows more detail about the rbio, the sector range [0, 16)
is corrupted, which indicates the first data stripe is corrupted, matching
the missing device.
The important part is that the csum bitmap shows the data csum is only
for sector number 2, meanwhile the failed verification is at sector
number 0.
This means we did the checksum verification even if no corresponding
checksum is populated.
[FIX]
There is already a similar check at verify_bio_data_sectors(), but
unfortunately there is no such check at verify_one_sector().
Add the missing check to skip the csum verification if there is no
corresponding data checksum.
Reported-by: Bartosz Fenski <bartosz@fenski.pl>
Link: https://lore.kernel.org/linux-btrfs/a72409af-45ef-45df-9970-2e38bcb22ea6@fenski.pl/
Fixes: 7a3150723061 ("btrfs: raid56: do data csum verification during RMW cycle")
CC: stable@vger.kernel.org
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
[ sashal: Adjusted context for the existing struct sector_ptr-based verification using btrfs_check_block_csum(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/btrfs/raid56.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 4d4852f2ba7eb..20eef417b8441 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -1788,6 +1788,8 @@ static int verify_one_sector(struct btrfs_raid_bio *rbio,
{
struct btrfs_fs_info *fs_info = rbio->bioc->fs_info;
struct sector_ptr *sector;
+ const unsigned int total_sector_nr =
+ stripe_nr * rbio->stripe_nsectors + sector_nr;
u8 csum_buf[BTRFS_CSUM_SIZE];
u8 *csum_expected;
int ret;
@@ -1798,6 +1800,11 @@ static int verify_one_sector(struct btrfs_raid_bio *rbio,
/* No way to verify P/Q as they are not covered by data csum. */
if (stripe_nr >= rbio->nr_data)
return 0;
+
+ /* No data checksum for this sector. */
+ if (!test_bit(total_sector_nr, rbio->csum_bitmap))
+ return 0;
+
/*
* If we're rebuilding a read, we have to use pages from the
* bio list if possible.
@@ -1808,9 +1815,7 @@ static int verify_one_sector(struct btrfs_raid_bio *rbio,
sector = rbio_stripe_sector(rbio, stripe_nr, sector_nr);
}
- csum_expected = rbio->csum_buf +
- (stripe_nr * rbio->stripe_nsectors + sector_nr) *
- fs_info->csum_size;
+ csum_expected = rbio->csum_buf + total_sector_nr * fs_info->csum_size;
ret = btrfs_check_block_csum(fs_info, sector->paddr, csum_buf, csum_expected);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0072/2151] ocfs2: add extra flags check in ocfs2_ioctl_move_extents()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (70 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0071/2151] btrfs: raid56: do not verify the content if there is no data checksum Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0073/2151] ocfs2: validate move extents against a stable EOF Greg Kroah-Hartman
` (810 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitry Antipov, Joseph Qi,
Changwei Ge, Joel Becker, Jun Piao, Junxiao Bi, Mark Fasheh,
Andrew Morton, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <dmantipov@yandex.ru>
[ Upstream commit 41a5e8777093f7946fade3737363ef045303b8dc ]
In 'ocfs2_ioctl_move_extents()', add extra check whether only actually
supported flags are passed via 'ioctl(..., OCFS2_IOC_MOVE_EXT, ...)',
and reject anything beyond OCFS2_MOVE_EXT_FL_AUTO_DEFRAG and
OCFS2_MOVE_EXT_FL_PART_DEFRAG with -EINVAL. In particular,
OCFS2_MOVE_EXT_FL_COMPLETE may be set by the kernel only and
should never be passed from userspace.
Link: https://lkml.kernel.org/r/20251009102349.181126-1-dmantipov@yandex.ru
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 84db6619cb70 ("ocfs2: validate move extents against a stable EOF")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ocfs2/move_extents.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index 831c6c648f04f..f599978cbb9b1 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs/ocfs2/move_extents.c
@@ -1044,6 +1044,12 @@ int ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
if (range.me_threshold > i_size_read(inode))
range.me_threshold = i_size_read(inode);
+ if (range.me_flags & ~(OCFS2_MOVE_EXT_FL_AUTO_DEFRAG |
+ OCFS2_MOVE_EXT_FL_PART_DEFRAG)) {
+ status = -EINVAL;
+ goto out_free;
+ }
+
if (range.me_flags & OCFS2_MOVE_EXT_FL_AUTO_DEFRAG) {
context->auto_defrag = 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0073/2151] ocfs2: validate move extents against a stable EOF
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (71 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0072/2151] ocfs2: add extra flags check in ocfs2_ioctl_move_extents() Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0074/2151] ksmbd: do not read past the DACL in the access denied debug message Greg Kroah-Hartman
` (809 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cen Zhang, Andrew Morton, Joseph Qi,
Mark Fasheh, Joel Becker, Heming Zhao, Jia-Ju Bai, jjzuming,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cen Zhang <zzzccc427@gmail.com>
[ Upstream commit 84db6619cb702c37cf848b450c21b9c9706b0775 ]
The move-extents range must be bounded by the inode size used for extent
movement. ocfs2_ioctl_move_extents() checks and clamps the request before
taking the local inode and cluster locks in ocfs2_move_extents(). It also
uses separate i_size_read() calls for the range check and subtraction.
A concurrent truncate can invalidate the first check and make the later
unsigned subtraction underflow:
Move-extents ioctl Truncate
------------------ --------
check me_start <= i_size
take inode and cluster locks
shrink EOF below me_start
release locks
compare me_start + me_len with EOF
set me_len = EOF - me_start
[unsigned underflow]
acquire inode and cluster locks
select extents using the bad range
A truncate after clamping can also leave the range extending beyond EOF.
Conversely, the cached size may be smaller than the size refreshed when
the cluster inode lock is acquired. Early validation can then reject a
valid start or permanently shorten the requested length and threshold.
The me_start + me_len comparison can also wrap for a large input length.
Validate and adjust the original request once, after inode_lock(), the
exclusive rw lock and ocfs2_inode_lock() have stabilized and refreshed the
size. Read EOF once, reject a start beyond it, and bound the length by
EOF minus start. Normalize the threshold using the same EOF snapshot.
This keeps zero as the default-threshold sentinel until validation uses
the size that will govern extent movement.
Move goal validation after range adjustment as well. Its allocation-group
capacity check uses me_len and must see the EOF-clamped length. Both
validation failures use the existing inode-lock unwind path before any
extent movement or transaction starts.
Range errors now reach the ioctl's normal copyout path, as goal errors
already did. Unlike the old early rejection, a failed copyout can
therefore override -EINVAL with -EFAULT.
Link: https://lore.kernel.org/pm-ocfs2-move-extents-isize-rrw-v6-395bdee84ea81149068e@gmail.com
Fixes: 53069d4e7695 ("Ocfs2/move_extents: move/defrag extents within a certain range.")
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Assisted-by: LLM
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Heming Zhao <heming.zhao@suse.com>
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>
Cc: <jjzuming@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ocfs2/move_extents.c | 70 +++++++++++++++++++++++------------------
1 file changed, 39 insertions(+), 31 deletions(-)
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index f599978cbb9b1..5952c7f4e7f04 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs/ocfs2/move_extents.c
@@ -902,6 +902,30 @@ static int __ocfs2_move_extents_range(struct buffer_head *di_bh,
return ret;
}
+static int ocfs2_validate_and_adjust_move_range(struct inode *inode,
+ struct ocfs2_move_extents *range)
+{
+ u64 i_size = i_size_read(inode);
+
+ if (range->me_start > i_size)
+ return -EINVAL;
+
+ if (range->me_len > i_size - range->me_start)
+ range->me_len = i_size - range->me_start;
+
+ /*
+ * The default threshold for defragmentation is 1 MiB, which
+ * matches the maximum OCFS2 cluster size.
+ */
+ if (!range->me_threshold)
+ range->me_threshold = 1024 * 1024;
+
+ if (range->me_threshold > i_size)
+ range->me_threshold = i_size;
+
+ return 0;
+}
+
static int ocfs2_move_extents(struct ocfs2_move_extents_context *context)
{
int status;
@@ -931,6 +955,21 @@ static int ocfs2_move_extents(struct ocfs2_move_extents_context *context)
goto out_rw_unlock;
}
+ status = ocfs2_validate_and_adjust_move_range(inode, context->range);
+ if (status) {
+ mlog_errno(status);
+ goto out_inode_unlock;
+ }
+
+ /* The goal check depends on the adjusted range length. */
+ if (!context->auto_defrag) {
+ status = ocfs2_validate_and_adjust_move_goal(inode, context->range);
+ if (status) {
+ mlog_errno(status);
+ goto out_inode_unlock;
+ }
+ }
+
/*
* remember ip_xattr_sem also needs to be held if necessary
*/
@@ -1023,27 +1062,8 @@ int ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
goto out_free;
}
- if (range.me_start > i_size_read(inode)) {
- status = -EINVAL;
- goto out_free;
- }
-
- if (range.me_start + range.me_len > i_size_read(inode))
- range.me_len = i_size_read(inode) - range.me_start;
-
context->range = ⦥
- /*
- * ok, the default threshold for the defragmentation
- * is 1M, since our maximum clustersize was 1M also.
- * any thought?
- */
- if (!range.me_threshold)
- range.me_threshold = 1024 * 1024;
-
- if (range.me_threshold > i_size_read(inode))
- range.me_threshold = i_size_read(inode);
-
if (range.me_flags & ~(OCFS2_MOVE_EXT_FL_AUTO_DEFRAG |
OCFS2_MOVE_EXT_FL_PART_DEFRAG)) {
status = -EINVAL;
@@ -1055,23 +1075,11 @@ int ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
if (range.me_flags & OCFS2_MOVE_EXT_FL_PART_DEFRAG)
context->partial = 1;
- } else {
- /*
- * first best-effort attempt to validate and adjust the goal
- * (physical address in block), while it can't guarantee later
- * operation can succeed all the time since global_bitmap may
- * change a bit over time.
- */
-
- status = ocfs2_validate_and_adjust_move_goal(inode, &range);
- if (status)
- goto out_copy;
}
status = ocfs2_move_extents(context);
if (status)
mlog_errno(status);
-out_copy:
/*
* movement/defragmentation may end up being partially completed,
* that's the reason why we need to return userspace the finished
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0074/2151] ksmbd: do not read past the DACL in the access denied debug message
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (72 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0073/2151] ocfs2: validate move extents against a stable EOF Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0075/2151] cipso: stop modifying live ip_options_rcu Greg Kroah-Hartman
` (808 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ian Bridges, Namjae Jeon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Bridges <icb@fastmail.org>
[ Upstream commit 8296a64df5448548f410fb246c1d88a93609602b ]
When smb_check_perm_dacl() falls back to the POSIX ACL and then denies
the request, its debug message prints the access mask of the ACE that
the second DACL walk stopped at. On that path the walk ran to the end
of the DACL, so the pointer is one past the last ACE. If the DACL is
the last part of the stored security descriptor, the message reads 4
bytes past the buffer, and KASAN reports a slab-out-of-bounds read in
smb_check_perm_dacl().
Print the requested and allowed masks instead. They are what the check
compares.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
[ sashal: Adjusted context to preserve the existing permission check with inline implicit permissions because strict mode is absent. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/smbacl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/smb/server/smbacl.c b/fs/smb/server/smbacl.c
index 63f7bccb4d9af..d8c01e775d941 100644
--- a/fs/smb/server/smbacl.c
+++ b/fs/smb/server/smbacl.c
@@ -1650,8 +1650,8 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
check_access_bits:
if (granted &
~(access_bits | FILE_READ_ATTRIBUTES | READ_CONTROL | WRITE_DAC | DELETE)) {
- ksmbd_debug(SMB, "Access denied with winACL, granted : %x, access_req : %x\n",
- granted, le32_to_cpu(ace->access_req));
+ ksmbd_debug(SMB, "Access denied with winACL, requested : %x, allowed : %x\n",
+ granted, access_bits);
rc = -EACCES;
goto err_out;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0075/2151] cipso: stop modifying live ip_options_rcu
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (73 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0074/2151] ksmbd: do not read past the DACL in the access denied debug message Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0076/2151] mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows Greg Kroah-Hartman
` (807 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jann Horn, Eric Dumazet, Paul Moore,
Jakub Kicinski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <jannh@google.com>
[ Upstream commit 1f2c5183fc0902892648f0453e38c0951cef3fec ]
cipso_v4_delopt() operates on the ip_options_rcu of a socket or a request
socket, and tries to remove CIPSO options from the middle by moving all
subsequent options.
That's not allowed - ip_options_rcu can be read locklessly and must always
be consistent. For example, ip_options_undo() reads trusted offsets and
length values from the options buffer.
Fix it by doing the modification in a copy.
The core change is in cipso_v4_delopt(), the rest is ugly plumbing to
propagate memory allocation failures.
Triggering this bug requires that the system is configured to use CIPSO.
(Setting up CIPSO requires privileges in init_user_ns.)
Fixes: f6d8bd051c39 ("inet: add RCU protection to inet->opt")
Cc: stable@vger.kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Acked-by: Paul Moore <paul@paul-moore.com>
Link: https://patch.msgid.link/20261106-cipso-rcuopts-v1-1-31ae931d7a0f@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/cipso_ipv4.h | 11 ++++++-----
include/net/netlabel.h | 11 ++++++-----
net/ipv4/cipso_ipv4.c | 16 +++++++++++++---
net/netlabel/netlabel_kapi.c | 24 ++++++++++--------------
security/selinux/netlabel.c | 5 +++--
security/smack/smack_lsm.c | 14 +++++++++-----
6 files changed, 47 insertions(+), 34 deletions(-)
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index d6780d7903f4a..b41672221797b 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -185,12 +185,12 @@ int cipso_v4_sock_setattr(struct sock *sk,
const struct cipso_v4_doi *doi_def,
const struct netlbl_lsm_secattr *secattr,
bool sk_locked);
-void cipso_v4_sock_delattr(struct sock *sk);
+int cipso_v4_sock_delattr(struct sock *sk);
int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr);
int cipso_v4_req_setattr(struct request_sock *req,
const struct cipso_v4_doi *doi_def,
const struct netlbl_lsm_secattr *secattr);
-void cipso_v4_req_delattr(struct request_sock *req);
+int cipso_v4_req_delattr(struct request_sock *req);
int cipso_v4_skbuff_setattr(struct sk_buff *skb,
const struct cipso_v4_doi *doi_def,
const struct netlbl_lsm_secattr *secattr);
@@ -221,8 +221,9 @@ static inline int cipso_v4_sock_setattr(struct sock *sk,
return -ENOSYS;
}
-static inline void cipso_v4_sock_delattr(struct sock *sk)
+static inline int cipso_v4_sock_delattr(struct sock *sk)
{
+ return 0;
}
static inline int cipso_v4_sock_getattr(struct sock *sk,
@@ -238,9 +239,9 @@ static inline int cipso_v4_req_setattr(struct request_sock *req,
return -ENOSYS;
}
-static inline void cipso_v4_req_delattr(struct request_sock *req)
+static inline int cipso_v4_req_delattr(struct request_sock *req)
{
- return;
+ return 0;
}
static inline int cipso_v4_skbuff_setattr(struct sk_buff *skb,
diff --git a/include/net/netlabel.h b/include/net/netlabel.h
index 02914b1df38ba..f896b9d52ed16 100644
--- a/include/net/netlabel.h
+++ b/include/net/netlabel.h
@@ -477,7 +477,7 @@ int netlbl_sock_setattr(struct sock *sk,
u16 family,
const struct netlbl_lsm_secattr *secattr,
bool sk_locked);
-void netlbl_sock_delattr(struct sock *sk);
+int netlbl_sock_delattr(struct sock *sk);
int netlbl_sock_getattr(struct sock *sk,
struct netlbl_lsm_secattr *secattr);
int netlbl_conn_setattr(struct sock *sk,
@@ -485,7 +485,7 @@ int netlbl_conn_setattr(struct sock *sk,
const struct netlbl_lsm_secattr *secattr);
int netlbl_req_setattr(struct request_sock *req,
const struct netlbl_lsm_secattr *secattr);
-void netlbl_req_delattr(struct request_sock *req);
+int netlbl_req_delattr(struct request_sock *req);
int netlbl_skbuff_setattr(struct sk_buff *skb,
u16 family,
const struct netlbl_lsm_secattr *secattr);
@@ -626,8 +626,9 @@ static inline int netlbl_sock_setattr(struct sock *sk,
{
return -ENOSYS;
}
-static inline void netlbl_sock_delattr(struct sock *sk)
+static inline int netlbl_sock_delattr(struct sock *sk)
{
+ return 0;
}
static inline int netlbl_sock_getattr(struct sock *sk,
struct netlbl_lsm_secattr *secattr)
@@ -645,9 +646,9 @@ static inline int netlbl_req_setattr(struct request_sock *req,
{
return -ENOSYS;
}
-static inline void netlbl_req_delattr(struct request_sock *req)
+static inline int netlbl_req_delattr(struct request_sock *req)
{
- return;
+ return 0;
}
static inline int netlbl_skbuff_setattr(struct sk_buff *skb,
u16 family,
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 793c556c206d7..cea4bcfe26937 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -2005,11 +2005,16 @@ static int cipso_v4_delopt(struct ip_options_rcu __rcu **opt_ptr)
if (!opt || opt->opt.cipso == 0)
return 0;
if (opt->opt.srr || opt->opt.rr || opt->opt.ts || opt->opt.router_alert) {
+ struct ip_options_rcu *old_opt = opt;
u8 cipso_len;
u8 cipso_off;
unsigned char *cipso_ptr;
int optlen_new;
+ /* ip_options_rcu must not be modified in place, use a copy */
+ opt = kmemdup(opt, sizeof(*opt) + opt->opt.optlen, GFP_ATOMIC);
+ if (!opt)
+ return -ENOMEM;
cipso_off = opt->opt.cipso - sizeof(struct iphdr);
cipso_ptr = &opt->opt.__data[cipso_off];
cipso_len = cipso_ptr[1];
@@ -2037,6 +2042,8 @@ static int cipso_v4_delopt(struct ip_options_rcu __rcu **opt_ptr)
memset(&opt->opt.__data[optlen_new], IPOPT_END,
opt->opt.optlen - optlen_new);
+ rcu_assign_pointer(*opt_ptr, opt);
+ kfree_rcu(old_opt, rcu);
} else {
/* only the cipso option was present on the socket so we can
* remove the entire option struct */
@@ -2056,7 +2063,7 @@ static int cipso_v4_delopt(struct ip_options_rcu __rcu **opt_ptr)
* Removes the CIPSO option from a socket, if present.
*
*/
-void cipso_v4_sock_delattr(struct sock *sk)
+int cipso_v4_sock_delattr(struct sock *sk)
{
struct inet_sock *sk_inet;
int hdr_delta;
@@ -2069,6 +2076,7 @@ void cipso_v4_sock_delattr(struct sock *sk)
sk_conn->icsk_ext_hdr_len -= hdr_delta;
sk_conn->icsk_sync_mss(sk, sk_conn->icsk_pmtu_cookie);
}
+ return (hdr_delta < 0) ? hdr_delta : 0;
}
/**
@@ -2079,9 +2087,11 @@ void cipso_v4_sock_delattr(struct sock *sk)
* Removes the CIPSO option from a request socket, if present.
*
*/
-void cipso_v4_req_delattr(struct request_sock *req)
+int cipso_v4_req_delattr(struct request_sock *req)
{
- cipso_v4_delopt(&inet_rsk(req)->ireq_opt);
+ int hdr_delta = cipso_v4_delopt(&inet_rsk(req)->ireq_opt);
+
+ return (hdr_delta < 0) ? hdr_delta : 0;
}
/**
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c
index 33b77084a4e5f..34ef835191dd2 100644
--- a/net/netlabel/netlabel_kapi.c
+++ b/net/netlabel/netlabel_kapi.c
@@ -1045,18 +1045,18 @@ int netlbl_sock_setattr(struct sock *sk,
* ensuring that @sk is locked.
*
*/
-void netlbl_sock_delattr(struct sock *sk)
+int netlbl_sock_delattr(struct sock *sk)
{
switch (sk->sk_family) {
case AF_INET:
- cipso_v4_sock_delattr(sk);
- break;
+ return cipso_v4_sock_delattr(sk);
#if IS_ENABLED(CONFIG_IPV6)
case AF_INET6:
calipso_sock_delattr(sk);
break;
#endif /* IPv6 */
}
+ return 0;
}
/**
@@ -1156,8 +1156,7 @@ int netlbl_conn_setattr(struct sock *sk,
case NETLBL_NLTYPE_UNLABELED:
/* just delete the protocols we support for right now
* but we could remove other protocols if needed */
- netlbl_sock_delattr(sk);
- ret_val = 0;
+ ret_val = netlbl_sock_delattr(sk);
break;
default:
ret_val = -ENOENT;
@@ -1185,8 +1184,7 @@ int netlbl_conn_setattr(struct sock *sk,
case NETLBL_NLTYPE_UNLABELED:
/* just delete the protocols we support for right now
* but we could remove other protocols if needed */
- netlbl_sock_delattr(sk);
- ret_val = 0;
+ ret_val = netlbl_sock_delattr(sk);
break;
default:
ret_val = -ENOENT;
@@ -1234,8 +1232,7 @@ int netlbl_req_setattr(struct request_sock *req,
entry->cipso, secattr);
break;
case NETLBL_NLTYPE_UNLABELED:
- netlbl_req_delattr(req);
- ret_val = 0;
+ ret_val = netlbl_req_delattr(req);
break;
default:
ret_val = -ENOENT;
@@ -1255,8 +1252,7 @@ int netlbl_req_setattr(struct request_sock *req,
entry->calipso, secattr);
break;
case NETLBL_NLTYPE_UNLABELED:
- netlbl_req_delattr(req);
- ret_val = 0;
+ ret_val = netlbl_req_delattr(req);
break;
default:
ret_val = -ENOENT;
@@ -1280,18 +1276,18 @@ int netlbl_req_setattr(struct request_sock *req,
* Remove all the NetLabel labeling from @req.
*
*/
-void netlbl_req_delattr(struct request_sock *req)
+int netlbl_req_delattr(struct request_sock *req)
{
switch (req->rsk_ops->family) {
case AF_INET:
- cipso_v4_req_delattr(req);
- break;
+ return cipso_v4_req_delattr(req);
#if IS_ENABLED(CONFIG_IPV6)
case AF_INET6:
calipso_req_delattr(req);
break;
#endif /* IPv6 */
}
+ return 0;
}
/**
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c
index d51dfe8923122..24b11d1891d85 100644
--- a/security/selinux/netlabel.c
+++ b/security/selinux/netlabel.c
@@ -557,9 +557,10 @@ static int selinux_netlbl_socket_connect_helper(struct sock *sk,
* is set to AF_UNSPEC, if that is what is happening we want to reset
* the socket */
if (addr->sa_family == AF_UNSPEC) {
- netlbl_sock_delattr(sk);
+ rc = netlbl_sock_delattr(sk);
+ if (rc)
+ return rc;
sksec->nlbl_state = NLBL_REQSKB;
- rc = 0;
return rc;
}
secattr = selinux_netlbl_sock_genattr(sk);
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 217304cd20c3b..a8dc3a8a46b89 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -2658,22 +2658,26 @@ static int smack_netlbl_add(struct sock *sk)
*
* Remove the outbound smack value from a socket
*/
-static void smack_netlbl_delete(struct sock *sk)
+static int smack_netlbl_delete(struct sock *sk)
{
struct socket_smack *ssp = smack_sock(sk);
+ int rc;
/*
* Take the label off the socket if one is set.
*/
if (ssp->smk_state != SMK_NETLBL_LABELED)
- return;
+ return 0;
local_bh_disable();
bh_lock_sock_nested(sk);
- netlbl_sock_delattr(sk);
+ rc = netlbl_sock_delattr(sk);
bh_unlock_sock(sk);
local_bh_enable();
+ if (rc)
+ return rc;
ssp->smk_state = SMK_NETLBL_UNLABELED;
+ return 0;
}
/**
@@ -2713,7 +2717,7 @@ static int smk_ipv4_check(struct sock *sk, struct sockaddr_in *sap)
* Clear the socket netlabel if it's set.
*/
if (!rc)
- smack_netlbl_delete(sk);
+ rc = smack_netlbl_delete(sk);
}
rcu_read_unlock();
@@ -4550,7 +4554,7 @@ static int smack_inet_conn_request(const struct sock *sk, struct sk_buff *skb,
if (hskp == NULL)
rc = netlbl_req_setattr(req, &ssp->smk_out->smk_netlabel);
else
- netlbl_req_delattr(req);
+ rc = netlbl_req_delattr(req);
return rc;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0076/2151] mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (74 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0075/2151] cipso: stop modifying live ip_options_rcu Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0077/2151] KVM: arm64: vgic-its: Dont map an LPI from more than one event Greg Kroah-Hartman
` (806 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lorenzo Stoakes (ARM), Andrew Morton,
Daehyeon Ko, Jose A. Perez de Azpillaga, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes (ARM) <ljs@kernel.org>
[ Upstream commit 7135a05838e85845e1bbf6caa6596a7e3b791a40 ]
So far the assumption has been that mm->mm_lock_seq overflow is benign,
resulting only in readers spuriously falling back to the mmap lock, however
it turns out that this was an unsafe assumption.
If a VMA can be spuriously considered write locked that means read lock
exclusion does not take place, and thus a VMA can end up write-locked with
concurrent readers.
Since overflow only occurs every 2^31 write lock/unlock cycles, resolve the
issue by resetting every VMA's vma->vm_lock_seq each time such an overflow
occurs.
This is done in vma_end_write_all(), which is called when the mmap write
lock is released, i.e. in mmap_write_unlock() and mmap_write_downgrade().
Care must be taken, as resetting the sequence count at overflow means
changing the seqcount of VMAs which are already attached and observable.
The mm's seqcount is guaranteed to be odd when a write lock is held, and
thus any write locked VMA will have an odd seqcount assigned.
Therefore resetting to an even value prevents spurious write locks, since
these can only occur with the mmap write lock held, at which point the mmap
seqcount will be odd.
However, vma_start_read() also checks vma->vm_lock_seq == mm->mm_lock_seq,
bailing if so (indicating a write lock).
This would cause any even reset value chosen to prevent VMA read locks from
being taken - avoid this by also checking whether the VMA seqcount is odd
before bailing on the read lock.
So far, vma->vm_lock_seq has defaulted to UINT_MAX, but this has been
unnecessary since commit e5e7fb278e59 ("mm: convert mm_lock_seq to a proper
seqcount"), since this is assigned when the VMA is still detached, and
cannot be observed.
Therefore perform both reset and initialisation of vma->vm_lock_seq by
simply setting vma->vm_lock_seq to zero.
The reset, performed in __mm_reset_vma_seqcounts(), only needs to
WRITE_ONCE() the value.
However the read of vma->vm_lock_seq in vma_start_read() needs to have
acquire semantics to pair with the smp_wmb() in do_raw_write_seqcount_end()
so a reader reading a reset value also observes VMA modifications made
under the write lock.
Since all VMA write locks were just released and the mmap write lock is
still held, there are no concurrent VMA writers.
Concurrent VMA readers are unaffected. New VMA readers observe either zero,
never a write lock, or the prior seqcount, behaving as before the reset.
Since this only occurs every 2^31 write lock/unlock cycles, the time taken
to update all VMAs is considered to be acceptable.
Also update comments, documentation and VMA userland tests to reflect the
change.
User facing effects are - dangerous races that could cause memory
corruption or NULL pointer derefences (especially on page table traversal)
are avoided.
Fixes: 5e31275cc997 ("mm: add per-VMA lock and helper functions to control it")
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Daehyeon Ko <4ncienth@gmail.com>
Closes: https://lore.kernel.org/all/20261015143735.1630957-1-4ncienth@gmail.com/
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Tested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Cc: <stable@vger.kernel.org>
[ ljs - Placed the seqcount reset under CONFIG_PER_VMA_LOCK, applied test changes to vma.c, vma_internal.h. ]
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/mm/process_addrs.rst | 14 ++++-
include/linux/mm_types.h | 12 ++--
include/linux/mmap_lock.h | 32 ++++++++---
mm/mmap_lock.c | 89 ++++++++++++++++++++++++++----
tools/testing/vma/vma.c | 8 +--
tools/testing/vma/vma_internal.h | 2 +-
6 files changed, 126 insertions(+), 31 deletions(-)
diff --git a/Documentation/mm/process_addrs.rst b/Documentation/mm/process_addrs.rst
index be49e2a269e47..b0607449485f6 100644
--- a/Documentation/mm/process_addrs.rst
+++ b/Documentation/mm/process_addrs.rst
@@ -807,9 +807,17 @@ All this is achieved by the use of per-mm and per-VMA sequence counts, which are
used in order to reduce complexity, especially for operations which write-lock
multiple VMAs at once.
-If the mm sequence count, :c:member:`!mm->mm_lock_seq` is equal to the VMA
-sequence count :c:member:`!vma->vm_lock_seq` then the VMA is write-locked. If
-they differ, then it is not.
+The mm sequence count :c:member:`!mm->mm_lock_seq` is incremented on both mmap
+write lock and unlock, so it is odd while the mmap write lock is held. If it is
+equal to the VMA sequence count :c:member:`!vma->vm_lock_seq`, and that value
+is odd, then the VMA is write-locked. If they differ, then it is not.
+
+A VMA's sequence count is not updated on unlock, so after 2^31 write lock/unlock
+cycles the mm sequence count would wrap and match stale VMA values again. To
+prevent this, when the mm sequence count wraps to zero,
+:c:func:`!vma_end_write_all` invokes :c:func:`!__mm_reset_vma_seqcounts` to
+reset every VMA's sequence count to zero, an even value which can never
+indicate a write lock.
Each time the mmap write lock is released in :c:func:`!mmap_write_unlock` or
:c:func:`!mmap_write_downgrade`, :c:func:`!vma_end_write_all` is invoked which
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 08495d38572f3..74ecc8f04d295 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -845,15 +845,19 @@ struct vm_area_struct {
* Can only be written (using WRITE_ONCE()) while holding both:
* - mmap_lock (in write mode)
* - vm_refcnt bit at VMA_LOCK_OFFSET is set
+ * The one exception is __mm_reset_vma_seqcounts(), which stores zero
+ * (an even value, which can never indicate a write lock) under the
+ * mmap write lock alone once the mm seqcount has wrapped, so a reader
+ * holding only vm_refcnt may observe the value change from odd to zero.
* Can be read reliably while holding one of:
* - mmap_lock (in read or write mode)
- * - vm_refcnt bit at VMA_LOCK_OFFSET is set or vm_refcnt > 1
+ * - vm_refcnt bit at VMA_LOCK_OFFSET is set
* Can be read unreliably (using READ_ONCE()) for pessimistic bailout
* while holding nothing (except RCU to keep the VMA struct allocated).
*
- * This sequence counter is explicitly allowed to overflow; sequence
- * counter reuse can only lead to occasional unnecessary use of the
- * slowpath.
+ * Assigned the (odd) mm seqcount on write lock and not updated on
+ * unlock, so a stale value would alias the mm seqcount again 2^31 write
+ * lock/unlock cycles later. The reset described above prevents this.
*/
unsigned int vm_lock_seq;
#endif
diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h
index 81c4d552bfab6..2e8bef12c76c8 100644
--- a/include/linux/mmap_lock.h
+++ b/include/linux/mmap_lock.h
@@ -119,7 +119,7 @@ static inline void vma_lock_init(struct vm_area_struct *vma, bool reset_refcnt)
#endif
if (reset_refcnt)
refcount_set(&vma->vm_refcnt, 0);
- vma->vm_lock_seq = UINT_MAX;
+ vma->vm_lock_seq = 0;
}
static inline bool is_vma_writer_only(int refcnt)
@@ -148,9 +148,10 @@ static inline void vma_refcount_put(struct vm_area_struct *vma)
}
/*
- * Use only while holding mmap read lock which guarantees that locking will not
- * fail (nobody can concurrently write-lock the vma). vma_start_read() should
- * not be used in such cases because it might fail due to mm_lock_seq overflow.
+ * Use only while holding mmap read lock which guarantees that vma lock is not
+ * contended (nobody can concurrently write-lock the vma). vma_start_read() need
+ * not be used in such cases, as the mmap lock already excludes VMA writers so
+ * its sequence number checks are redundant.
* This functionality is used to obtain vma read lock and drop the mmap read lock.
*/
static inline bool vma_start_read_locked_nested(struct vm_area_struct *vma, int subclass)
@@ -167,9 +168,10 @@ static inline bool vma_start_read_locked_nested(struct vm_area_struct *vma, int
}
/*
- * Use only while holding mmap read lock which guarantees that locking will not
- * fail (nobody can concurrently write-lock the vma). vma_start_read() should
- * not be used in such cases because it might fail due to mm_lock_seq overflow.
+ * Use only while holding mmap read lock which guarantees that vma lock is not
+ * contended (nobody can concurrently write-lock the vma). vma_start_read() need
+ * not be used in such cases, as the mmap lock already excludes VMA writers so
+ * its sequence number checks are redundant.
* This functionality is used to obtain vma read lock and drop the mmap read lock.
*/
static inline bool vma_start_read_locked(struct vm_area_struct *vma)
@@ -334,6 +336,10 @@ static inline int __must_check mmap_write_lock_killable(struct mm_struct *mm)
return ret;
}
+#ifdef CONFIG_PER_VMA_LOCK
+void __mm_reset_vma_seqcounts(struct mm_struct *mm);
+#endif
+
/*
* Drop all currently-held per-VMA locks.
* This is called from the mmap_lock implementation directly before releasing
@@ -346,6 +352,18 @@ static inline void vma_end_write_all(struct mm_struct *mm)
{
mmap_assert_write_locked(mm);
mm_lock_seqcount_end(mm);
+
+#ifdef CONFIG_PER_VMA_LOCK
+ /*
+ * VMA seqcounts are not updated on unlock, so once the mm seqcount has
+ * wrapped, any VMA still carrying a sequence number from before the
+ * wrap would satisfy __is_vma_write_locked() when that number comes
+ * round again, and readers would not be excluded. Reset every VMA's
+ * seqcount so that no stale value survives the wrap.
+ */
+ if (unlikely(!mm->mm_lock_seq.sequence))
+ __mm_reset_vma_seqcounts(mm);
+#endif
}
static inline void mmap_write_unlock(struct mm_struct *mm)
diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c
index 42e3dde73e741..c6becd6dd5d50 100644
--- a/mm/mmap_lock.c
+++ b/mm/mmap_lock.c
@@ -127,21 +127,38 @@ void vma_mark_detached(struct vm_area_struct *vma)
}
}
+/* Do the VMA, mm seqcounts indicate the VMA is write locked? */
+static bool vma_seqcount_is_write_locked(unsigned int vma_seq, unsigned int mm_seq)
+{
+ /* VMA and mm sequence numbers must match for a write lock. */
+ if (vma_seq != mm_seq)
+ return false;
+
+ /*
+ * The VMA seqcount is always odd if locked. For an attached VMA an even
+ * value can only be the zero stored by __mm_reset_vma_seqcounts(),
+ * never a write lock.
+ */
+ return vma_seq & 1;
+}
+
/*
* Try to read-lock a vma. The function is allowed to occasionally yield false
* locked result to avoid performance overhead, in which case we fall back to
* using mmap_lock. The function should never yield false unlocked result.
- * False locked result is possible if mm_lock_seq overflows or if vma gets
- * reused and attached to a different mm before we lock it.
+ * False locked result is possible if vma gets reused and attached to a
+ * different mm before we lock it.
* Returns the vma on success, NULL on failure to lock and EAGAIN if vma got
* detached.
*
* IMPORTANT: RCU lock must be held upon entering the function, but upon error
* IT IS RELEASED. The caller must handle this correctly.
*/
-static inline struct vm_area_struct *vma_start_read(struct mm_struct *mm,
- struct vm_area_struct *vma)
+static struct vm_area_struct *vma_start_read(struct mm_struct *mm,
+ struct vm_area_struct *vma)
{
+ unsigned int vma_seq;
+ unsigned int mm_seq;
struct mm_struct *other_mm;
int oldcnt;
@@ -153,7 +170,9 @@ static inline struct vm_area_struct *vma_start_read(struct mm_struct *mm,
* we don't rely on for anything - the mm_lock_seq read against which we
* need ordering is below.
*/
- if (READ_ONCE(vma->vm_lock_seq) == READ_ONCE(mm->mm_lock_seq.sequence)) {
+ vma_seq = READ_ONCE(vma->vm_lock_seq);
+ mm_seq = READ_ONCE(mm->mm_lock_seq.sequence);
+ if (vma_seqcount_is_write_locked(vma_seq, mm_seq)) {
vma = NULL;
goto err;
}
@@ -177,17 +196,26 @@ static inline struct vm_area_struct *vma_start_read(struct mm_struct *mm,
goto err_unstable;
/*
- * Overflow of vm_lock_seq/mm_lock_seq might produce false locked result.
- * False unlocked result is impossible because we modify and check
+ * False unlocked result is impossible because a write lock sets
* vma->vm_lock_seq under vma->vm_refcnt protection and mm->mm_lock_seq
* modification invalidates all existing locks.
*
- * We must use ACQUIRE semantics for the mm_lock_seq so that if we are
- * racing with vma_end_write_all(), we only start reading from the VMA
- * after it has been unlocked.
- * This pairs with RELEASE semantics in vma_end_write_all().
+ * ACQUIRE semantics are required for both reads.
+ *
+ * __mm_reset_vma_seqcounts() might reset vma->vm_lock_seq to zero
+ * after an overflow. A reader observing that zero must also observe
+ * the VMA modifications made under the write lock which just ended, so
+ * the ACQUIRE pairs with the smp_wmb() in do_raw_write_seqcount_end()
+ * that precedes the reset stores.
+ *
+ * The ACQUIRE semantics for the mm_lock_seq read is required so that,
+ * if we are racing with vma_end_write_all(), we only start reading from
+ * the VMA after it has been unlocked. This pairs with the RELEASE
+ * semantics in vma_end_write_all().
*/
- if (unlikely(vma->vm_lock_seq == raw_read_seqcount(&mm->mm_lock_seq))) {
+ vma_seq = smp_load_acquire(&vma->vm_lock_seq);
+ mm_seq = raw_read_seqcount(&mm->mm_lock_seq);
+ if (unlikely(vma_seqcount_is_write_locked(vma_seq, mm_seq))) {
vma_refcount_put(vma);
vma = NULL;
goto err;
@@ -359,6 +387,43 @@ struct vm_area_struct *lock_next_vma(struct mm_struct *mm,
return vma;
}
+
+/*
+ * Called with mmap write lock held after mm->mm_lock_seq just overflowed (and
+ * therefore zero), with all VMA write locks now released.
+ *
+ * The stores below follow the smp_wmb() in do_raw_write_seqcount_end(), so
+ * a reader that observes a reset value also observes this cycle's VMA
+ * modifications (ordered by the ACQUIRE on vma->vm_lock_seq in
+ * vma_start_read()).
+ */
+void __mm_reset_vma_seqcounts(struct mm_struct *mm)
+{
+ struct vm_area_struct *vma;
+ VMA_ITERATOR(vmi, mm, 0);
+
+ mmap_assert_write_locked(mm);
+ VM_WARN_ON_ONCE(mm->mm_lock_seq.sequence);
+
+ /*
+ * Failing to reset means stale vma->vm_lock_seq values could result in
+ * those VMAs becoming spuriously write locked when mm->mm_lock_seq
+ * happens to match their values.
+ *
+ * This is problematic, as it causes the VMA write lock to not exclude
+ * readers, which can result in concurrent readers while a VMA write
+ * lock is held.
+ *
+ * Avoid this by resetting to an even value (indicates no write lock
+ * held).
+ *
+ * Readers will either observe zero (not write locked) or the previous
+ * value, so this is safe.
+ */
+ for_each_vma(vmi, vma)
+ WRITE_ONCE(vma->vm_lock_seq, 0);
+}
+EXPORT_SYMBOL(__mm_reset_vma_seqcounts);
#endif /* CONFIG_PER_VMA_LOCK */
#ifdef CONFIG_LOCK_MM_AND_FIND_VMA
diff --git a/tools/testing/vma/vma.c b/tools/testing/vma/vma.c
index db580c5d21515..0e68b523db91f 100644
--- a/tools/testing/vma/vma.c
+++ b/tools/testing/vma/vma.c
@@ -120,7 +120,7 @@ static struct vm_area_struct *alloc_and_link_vma(struct mm_struct *mm,
* begun. Linking to the tree will have caused this to be incremented,
* which means we will get a false positive otherwise.
*/
- vma->vm_lock_seq = UINT_MAX;
+ vma->vm_lock_seq = 0;
return vma;
}
@@ -268,13 +268,13 @@ static int cleanup_mm(struct mm_struct *mm, struct vma_iterator *vmi)
/* Helper function to determine if VMA has had vma_start_write() performed. */
static bool vma_write_started(struct vm_area_struct *vma)
{
- int seq = vma->vm_lock_seq;
+ unsigned int seq = vma->vm_lock_seq;
/* We reset after each check. */
- vma->vm_lock_seq = UINT_MAX;
+ vma->vm_lock_seq = 0;
/* The vma_start_write() stub simply increments this value. */
- return seq > -1;
+ return seq > 0;
}
/* Helper function providing a dummy vm_ops->close() method.*/
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h
index b736528815bd8..02e6c32d16bb1 100644
--- a/tools/testing/vma/vma_internal.h
+++ b/tools/testing/vma/vma_internal.h
@@ -658,7 +658,7 @@ static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm)
vma->vm_mm = mm;
vma->vm_ops = &vma_dummy_vm_ops;
INIT_LIST_HEAD(&vma->anon_vma_chain);
- vma->vm_lock_seq = UINT_MAX;
+ vma->vm_lock_seq = 0;
}
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0077/2151] KVM: arm64: vgic-its: Dont map an LPI from more than one event
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (75 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0076/2151] mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0078/2151] l2tp: snapshot sequencing state when building transmit headers Greg Kroah-Hartman
` (805 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Marc Zyngier, Fuad Tabba,
Oliver Upton, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fuad Tabba <fuad.tabba@linux.dev>
[ Upstream commit de81b28f0b83b22163d7d9a9b708d7aa912e0ef7 ]
KVM keeps one vgic_irq per LPI. A MAPTI of an LPI whose vgic_irq
already exists reuses it for the new ITE and leaves its target vCPU as
it was. Mapping one LPI from two events is UNPREDICTABLE (IHI 0069H.b,
5.2.10), but nothing stops a guest from doing it. If the first MAPTI
names a collection the guest never maps and the second a mapped one,
the LPI translates through the second event with a NULL target vCPU.
When the VMM routes an assigned device's MSI to that event on a host
with GICv4 enabled, kvm_vgic_v4_set_forwarding() takes the vPE from the
NULL target vCPU and the host oopses:
Unable to handle kernel paging request at virtual address 0000000000001980
[...]
Call trace:
its_build_vmapti_cmd (drivers/irqchip/irq-gic-v3-its.c:943) (P)
its_irq_set_vcpu_affinity (drivers/irqchip/irq-gic-v3-its.c:1380)
irq_set_vcpu_affinity (kernel/irq/manage.c:670)
its_map_vlpi (drivers/irqchip/irq-gic-v4.c:326)
kvm_vgic_v4_set_forwarding (arch/arm64/kvm/vgic/vgic-v4.c:485)
kvm_arch_irq_bypass_add_producer (arch/arm64/kvm/arm.c:2977)
irq_bypass_register_consumer (virt/lib/irqbypass.c:44)
kvm_irqfd (arch/arm64/kvm/../../../virt/kvm/eventfd.c:496)
kvm_vm_ioctl (arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5270)
Track in each vgic_irq whether an ITE maps it. Drop a MAPTI of an LPI
that is already mapped, as a failed MAPTI already is. Restoring the ITS
tables keeps the first ITE it reads for each LPI and drops any later
one, so a guest saved with a double mapping still restores. Key the
check on the mapping, not on the vgic_irq. A vgic_irq outlives its ITE
while anything holds a reference to it, such as the vCPU it was last
queued on. A later MAPTI of such an LPI succeeds as before, and now
retargets it to its collection.
Fixes: 196b136498b35 ("KVM: arm/arm64: GICv4: Wire mapping/unmapping of VLPIs in VFIO irq bypass")
Suggested-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Reviewed-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/20261013081646.933312-2-fuad.tabba@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
[ sashal: Changed mapped from a boolean bitfield to a plain bool to match the existing vgic_irq layout. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/kvm/vgic/vgic-its.c | 26 ++++++++++++++++++++++++--
include/kvm/arm_vgic.h | 1 +
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
index 7ce07c8eb5b7e..0f77c755b16f9 100644
--- a/arch/arm64/kvm/vgic/vgic-its.c
+++ b/arch/arm64/kvm/vgic/vgic-its.c
@@ -774,6 +774,7 @@ static void its_free_ite(struct kvm *kvm, struct its_ite *ite)
its_unmap_vlpi(ite->irq->host_irq);
irq->hw = false;
+ irq->mapped = false;
}
vgic_put_irq(kvm, ite->irq);
@@ -782,6 +783,23 @@ static void its_free_ite(struct kvm *kvm, struct its_ite *ite)
kfree(ite);
}
+/* Mapping one LPI from two events is UNPREDICTABLE: the first ITE keeps it. */
+static bool vgic_its_map_lpi(struct kvm *kvm, struct its_ite *ite,
+ struct vgic_irq *irq, struct kvm_vcpu *vcpu)
+{
+ scoped_guard(raw_spinlock_irqsave, &irq->irq_lock) {
+ if (!irq->mapped) {
+ irq->mapped = true;
+ irq->target_vcpu = vcpu;
+ ite->irq = irq;
+ return true;
+ }
+ }
+
+ vgic_put_irq(kvm, irq);
+ return false;
+}
+
static u64 its_cmd_mask_field(u64 *its_cmd, int word, int shift, int size)
{
return (le64_to_cpu(its_cmd[word]) >> shift) & (BIT_ULL(size) - 1);
@@ -1091,13 +1109,14 @@ static int vgic_its_cmd_handle_mapi(struct kvm *kvm, struct vgic_its *its,
vcpu = collection_to_vcpu(kvm, collection);
irq = vgic_add_lpi(kvm, lpi_nr, vcpu);
+ if (!IS_ERR(irq) && !vgic_its_map_lpi(kvm, ite, irq, vcpu))
+ irq = ERR_PTR(-EEXIST);
if (IS_ERR(irq)) {
if (new_coll)
vgic_its_free_collection(its, coll_id);
its_free_ite(kvm, ite);
return PTR_ERR(irq);
}
- ite->irq = irq;
return 0;
}
@@ -2208,7 +2227,10 @@ static int vgic_its_restore_ite(struct vgic_its *its, u32 event_id,
its_free_ite(kvm, ite);
return PTR_ERR(irq);
}
- ite->irq = irq;
+
+ /* Drop an ITE whose LPI another ITE maps, as MAPTI does. */
+ if (!vgic_its_map_lpi(kvm, ite, irq, vcpu))
+ its_free_ite(kvm, ite);
return offset;
}
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 25eb6ba9dd23c..e8c00881dc218 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -142,6 +142,7 @@ struct vgic_irq {
bool active;
bool enabled;
bool hw; /* Tied to HW IRQ */
+ bool mapped; /* LPIs: mapped by an ITE */
refcount_t refcount; /* Used for LPIs */
u32 hwintid; /* HW INTID number */
unsigned int host_irq; /* linux irq corresponding to hwintid */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0078/2151] l2tp: snapshot sequencing state when building transmit headers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (76 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0077/2151] KVM: arm64: vgic-its: Dont map an LPI from more than one event Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0079/2151] mm/memory: update stale locking comments for fault handlers Greg Kroah-Hartman
` (804 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Chengfeng Ye, Paolo Abeni,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengfeng Ye <nicoyip.dev@gmail.com>
[ Upstream commit d06ae66516e1aaf023808912af6292aef09d46c3 ]
Updates to send_seq from netlink, PPP setsockopt and receive-side
negotiation race with packet transmission. The header length is updated
separately, while transmit reads both fields repeatedly without
synchronization.
For example, transmit can push a ten-byte L2TPv2 header, then a concurrent
writer clears send_seq before the header builder reads it. The builder
writes only six bytes, leaving four bytes of uninitialized skb headroom
in the outgoing packet. The reverse mismatch overwrites the beginning of
the payload. A later hdr_len read can also make the UDP length disagree
with the skb length.
KCSAN reported:
BUG: KCSAN: data-race in l2tp_session_set_header_len / l2tp_xmit_skb
write to 0xffff888100d0944a of 2 bytes by task 116 on cpu 1:
l2tp_session_set_header_len+0x81/0xc0
l2tp_nl_cmd_session_modify+0x122/0x2c0
genl_family_rcv_msg_doit+0x170/0x1d0
read to 0xffff888100d0944a of 2 bytes by task 115 on cpu 0:
l2tp_xmit_skb+0x9c/0xc80
pppol2tp_sendmsg+0x21c/0x2a0
__sys_sendto+0x28c/0x2a0
The bug can lead to leak kernel base address for KASLR bypass, the
corresponding reproducer can be provided per request.
Initialize hdr_len to the maximum header size and leave it unchanged
when sequencing is toggled. Snapshot send_seq once per packet and use
that snapshot for the actual header length and header construction,
including the sequence flag. Use the same length for headroom, the header
push and the UDP length. PPP callers can safely reserve the maximum size;
L2TPv3 header sizes do not depend on sequencing.
Make send_seq a separate bool so READ_ONCE() and WRITE_ONCE() can be used
without sharing a bitfield storage unit with other configuration flags.
Preserve the netlink attribute's existing low-bit truncation.
Fixes: 3557baabf280 ("[L2TP]: PPP over L2TP driver core")
Cc: stable@vger.kernel.org
Assisted-by: GPT-6 Astra
Signed-off-by: Chengfeng Ye <nicoyip.dev@gmail.com>
Link: https://patch.msgid.link/20261013090500.1180376-1-nicoyip.dev@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ sashal: Preserved the existing po->chan.hdrlen update in pppol2tp_session_setsockopt(), which upstream had removed. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 +++----
5 files changed, 35 insertions(+), 45 deletions(-)
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index e78e8ea93bb7b..1d575005a58e2 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -924,11 +924,9 @@ void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb,
* check if we sre sending sequence numbers and if not,
* configure it so.
*/
- if (!session->lns_mode && !session->send_seq) {
+ if (!session->lns_mode && !READ_ONCE(session->send_seq)) {
trace_session_seqnum_lns_enable(session);
- session->send_seq = 1;
- l2tp_session_set_header_len(session, tunnel->version,
- tunnel->encap);
+ WRITE_ONCE(session->send_seq, true);
}
} else {
/* No sequence numbers.
@@ -946,12 +944,10 @@ void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb,
* If we're the LNS and we're sending sequence numbers, the
* LAC is broken. Discard the frame.
*/
- if (!session->lns_mode && session->send_seq) {
+ if (!session->lns_mode && READ_ONCE(session->send_seq)) {
trace_session_seqnum_lns_disable(session);
- session->send_seq = 0;
- l2tp_session_set_header_len(session, tunnel->version,
- tunnel->encap);
- } else if (session->send_seq) {
+ WRITE_ONCE(session->send_seq, false);
+ } else if (READ_ONCE(session->send_seq)) {
pr_debug_ratelimited("%s: recv data has no seq numbers when required. Discarding.\n",
session->name);
atomic_long_inc(&session->stats.rx_seq_discards);
@@ -1147,7 +1143,8 @@ static void l2tp_udp_encap_err_recv(struct sock *sk, struct sk_buff *skb, int er
/* Build an L2TP header for the session into the buffer provided.
*/
-static int l2tp_build_l2tpv2_header(struct l2tp_session *session, void *buf)
+static int l2tp_build_l2tpv2_header(struct l2tp_session *session, void *buf,
+ bool send_seq)
{
struct l2tp_tunnel *tunnel = session->tunnel;
__be16 *bufp = buf;
@@ -1156,14 +1153,14 @@ static int l2tp_build_l2tpv2_header(struct l2tp_session *session, void *buf)
u32 tunnel_id = tunnel->peer_tunnel_id;
u32 session_id = session->peer_session_id;
- if (session->send_seq)
+ if (send_seq)
flags |= L2TP_HDRFLAG_S;
/* Setup L2TP header. */
*bufp++ = htons(flags);
*bufp++ = htons(tunnel_id);
*bufp++ = htons(session_id);
- if (session->send_seq) {
+ if (send_seq) {
*bufp++ = htons(session->ns);
*bufp++ = 0;
session->ns++;
@@ -1174,7 +1171,8 @@ static int l2tp_build_l2tpv2_header(struct l2tp_session *session, void *buf)
return bufp - optr;
}
-static int l2tp_build_l2tpv3_header(struct l2tp_session *session, void *buf)
+static int l2tp_build_l2tpv3_header(struct l2tp_session *session, void *buf,
+ bool send_seq)
{
struct l2tp_tunnel *tunnel = session->tunnel;
char *bufp = buf;
@@ -1200,7 +1198,7 @@ static int l2tp_build_l2tpv3_header(struct l2tp_session *session, void *buf)
if (session->l2specific_type == L2TP_L2SPECTYPE_DEFAULT) {
u32 l2h = 0;
- if (session->send_seq) {
+ if (send_seq) {
l2h = 0x40000000 | session->ns;
session->ns++;
session->ns &= 0xffffff;
@@ -1234,19 +1232,24 @@ static int l2tp_xmit_queue(struct l2tp_tunnel *tunnel, struct sk_buff *skb, stru
static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb, unsigned int *len)
{
struct l2tp_tunnel *tunnel = session->tunnel;
+ bool send_seq = READ_ONCE(session->send_seq);
unsigned int data_len = skb->len;
struct sock *sk = tunnel->sock;
+ u16 hdr_len = session->hdr_len;
int headroom, uhlen, udp_len;
int ret = NET_XMIT_SUCCESS;
struct inet_sock *inet;
struct udphdr *uh;
+ if (tunnel->version == L2TP_HDR_VER_2 && !send_seq)
+ hdr_len -= 4;
+
/* Check that there's enough headroom in the skb to insert IP,
* UDP and L2TP headers. If not enough, expand it to
* make room. Adjust truesize.
*/
uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0;
- headroom = NET_SKB_PAD + sizeof(struct iphdr) + uhlen + session->hdr_len;
+ headroom = NET_SKB_PAD + sizeof(struct iphdr) + uhlen + hdr_len;
if (skb_cow_head(skb, headroom)) {
kfree_skb(skb);
return NET_XMIT_DROP;
@@ -1254,9 +1257,9 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb, uns
/* Setup L2TP header */
if (tunnel->version == L2TP_HDR_VER_2)
- l2tp_build_l2tpv2_header(session, __skb_push(skb, session->hdr_len));
+ l2tp_build_l2tpv2_header(session, __skb_push(skb, hdr_len), send_seq);
else
- l2tp_build_l2tpv3_header(session, __skb_push(skb, session->hdr_len));
+ l2tp_build_l2tpv3_header(session, __skb_push(skb, hdr_len), send_seq);
/* Reset control buffer */
memset(skb->cb, 0, sizeof(skb->cb));
@@ -1299,7 +1302,7 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb, uns
uh = udp_hdr(skb);
uh->source = inet->inet_sport;
uh->dest = inet->inet_dport;
- udp_len = uhlen + session->hdr_len + data_len;
+ udp_len = uhlen + hdr_len + data_len;
if (udp_len > U16_MAX) {
kfree_skb(skb);
ret = NET_XMIT_DROP;
@@ -1768,16 +1771,11 @@ static void l2tp_session_del_work(struct work_struct *work)
l2tp_session_put(session);
}
-/* We come here whenever a session's send_seq, cookie_len or
- * l2specific_type parameters are set.
- */
-void l2tp_session_set_header_len(struct l2tp_session *session, int version,
- enum l2tp_encap_type encap)
+static void l2tp_session_set_header_len(struct l2tp_session *session, int version,
+ enum l2tp_encap_type encap)
{
if (version == L2TP_HDR_VER_2) {
- session->hdr_len = 6;
- if (session->send_seq)
- session->hdr_len += 4;
+ session->hdr_len = 10;
} else {
session->hdr_len = 4 + session->cookie_len;
session->hdr_len += l2tp_get_l2specific_len(session);
@@ -1785,7 +1783,6 @@ void l2tp_session_set_header_len(struct l2tp_session *session, int version,
session->hdr_len += 4;
}
}
-EXPORT_SYMBOL_GPL(l2tp_session_set_header_len);
struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id,
u32 peer_session_id, struct l2tp_session_cfg *cfg)
diff --git a/net/l2tp/l2tp_core.h b/net/l2tp/l2tp_core.h
index ffd8ced3a51ff..25ae4c25d3eff 100644
--- a/net/l2tp/l2tp_core.h
+++ b/net/l2tp/l2tp_core.h
@@ -76,7 +76,7 @@ struct l2tp_session {
u8 peer_cookie[8];
int peer_cookie_len;
u16 l2specific_type;
- u16 hdr_len;
+ u16 hdr_len; /* maximum L2TP header length */
u32 nr; /* session NR state (receive) */
u32 ns; /* session NR state (send) */
struct sk_buff_head reorder_q; /* receive reorder queue */
@@ -94,8 +94,8 @@ struct l2tp_session {
char name[L2TP_SESSION_NAME_MAX]; /* for logging */
char ifname[IFNAMSIZ];
+ bool send_seq; /* send packets with sequence numbers? */
unsigned int recv_seq:1; /* expect receive packets with sequence numbers? */
- unsigned int send_seq:1; /* send packets with sequence numbers? */
unsigned int lns_mode:1; /* behave as LNS?
* LAC enables sequence numbers under LNS control.
*/
@@ -257,8 +257,6 @@ void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb,
int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb);
/* Transmit path helpers for sending packets over the tunnel socket. */
-void l2tp_session_set_header_len(struct l2tp_session *session, int version,
- enum l2tp_encap_type encap);
int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb);
/* Pseudowire management.
diff --git a/net/l2tp/l2tp_debugfs.c b/net/l2tp/l2tp_debugfs.c
index 90fc0a59d50ac..17c3a6db4c227 100644
--- a/net/l2tp/l2tp_debugfs.c
+++ b/net/l2tp/l2tp_debugfs.c
@@ -182,12 +182,12 @@ static void l2tp_dfs_seq_session_show(struct seq_file *m, void *v)
session->pwtype == L2TP_PWTYPE_ETH ? "ETH" :
session->pwtype == L2TP_PWTYPE_PPP ? "PPP" :
"");
- if (session->send_seq || session->recv_seq)
+ if (READ_ONCE(session->send_seq) || session->recv_seq)
seq_printf(m, " nr %u, ns %u\n", session->nr, session->ns);
seq_printf(m, " refcnt %d\n", refcount_read(&session->ref_count));
seq_printf(m, " config 0/0/%c/%c/-/%s %08x %u\n",
session->recv_seq ? 'R' : '-',
- session->send_seq ? 'S' : '-',
+ READ_ONCE(session->send_seq) ? 'S' : '-',
session->lns_mode ? "LNS" : "LAC",
0,
jiffies_to_msecs(session->reorder_timeout));
diff --git a/net/l2tp/l2tp_netlink.c b/net/l2tp/l2tp_netlink.c
index fbdd3d055dbc7..a9221c7360b70 100644
--- a/net/l2tp/l2tp_netlink.c
+++ b/net/l2tp/l2tp_netlink.c
@@ -697,12 +697,9 @@ static int l2tp_nl_cmd_session_modify(struct sk_buff *skb, struct genl_info *inf
if (info->attrs[L2TP_ATTR_RECV_SEQ])
session->recv_seq = nla_get_u8(info->attrs[L2TP_ATTR_RECV_SEQ]);
- if (info->attrs[L2TP_ATTR_SEND_SEQ]) {
- struct l2tp_tunnel *tunnel = session->tunnel;
-
- session->send_seq = nla_get_u8(info->attrs[L2TP_ATTR_SEND_SEQ]);
- l2tp_session_set_header_len(session, tunnel->version, tunnel->encap);
- }
+ if (info->attrs[L2TP_ATTR_SEND_SEQ])
+ WRITE_ONCE(session->send_seq,
+ nla_get_u8(info->attrs[L2TP_ATTR_SEND_SEQ]) & 1);
if (info->attrs[L2TP_ATTR_LNS_MODE])
session->lns_mode = nla_get_u8(info->attrs[L2TP_ATTR_LNS_MODE]);
@@ -745,7 +742,7 @@ static int l2tp_nl_session_send(struct sk_buff *skb, u32 portid, u32 seq, int fl
(session->peer_cookie_len &&
nla_put(skb, L2TP_ATTR_PEER_COOKIE, session->peer_cookie_len, session->peer_cookie)) ||
nla_put_u8(skb, L2TP_ATTR_RECV_SEQ, session->recv_seq) ||
- nla_put_u8(skb, L2TP_ATTR_SEND_SEQ, session->send_seq) ||
+ nla_put_u8(skb, L2TP_ATTR_SEND_SEQ, READ_ONCE(session->send_seq)) ||
nla_put_u8(skb, L2TP_ATTR_LNS_MODE, session->lns_mode) ||
(l2tp_tunnel_uses_xfrm(tunnel) &&
nla_put_u8(skb, L2TP_ATTR_USING_IPSEC, 1)) ||
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index c67ba1eab4769..dda3d12337802 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1193,15 +1193,13 @@ static int pppol2tp_session_setsockopt(struct sock *sk,
err = -EINVAL;
break;
}
- session->send_seq = !!val;
+ WRITE_ONCE(session->send_seq, !!val);
{
struct pppox_sock *po = pppox_sk(sk);
po->chan.hdrlen = val ? PPPOL2TP_L2TP_HDR_SIZE_SEQ :
PPPOL2TP_L2TP_HDR_SIZE_NOSEQ;
}
- l2tp_session_set_header_len(session, session->tunnel->version,
- session->tunnel->encap);
break;
case PPPOL2TP_SO_LNSMODE:
@@ -1311,7 +1309,7 @@ static int pppol2tp_session_getsockopt(struct sock *sk,
break;
case PPPOL2TP_SO_SENDSEQ:
- *val = session->send_seq;
+ *val = READ_ONCE(session->send_seq);
break;
case PPPOL2TP_SO_LNSMODE:
@@ -1557,7 +1555,7 @@ static void pppol2tp_seq_session_show(struct seq_file *m, void *v)
state, user_data_ok);
seq_printf(m, " 0/0/%c/%c/%s %08x %u\n",
session->recv_seq ? 'R' : '-',
- session->send_seq ? 'S' : '-',
+ READ_ONCE(session->send_seq) ? 'S' : '-',
session->lns_mode ? "LNS" : "LAC",
0,
jiffies_to_msecs(session->reorder_timeout));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0079/2151] mm/memory: update stale locking comments for fault handlers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (77 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0078/2151] l2tp: snapshot sequencing state when building transmit headers Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0080/2151] mm: fix address wraparound when scanning large folio PTEs Greg Kroah-Hartman
` (803 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aditya Sharma,
David Hildenbrand (Arm), Liam Howlett, Lorenzo Stoakes,
Michal Hocko, Mike Rapoport, Suren Baghdasaryan, Andrew Morton,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aditya Sharma <adi.sharma@zohomail.in>
[ Upstream commit 214f9ab72ce6e16120c20ad670389656f059e685 ]
Update the comments for wp_page_copy(), do_wp_page(), do_swap_page(),
do_anonymous_page(), __do_fault(), do_fault(), handle_pte_fault(),
__handle_mm_fault(), and handle_mm_fault() to concisely clarify that they
can be entered holding either the mmap_lock or the VMA lock, and that the
lock may be released upon returning VM_FAULT_RETRY.
Additionally, make the following corrections:
- In do_anonymous_page(), correct the outdated claim that the function
is entered with the PTE "mapped but not yet locked". Since
handle_pte_fault() unmaps the empty PTE before routing to
do_pte_missing(), the comment now correctly states it is entered
with the PTE unmapped and unlocked.
- In __do_fault(), update the stale reference from __lock_page_retry()
to __folio_lock_or_retry().
Link: https://lore.kernel.org/20260424092217.263648-1-adi.sharma@zohomail.in
Signed-off-by: Aditya Sharma <adi.sharma@zohomail.in>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Liam Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: f681d4580d5c ("mm: fix address wraparound when scanning large folio PTEs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/memory.c | 55 ++++++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index e37ae367c8c19..c9597d7f8ba0a 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3673,8 +3673,8 @@ vm_fault_t __vmf_anon_prepare(struct vm_fault *vmf)
* Handle the case of a page which we actually need to copy to a new page,
* either due to COW or unsharing.
*
- * Called with mmap_lock locked and the old page referenced, but
- * without the ptl held.
+ * Called with either the VMA lock or the mmap_lock held (see FAULT_FLAG_VMA_LOCK)
+ * and the old page referenced, but without the ptl held.
*
* High level logic flow:
*
@@ -4075,9 +4075,9 @@ static bool wp_can_reuse_anon_folio(struct folio *folio,
* though the page will change only once the write actually happens. This
* avoids a few races, and potentially makes it more efficient.
*
- * We enter with non-exclusive mmap_lock (to exclude vma changes,
- * but allow concurrent faults), with pte both mapped and locked.
- * We return with mmap_lock still held, but pte unmapped and unlocked.
+ * We enter with either the VMA lock or the mmap_lock held (see
+ * FAULT_FLAG_VMA_LOCK) and pte both mapped and locked. We return with
+ * the same lock still held, but pte unmapped and unlocked.
*/
static vm_fault_t do_wp_page(struct vm_fault *vmf)
__releases(vmf->ptl)
@@ -4605,12 +4605,12 @@ static struct folio *alloc_swap_folio(struct vm_fault *vmf)
static DECLARE_WAIT_QUEUE_HEAD(swapcache_wq);
/*
- * We enter with non-exclusive mmap_lock (to exclude vma changes,
- * but allow concurrent faults), and pte mapped but not yet locked.
+ * We enter with either the VMA lock or the mmap_lock held (see
+ * FAULT_FLAG_VMA_LOCK), and pte mapped but not yet locked.
* We return with pte unmapped and unlocked.
*
- * We return with the mmap_lock locked or unlocked in the same cases
- * as does filemap_fault().
+ * When returning, the lock may have been released in the same cases
+ * as done by filemap_fault().
*/
vm_fault_t do_swap_page(struct vm_fault *vmf)
{
@@ -5161,9 +5161,10 @@ static struct folio *alloc_anon_folio(struct vm_fault *vmf)
}
/*
- * We enter with non-exclusive mmap_lock (to exclude vma changes,
- * but allow concurrent faults), and pte mapped but not yet locked.
- * We return with mmap_lock still held, but pte unmapped and unlocked.
+ * We enter with either the VMA lock or the mmap_lock held (see
+ * FAULT_FLAG_VMA_LOCK), and pte unmapped and unlocked.
+ * We return with the lock still held, but pte unmapped and unlocked.
+ * If VM_FAULT_RETRY is returned, the lock may have been released.
*/
static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
{
@@ -5281,9 +5282,10 @@ static vm_fault_t do_anonymous_page(struct vm_fault *vmf)
}
/*
- * The mmap_lock must have been held on entry, and may have been
- * released depending on flags and vma->vm_ops->fault() return value.
- * See filemap_fault() and __lock_page_retry().
+ * Either the VMA lock or the mmap_lock must have been held on entry
+ * (see FAULT_FLAG_VMA_LOCK) and may have been released depending on
+ * flags and vma->vm_ops->fault() return value.
+ * See filemap_fault() and __folio_lock_or_retry().
*/
static vm_fault_t __do_fault(struct vm_fault *vmf)
{
@@ -5844,11 +5846,11 @@ static vm_fault_t do_shared_fault(struct vm_fault *vmf)
}
/*
- * We enter with non-exclusive mmap_lock (to exclude vma changes,
- * but allow concurrent faults).
- * The mmap_lock may have been released depending on flags and our
+ * We enter with either the VMA lock or the mmap_lock held (see
+ * FAULT_FLAG_VMA_LOCK).
+ * The lock may have been released depending on flags and our
* return value. See filemap_fault() and __folio_lock_or_retry().
- * If mmap_lock is released, vma may become invalid (for example
+ * If the lock is released, vma may become invalid (for example
* by other thread calling munmap()).
*/
static vm_fault_t do_fault(struct vm_fault *vmf)
@@ -6176,10 +6178,11 @@ static vm_fault_t wp_huge_pud(struct vm_fault *vmf, pud_t orig_pud)
* with external mmu caches can use to update those (ie the Sparc or
* PowerPC hashed page tables that act as extended TLBs).
*
- * We enter with non-exclusive mmap_lock (to exclude vma changes, but allow
- * concurrent faults).
+ * On entry, we hold either the VMA lock or the mmap_lock
+ * (see FAULT_FLAG_VMA_LOCK).
*
- * The mmap_lock may have been released depending on flags and our return value.
+ * The mmap_lock or VMA lock may have been released depending on flags
+ * and our return value.
* See filemap_fault() and __folio_lock_or_retry().
*/
static vm_fault_t handle_pte_fault(struct vm_fault *vmf)
@@ -6272,8 +6275,8 @@ static vm_fault_t handle_pte_fault(struct vm_fault *vmf)
/*
* On entry, we hold either the VMA lock or the mmap_lock
- * (FAULT_FLAG_VMA_LOCK tells you which). If VM_FAULT_RETRY is set in
- * the result, the mmap_lock is not held on exit. See filemap_fault()
+ * (see FAULT_FLAG_VMA_LOCK). If VM_FAULT_RETRY is set in
+ * the result, the lock is not held on exit. See filemap_fault()
* and __folio_lock_or_retry().
*/
static vm_fault_t __handle_mm_fault(struct vm_area_struct *vma,
@@ -6501,9 +6504,9 @@ static vm_fault_t sanitize_fault_flags(struct vm_area_struct *vma,
/*
* By the time we get here, we already hold either the VMA lock or the
- * mmap_lock (FAULT_FLAG_VMA_LOCK tells you which).
+ * mmap_lock (see FAULT_FLAG_VMA_LOCK).
*
- * The mmap_lock may have been released depending on flags and our
+ * The lock may have been released depending on flags and our
* return value. See filemap_fault() and __folio_lock_or_retry().
*/
vm_fault_t handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0080/2151] mm: fix address wraparound when scanning large folio PTEs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (78 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0079/2151] mm/memory: update stale locking comments for fault handlers Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0081/2151] mm/huge_memory: fix truncate racing with PMD zapping Greg Kroah-Hartman
` (802 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Hildenbrand (Arm),
Andrew Morton, Kyle Zeng, Lorenzo Stoakes (ARM),
Kiryl Shutsemau (Meta), Baolin Wang, Lance Yang, Barry Song,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Ying Huang, Ryan Roberts,
Chuanhua Han, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit f681d4580d5c3c749f623cda722a21aefd3147b3 ]
numa_rebuild_large_mapping() and do_swap_page() can be tricked into
generating an address wraparound, crashing the kernel. All that's required
is to map a tail page of a large folio close enough to the start/end of
the address space to e.g., make
unsigned long addr_start = addr - (nr << PAGE_SHIFT);
to wrap around.
Let's fix it by providing a better helper, folio_scan_range(), that
takes care of staying within VMA and page table boundaries while
handling possible wraparounds.
There are some nasty details, like not being able to use pmd_addr_end()
in this context. Add some helpful comments for these cases.
Link: https://lore.kernel.org/20261014-folio_pte_scan_range-v2-1-00cf9bbaa364@kernel.org
Fixes: d2136d749d76 ("mm: support multi-size THP numa balancing")
Fixes: 508758960b8d ("mm: swap: entirely map large folios found in swapcache")
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Kyle Zeng <kylebot@openai.com>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Barry Song <baohua@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Ying Huang <huang.ying.caritas@gmail.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Chuanhua Han <hanchuanhua@oppo.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/memory.c | 50 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 36 insertions(+), 14 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index c9597d7f8ba0a..e8a5292c5a317 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4604,6 +4604,34 @@ static struct folio *alloc_swap_folio(struct vm_fault *vmf)
static DECLARE_WAIT_QUEUE_HEAD(swapcache_wq);
+/*
+ * Get the address range in which a folio might be mapped, assuming its pages
+ * are mapped consecutively and the folio page at the given idx is mapped at
+ * the given address.
+ */
+static void folio_pte_range(const struct folio *folio,
+ const struct vm_area_struct *vma, unsigned long addr,
+ unsigned long idx, unsigned long *start, unsigned long *end)
+{
+ /* Stay within the page table and VMA boundaries. */
+ const unsigned long pmd_start = addr & PMD_MASK;
+ const unsigned long pmd_end = pmd_start + PMD_SIZE;
+ const unsigned long lower = max(pmd_start, vma->vm_start);
+ /*
+ * We cannot use pmd_addr_end(), as it does not clamp reliably. To
+ * avoid wraparounds, compute using the inclusive end.
+ */
+ const unsigned long upper = min(pmd_end - 1, vma->vm_end - 1) + 1;
+ const unsigned long offset = idx << PAGE_SHIFT;
+
+ /*
+ * Avoid start/end addresses wrapping by not adding/subtracting more
+ * than the lower/upper limits would allow.
+ */
+ *start = addr - min(addr - lower, offset);
+ *end = addr + min(upper - addr, folio_size(folio) - offset);
+}
+
/*
* We enter with either the VMA lock or the mmap_lock held (see
* FAULT_FLAG_VMA_LOCK), and pte mapped but not yet locked.
@@ -4861,16 +4889,15 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
address = vmf->address;
ptep = vmf->pte;
if (folio_test_large(folio) && folio_test_swapcache(folio)) {
- int nr = folio_nr_pages(folio);
- unsigned long idx = folio_page_idx(folio, page);
- unsigned long folio_start = address - idx * PAGE_SIZE;
- unsigned long folio_end = folio_start + nr * PAGE_SIZE;
+ const int nr = folio_nr_pages(folio);
+ const unsigned long idx = folio_page_idx(folio, page);
+ unsigned long folio_start, folio_end;
pte_t *folio_ptep;
pte_t folio_pte;
- if (unlikely(folio_start < max(address & PMD_MASK, vma->vm_start)))
- goto check_folio;
- if (unlikely(folio_end > pmd_addr_end(address, vma->vm_end)))
+ folio_pte_range(folio, vma, address, idx, &folio_start,
+ &folio_end);
+ if (unlikely((folio_end - folio_start) >> PAGE_SHIFT != nr))
goto check_folio;
folio_ptep = vmf->pte - idx;
@@ -5963,16 +5990,11 @@ static void numa_rebuild_large_mapping(struct vm_fault *vmf, struct vm_area_stru
struct folio *folio, pte_t fault_pte,
bool ignore_writable, bool pte_write_upgrade)
{
- int nr = pte_pfn(fault_pte) - folio_pfn(folio);
+ const unsigned long idx = pte_pfn(fault_pte) - folio_pfn(folio);
unsigned long start, end, addr = vmf->address;
- unsigned long addr_start = addr - (nr << PAGE_SHIFT);
- unsigned long pt_start = ALIGN_DOWN(addr, PMD_SIZE);
pte_t *start_ptep;
- /* Stay within the VMA and within the page table. */
- start = max3(addr_start, pt_start, vma->vm_start);
- end = min3(addr_start + folio_size(folio), pt_start + PMD_SIZE,
- vma->vm_end);
+ folio_pte_range(folio, vma, addr, idx, &start, &end);
start_ptep = vmf->pte - ((addr - start) >> PAGE_SHIFT);
/* Restore all PTEs' mapping of the large folio */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0081/2151] mm/huge_memory: fix truncate racing with PMD zapping
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (79 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0080/2151] mm: fix address wraparound when scanning large folio PTEs Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0082/2151] hwmon: (coretemp) Read TjMax only when refreshing the temperature Greg Kroah-Hartman
` (801 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Mason, Gregory Price (Meta),
Muhammad Usama Anjum, Zi Yan, Baolin Wang,
David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Mason <mason@kernel.org>
[ Upstream commit e6a07d29b0a60f3a4cfe77fe34eeb4b3fb38d6c4 ]
zap_huge_pmd_folio() removes the rmap before calling folio_mark_dirty().
If this was the last mapping, truncation can skip unmapping the folio
and proceed without waiting for the PMD lock, racing with dirtying.
ifs_set_range_dirty() can oops if MADV_DONTNEED races with
ftruncate() on XFS, when we get the folio set dirty after it was found
to not be mapped anymore.
Move folio_mark_dirty() and folio_mark_accessed() before rmap removal,
matching the PTE zap path. This keeps the folio mapped while updating
its state, so truncation must wait for the page table lock.
Fix generated by an LLM and sent by Chris Mason in private.
Fixes: fe6cf984939d ("mm/huge_memory: transfer the pmd dirty bit to the folio on zap")
Cc: stable@vger.kernel.org
Signed-off-by: Chris Mason <mason@kernel.org>
[ david: simplify comment and description ]
Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-13-d6437171ecc3@kernel.org
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: adapted zap_huge_pmd_folio() changes to the existing inline logic in zap_huge_pmd() ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/huge_memory.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 24f5887eb48ee..eba9280ddb594 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2327,8 +2327,6 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
struct page *page = pmd_page(orig_pmd);
folio = page_folio(page);
- folio_remove_rmap_pmd(folio, page, vma);
- WARN_ON_ONCE(folio_mapcount(folio) < 0);
VM_BUG_ON_PAGE(!PageHead(page), page);
} else if (thp_migration_supported()) {
swp_entry_t entry;
@@ -2360,6 +2358,15 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
folio_mark_accessed(folio);
}
+ /*
+ * Only present folios are rmappable. Remove the rmap after
+ * transferring young+dirty to the folio.
+ */
+ if (flush_needed) {
+ folio_remove_rmap_pmd(folio, &folio->page, vma);
+ WARN_ON_ONCE(folio_mapcount(folio) < 0);
+ }
+
spin_unlock(ptl);
if (flush_needed)
tlb_remove_page_size(tlb, &folio->page, HPAGE_PMD_SIZE);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0082/2151] hwmon: (coretemp) Read TjMax only when refreshing the temperature
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (80 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0081/2151] mm/huge_memory: fix truncate racing with PMD zapping Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0083/2151] hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp() Greg Kroah-Hartman
` (800 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ricardo Neri, Guenter Roeck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
[ Upstream commit 5407d2b7d5279b7100621d92f2181184c8f00d62 ]
show_temp() reads TjMax before checking whether the cached temperature is
still fresh, but consumes it only when recomputing that temperature. On a
cache hit the value is discarded.
Discarding it is not free. On CPUs that report TjMax in
MSR_IA32_TEMPERATURE_TARGET, get_tjmax() returns the value it just read
without storing it in tdata->tjmax, so every call reads the MSR again.
That is a cross-CPU call whenever the CPU owning the sensor is not the
current one, and it is made while holding tdata->update_lock.
Read TjMax where it is used. The value cannot go stale in the meantime:
bits 23:16 of MSR_IA32_TEMPERATURE_TARGET are read-only, and the register
is package-scoped, so every CPU of the package reads the same value.
The temperature reported to userspace does not change.
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Link: https://patch.msgid.link/20260924-coretemp-temp-fault-v1-2-1884f0ff97d5@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Use the existing rdmsrq_on_cpu() interface and struct msr in show_temp()
so the subsequent timestamp fix applies without changes. Read the
validity bit and temperature from the same low word as before.
Stable-dep-of: 9a6aa085c94c ("hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/coretemp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 03b40d643dccf..3cbdf48b15af0 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -392,24 +392,24 @@ static ssize_t show_ttarget(struct device *dev,
static ssize_t show_temp(struct device *dev,
struct device_attribute *devattr, char *buf)
{
- u32 eax, edx;
+ struct msr val;
struct temp_data *tdata = container_of(devattr, struct temp_data, sd_attrs[ATTR_TEMP]);
int tjmax, temp;
bool valid;
mutex_lock(&tdata->update_lock);
- tjmax = get_tjmax(tdata, dev);
/* Check whether the time interval has elapsed */
if (time_after(jiffies, tdata->last_updated + HZ)) {
- rdmsr_on_cpu(tdata->cpu, tdata->status_reg, &eax, &edx);
+ tjmax = get_tjmax(tdata, dev);
+ rdmsrq_on_cpu(tdata->cpu, tdata->status_reg, &val.q);
/*
* Bit 31 indicates whether the reading is valid. Some CPUs
* clear it while the temperature is too low to be measured.
* Such a reading is not a temperature. Do not report it.
*/
- tdata->temp_valid = (eax >> 31) & 1;
- tdata->temp = tjmax - ((eax >> 16) & 0xff) * 1000;
+ tdata->temp_valid = (val.l >> 31) & 1;
+ tdata->temp = tjmax - ((val.l >> 16) & 0xff) * 1000;
tdata->last_updated = jiffies;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0083/2151] hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (81 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0082/2151] hwmon: (coretemp) Read TjMax only when refreshing the temperature Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0084/2151] hwmon: (tmp108) Fix initial conversion delay and wait until ready Greg Kroah-Hartman
` (799 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Asaf Nuri Bertizlioğlu,
Guenter Roeck, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 9a6aa085c94c7f2817c4d50a7264e6fb51286f40 ]
show_temp() rate-limits MSR reads by storing tdata->last_updated as an
unsigned long and comparing it against jiffies using
time_after(jiffies, tdata->last_updated + HZ).
time_after() relies on signed long subtraction, which only produces the
expected result while the two timestamps are within LONG_MAX jiffies of
each other. On 32-bit kernels, if tempX_input is not read for more than
LONG_MAX jiffies (~24.85 days at HZ=1000), the signed difference flips
sign and time_after() evaluates to false. Because tdata->last_updated is
only refreshed when time_after() succeeds, subsequent reads remain
blocked from refreshing for another ~24.85 days until jiffies wraps
past tdata->last_updated + HZ again, returning either a stale cached
temperature or -ENODATA if the sensor had never been read since
initialization.
Store tdata->last_updated as a u64 and use get_jiffies_64() with
time_after64(), which does not wrap in any practical uptime.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Fixes: bebe467823c0 ("hwmon: New coretemp driver")
Cc: stable@vger.kernel.org
Tested-by: Asaf Nuri Bertizlioğlu <ycistak@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/coretemp.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 3cbdf48b15af0..709ffc758d7fa 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -77,7 +77,7 @@ struct temp_data {
int temp;
bool temp_valid;
int tjmax;
- unsigned long last_updated;
+ u64 last_updated;
unsigned int cpu;
int index;
u32 cpu_core_id;
@@ -400,7 +400,7 @@ static ssize_t show_temp(struct device *dev,
mutex_lock(&tdata->update_lock);
/* Check whether the time interval has elapsed */
- if (time_after(jiffies, tdata->last_updated + HZ)) {
+ if (time_after64(get_jiffies_64(), tdata->last_updated + HZ)) {
tjmax = get_tjmax(tdata, dev);
rdmsrq_on_cpu(tdata->cpu, tdata->status_reg, &val.q);
/*
@@ -410,7 +410,7 @@ static ssize_t show_temp(struct device *dev,
*/
tdata->temp_valid = (val.l >> 31) & 1;
tdata->temp = tjmax - ((val.l >> 16) & 0xff) * 1000;
- tdata->last_updated = jiffies;
+ tdata->last_updated = get_jiffies_64();
}
valid = tdata->temp_valid;
@@ -522,11 +522,8 @@ init_temp_data(struct platform_data *pdata, unsigned int cpu, int pkg_flag)
tdata->cpu = cpu;
tdata->cpu_core_id = topology_core_id(cpu);
tdata->attr_size = MAX_CORE_ATTRS;
- /*
- * A zero timestamp does not look stale on 32-bit, where jiffies
- * starts just short of wrapping. Backdate it instead.
- */
- tdata->last_updated = jiffies - HZ - 1;
+ /* Backdate to force a refresh on the first read */
+ tdata->last_updated = get_jiffies_64() - HZ - 1;
mutex_init(&tdata->update_lock);
return tdata;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0084/2151] hwmon: (tmp108) Fix initial conversion delay and wait until ready
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (82 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0083/2151] hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp() Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0085/2151] drm/amdgpu: dont walk the CS chunks when allocating them failed Greg Kroah-Hartman
` (798 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sashiko, Guenter Roeck, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 7cd60538073e465310c94b2a2f0ea8d2f03768ef ]
In tmp108_common_probe(), the driver only adds the 30 ms conversion delay
(TMP108_CONVERSION_TIME_MS) to ready_time if the sensor was previously in
TMP108_MODE_SHUTDOWN. However, the TMP108 hardware defaults to continuous
conversion mode (TMP108_MODE_CONTINUOUS) upon power-on reset, including
immediately after enabling the vcc supply regulator during probe, while
the temperature register retains its power-on reset value of 0x0000 (0°C)
until the first conversion completes. Because the initial mode is not
shutdown, the delay is bypassed and early reads via thermal zone
registration or sysfs before the first conversion finishes return an
uninitialized 0°C reading.
In addition, returning -EAGAIN from tmp108_read() while waiting for a
conversion to complete after probe or resume can trigger an unnecessary
tight retry loop in callers or fail initial reads.
Unconditionally set ready_time to TMP108_CONVERSION_TIME_MS ahead in
tmp108_common_probe(), track ready_time as ktime_t, and wait for the
remaining conversion time in tmp108_read() using usleep_range() instead
of returning -EAGAIN.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Fixes: 66e1c9171339 ("hwmon: Add Texas Instruments TMP108 temperature sensor driver.")
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/tmp108.c | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/hwmon/tmp108.c b/drivers/hwmon/tmp108.c
index b298fae9296c6..530f679898992 100644
--- a/drivers/hwmon/tmp108.c
+++ b/drivers/hwmon/tmp108.c
@@ -14,7 +14,7 @@
#include <linux/i2c.h>
#include <linux/i3c/device.h>
#include <linux/init.h>
-#include <linux/jiffies.h>
+#include <linux/ktime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
@@ -74,7 +74,7 @@
struct tmp108 {
struct regmap *regmap;
u16 orig_config;
- u64 ready_time;
+ ktime_t ready_time;
};
/* convert 12-bit TMP108 register value to milliCelsius */
@@ -95,6 +95,7 @@ static int tmp108_read(struct device *dev, enum hwmon_sensor_types type,
struct tmp108 *tmp108 = dev_get_drvdata(dev);
unsigned int regval;
int err, hyst;
+ s64 delay;
if (type == hwmon_chip) {
if (attr == hwmon_chip_update_interval) {
@@ -124,12 +125,10 @@ static int tmp108_read(struct device *dev, enum hwmon_sensor_types type,
switch (attr) {
case hwmon_temp_input:
- /* Is it too early to return a conversion ? */
- if (time_before64(get_jiffies_64(), tmp108->ready_time)) {
- dev_dbg(dev, "%s: Conversion not ready yet..\n",
- __func__);
- return -EAGAIN;
- }
+ /* Wait if it is too early to return a conversion */
+ delay = ktime_us_delta(tmp108->ready_time, ktime_get());
+ if (delay > 0)
+ usleep_range(delay, delay + 1000);
err = regmap_read(tmp108->regmap, TMP108_REG_TEMP, ®val);
if (err < 0)
return err;
@@ -362,11 +361,8 @@ static int tmp108_common_probe(struct device *dev, struct regmap *regmap, char *
return err;
}
- tmp108->ready_time = get_jiffies_64();
- if ((tmp108->orig_config & TMP108_CONF_MODE_MASK) ==
- TMP108_MODE_SHUTDOWN)
- tmp108->ready_time +=
- msecs_to_jiffies(TMP108_CONVERSION_TIME_MS);
+ tmp108->ready_time = ktime_add_ms(ktime_get(),
+ TMP108_CONVERSION_TIME_MS);
err = devm_add_action_or_reset(dev, tmp108_restore_config, tmp108);
if (err) {
@@ -413,8 +409,8 @@ static int tmp108_resume(struct device *dev)
err = regmap_update_bits(tmp108->regmap, TMP108_REG_CONF,
TMP108_CONF_MODE_MASK, TMP108_MODE_CONTINUOUS);
- tmp108->ready_time = get_jiffies_64() +
- msecs_to_jiffies(TMP108_CONVERSION_TIME_MS);
+ tmp108->ready_time = ktime_add_ms(ktime_get(),
+ TMP108_CONVERSION_TIME_MS);
return err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0085/2151] drm/amdgpu: dont walk the CS chunks when allocating them failed
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (83 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0084/2151] hwmon: (tmp108) Fix initial conversion delay and wait until ready Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0086/2151] mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags Greg Kroah-Hartman
` (797 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jesse Zhang, Christian König,
Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jesse Zhang <Jesse.Zhang@amd.com>
[ Upstream commit ade92d50aad6799a5a9d7e73cd1604fd0576e656 ]
amdgpu_cs_pass1() sets p->nchunks before allocating p->chunks, and the
allocation failure path skips resetting it. amdgpu_cs_parser_fini() then
frees the kdata of nchunks chunks from a NULL array. On navi48 with the
chunk array allocation failed through failslab:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
RIP: 0010:amdgpu_cs_parser_fini+0x35d/0x710 [amdgpu]
amdgpu_cs_ioctl+0xcae/0x7a20 [amdgpu]
drm_ioctl_kernel+0x180/0x320 [drm]
Set nchunks once the array exists.
Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 0c828445757b86aaa3ed2638832d76f450022bdf)
Cc: stable@vger.kernel.org
[ sashal: Retained kvmalloc_array() with explicit element size and GFP_KERNEL in place of kvmalloc_objs(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 0f6505d4c958b..5a4e7a6623748 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -219,13 +219,14 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
if (IS_ERR(chunk_array))
return PTR_ERR(chunk_array);
- p->nchunks = cs->in.num_chunks;
- p->chunks = kvmalloc_array(p->nchunks, sizeof(struct amdgpu_cs_chunk),
+ /* parser_fini() walks nchunks chunks, set it once they exist */
+ p->chunks = kvmalloc_array(cs->in.num_chunks, sizeof(struct amdgpu_cs_chunk),
GFP_KERNEL);
if (!p->chunks) {
ret = -ENOMEM;
goto free_chunk;
}
+ p->nchunks = cs->in.num_chunks;
for (i = 0; i < p->nchunks; i++) {
struct drm_amdgpu_cs_chunk __user *chunk_ptr = NULL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0086/2151] mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (84 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0085/2151] drm/amdgpu: dont walk the CS chunks when allocating them failed Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0087/2151] mm/vma: dont leak the charge for stack growth Greg Kroah-Hartman
` (796 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lorenzo Stoakes (ARM), Andrew Morton,
David Hildenbrand (Arm), Pedro Falcato, Gregory Price (Meta),
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Jann Horn, Davidlohr Bueso,
SJ Park, Kees Cook, Colin Cross, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes (ARM) <ljs@kernel.org>
[ Upstream commit c386d799f423685952138cab8d89f0331825bdee ]
vma_merge_existing_range() merges an existing VMA (middle) when its
attributes have changed to match those of one or both adjacent VMAs.
Sticky flags are propagated if they are set in any of the merged VMAs. They
are initialised from vmg->vma_flags, which is assumed to contain middle's
sticky flags when the function is invoked.
However, the VMA write lock is not held for middle when they are first
populated, so concurrent updates to atomic VMA flags may occur, which will
be lost upon merge.
This can result in fork failing to propagate guard region markers and (if
file-backed) THP collapse discarding them.
Resolve this by propagating the sticky flags after middle is locked.
Make life easier by factoring this into propagate_sticky_flags(), which
treats vmg->vma_flags as its base (in case any sticky flags are set there),
updating it as sticky flags are accumulated from merged VMAs.
Also update vma_expand() to use propagate_sticky_flags() so all merge paths
utilise it.
propagate_sticky_flags() also asserts that the VMA write lock is held for
the VMA whose sticky flags are being read, with a comment explaining why.
Another means by which atomic VMA flags can fail to be observed is when the
merge is finalised in commit_merge().
rmap locks are dropped in vma_complete() before the sticky flags are
written, meaning an rmap walker can observe the VMA without sticky flags
set, which can also result in retract_page_tables() discarding guard
markers.
Resolve this by assigning the sticky flags before dropping rmap locks,
factored into commit_sticky_flags() with a write assert on the VMA being
written to.
Also remove the vma_set_flags_mask() invocation at the end of
vma_merge_existing_range() as this was introduced by commit
64212ba02e66 ("mm: implement sticky VMA flags") to propagate sticky flags,
which is now redundant with the introduction of commit_sticky_flags().
The vma_set_flags_mask() invocation at the end of vma_expand() setting
sticky flags only is also removed for the same reason.
Also update vma_merge_existing_range()'s comment to reflect the fact that
vmg->vma_flags gets updated.
Finally, update the userland VMA tests to reflect a previously missed
const-ification in vma_assert_write_locked() which would otherwise cause a
warning when building them.
Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-4-8ff4fae1fc85@kernel.org
Fixes: 2ab7f1bbafc9 ("mm/madvise: allow guard page install/remove under VMA lock")
Fixes: 49e14dabed7a ("mm: set the VM_MAYBE_GUARD flag on guard region install")
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Jann Horn <jannh@google.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: SJ Park <sj@kernel.org>
Cc: Kees Cook <kees@kernel.org>
Cc: Colin Cross <ccross@google.com>
Cc: <stable@vger.kernel.org>
[ sashal: Replaced bitmap-based VMA flag helpers with equivalent scalar vm_flags operations inline in existing functions. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/vma.c | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/mm/vma.c b/mm/vma.c
index 574585a800fc8..e7914cd6d901d 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -756,6 +756,9 @@ static int commit_merge(struct vma_merge_struct *vmg)
return -ENOMEM;
vma_prepare(&vp);
+ /* Must be made visible before vma_complete() for rmap walkers. */
+ vma_assert_write_locked(vmg->target);
+ vm_flags_set(vmg->target, vmg->vm_flags & VM_STICKY);
/*
* THP pages may need to do additional splits if we increase
* middle->vm_start.
@@ -794,8 +797,8 @@ static bool can_merge_remove_vma(struct vm_area_struct *vma)
* merge.
*
* As part of this operation, if a merge occurs, the @vmg object will have its
- * vma, start, end, and pgoff fields modified to execute the merge. Subsequent
- * calls to this function should reset these fields.
+ * vma, start, end, pgoff and vm_flags fields modified to execute the merge.
+ * Subsequent calls to this function should reset these fields.
*
* Returns: The merged VMA if merge succeeds, or NULL otherwise.
*
@@ -809,7 +812,6 @@ static bool can_merge_remove_vma(struct vm_area_struct *vma)
static __must_check struct vm_area_struct *vma_merge_existing_range(
struct vma_merge_struct *vmg)
{
- vm_flags_t sticky_flags = vmg->vm_flags & VM_STICKY;
struct vm_area_struct *middle = vmg->middle;
struct vm_area_struct *prev = vmg->prev;
struct vm_area_struct *next;
@@ -904,17 +906,22 @@ static __must_check struct vm_area_struct *vma_merge_existing_range(
/* No matter what happens, we will be adjusting middle. */
vma_start_write(middle);
+ /* Write lock prevents concurrent atomic VMA flag updates. */
+ vma_assert_write_locked(middle);
+ vmg->vm_flags |= middle->vm_flags & VM_STICKY;
if (merge_right) {
vma_start_write(next);
vmg->target = next;
- sticky_flags |= (next->vm_flags & VM_STICKY);
+ vma_assert_write_locked(next);
+ vmg->vm_flags |= next->vm_flags & VM_STICKY;
}
if (merge_left) {
vma_start_write(prev);
vmg->target = prev;
- sticky_flags |= (prev->vm_flags & VM_STICKY);
+ vma_assert_write_locked(prev);
+ vmg->vm_flags |= prev->vm_flags & VM_STICKY;
}
if (merge_both) {
@@ -984,7 +991,6 @@ static __must_check struct vm_area_struct *vma_merge_existing_range(
if (err || commit_merge(vmg))
goto abort;
- vm_flags_set(vmg->target, sticky_flags);
khugepaged_enter_vma(vmg->target, vmg->vm_flags);
vmg->state = VMA_MERGE_SUCCESS;
return vmg->target;
@@ -1176,20 +1182,14 @@ int vma_expand(struct vma_merge_struct *vmg)
struct vm_area_struct *target = vmg->target;
struct vm_area_struct *next = vmg->next;
int ret = 0;
- vm_flags_t sticky_flags;
-
- sticky_flags = vmg->vm_flags & VM_STICKY;
- sticky_flags |= target->vm_flags & VM_STICKY;
VM_WARN_ON_VMG(!target, vmg);
mmap_assert_write_locked(vmg->mm);
vma_start_write(target);
- if (next && target != next && vmg->end == next->vm_end) {
- sticky_flags |= next->vm_flags & VM_STICKY;
+ if (next && target != next && vmg->end == next->vm_end)
remove_next = true;
- }
/* We must have a target. */
VM_WARN_ON_VMG(!target, vmg);
@@ -1202,6 +1202,9 @@ int vma_expand(struct vma_merge_struct *vmg)
VM_WARN_ON_VMG(target->vm_start < vmg->start ||
target->vm_end > vmg->end, vmg);
+ vma_assert_write_locked(target);
+ vmg->vm_flags |= target->vm_flags & VM_STICKY;
+
/*
* If we are removing the next VMA or copying from a VMA
* (e.g. mremap()'ing), we must propagate anon_vma state.
@@ -1219,11 +1222,13 @@ int vma_expand(struct vma_merge_struct *vmg)
if (remove_next) {
vma_start_write(next);
vmg->__remove_next = true;
+
+ vma_assert_write_locked(next);
+ vmg->vm_flags |= next->vm_flags & VM_STICKY;
}
if (commit_merge(vmg))
goto nomem;
- vm_flags_set(target, sticky_flags);
return 0;
nomem:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0087/2151] mm/vma: dont leak the charge for stack growth
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (85 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0086/2151] mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0088/2151] sched: Re-arrange the {EN,DE}QUEUE flags Greg Kroah-Hartman
` (795 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik, Lorenzo Stoakes (ARM),
Pedro Falcato, Harry Yoo (Meta), Muhammad Usama Anjum,
David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit b1ee87802111156e27557e82acc31fa7dfc76e2a ]
acct_stack_growth() charges stack expansion even without VM_ACCOUNT.
This can happen for read-only or MAP_NORESERVE mappings created with
MAP_GROWSDOWN. Unmapping these VMAs does not release the charge, leaking
Committed_AS.
Only check and charge growth for VM_ACCOUNT VMAs, matching mremap().
Unaccounted growth skips the overcommit check while remaining subject
to the other stack-growth limits.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Reported-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-44-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Replaced vma_test() using VMA_ACCOUNT_BIT with the equivalent vma->vm_flags & VM_ACCOUNT check. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/vma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/vma.c b/mm/vma.c
index e7914cd6d901d..d4146631eb3fe 100644
--- a/mm/vma.c
+++ b/mm/vma.c
@@ -3089,7 +3089,8 @@ static int acct_stack_growth(struct vm_area_struct *vma,
* Overcommit.. This must be the final test, as it will
* update security statistics.
*/
- if (security_vm_enough_memory_mm(mm, grow))
+ if ((vma->vm_flags & VM_ACCOUNT) &&
+ security_vm_enough_memory_mm(mm, grow))
return -ENOMEM;
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0088/2151] sched: Re-arrange the {EN,DE}QUEUE flags
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (86 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0087/2151] mm/vma: dont leak the charge for stack growth Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0089/2151] sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern Greg Kroah-Hartman
` (794 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Peter Zijlstra (Intel), Juri Lelli,
Tejun Heo, Vincent Guittot, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@infradead.org>
[ Upstream commit 376f8963bbda5fee838eb1823b07562368104024 ]
Ensure the matched flags are in the low word while the unmatched flags
go into the second word.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Stable-dep-of: c282051fc2ca ("sched/fair: Clear throttle state when leaving the fair class")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/sched/sched.h | 45 +++++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 21 deletions(-)
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 0f29def72877b..2e0604b3a337f 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2377,27 +2377,30 @@ extern const u32 sched_prio_to_wmult[40];
*
*/
-#define DEQUEUE_SLEEP 0x01 /* Matches ENQUEUE_WAKEUP */
-#define DEQUEUE_SAVE 0x02 /* Matches ENQUEUE_RESTORE */
-#define DEQUEUE_MOVE 0x04 /* Matches ENQUEUE_MOVE */
-#define DEQUEUE_NOCLOCK 0x08 /* Matches ENQUEUE_NOCLOCK */
-#define DEQUEUE_SPECIAL 0x10
-#define DEQUEUE_MIGRATING 0x100 /* Matches ENQUEUE_MIGRATING */
-#define DEQUEUE_DELAYED 0x200 /* Matches ENQUEUE_DELAYED */
-#define DEQUEUE_THROTTLE 0x800
-
-#define ENQUEUE_WAKEUP 0x01
-#define ENQUEUE_RESTORE 0x02
-#define ENQUEUE_MOVE 0x04
-#define ENQUEUE_NOCLOCK 0x08
-
-#define ENQUEUE_HEAD 0x10
-#define ENQUEUE_REPLENISH 0x20
-#define ENQUEUE_MIGRATED 0x40
-#define ENQUEUE_INITIAL 0x80
-#define ENQUEUE_MIGRATING 0x100
-#define ENQUEUE_DELAYED 0x200
-#define ENQUEUE_RQ_SELECTED 0x400
+#define DEQUEUE_SLEEP 0x0001 /* Matches ENQUEUE_WAKEUP */
+#define DEQUEUE_SAVE 0x0002 /* Matches ENQUEUE_RESTORE */
+#define DEQUEUE_MOVE 0x0004 /* Matches ENQUEUE_MOVE */
+#define DEQUEUE_NOCLOCK 0x0008 /* Matches ENQUEUE_NOCLOCK */
+
+#define DEQUEUE_MIGRATING 0x0010 /* Matches ENQUEUE_MIGRATING */
+#define DEQUEUE_DELAYED 0x0020 /* Matches ENQUEUE_DELAYED */
+
+#define DEQUEUE_SPECIAL 0x00010000
+#define DEQUEUE_THROTTLE 0x00020000
+
+#define ENQUEUE_WAKEUP 0x0001
+#define ENQUEUE_RESTORE 0x0002
+#define ENQUEUE_MOVE 0x0004
+#define ENQUEUE_NOCLOCK 0x0008
+
+#define ENQUEUE_MIGRATING 0x0010
+#define ENQUEUE_DELAYED 0x0020
+
+#define ENQUEUE_HEAD 0x00010000
+#define ENQUEUE_REPLENISH 0x00020000
+#define ENQUEUE_MIGRATED 0x00040000
+#define ENQUEUE_INITIAL 0x00080000
+#define ENQUEUE_RQ_SELECTED 0x00100000
#define RETRY_TASK ((void *)-1UL)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0089/2151] sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (87 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0088/2151] sched: Re-arrange the {EN,DE}QUEUE flags Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0090/2151] sched/fair: Clear throttle state when leaving the fair class Greg Kroah-Hartman
` (793 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Peter Zijlstra (Intel), Juri Lelli,
Tejun Heo, Vincent Guittot, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@infradead.org>
[ Upstream commit 637b0682821b144d5993211cf0a768b322138a69 ]
Add {DE,EN}QUEUE_CLASS and fold the sched_class::switch* methods into
the change pattern. This completes and makes the pattern more
symmetric.
This changes the order of callbacks slightly:
OLD NEW
|
| switching_from()
dequeue_task(); | dequeue_task()
put_prev_task(); | put_prev_task()
| switched_from()
|
... change task ... | ... change task ...
|
switching_to(); | switching_to()
enqueue_task(); | enqueue_task()
set_next_task(); | set_next_task()
prev_class->switched_from() |
switched_to() | switched_to()
|
Notably, it moves the switched_from() callback right after the
dequeue/put. Existing implementations don't appear to be affected by
this change in location -- specifically the task isn't enqueued on the
class in question in either location.
Make (CLASS)^(SAVE|MOVE), because there is nothing to save-restore
when changing scheduling classes.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Juri Lelli <juri.lelli@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Vincent Guittot <vincent.guittot@linaro.org>
Stable-dep-of: c282051fc2ca ("sched/fair: Clear throttle state when leaving the fair class")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/sched/core.c | 51 +++++++++++++++++-----------------------
kernel/sched/ext.c | 22 ++++++++++++-----
kernel/sched/idle.c | 4 ++--
kernel/sched/rt.c | 2 +-
kernel/sched/sched.h | 22 +++++++----------
kernel/sched/stop_task.c | 4 ++--
kernel/sched/syscalls.c | 7 ++++--
7 files changed, 55 insertions(+), 57 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index dbd871c6235f4..57ba5fcff1339 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2185,34 +2185,9 @@ inline int task_curr(const struct task_struct *p)
return cpu_curr(task_cpu(p)) == p;
}
-/*
- * ->switching_to() is called with the pi_lock and rq_lock held and must not
- * mess with locking.
- */
-void check_class_changing(struct rq *rq, struct task_struct *p,
- const struct sched_class *prev_class)
-{
- if (prev_class != p->sched_class && p->sched_class->switching_to)
- p->sched_class->switching_to(rq, p);
-}
-
-/*
- * switched_from, switched_to and prio_changed must _NOT_ drop rq->lock,
- * use the balance_callback list if you want balancing.
- *
- * this means any call to check_class_changed() must be followed by a call to
- * balance_callback().
- */
-void check_class_changed(struct rq *rq, struct task_struct *p,
- const struct sched_class *prev_class,
- int oldprio)
+void check_prio_changed(struct rq *rq, struct task_struct *p, int oldprio)
{
- if (prev_class != p->sched_class) {
- if (prev_class->switched_from)
- prev_class->switched_from(rq, p);
-
- p->sched_class->switched_to(rq, p);
- } else if (oldprio != p->prio || dl_task(p))
+ if (oldprio != p->prio || dl_task(p))
p->sched_class->prio_changed(rq, p, oldprio);
}
@@ -7413,6 +7388,9 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
prev_class = p->sched_class;
next_class = __setscheduler_class(p->policy, prio);
+ if (prev_class != next_class)
+ queue_flag |= DEQUEUE_CLASS;
+
if (prev_class != next_class && p->se.sched_delayed)
dequeue_task(rq, p, DEQUEUE_SLEEP | DEQUEUE_DELAYED | DEQUEUE_NOCLOCK);
@@ -7449,11 +7427,10 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
p->sched_class = next_class;
p->prio = prio;
-
- check_class_changing(rq, p, prev_class);
}
- check_class_changed(rq, p, prev_class, oldprio);
+ if (!(queue_flag & DEQUEUE_CLASS))
+ check_prio_changed(rq, p, oldprio);
out_unlock:
/* Avoid rq from going away on us: */
preempt_disable();
@@ -10892,6 +10869,11 @@ struct sched_change_ctx *sched_change_begin(struct task_struct *p, unsigned int
lockdep_assert_rq_held(rq);
+ if (flags & DEQUEUE_CLASS) {
+ if (p->sched_class->switching_from)
+ p->sched_class->switching_from(rq, p);
+ }
+
*ctx = (struct sched_change_ctx){
.p = p,
.flags = flags,
@@ -10904,6 +10886,9 @@ struct sched_change_ctx *sched_change_begin(struct task_struct *p, unsigned int
if (ctx->running)
put_prev_task(rq, p);
+ if ((flags & DEQUEUE_CLASS) && p->sched_class->switched_from)
+ p->sched_class->switched_from(rq, p);
+
return ctx;
}
@@ -10914,8 +10899,14 @@ void sched_change_end(struct sched_change_ctx *ctx)
lockdep_assert_rq_held(rq);
+ if ((ctx->flags & ENQUEUE_CLASS) && p->sched_class->switching_to)
+ p->sched_class->switching_to(rq, p);
+
if (ctx->queued)
enqueue_task(rq, p, ctx->flags | ENQUEUE_NOCLOCK);
if (ctx->running)
set_next_task(rq, p);
+
+ if ((ctx->flags & ENQUEUE_CLASS) && p->sched_class->switched_to)
+ p->sched_class->switched_to(rq, p);
}
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 3117d1ef869c5..48b8fb873b852 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -4079,20 +4079,25 @@ static void scx_root_disable(struct scx_sched *sch)
scx_task_iter_start(&sti);
while ((p = scx_task_iter_next_locked(&sti))) {
+ unsigned int queue_flags = DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
const struct sched_class *old_class = p->sched_class;
const struct sched_class *new_class = scx_setscheduler_class(p);
update_rq_clock(task_rq(p));
+ if (old_class != new_class)
+ queue_flags |= DEQUEUE_CLASS;
+
if (old_class != new_class && p->se.sched_delayed)
dequeue_task(task_rq(p), p, DEQUEUE_SLEEP | DEQUEUE_DELAYED | DEQUEUE_NOCLOCK);
- scoped_guard (sched_change, p, DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK) {
+ scoped_guard (sched_change, p, queue_flags) {
p->sched_class = new_class;
- check_class_changing(task_rq(p), p, old_class);
}
- check_class_changed(task_rq(p), p, old_class, p->prio);
+ if (!(queue_flags & DEQUEUE_CLASS))
+ check_prio_changed(task_rq(p), p, p->prio);
+
scx_exit_task(p);
}
scx_task_iter_stop(&sti);
@@ -4932,6 +4937,7 @@ static void scx_root_enable_workfn(struct kthread_work *work)
percpu_down_write(&scx_fork_rwsem);
scx_task_iter_start(&sti);
while ((p = scx_task_iter_next_locked(&sti))) {
+ unsigned int queue_flags = DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
const struct sched_class *old_class = p->sched_class;
const struct sched_class *new_class = scx_setscheduler_class(p);
@@ -4940,16 +4946,20 @@ static void scx_root_enable_workfn(struct kthread_work *work)
update_rq_clock(task_rq(p));
+ if (old_class != new_class)
+ queue_flags |= DEQUEUE_CLASS;
+
if (old_class != new_class && p->se.sched_delayed)
dequeue_task(task_rq(p), p, DEQUEUE_SLEEP | DEQUEUE_DELAYED | DEQUEUE_NOCLOCK);
- scoped_guard (sched_change, p, DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK) {
+ scoped_guard (sched_change, p, queue_flags) {
p->scx.slice = SCX_SLICE_DFL;
p->sched_class = new_class;
- check_class_changing(task_rq(p), p, old_class);
}
- check_class_changed(task_rq(p), p, old_class, p->prio);
+ if (!(queue_flags & DEQUEUE_CLASS))
+ check_prio_changed(task_rq(p), p, p->prio);
+
put_task_struct(p);
}
scx_task_iter_stop(&sti);
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 220fc9e7c22db..d5607b2150ba4 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -525,7 +525,7 @@ static void task_tick_idle(struct rq *rq, struct task_struct *curr, int queued)
{
}
-static void switched_to_idle(struct rq *rq, struct task_struct *p)
+static void switching_to_idle(struct rq *rq, struct task_struct *p)
{
BUG();
}
@@ -563,6 +563,6 @@ DEFINE_SCHED_CLASS(idle) = {
.task_tick = task_tick_idle,
.prio_changed = prio_changed_idle,
- .switched_to = switched_to_idle,
+ .switching_to = switching_to_idle,
.update_curr = update_curr_idle,
};
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index fc9737decfb73..6274bda1d5706 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2609,8 +2609,8 @@ DEFINE_SCHED_CLASS(rt) = {
.get_rr_interval = get_rr_interval_rt,
- .prio_changed = prio_changed_rt,
.switched_to = switched_to_rt,
+ .prio_changed = prio_changed_rt,
.update_curr = update_curr_rt,
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 2e0604b3a337f..81ccbfbb81521 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -21,7 +21,6 @@
#include <linux/sched/task_flags.h>
#include <linux/sched/task.h>
#include <linux/sched/topology.h>
-
#include <linux/atomic.h>
#include <linux/bitmap.h>
#include <linux/bug.h>
@@ -2384,6 +2383,7 @@ extern const u32 sched_prio_to_wmult[40];
#define DEQUEUE_MIGRATING 0x0010 /* Matches ENQUEUE_MIGRATING */
#define DEQUEUE_DELAYED 0x0020 /* Matches ENQUEUE_DELAYED */
+#define DEQUEUE_CLASS 0x0040 /* Matches ENQUEUE_CLASS */
#define DEQUEUE_SPECIAL 0x00010000
#define DEQUEUE_THROTTLE 0x00020000
@@ -2395,6 +2395,7 @@ extern const u32 sched_prio_to_wmult[40];
#define ENQUEUE_MIGRATING 0x0010
#define ENQUEUE_DELAYED 0x0020
+#define ENQUEUE_CLASS 0x0040
#define ENQUEUE_HEAD 0x00010000
#define ENQUEUE_REPLENISH 0x00020000
@@ -2458,14 +2459,11 @@ struct sched_class {
void (*task_fork)(struct task_struct *p);
void (*task_dead)(struct task_struct *p);
- /*
- * The switched_from() call is allowed to drop rq->lock, therefore we
- * cannot assume the switched_from/switched_to pair is serialized by
- * rq->lock. They are however serialized by p->pi_lock.
- */
- void (*switching_to) (struct rq *this_rq, struct task_struct *task);
- void (*switched_from)(struct rq *this_rq, struct task_struct *task);
- void (*switched_to) (struct rq *this_rq, struct task_struct *task);
+ void (*switching_from)(struct rq *this_rq, struct task_struct *task);
+ void (*switched_from) (struct rq *this_rq, struct task_struct *task);
+ void (*switching_to) (struct rq *this_rq, struct task_struct *task);
+ void (*switched_to) (struct rq *this_rq, struct task_struct *task);
+
void (*reweight_task)(struct rq *this_rq, struct task_struct *task,
const struct load_weight *lw);
void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
@@ -3892,11 +3890,7 @@ extern void set_load_weight(struct task_struct *p, bool update_load);
extern void enqueue_task(struct rq *rq, struct task_struct *p, int flags);
extern bool dequeue_task(struct rq *rq, struct task_struct *p, int flags);
-extern void check_class_changing(struct rq *rq, struct task_struct *p,
- const struct sched_class *prev_class);
-extern void check_class_changed(struct rq *rq, struct task_struct *p,
- const struct sched_class *prev_class,
- int oldprio);
+extern void check_prio_changed(struct rq *rq, struct task_struct *p, int oldprio);
extern struct balance_callback *splice_balance_callbacks(struct rq *rq);
extern void balance_callbacks(struct rq *rq, struct balance_callback *head);
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
index 73aeb0743aa2e..a781f4b44abf9 100644
--- a/kernel/sched/stop_task.c
+++ b/kernel/sched/stop_task.c
@@ -75,7 +75,7 @@ static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
{
}
-static void switched_to_stop(struct rq *rq, struct task_struct *p)
+static void switching_to_stop(struct rq *rq, struct task_struct *p)
{
BUG(); /* its impossible to change to this class */
}
@@ -112,6 +112,6 @@ DEFINE_SCHED_CLASS(stop) = {
.task_tick = task_tick_stop,
.prio_changed = prio_changed_stop,
- .switched_to = switched_to_stop,
+ .switching_to = switching_to_stop,
.update_curr = update_curr_stop,
};
diff --git a/kernel/sched/syscalls.c b/kernel/sched/syscalls.c
index 77b663a5dfb2b..b044a3aa4a0ad 100644
--- a/kernel/sched/syscalls.c
+++ b/kernel/sched/syscalls.c
@@ -713,6 +713,9 @@ int __sched_setscheduler(struct task_struct *p,
prev_class = p->sched_class;
next_class = __setscheduler_class(policy, newprio);
+ if (prev_class != next_class)
+ queue_flags |= DEQUEUE_CLASS;
+
if (prev_class != next_class && p->se.sched_delayed)
dequeue_task(rq, p, DEQUEUE_SLEEP | DEQUEUE_DELAYED | DEQUEUE_NOCLOCK);
@@ -725,7 +728,6 @@ int __sched_setscheduler(struct task_struct *p,
__setscheduler_dl_pi(newprio, policy, p, scope);
}
__setscheduler_uclamp(p, attr);
- check_class_changing(rq, p, prev_class);
if (scope->queued) {
/*
@@ -737,7 +739,8 @@ int __sched_setscheduler(struct task_struct *p,
}
}
- check_class_changed(rq, p, prev_class, oldprio);
+ if (!(queue_flags & DEQUEUE_CLASS))
+ check_prio_changed(rq, p, oldprio);
/* Avoid rq from going away on us: */
preempt_disable();
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0090/2151] sched/fair: Clear throttle state when leaving the fair class
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (88 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0089/2151] sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0091/2151] sched_ext: Skip ops.set_weight() for disabled tasks Greg Kroah-Hartman
` (792 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daehyeon Ko, Peter Zijlstra (Intel),
Ingo Molnar, Aaron Lu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daehyeon Ko <4ncienth@gmail.com>
[ Upstream commit c282051fc2cae2ea54770ebe435dbea090272c25 ]
Task-based CFS bandwidth throttling removes a task's fair sched_entity
while the scheduler core still considers the task queued. p->throttled
carries the fair-specific state across dequeue/enqueue operations.
DEQUEUE_CLASS removes the task from cfs_rq->throttled_limbo_list
but retains the bit. If the last finite CFS quota is disabled while
the task runs in another class, it is absent from the unthrottle walk and
the bit survives.
Returning to fair while cfs_bandwidth_used() is false then performs a real
fair enqueue with p->throttled still set.
After bandwidth is re-enabled, a class-change dequeue treats the
stale bit as limbo state and skips __dequeue_task(). p->se.on_rq therefore
remains set, and put_prev_task_fair() places the entity in the EEVDF tree
while the task moves to RT. On exit, the fair picker can select the
TASK_DEAD task. __schedule() then returns to do_task_dead(),
which hits BUG().
Keep p->throttled across migrations and group moves, but clear it on
DEQUEUE_CLASS because fair-specific state must not outlive fair-class
membership. A later return to fair uses the normal enqueue path. That path
still respects a throttled cfs_rq.
A KASAN, LOCKDEP and DEBUG_LIST v7.3 kernel reproduced the do_task_dead()
BUG in 3/3 root and 3/3 delegated uid-1000 runs with CapPrm=CapEff=0 and
RLIMIT_RTPRIO=1. The fix passed both matrices plus a 3/3 class-switch
control with bandwidth continuously enabled, without a scheduler warning,
KASAN report, lockdep splat or crash.
An AI coding assistant analyzed the state mismatch and drafted the initial
reproducer, fix candidate and this changelog. The source paths, trigger,
controls and results were rechecked against the cited revisions.
Fixes: e1fad12dcb66 ("sched/fair: Switch to task based throttle model")
Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Aaron Lu <ziqianlu@bytedance.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261022235234.150957-1-4ncienth@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/sched/fair.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index fbc277c6963c5..a063e302fbf8e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5988,8 +5988,8 @@ static void dequeue_throttled_task(struct task_struct *p, int flags)
WARN_ON_ONCE(p->se.on_rq);
list_del_init(&p->throttle_node);
- /* task blocked after throttled */
- if (flags & DEQUEUE_SLEEP) {
+ /* Task blocked after throttling or is leaving the fair class: */
+ if (flags & (DEQUEUE_SLEEP | DEQUEUE_CLASS)) {
p->throttled = false;
return;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0091/2151] sched_ext: Skip ops.set_weight() for disabled tasks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (89 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0090/2151] sched/fair: Clear throttle state when leaving the fair class Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0092/2151] mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names Greg Kroah-Hartman
` (791 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Kuba Piecuch, Tejun Heo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuba Piecuch <jpiecuch@google.com>
[ Upstream commit 0e2f4ab68a89fad42e0f5a9ff4b740738e7aa1d6 ]
When switching a task's sched_class away from sched_ext, we get the
following sequence of events in __sched_setscheduler():
sched_change_begin()
switched_from_scx()
scx_disable_task(p)
ops.disable(p)
__setscheduler_params()
set_load_weight()
reweight_task_scx(p)
ops.set_weight(p)
p->sched_class = next_class;
sched_change_end()
...
Notably, ops.set_weight() is called _after_ ops.disable().
This violates the expected semantics of the callbacks, the expectation
being that ops.disable() can only be followed by ops.exit_task() or
ops.enable().
Skipping the weight adjustment for disabled tasks should be harmless
since the weight will be recalculated in scx_enable_task() if the task
ever rejoins SCX.
Fixes: 637b0682821b ("sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern")
Cc: stable@vger.kernel.org # v6.19+
Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/sched/ext.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 48b8fb873b852..af5828f093045 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -3109,6 +3109,17 @@ static void reweight_task_scx(struct rq *rq, struct task_struct *p,
lockdep_assert_rq_held(task_rq(p));
+ /*
+ * When switching sched_class away from SCX, reweight_task_scx()
+ * is called _after_ scx_disable_task(). Skip calling ops.set_weight()
+ * since the BPF scheduler may have already forgotten the task in
+ * ops.disable().
+ * p->scx.weight will be recalculated in scx_enable_task() if the task
+ * ever returns to SCX class.
+ */
+ if (scx_get_task_state(p) != SCX_TASK_ENABLED)
+ return;
+
p->scx.weight = sched_weight_to_cgroup(scale_load_down(lw->weight));
if (SCX_HAS_OP(sch, set_weight))
SCX_CALL_OP_TASK(sch, SCX_KF_REST, set_weight, rq,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0092/2151] mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (90 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0091/2151] sched_ext: Skip ops.set_weight() for disabled tasks Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0093/2151] quota: initialize dquot cache before mounting rootfs Greg Kroah-Hartman
` (790 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Hildenbrand (Arm),
Lorenzo Stoakes (ARM), Andrew Morton, Pedro Falcato,
Gregory Price (Meta), Liam R. Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Jann Horn,
Davidlohr Bueso, SJ Park, Kees Cook, Colin Cross, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit 652f15be3c11415725694ccea317c51e35c0b582 ]
When changing the anonymous VMA name, madvise_update_vma() calls
vma_modify_name() to possibly merge with adjacent VMAs. We don't call
vma_modify_flags() and consequently don't obtain the new VMA flags.
Later in the function we update the VMA flags to the stale new_vma_flags
we obtained before. This can result in us losing the VMA_SOFTDIRTY_BIT
flag set on a VMA we just merged with.
There is no need to update the VMA flags at all, so just exit early. This
skips calling khugepaged_enter_vma(), but since the flags didn't change
this is fine.
[ljs@kernel.org: minor edit of commit message, rebased]
Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-3-8ff4fae1fc85@kernel.org
Fixes: 9a10064f5625 ("mm: add a field to store names for private anonymous memory")
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Jann Horn <jannh@google.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: SJ Park <sj@kernel.org>
Cc: Kees Cook <kees@kernel.org>
Cc: Colin Cross <ccross@google.com>
Cc: <stable@vger.kernel.org>
[ sashal: Adjusted context to match vm_flags_reset(vma, new_flags) instead of vma_overwrite_flags(vma, new_vma_flags). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/madvise.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index bd0a5093a2df2..c500f1cbd4987 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -176,6 +176,9 @@ static int madvise_update_vma(vm_flags_t new_flags,
/* vm_flags is protected by the mmap_lock held in write mode. */
vma_start_write(vma);
+ if (set_new_anon_name)
+ return replace_anon_vma_name(vma, anon_name);
+
vm_flags_reset(vma, new_flags);
/*
* If the vma become good for khugepaged to scan,
@@ -185,9 +188,6 @@ static int madvise_update_vma(vm_flags_t new_flags,
if (new_flags & VM_HUGEPAGE)
khugepaged_enter_vma(vma, new_flags);
- if (set_new_anon_name)
- return replace_anon_vma_name(vma, anon_name);
-
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0093/2151] quota: initialize dquot cache before mounting rootfs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (91 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0092/2151] mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0094/2151] ksmbd: let the owner read and change the DACL when no ACE names it Greg Kroah-Hartman
` (789 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dylan Johnson, YouYou Yu,
Gunnar Kudrjavets, Jan Kara, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: YouYou Yu <youyouyu@amazon.com>
[ Upstream commit e21a6f39aa6d0336ffbf5f34e5fa20ff8de36773 ]
On some systems, a tmpfs backed rootfs is extensively used throughout
system's lifecycle. tmpfs quotas are needed to limit per user rootfs
usage. However, booting with CONFIG_TMPFS_QUOTA=y, an initramfs, no root=
and "initramfs_options=usrquota" panics at boot:
BUG: kernel NULL pointer dereference, address: 0000000000000000
RIP: 0010:dqget+0x1ac/0x490
Call Trace:
__dquot_initialize
dquot_initialize
shmem_get_inode
shmem_fill_super
...
mnt_init
vfs_caches_init
start_kernel
The rootfs is mounted from mnt_init(), but the dquot hash table and
cache are only set up later by dquot_init(), an fs_initcall. Creating
the root inode of a quota enabled rootfs thus dereferences the NULL
dquot_hash in dqget().
Rename dquot_init() to dquot_cache_init() and call it from
vfs_caches_init() before mnt_init(). The slab, percpu and early
workqueue code it relies on is available there, and the workqueue
rescuer and shrinker debugfs entries are set up later by their own
subsystems. Keep the sysctl registration in an fs_initcall, as done
for the dcache, inode and mount sysctls. This only moves existing
allocations earlier in boot.
Fixes: 278033a225e1 ("fs: Add 'initramfs_options' to set initramfs mount options")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Dylan Johnson <dgj@amazon.com>
Signed-off-by: Dylan Johnson <dgj@amazon.com>
Signed-off-by: YouYou Yu <youyouyu@amazon.com>
Reviewed-by: Gunnar Kudrjavets <gunnarku@amazon.com>
Link: https://patch.msgid.link/20261021181217.20171-1-youyouyu@amazon.com
Signed-off-by: Jan Kara <jack@suse.cz>
[ sashal: adjusted patch context to match the existing quota initialization code ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/dcache.c | 2 ++
fs/quota/dquot.c | 10 ++++++----
include/linux/quotaops.h | 5 +++++
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 84952f6bbf406..77792a9e86737 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -32,6 +32,7 @@
#include <linux/bit_spinlock.h>
#include <linux/rculist_bl.h>
#include <linux/list_lru.h>
+#include <linux/quotaops.h>
#include "internal.h"
#include "mount.h"
@@ -3288,6 +3289,7 @@ void __init vfs_caches_init(void)
inode_init();
files_init();
files_maxfiles_init();
+ dquot_cache_init();
mnt_init();
bdev_cache_init();
chrdev_init();
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 45a46dc4de4ef..c91076c3f05e7 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -3019,7 +3019,7 @@ static const struct ctl_table fs_dqstats_table[] = {
#endif
};
-static int __init dquot_init(void)
+void __init dquot_cache_init(void)
{
int i, ret;
unsigned long nr_hash, order;
@@ -3027,8 +3027,6 @@ static int __init dquot_init(void)
printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
- register_sysctl_init("fs/quota", fs_dqstats_table);
-
dquot_cachep = kmem_cache_create("dquot",
sizeof(struct dquot), sizeof(unsigned long) * 4,
(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
@@ -3070,7 +3068,11 @@ static int __init dquot_init(void)
WQ_UNBOUND | WQ_MEM_RECLAIM, WQ_MAX_ACTIVE);
if (!quota_unbound_wq)
panic("Cannot create quota_unbound_wq\n");
+}
+static int __init init_fs_dquot_sysctls(void)
+{
+ register_sysctl_init("fs/quota", fs_dqstats_table);
return 0;
}
-fs_initcall(dquot_init);
+fs_initcall(init_fs_dquot_sysctls);
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index f9c0f9d7c9d93..bbe22c22439ed 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -40,6 +40,7 @@ void __quota_error(struct super_block *sb, const char *func,
/*
* declaration of quota_function calls in kernel.
*/
+void dquot_cache_init(void);
int dquot_initialize(struct inode *inode);
bool dquot_initialize_needed(struct inode *inode);
void dquot_drop(struct inode *inode);
@@ -206,6 +207,10 @@ static inline int sb_has_quota_active(struct super_block *sb, int type)
return 0;
}
+static inline void dquot_cache_init(void)
+{
+}
+
static inline int dquot_initialize(struct inode *inode)
{
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0094/2151] ksmbd: let the owner read and change the DACL when no ACE names it
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (92 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0093/2151] quota: initialize dquot cache before mounting rootfs Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0095/2151] mm/userfaultfd: compare exact registration modes before skipping Greg Kroah-Hartman
` (788 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ian Bridges, Namjae Jeon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Bridges <icb@fastmail.org>
[ Upstream commit ffc855fe16afe02b22305111aa68cd8d07360941 ]
smb_check_perm_dacl() refuses the owner when neither its DACL lookup nor
the POSIX ACL fallback matches. The owner then cannot read or replace
the DACL over SMB. MS-DTYP 2.5.3.2 grants the owner READ_CONTROL and
WRITE_DAC unless an OWNER RIGHTS ACE applies.
An empty DACL allows the owner's explicit requests for these rights but
refuses MAXIMUM_ALLOWED. smb2_open() uses that check for the maximal
access reply (MS-SMB2 3.3.5.9.5), so even a READ_CONTROL open fails when
it asks for that reply.
Grant the owner's implicit rights on both paths, for explicit requests
and MAXIMUM_ALLOWED, unless an OWNER RIGHTS ACE applies.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
[ sashal: added the missing sid_owner_rights definition required by the upstream patch ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/smbacl.c | 37 +++++++++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/fs/smb/server/smbacl.c b/fs/smb/server/smbacl.c
index d8c01e775d941..42a638d1d2b97 100644
--- a/fs/smb/server/smbacl.c
+++ b/fs/smb/server/smbacl.c
@@ -27,6 +27,9 @@ static const struct smb_sid creator_owner = {
/* security id for everyone/world system group */
static const struct smb_sid creator_group = {
1, 1, {0, 0, 0, 0, 0, 3}, {cpu_to_le32(1)} };
+/* security id for owner rights */
+static const struct smb_sid sid_owner_rights = {
+ 1, 1, {0, 0, 0, 0, 0, 3}, {cpu_to_le32(4)} };
/* security id for everyone/world system group */
static const struct smb_sid sid_everyone = {
@@ -1466,6 +1469,7 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
int i, found = 0;
unsigned int access_bits = 0, denied = 0;
struct smb_ace *others_ace = NULL;
+ bool or_ace = false;
struct posix_acl_entry *pa_entry;
unsigned int sid_type = SIDOWNER;
unsigned short ace_size;
@@ -1498,6 +1502,8 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
is_owner = uid == from_kuid(&init_user_ns, vfsuid_into_kuid(vfsuid));
if (!pdacl->num_aces) {
+ unsigned int allowed = 0;
+
/*
* An empty (present, zero-ACE) DACL grants no access to
* anyone except the object owner's implicit READ_CONTROL
@@ -1506,9 +1512,14 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
* not let trailing bytes after a zero-ACE DACL become an
* implicit grant.
*/
- if (!is_owner ||
- (*pdaccess & ~(FILE_READ_CONTROL_LE | FILE_WRITE_DAC_LE)))
+ if (is_owner)
+ allowed = READ_CONTROL | WRITE_DAC;
+ if (*pdaccess & FILE_MAXIMAL_ACCESS_LE)
+ requested |= allowed;
+ if (!allowed || requested & ~allowed)
rc = -EACCES;
+ else
+ *pdaccess = cpu_to_le32(requested);
goto err_out;
}
@@ -1585,6 +1596,9 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
found = 1;
break;
}
+ if (!compare_sids(&sid_owner_rights, &ace->sid) &&
+ !(ace->flags & INHERIT_ONLY_ACE))
+ or_ace = true;
if (!compare_sids(&sid_everyone, &ace->sid) ||
!compare_sids(&sid_authusers, &ace->sid))
others_ace = ace;
@@ -1629,8 +1643,23 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
if (others_ace) {
ace = others_ace;
} else {
- ksmbd_debug(SMB, "Can't find corresponding sid\n");
- rc = -EACCES;
+ unsigned int allowed = 0;
+
+ /*
+ * No ACE names the owner, who may still read and
+ * change the DACL unless OWNER RIGHTS applies
+ * (MS-DTYP 2.5.3.2).
+ */
+ if (is_owner && !or_ace)
+ allowed = READ_CONTROL | WRITE_DAC;
+ if (*pdaccess & FILE_MAXIMAL_ACCESS_LE)
+ requested |= allowed;
+ if (!allowed || requested & ~allowed) {
+ ksmbd_debug(SMB, "Can't find corresponding sid\n");
+ rc = -EACCES;
+ goto err_out;
+ }
+ *pdaccess = cpu_to_le32(requested);
goto err_out;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0095/2151] mm/userfaultfd: compare exact registration modes before skipping
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (93 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0094/2151] ksmbd: let the owner read and change the DACL when no ACE names it Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0096/2151] apparmor: optimize current_label_crit_section() with needput Greg Kroah-Hartman
` (787 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregory Price (Meta),
Muhammad Usama Anjum, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregory Price <gourry@gourry.net>
[ Upstream commit 05f64f211a25f7d9771d4fde109aad97174a1cf3 ]
Changing registration from MISSING|WP to WP returns success but leaves
MISSING enabled. The no-op check sees that WP is already set and skips
the update, so later accesses to missing pages still wait for userspace.
Skip the update only when the current and requested UFFD modes match
exactly.
Fixes: 63b2d4174c4a ("userfaultfd: wp: add the writeprotect API to userfaultfd ioctl")
Cc: stable@vger.kernel.org
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
[ david: apply fixup from Lorenzo ]
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-26-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Replaced bitmap-based VMA flag helpers with a scalar vm_flags mask and equality comparison. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/userfaultfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index d5467692e8c3b..afee33a97bc49 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -2077,7 +2077,7 @@ int userfaultfd_register_range(struct userfaultfd_ctx *ctx,
* userfaultfd and with the right tracking mode too.
*/
if (vma->vm_userfaultfd_ctx.ctx == ctx &&
- (vma->vm_flags & vm_flags) == vm_flags)
+ (vma->vm_flags & __VM_UFFD_FLAGS) == vm_flags)
goto skip;
if (vma->vm_start > start)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0096/2151] apparmor: optimize current_label_crit_section() with needput
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (94 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0095/2151] mm/userfaultfd: compare exact registration modes before skipping Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0097/2151] apparmor: fix query_data() output overlapping the lookup key Greg Kroah-Hartman
` (786 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, John Johansen, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Johansen <john.johansen@canonical.com>
[ Upstream commit 1555a0e2a149cba4578f5270e7fb9efb420b985f ]
The {begin,end}_current_label_crit_section() has the same issue as the
{__begin,__end} version. That is the check to see if the label has
been updated in the end check forces an unnecessary memory barrier.
We can optimize this the same way we do with the {__begin,__end}
variant by passing in a local variable that carries the state
information from the begin check into the end check.
No functional change.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Stable-dep-of: d30844001360 ("apparmor: fix query_data() output overlapping the lookup key")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/apparmor/af_unix.c | 25 +++++++++-------
security/apparmor/apparmorfs.c | 51 +++++++++++++++++++-------------
security/apparmor/include/cred.h | 16 +++++-----
security/apparmor/lsm.c | 45 +++++++++++++++++-----------
security/apparmor/net.c | 5 ++--
5 files changed, 84 insertions(+), 58 deletions(-)
diff --git a/security/apparmor/af_unix.c b/security/apparmor/af_unix.c
index 7ba775017586b..5474aa11bca83 100644
--- a/security/apparmor/af_unix.c
+++ b/security/apparmor/af_unix.c
@@ -462,13 +462,14 @@ static int aa_unix_label_sk_perm(const struct cred *subj_cred,
int aa_unix_sock_perm(const char *op, u32 request, struct socket *sock)
{
struct aa_label *label;
+ bool needput;
int error;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
error = aa_unix_label_sk_perm(current_cred(), label, op,
request, sock->sk,
is_unix_fs(sock->sk) ? &unix_sk(sock->sk)->path : NULL);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -489,13 +490,14 @@ int aa_unix_bind_perm(struct socket *sock, struct sockaddr *addr,
{
struct aa_profile *profile;
struct aa_label *label;
+ bool needput;
int error = 0;
error = valid_addr(addr, addrlen);
if (error)
return error;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
/* fs bind is handled by mknod */
if (!unconfined(label)) {
DEFINE_AUDIT_SK(ad, OP_BIND, current_cred(), sock->sk);
@@ -506,7 +508,7 @@ int aa_unix_bind_perm(struct socket *sock, struct sockaddr *addr,
error = fn_for_each_confined(label, profile,
profile_bind_perm(profile, sock->sk, &ad));
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -528,9 +530,10 @@ int aa_unix_listen_perm(struct socket *sock, int backlog)
{
struct aa_profile *profile;
struct aa_label *label;
+ bool needput;
int error = 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label)) {
DEFINE_AUDIT_SK(ad, OP_LISTEN, current_cred(), sock->sk);
@@ -538,7 +541,7 @@ int aa_unix_listen_perm(struct socket *sock, int backlog)
profile_listen_perm(profile, sock->sk,
backlog, &ad));
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -549,16 +552,17 @@ int aa_unix_accept_perm(struct socket *sock, struct socket *newsock)
{
struct aa_profile *profile;
struct aa_label *label;
+ bool needput;
int error = 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label)) {
DEFINE_AUDIT_SK(ad, OP_ACCEPT, current_cred(), sock->sk);
error = fn_for_each_confined(label, profile,
profile_accept_perm(profile, sock->sk, &ad));
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -582,9 +586,10 @@ int aa_unix_opt_perm(const char *op, u32 request, struct socket *sock,
{
struct aa_profile *profile;
struct aa_label *label;
+ bool needput;
int error = 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label)) {
DEFINE_AUDIT_SK(ad, op, current_cred(), sock->sk);
@@ -592,7 +597,7 @@ int aa_unix_opt_perm(const char *op, u32 request, struct socket *sock,
profile_opt_perm(profile, request, sock->sk,
optname, &ad));
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 7db41581b7b21..765812092cacd 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -494,8 +494,9 @@ static ssize_t policy_update(u32 mask, const char __user *buf, size_t size,
struct aa_loaddata *data;
struct aa_label *label;
ssize_t error;
+ bool needput;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
/* high level check about policy management - fine grained in
* below after unpack
@@ -514,7 +515,7 @@ static ssize_t policy_update(u32 mask, const char __user *buf, size_t size,
aa_put_profile_loaddata(data);
}
end_section:
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -562,8 +563,9 @@ static ssize_t profile_remove(struct file *f, const char __user *buf,
struct aa_label *label;
ssize_t error;
struct aa_ns *ns = get_ns_common_ref(f->f_inode->i_private);
+ bool needput;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
/* high level check about policy management - fine grained in
* below after unpack
*/
@@ -585,7 +587,7 @@ static ssize_t profile_remove(struct file *f, const char __user *buf,
aa_put_profile_loaddata(data);
}
out:
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
aa_put_ns(ns);
return error;
}
@@ -761,6 +763,7 @@ static ssize_t query_data(char *buf, size_t buf_len,
struct aa_data *data;
u32 bytes, blocks;
__le32 outle32;
+ bool needput;
if (!query_len)
return -EINVAL; /* need a query */
@@ -774,9 +777,9 @@ static ssize_t query_data(char *buf, size_t buf_len,
if (buf_len < sizeof(bytes) + sizeof(blocks))
return -EINVAL; /* not enough space */
- curr = begin_current_label_crit_section();
+ curr = begin_current_label_crit_section(&needput);
label = aa_label_parse(curr, query, GFP_KERNEL, false, false);
- end_current_label_crit_section(curr);
+ end_current_label_crit_section(curr, needput);
if (IS_ERR(label))
return PTR_ERR(label);
@@ -852,6 +855,7 @@ static ssize_t query_label(char *buf, size_t buf_len,
size_t label_name_len, match_len;
struct aa_perms perms;
struct label_it i;
+ bool needput;
if (!query_len)
return -EINVAL;
@@ -870,9 +874,9 @@ static ssize_t query_label(char *buf, size_t buf_len,
match_str = label_name + label_name_len + 1;
match_len = query_len - label_name_len - 1;
- curr = begin_current_label_crit_section();
+ curr = begin_current_label_crit_section(&needput);
label = aa_label_parse(curr, label_name, GFP_KERNEL, false, false);
- end_current_label_crit_section(curr);
+ end_current_label_crit_section(curr, needput);
if (IS_ERR(label))
return PTR_ERR(label);
@@ -1240,10 +1244,11 @@ static const struct file_operations seq_ns_ ##NAME ##_fops = { \
static int seq_ns_stacked_show(struct seq_file *seq, void *v)
{
struct aa_label *label;
+ bool needput;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
seq_printf(seq, "%s\n", str_yes_no(label->size > 1));
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return 0;
}
@@ -1254,8 +1259,9 @@ static int seq_ns_nsstacked_show(struct seq_file *seq, void *v)
struct aa_profile *profile;
struct label_it it;
int count = 1;
+ bool needput;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (label->size > 1) {
label_for_each(it, label, profile)
@@ -1266,7 +1272,7 @@ static int seq_ns_nsstacked_show(struct seq_file *seq, void *v)
}
seq_printf(seq, "%s\n", str_yes_no(count > 1));
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return 0;
}
@@ -1274,19 +1280,22 @@ static int seq_ns_nsstacked_show(struct seq_file *seq, void *v)
static int seq_ns_level_show(struct seq_file *seq, void *v)
{
struct aa_label *label;
+ bool needput;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
seq_printf(seq, "%d\n", labels_ns(label)->level);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return 0;
}
static int seq_ns_name_show(struct seq_file *seq, void *v)
{
- struct aa_label *label = begin_current_label_crit_section();
+ bool needput;
+ struct aa_label *label = begin_current_label_crit_section(&needput);
+
seq_printf(seq, "%s\n", labels_ns(label)->base.name);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return 0;
}
@@ -1937,11 +1946,12 @@ static struct dentry *ns_mkdir_op(struct mnt_idmap *idmap, struct inode *dir,
/* TODO: improve permission check */
struct aa_label *label;
int error;
+ bool needput;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
error = aa_may_manage_policy(current_cred(), label, NULL, NULL,
AA_MAY_LOAD_POLICY);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
if (error)
return ERR_PTR(error);
@@ -1986,12 +1996,13 @@ static int ns_rmdir_op(struct inode *dir, struct dentry *dentry)
struct aa_ns *ns, *parent;
/* TODO: improve permission check */
struct aa_label *label;
+ bool needput;
int error;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
error = aa_may_manage_policy(current_cred(), label, NULL, NULL,
AA_MAY_LOAD_POLICY);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
if (error)
return error;
diff --git a/security/apparmor/include/cred.h b/security/apparmor/include/cred.h
index d37f33f0eec89..e1d7f050f9bd9 100644
--- a/security/apparmor/include/cred.h
+++ b/security/apparmor/include/cred.h
@@ -131,12 +131,14 @@ static inline void __end_current_label_crit_section(struct aa_label *label,
/**
* end_current_label_crit_section - put a reference found with begin_current_label..
* @label: label reference to put
+ * @needput: output: bool set by __begin_current_label_crit_section
*
* Should only be used with a reference obtained with
* begin_current_label_crit_section and never used in situations where the
* task cred may be updated
*/
-static inline void end_current_label_crit_section(struct aa_label *label)
+static inline void end_current_label_crit_section(struct aa_label *label,
+ bool needput)
{
if (label != aa_current_raw_label())
aa_put_label(label);
@@ -170,24 +172,22 @@ static inline struct aa_label *__begin_current_label_crit_section(bool *needput)
/**
* begin_current_label_crit_section - current's confining label and update it
+ * @needput: store whether the label needs to be put when ending crit section
*
* Returns: up to date confining label or the ns unconfined label (NOT NULL)
*
- * Not safe to call inside locks
- *
* The returned reference must be put with end_current_label_crit_section()
- * This must NOT be used if the task cred could be updated within the
+ * This should NOT be used if the task cred could be updated within the
* critical section between begin_current_label_crit_section() ..
* end_current_label_crit_section()
*/
-static inline struct aa_label *begin_current_label_crit_section(void)
+static inline struct aa_label *begin_current_label_crit_section(bool *needput)
{
struct aa_label *label = aa_current_raw_label();
- if (label_is_stale(label)) {
- label = aa_get_newest_label(label);
+ label = __begin_current_label_crit_section(needput);
+ if (*needput)
aa_schedule_stale_label_replacement();
- }
return label;
}
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index e47696a7eacf8..dca21162a2140 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -365,15 +365,16 @@ static int apparmor_path_link(struct dentry *old_dentry, const struct path *new_
{
struct aa_label *label;
int error = 0;
+ bool needput;
if (!path_mediated_fs(old_dentry))
return 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label))
error = aa_path_link(current_cred(), label, old_dentry, new_dir,
new_dentry);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -384,13 +385,14 @@ static int apparmor_path_rename(const struct path *old_dir, struct dentry *old_d
{
struct aa_label *label;
int error = 0;
+ bool needput;
if (!path_mediated_fs(old_dentry))
return 0;
if ((flags & RENAME_EXCHANGE) && !path_mediated_fs(new_dentry))
return 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label)) {
struct mnt_idmap *idmap = mnt_idmap(old_dir->mnt);
vfsuid_t vfsuid;
@@ -436,7 +438,7 @@ static int apparmor_path_rename(const struct path *old_dir, struct dentry *old_d
AA_MAY_CREATE, &cond);
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -503,11 +505,12 @@ static int apparmor_file_open(struct file *file)
static int apparmor_file_alloc_security(struct file *file)
{
struct aa_file_ctx *ctx = file_ctx(file);
- struct aa_label *label = begin_current_label_crit_section();
+ bool needput;
+ struct aa_label *label = begin_current_label_crit_section(&needput);
spin_lock_init(&ctx->lock);
rcu_assign_pointer(ctx->label, aa_get_label(label));
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return 0;
}
@@ -522,11 +525,12 @@ static void apparmor_file_free_security(struct file *file)
static int common_file_perm(const char *op, struct file *file, u32 mask)
{
struct aa_label *label;
+ bool needput;
int error = 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
error = aa_file_perm(op, current_cred(), label, file, mask, false);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -847,6 +851,7 @@ static int do_setattr(u64 attr, void *value, size_t size)
char *command, *largs = NULL, *args = value;
size_t arg_size;
int error;
+ bool needput;
DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_NONE, AA_CLASS_NONE,
OP_SETPROCATTR);
@@ -907,7 +912,7 @@ static int do_setattr(u64 attr, void *value, size_t size)
return error;
fail:
- ad.subj_label = begin_current_label_crit_section();
+ ad.subj_label = begin_current_label_crit_section(&needput);
if (attr == LSM_ATTR_CURRENT)
ad.info = "current";
else if (attr == LSM_ATTR_EXEC)
@@ -916,7 +921,7 @@ static int do_setattr(u64 attr, void *value, size_t size)
ad.info = "invalid";
ad.error = error = -EINVAL;
aa_audit_msg(AUDIT_APPARMOR_DENIED, &ad, NULL);
- end_current_label_crit_section(ad.subj_label);
+ end_current_label_crit_section(ad.subj_label, needput);
goto out;
}
@@ -1047,18 +1052,19 @@ static int apparmor_userns_create(const struct cred *cred)
struct aa_label *label;
struct aa_profile *profile;
int error = 0;
+ bool needput;
DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_TASK, AA_CLASS_NS,
OP_USERNS_CREATE);
ad.subj_cred = current_cred();
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label)) {
error = fn_for_each(label, profile,
aa_profile_ns_perm(profile, &ad,
AA_USERNS_CREATE));
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -1252,13 +1258,14 @@ static int apparmor_socket_create(int family, int type, int protocol, int kern)
{
struct aa_label *label;
int error = 0;
+ bool needput;
AA_BUG(in_interrupt());
if (kern)
return 0;
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (!unconfined(label)) {
if (family == PF_UNIX)
error = aa_unix_create_perm(label, family, type,
@@ -1268,7 +1275,7 @@ static int apparmor_socket_create(int family, int type, int protocol, int kern)
AA_MAY_CREATE, family, type,
protocol);
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
@@ -1315,9 +1322,10 @@ static int apparmor_socket_socketpair(struct socket *socka,
struct aa_sk_ctx *a_ctx = aa_sock(socka->sk);
struct aa_sk_ctx *b_ctx = aa_sock(sockb->sk);
struct aa_label *label;
+ bool needput;
/* socks not live yet - initial values set in sk_alloc */
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
if (rcu_access_pointer(a_ctx->label) != label) {
AA_BUG("a_ctx != label");
aa_put_label(rcu_dereference_protected(a_ctx->label, true));
@@ -1333,7 +1341,7 @@ static int apparmor_socket_socketpair(struct socket *socka,
/* unix socket pairs by-pass unix_stream_connect */
unix_connect_peers(a_ctx, b_ctx);
}
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return 0;
}
@@ -1568,13 +1576,14 @@ static int apparmor_socket_getpeersec_stream(struct socket *sock,
int slen, error = 0;
struct aa_label *label;
struct aa_label *peer;
+ bool needput;
peer = sk_peer_get_label(sock->sk);
if (IS_ERR(peer)) {
error = PTR_ERR(peer);
goto done;
}
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
slen = aa_label_asxprint(&name, labels_ns(label), peer,
FLAG_SHOW_MODE | FLAG_VIEW_SUBNS |
FLAG_HIDDEN_UNCONFINED, GFP_KERNEL);
@@ -1595,7 +1604,7 @@ static int apparmor_socket_getpeersec_stream(struct socket *sock,
error = -EFAULT;
done_put:
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
aa_put_label(peer);
done:
kfree(name);
diff --git a/security/apparmor/net.c b/security/apparmor/net.c
index 73a272576d5d6..6376a86f82e17 100644
--- a/security/apparmor/net.c
+++ b/security/apparmor/net.c
@@ -308,15 +308,16 @@ static int aa_label_sk_perm(const struct cred *subj_cred,
int aa_sk_perm(const char *op, u32 request, struct sock *sk)
{
struct aa_label *label;
+ bool needput;
int error;
AA_BUG(!sk);
AA_BUG(in_interrupt());
/* TODO: switch to begin_current_label ???? */
- label = begin_current_label_crit_section();
+ label = begin_current_label_crit_section(&needput);
error = aa_label_sk_perm(current_cred(), label, op, request, sk);
- end_current_label_crit_section(label);
+ end_current_label_crit_section(label, needput);
return error;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0097/2151] apparmor: fix query_data() output overlapping the lookup key
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (95 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0096/2151] apparmor: optimize current_label_crit_section() with needput Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0098/2151] mm/shmem: preserve allocation errors when swapping in large entries Greg Kroah-Hartman
` (785 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Francis Perron,
AutonomousCodeSecurity, Cen Zhang (Microsoft), John Johansen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cen Zhang (Microsoft) <cenzhang@linux.microsoft.com>
[ Upstream commit d30844001360a403a511cf24fc75ecaa6a7a7544 ]
In query_data(), buf and query point into the same multi_transaction
buffer: buf at the start, query a few bytes in, and the lookup key
right after the label string that query points to. Reusing the buffer
is by design and is safe as long as the query is fully parsed before
buf is written to, but the key is not: it is dereferenced on every
iteration of label_for_each_confined(), after output has already been
written. So when the label has more than one profile with a data
table, the data of the first matching profile is written to buf while
the key is still needed, and overwrites it if the data is large enough.
The later lookups then run on a corrupted key. Besides, if the data has
no NUL byte from the key's position to the end of the allocation,
strhash() -> strlen() -> jhash() reads past the 4096-byte slab object,
triggering an out-of-bound read:
BUG: KASAN: slab-out-of-bounds in jhash+0x595/0x5e0
Read of size 1 at addr ff1100001159d000 by task exploit/155
CPU: 0 UID: 1000 PID: 155 Comm: exploit Not tainted 7.3.0-rc7 #1
Call Trace:
jhash+0x595/0x5e0
aa_write_access+0x880/0x1400
vfs_write+0x26f/0xd20
ksys_write+0x115/0x210
Writing to the .access file is unprivileged (0666), but triggering this
requires loaded profiles that carry a data table, which needs
CAP_MAC_ADMIN and is not the case on default distribution policies.
Fix by copying the key with kstrdup() before writing any output to buf,
so the key stays valid across all loop iterations regardless of what
gets written to the overlapping buffer.
Fixes: 317d9a054e1c ("apparmor: update query interface to support label queries")
Cc: stable@vger.kernel.org # v4.13+
Cc: Francis Perron <francis@akrites.dev>
Reported-by: AutonomousCodeSecurity@microsoft.com
Signed-off-by: Cen Zhang (Microsoft) <cenzhang@linux.microsoft.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/apparmor/apparmorfs.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 765812092cacd..48711167956eb 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -755,7 +755,7 @@ static void profile_query_cb(const struct aa_profile *profile,
static ssize_t query_data(char *buf, size_t buf_len,
char *query, size_t query_len)
{
- char *out;
+ char *out, *keydup;
const char *key;
struct label_it i;
struct aa_label *label, *curr;
@@ -777,11 +777,18 @@ static ssize_t query_data(char *buf, size_t buf_len,
if (buf_len < sizeof(bytes) + sizeof(blocks))
return -EINVAL; /* not enough space */
+ /* buf overlaps query, keep a copy of the key for the later lookups */
+ keydup = kstrdup(key, GFP_KERNEL);
+ if (!keydup)
+ return -ENOMEM;
+
curr = begin_current_label_crit_section(&needput);
label = aa_label_parse(curr, query, GFP_KERNEL, false, false);
end_current_label_crit_section(curr, needput);
- if (IS_ERR(label))
+ if (IS_ERR(label)) {
+ kfree(keydup);
return PTR_ERR(label);
+ }
/* We are going to leave space for two numbers. The first is the total
* number of bytes we are writing after the first number. This is so
@@ -799,13 +806,14 @@ static ssize_t query_data(char *buf, size_t buf_len,
if (!profile->data)
continue;
- data = rhashtable_lookup_fast(profile->data, &key,
+ data = rhashtable_lookup_fast(profile->data, &keydup,
profile->data->p);
if (data) {
if (out + sizeof(outle32) + data->size > buf +
buf_len) {
aa_put_label(label);
+ kfree(keydup);
return -EINVAL; /* not enough space */
}
outle32 = __cpu_to_le32(data->size);
@@ -817,6 +825,7 @@ static ssize_t query_data(char *buf, size_t buf_len,
}
}
aa_put_label(label);
+ kfree(keydup);
outle32 = __cpu_to_le32(out - buf - sizeof(bytes));
memcpy(buf, &outle32, sizeof(outle32));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0098/2151] mm/shmem: preserve allocation errors when swapping in large entries
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (96 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0097/2151] apparmor: fix query_data() output overlapping the lookup key Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0099/2151] mm/filemap: read mapping->a_ops->free_folio under i_lock Greg Kroah-Hartman
` (784 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik, Kiryl Shutsemau (Meta),
Baolin Wang, Gregory Price (Meta), David Hildenbrand (Arm),
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit f4ce23b1feef16d435aa1188b6c2a637a5373ed5 ]
shmem_swapin_folio() adjusts swap to the requested slot within a large
swap entry before allocating a folio. If allocation or charging fails,
the error path compares this adjusted value with the original entry
still stored in the XArray in shmem_confirm_swap().
Unless the index is at the start of the entry, this turns -ENOMEM into
-EEXIST even though nothing changed.
The caller retries -EEXIST, so persistent allocation failures can leave
the task spinning instead of returning the error.
Restore swap to index_entry on allocation failure so the existing error
path checks the original entry. This preserves the allocation error if
the entry is unchanged and still retries if it changed concurrently.
Fixes: 91ab656ece13 ("mm/shmem, swap: tidy up swap entry splitting")
Cc: stable@vger.kernel.org
Reported-by: Josef Bacik <josef@toxicpanda.com>
Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Link: https://patch.msgid.link/20261029-fixes_shmem-v4-12-392fc715d8f6@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Duplicated the swap = index_entry assignment across separate direct and cached swap-in failure paths instead of one shared error block. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/shmem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/shmem.c b/mm/shmem.c
index 6828611bcdfe0..e7c4d134b8255 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2376,6 +2376,8 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
if (IS_ERR(folio)) {
error = PTR_ERR(folio);
folio = NULL;
+ /* Make sure to validate the original value. */
+ swap = index_entry;
goto failed;
}
skip_swapcache = true;
@@ -2384,6 +2386,8 @@ static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
folio = shmem_swapin_cluster(swap, gfp, info, index);
if (!folio) {
error = -ENOMEM;
+ /* Make sure to validate the original value. */
+ swap = index_entry;
goto failed;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0099/2151] mm/filemap: read mapping->a_ops->free_folio under i_lock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (97 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0098/2151] mm/shmem: preserve allocation errors when swapping in large entries Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0100/2151] mm/rmap: handle device-exclusive entries in folio_referenced_one() Greg Kroah-Hartman
` (783 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik, Rik van Riel,
Muhammad Usama Anjum, Zi Yan, David Hildenbrand (Arm),
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josef Bacik <josef@toxicpanda.com>
[ Upstream commit dc24e273244e9d712257d5a6c20a32c7f5ca84e6 ]
memory_failure() -> ... -> filemap_remove_folio() can read mapping->a_ops
after the inode has been freed. Once the folio is deleted from the
pagecache it no longer pins the mapping, so after i_lock is dropped
e.g., a concurrent final iput() can evict and free the inode before
filemap_free_folio() looks up mapping->a_ops->free_folio.
Most callers hold a reference on the inode, but not all.
Documentation/filesystems/vfs.rst explicitly states that ->free_folio()
must not assume the original address_space mapping still exists.
Fix it by loading ->free_folio while i_lock is still held, similar to
what folio_unmap_invalidate() does.
Inline filemap_free_folio() into its remaining caller such that
delete_from_page_cache_batch() also just loads the callback before
dropping the i_lock.
The bug was found by code inspection and has not been reproduced.
Fix generated by an LLM and sent by Josef Bacik in private.
Fixes: 59c66c5f8c4f ("mm: factor out page cache page freeing into a separate function")
Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ david: get rid of filemap_free_folio() entirely; improve patch description ]
Reviewed-by: Rik van Riel <riel@surriel.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-6-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Adjusted patch context to retain inode_add_lru() instead of inode_lru_list_add(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/filemap.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index cd7af384cff26..ee6594e691456 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -227,18 +227,6 @@ void __filemap_remove_folio(struct folio *folio, void *shadow)
page_cache_delete(mapping, folio, shadow);
}
-static void filemap_free_folio(const struct address_space *mapping,
- struct folio *folio)
-{
- void (*free_folio)(struct folio *);
-
- free_folio = mapping->a_ops->free_folio;
- if (free_folio)
- free_folio(folio);
-
- folio_put_refs(folio, folio_nr_pages(folio));
-}
-
/**
* filemap_remove_folio - Remove folio from page cache.
* @folio: The folio.
@@ -250,6 +238,7 @@ static void filemap_free_folio(const struct address_space *mapping,
void filemap_remove_folio(struct folio *folio)
{
struct address_space *mapping = folio->mapping;
+ void (*free_folio)(struct folio *folio);
BUG_ON(!folio_test_locked(folio));
spin_lock(&mapping->host->i_lock);
@@ -258,9 +247,12 @@ void filemap_remove_folio(struct folio *folio)
xa_unlock_irq(&mapping->i_pages);
if (mapping_shrinkable(mapping))
inode_add_lru(mapping->host);
+ free_folio = mapping->a_ops->free_folio;
spin_unlock(&mapping->host->i_lock);
- filemap_free_folio(mapping, folio);
+ if (free_folio)
+ free_folio(folio);
+ folio_put_refs(folio, folio_nr_pages(folio));
}
/*
@@ -320,6 +312,7 @@ static void page_cache_delete_batch(struct address_space *mapping,
void delete_from_page_cache_batch(struct address_space *mapping,
struct folio_batch *fbatch)
{
+ void (*free_folio)(struct folio *folio);
int i;
if (!folio_batch_count(fbatch))
@@ -337,10 +330,16 @@ void delete_from_page_cache_batch(struct address_space *mapping,
xa_unlock_irq(&mapping->i_pages);
if (mapping_shrinkable(mapping))
inode_add_lru(mapping->host);
+ free_folio = mapping->a_ops->free_folio;
spin_unlock(&mapping->host->i_lock);
- for (i = 0; i < folio_batch_count(fbatch); i++)
- filemap_free_folio(mapping, fbatch->folios[i]);
+ for (i = 0; i < folio_batch_count(fbatch); i++) {
+ struct folio *folio = fbatch->folios[i];
+
+ if (free_folio)
+ free_folio(folio);
+ folio_put_refs(folio, folio_nr_pages(folio));
+ }
}
int filemap_check_errors(struct address_space *mapping)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0100/2151] mm/rmap: handle device-exclusive entries in folio_referenced_one()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (98 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0099/2151] mm/filemap: read mapping->a_ops->free_folio under i_lock Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0101/2151] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends Greg Kroah-Hartman
` (782 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lorenzo Stoakes (ARM), Josef Bacik,
Harry Yoo (Meta), Barry Song, Dev Jain, Muhammad Usama Anjum,
Baolin Wang, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit f3c493d2f42b5f44a5c134d8d7ea7f960caf5e2c ]
page_vma_mapped_walk() can return non-present device-exclusive entries,
but folio_referenced_one() passes them to PTE young-bit accessors that
require present PTEs.
We must neither call clear_flush_young_ptes_notify() nor
folio_pte_batch() with non-present entries. For example, clearing the
young bit on non-present PTEs can corrupt the entry: on arm64
PTE_AF overlaps the swap type, so clearing it turns a device-exclusive
entry into an ordinary swap entry.
folio_pte_batch() will VM_WARN_ON_FOLIO.
Apply the same approach as the previous fixes to e.g., damon_ptep_mkold():
treat these entries as old from the CPU's perspective and obtain their
young state through the MMU notifier.
Skip PTE batching and MGLRU look-around for non-present entries, and
don't modify non-present PTEs.
Fixes: b756a3b5e7ea ("mm: device exclusive memory access")
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Cc: stable@vger.kernel.org
Reported-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>
Reviewed-by: Barry Song <baohua@kernel.org>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-9-d6437171ecc3@kernel.org
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: adapted batched PTE handling to the existing single-PTE APIs ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/rmap.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c
index 03d7d666cc578..14b5d9f2093fd 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -858,6 +858,7 @@ static bool folio_referenced_one(struct folio *folio,
struct folio_referenced_arg *pra = arg;
DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, address, 0);
int ptes = 0, referenced = 0;
+ pte_t pteval;
while (page_vma_mapped_walk(&pvmw)) {
address = pvmw.address;
@@ -901,12 +902,25 @@ static bool folio_referenced_one(struct folio *folio,
return false;
}
- if (lru_gen_enabled() && pvmw.pte) {
+ if (pvmw.pte)
+ pteval = ptep_get(pvmw.pte);
+
+ if (lru_gen_enabled() && pvmw.pte && pte_present(pteval)) {
if (lru_gen_look_around(&pvmw))
referenced++;
} else if (pvmw.pte) {
- if (ptep_clear_flush_young_notify(vma, address,
- pvmw.pte))
+ bool young = false;
+
+ /*
+ * PFN swap PTEs, such as device-exclusive ones, that
+ * actually map pages are "old" from a CPU perspective.
+ * The MMU notifier takes care of any device aspects.
+ */
+ if (pte_present(pteval))
+ young = ptep_clear_flush_young(vma, address, pvmw.pte);
+ young |= mmu_notifier_clear_flush_young(vma->vm_mm, address,
+ address + PAGE_SIZE);
+ if (young)
referenced++;
} else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
if (pmdp_clear_flush_young_notify(vma, address,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0101/2151] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (99 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0100/2151] mm/rmap: handle device-exclusive entries in folio_referenced_one() Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0102/2151] mm/huge_memory: properly handle refcounted PUD mappings on fork Greg Kroah-Hartman
` (781 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Hildenbrand (Arm),
Lorenzo Stoakes (ARM), Andrew Morton, Suren Baghdasaryan,
Jose A. Perez de Azpillaga, Liam R. Howlett, Vlastimil Babka,
Jann Horn, Pedro Falcato, Shakeel Butt, SJ Park, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes (ARM) <ljs@kernel.org>
[ Upstream commit ee1afc5539b6fe03569a5855b6041b13343b0993 ]
Reading /proc/PID/maps under per-VMA locks can skip continuously mapped
address ranges during concurrent VMA splits or merges. This violates the
guarantee in Documentation/filesystems/proc.rst:
"If there is something at a given vaddr during the entirety of the
life of the smaps/maps walk, there will be some output for it."
lock_next_vma() reuses a tree iterator across calls under RCU. The iterator
remembers the range of its last entry. When its node is replaced,
mas_next_slot() walks the tree again at the last index of that range, then
advances past the entry containing that index. If VMA boundaries changed,
this can skip a range that has not been reported:
- A lookup finds [A, C), then mprotect() splits it into [A, B) and [B, C)
before vma_start_read() locks the first VMA. The reader reports [A, B),
but the iterator still covers [A, C). The next call starts from B yet
advances past C, omitting [B, C).
- The reader reports [A, B) and unlocks it. A concurrent mprotect() then
merges it with [B, C). On the next call, the iterator resumes at B - 1,
which now belongs to [A, C), and advances past C. Again, [B, C) is lost.
Checking the mmap_lock sequence only within the next call misses writers
that completed before that call began. Also, a NULL result is currently
accepted without validation, so a race can terminate the walk early.
Even a fresh lookup can skip a mapping. Suppose it finds a gap before
[B, C). A writer inserts an adjacent VMA at the end of that gap, then
merges it into [B, C), replacing the node. The lookup resumes at the old
gap's last index, now inside the merged VMA, and steps past it. The
original [B, C) remains mapped throughout. Repeating the forward lookup
is insufficient: another merge can make it skip the same mapping again,
returning the same later VMA or NULL.
The fresh-lookup race also affects /proc/PID/smaps, numa_maps and
smaps_rollup. Resetting the iterator after gathering each VMA's statistics
does not prevent a merge during the next lookup. Fixing lock_next_vma()
also prevents omitted entries and incomplete rollup statistics.
Tie VMA iterator state with the current mm and the write generation at the
point of last mm speculation in vma_rcu_iter, whose values we call 'rvmi'.
This allows us to neatly abstract the existing priv->iter logic alongside
query_vma_find_by_addr() which uses its own VMA iterator.
Then, provide helpers that act on the rvmi - vma_rcu_iter_[maybe_changed,
may_have_skipped]() to determine whether any VMAs may have
been altered since last mm speculation.
Additionally introduce vma_range_is_empty(), used by
vma_rcu_iter_may_have_skipped(), to determine conclusively whether VMAs
exist in a set range, needing to be traversed.
Original fix generated by an LLM and sent by Josef Bacik in private, then
amended by David Hildenbrand, and Lorenzo Stoakes added additional
abstraction.
Link: https://lore.kernel.org/20261027-fix-proc-pid-maps-missing-vmas-v2-1-2791cc9fc95f@kernel.org
Fixes: 5631da56c9a8 ("fs/proc/task_mmu: read proc/pid/maps under per-vma lock")
Fixes: ea3085dd7a4e ("fs/proc/task_mmu: read proc/pid/{smaps|numa_maps} under per-vma lock")
Fixes: 0e985559d72a ("proc/task_mmu: read proc/pid/smaps_rollup under per-vma lock")
Fixes: d9d1c2d81797 ("fs/proc/task_mmu: execute PROCMAP_QUERY ioctl under per-vma locks")
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Co-developed-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Tested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Pedro Falcato <pfalcato@suse.de>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: SJ Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
[ sashal: kept show_smaps_rollup() unchanged under mmap_lock while moving vma_rcu_iter_init() outside CONFIG_PER_VMA_LOCK. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/proc/internal.h | 1 +
fs/proc/task_mmu.c | 9 +++---
include/linux/mmap_lock.h | 22 ++++++++++++--
mm/mmap_lock.c | 61 +++++++++++++++++++++++++++++----------
4 files changed, 70 insertions(+), 23 deletions(-)
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 77c347d3b6ad2..ff47feecba59e 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -391,6 +391,7 @@ struct proc_maps_private {
struct inode *inode;
struct task_struct *task;
struct vma_iterator iter;
+ struct vma_rcu_iter rvmi;
loff_t last_pos;
struct proc_maps_locking_ctx lock_ctx;
#ifdef CONFIG_NUMA
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 823e8ee1b0953..f706477899f14 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -189,7 +189,7 @@ static struct vm_area_struct *get_next_vma(struct proc_maps_private *priv,
return vma_next(&priv->iter);
unlock_ctx_vma(lock_ctx);
- vma = lock_next_vma(lock_ctx->mm, &priv->iter, last_pos);
+ vma = lock_next_vma(&priv->rvmi, last_pos);
if (!IS_ERR_OR_NULL(vma))
lock_ctx->locked_vma = vma;
@@ -308,7 +308,7 @@ static void *m_start(struct seq_file *m, loff_t *ppos)
*/
if (last_addr > 0)
*ppos = last_addr = priv->last_pos;
- vma_iter_init(&priv->iter, mm, (unsigned long)last_addr);
+ vma_rcu_iter_init(&priv->rvmi, mm, &priv->iter, (unsigned long)last_addr);
hold_task_mempolicy(priv);
if (last_addr == SENTINEL_VMA_GATE)
return get_gate_vma(mm);
@@ -552,6 +552,7 @@ static struct vm_area_struct *query_vma_find_by_addr(struct proc_maps_locking_ct
struct mm_struct *mm = lock_ctx->mm;
struct vm_area_struct *vma;
struct vma_iterator vmi;
+ struct vma_rcu_iter rvmi;
if (lock_ctx->mmap_locked)
return find_vma(mm, addr);
@@ -559,8 +560,8 @@ static struct vm_area_struct *query_vma_find_by_addr(struct proc_maps_locking_ct
/* Unlock previously locked VMA and find the next one under RCU */
unlock_ctx_vma(lock_ctx);
rcu_read_lock();
- vma_iter_init(&vmi, mm, addr);
- vma = lock_next_vma(mm, &vmi, addr);
+ vma_rcu_iter_init(&rvmi, mm, &vmi, addr);
+ vma = lock_next_vma(&rvmi, addr);
rcu_read_unlock();
if (!vma)
diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h
index 2e8bef12c76c8..59a2f0b22a29e 100644
--- a/include/linux/mmap_lock.h
+++ b/include/linux/mmap_lock.h
@@ -17,6 +17,13 @@ extern int rcuwait_wake_up(struct rcuwait *w);
#define MMAP_LOCK_INITIALIZER(name) \
.mmap_lock = __RWSEM_INITIALIZER((name).mmap_lock),
+/* Tie a VMA iterator to mm write lock state at iterator initialisation. */
+struct vma_rcu_iter {
+ struct mm_struct *mm;
+ struct vma_iterator *vmi;
+ unsigned int mm_wr_seq;
+};
+
DECLARE_TRACEPOINT(mmap_lock_start_locking);
DECLARE_TRACEPOINT(mmap_lock_acquire_returned);
DECLARE_TRACEPOINT(mmap_lock_released);
@@ -263,9 +270,8 @@ struct vm_area_struct *lock_vma_under_rcu(struct mm_struct *mm,
* Returns either a valid locked VMA, NULL if no more VMAs or -EINTR if the
* process was interrupted.
*/
-struct vm_area_struct *lock_next_vma(struct mm_struct *mm,
- struct vma_iterator *iter,
- unsigned long address);
+struct vm_area_struct *lock_next_vma(struct vma_rcu_iter *rvmi,
+ unsigned long from_addr);
#else /* CONFIG_PER_VMA_LOCK */
@@ -308,6 +314,16 @@ static inline void vma_assert_locked(struct vm_area_struct *vma)
#endif /* CONFIG_PER_VMA_LOCK */
+static inline void vma_rcu_iter_init(struct vma_rcu_iter *rvmi,
+ struct mm_struct *mm, struct vma_iterator *vmi,
+ unsigned long addr)
+{
+ vma_iter_init(vmi, mm, addr);
+ rvmi->mm = mm;
+ rvmi->vmi = vmi;
+ rvmi->mm_wr_seq = UINT_MAX; /* Start odd so changed by default. */
+}
+
static inline void mmap_write_lock(struct mm_struct *mm)
{
__mmap_lock_trace_start_locking(mm, true);
diff --git a/mm/mmap_lock.c b/mm/mmap_lock.c
index c6becd6dd5d50..1511e6d617ce4 100644
--- a/mm/mmap_lock.c
+++ b/mm/mmap_lock.c
@@ -13,6 +13,8 @@
#include <linux/trace_events.h>
#include <linux/local_lock.h>
+#include "internal.h"
+
EXPORT_TRACEPOINT_SYMBOL(mmap_lock_start_locking);
EXPORT_TRACEPOINT_SYMBOL(mmap_lock_acquire_returned);
EXPORT_TRACEPOINT_SYMBOL(mmap_lock_released);
@@ -322,21 +324,53 @@ static struct vm_area_struct *lock_next_vma_under_mmap_lock(struct mm_struct *mm
return vma;
}
-struct vm_area_struct *lock_next_vma(struct mm_struct *mm,
- struct vma_iterator *vmi,
+/* Is there no VMA in [start, last]? */
+static bool vma_range_is_empty(struct mm_struct *mm, unsigned long start,
+ unsigned long last)
+{
+ VMA_ITERATOR(vmi, mm, start);
+
+ return !vma_iter_load(&vmi) && vma_iter_end(&vmi) - 1 >= last;
+}
+
+/* Might the VMA tree have been modified since last mm speculation? */
+static bool vma_rcu_iter_maybe_changed(const struct vma_rcu_iter *rvmi)
+{
+ return (rvmi->mm_wr_seq & 1) || /* Odd implies write-lock. */
+ mmap_lock_speculate_retry(rvmi->mm, rvmi->mm_wr_seq);
+}
+
+/* Could the VMA iterator have skipped a VMA due to the tree changing? */
+static bool vma_rcu_iter_may_have_skipped(const struct vma_rcu_iter *rvmi,
+ unsigned long from, unsigned long to)
+{
+ return vma_rcu_iter_maybe_changed(rvmi) &&
+ !vma_range_is_empty(rvmi->mm, from, to);
+}
+
+struct vm_area_struct *lock_next_vma(struct vma_rcu_iter *rvmi,
unsigned long from_addr)
{
+ struct mm_struct *mm = rvmi->mm;
+ struct vma_iterator *vmi = rvmi->vmi;
struct vm_area_struct *vma;
- unsigned int mm_wr_seq;
- bool mmap_unlocked;
RCU_LOCKDEP_WARN(!rcu_read_lock_held(), "no rcu read lock held");
retry:
- /* Start mmap_lock speculation in case we need to verify the vma later */
- mmap_unlocked = mmap_lock_speculate_try_begin(mm, &mm_wr_seq);
+ /* Only trust the iterator's position if the tree cannot have changed. */
+ if (vma_rcu_iter_maybe_changed(rvmi)) {
+ vma_iter_set(vmi, from_addr);
+ mmap_lock_speculate_try_begin(mm, &rvmi->mm_wr_seq);
+ }
vma = vma_next(vmi);
- if (!vma)
- return NULL;
+ if (!vma) {
+ /* No reason to fallback if nothing left in range. */
+ if (!vma_rcu_iter_may_have_skipped(rvmi, from_addr, ULONG_MAX))
+ return NULL;
+
+ rcu_read_unlock();
+ goto fallback;
+ }
vma = vma_start_read(mm, vma);
if (IS_ERR_OR_NULL(vma)) {
@@ -365,14 +399,9 @@ struct vm_area_struct *lock_next_vma(struct mm_struct *mm,
* installed ahead of it. Otherwise we might observe a gap that should
* not be there.
*/
- if (from_addr < vma->vm_start) {
- /* Verify only if the address space might have changed since vma lookup. */
- if (!mmap_unlocked || mmap_lock_speculate_retry(mm, mm_wr_seq)) {
- vma_iter_set(vmi, from_addr);
- if (vma != vma_next(vmi))
- goto fallback_unlock;
- }
- }
+ if (from_addr < vma->vm_start &&
+ vma_rcu_iter_may_have_skipped(rvmi, from_addr, vma->vm_start - 1))
+ goto fallback_unlock;
return vma;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0102/2151] mm/huge_memory: properly handle refcounted PUD mappings on fork
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (100 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0101/2151] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0103/2151] fork: take mmap_lock before copying mm_struct Greg Kroah-Hartman
` (780 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zi Yan, Pedro Falcato, Lance Yang,
Muhammad Usama Anjum, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit d90bdc02e36ec08d8248ebc6cdc52e12043eb28c ]
copy_huge_pud() copies device-DAX entries without taking a folio reference
or updating mapcounts and the child's RSS.
For example, MADV_GUARD_INSTALL sets VM_MAYBE_GUARD on a device-DAX VMA,
forcing copy_page_range() to traverse the whole VMA on fork. Any remaining
huge PUDs are then copied without accounting for the new mappings.
Unmapping them in the child decrements accounting that was never added.
Use vm_normal_page_pud() to identify refcounted mappings. Take a folio
reference and add the child's PUD rmap and RSS accounting before installing
the copied entry. Pass src and dst VMAs consistently instead of src and
dst MM. Move the TODO.
Fixes: aed877c2b4257 ("device/dax: properly refcount device dax pages when mapping")
Cc: stable@vger.kernel.org
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-11-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: changed vma_is_cow_mapping(src_vma) to is_cow_mapping(src_vma->vm_flags) ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/huge_mm.h | 5 ++---
mm/huge_memory.c | 27 +++++++++++++++++++--------
mm/memory.c | 4 +---
3 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index b55a4a342f578..c6befc9fddf12 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -12,9 +12,8 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
pmd_t *dst_pmd, pmd_t *src_pmd, unsigned long addr,
struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma);
void huge_pmd_set_accessed(struct vm_fault *vmf);
-int copy_huge_pud(struct mm_struct *dst_mm, struct mm_struct *src_mm,
- pud_t *dst_pud, pud_t *src_pud, unsigned long addr,
- struct vm_area_struct *vma);
+int copy_huge_pud(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
+ pud_t *dst_pud, pud_t *src_pud, unsigned long addr);
#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud);
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index eba9280ddb594..33c0d1bb0ee4d 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1911,11 +1911,13 @@ void touch_pud(struct vm_area_struct *vma, unsigned long addr,
update_mmu_cache_pud(vma, addr, pud);
}
-int copy_huge_pud(struct mm_struct *dst_mm, struct mm_struct *src_mm,
- pud_t *dst_pud, pud_t *src_pud, unsigned long addr,
- struct vm_area_struct *vma)
+int copy_huge_pud(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
+ pud_t *dst_pud, pud_t *src_pud, unsigned long addr)
{
+ struct mm_struct *dst_mm = dst_vma->vm_mm;
+ struct mm_struct *src_mm = src_vma->vm_mm;
spinlock_t *dst_ptl, *src_ptl;
+ struct page *page;
pud_t pud;
int ret;
@@ -1928,11 +1930,20 @@ int copy_huge_pud(struct mm_struct *dst_mm, struct mm_struct *src_mm,
if (unlikely(!pud_trans_huge(pud)))
goto out_unlock;
- /*
- * TODO: once we support anonymous pages, use
- * folio_try_dup_anon_rmap_*() and split if duplicating fails.
- */
- if (is_cow_mapping(vma->vm_flags) && pud_write(pud)) {
+ page = vm_normal_page_pud(src_vma, addr, pud);
+ if (page) {
+ struct folio *folio = page_folio(page);
+
+ folio_get(folio);
+ /*
+ * TODO: once we support anonymous pages, use
+ * folio_try_dup_anon_rmap_*() and split if duplicating fails.
+ */
+ folio_add_file_rmap_pud(folio, page, dst_vma);
+ add_mm_counter(dst_mm, mm_counter_file(folio), HPAGE_PUD_NR);
+ }
+
+ if (is_cow_mapping(src_vma->vm_flags) && pud_write(pud)) {
pudp_set_wrprotect(src_mm, addr, src_pud);
pud = pud_wrprotect(pud);
}
diff --git a/mm/memory.c b/mm/memory.c
index e8a5292c5a317..2dc764e898fac 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1416,7 +1416,6 @@ copy_pud_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
unsigned long end)
{
struct mm_struct *dst_mm = dst_vma->vm_mm;
- struct mm_struct *src_mm = src_vma->vm_mm;
pud_t *src_pud, *dst_pud;
unsigned long next;
@@ -1430,8 +1429,7 @@ copy_pud_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
int err;
VM_BUG_ON_VMA(next-addr != HPAGE_PUD_SIZE, src_vma);
- err = copy_huge_pud(dst_mm, src_mm,
- dst_pud, src_pud, addr, src_vma);
+ err = copy_huge_pud(dst_vma, src_vma, dst_pud, src_pud, addr);
if (err == -ENOMEM)
return -ENOMEM;
if (!err)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0103/2151] fork: take mmap_lock before copying mm_struct
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (101 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0102/2151] mm/huge_memory: properly handle refcounted PUD mappings on fork Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0104/2151] hwmon: (gpd-fan) Reset both fans to automatic on duo boards Greg Kroah-Hartman
` (779 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Josef Bacik, Lorenzo Stoakes (ARM),
Rik van Riel, Vlastimil Babka (SUSE), Barry Song, Pedro Falcato,
Harry Yoo (Meta), Kiryl Shutsemau (Meta), SJ Park,
Muhammad Usama Anjum, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit ef694e2d210111cc08c52fd25da9ab130170bfa3 ]
dup_mm() copies the parent's mm_struct before dup_mmap() takes the
mmap_lock. A concurrent brk() can leave the child with a stale mm->brk
and newer heap mappings, causing later brk() requests to fail.
Other operations (e.g., PR_SET_MM) on the parent's mm_struct can similarly
cause inconsistencies.
As a simple and robust fix, grab the parent's mmap_lock earlier. This
way we don't need to update individual mm fields in dup_mmap() and
keep missing ones. Stop updating the 4 existing members (total_vm, data_vm,
exec_vm, stack_vm), as that is now no longer required.
Keep releasing the parent's mmap_lock in dup_mmap(), before
userfaultfd completion, to avoid moving the userfaultfd handling into the
caller. This should get cleaned up later.
Move uprobe_start_dup_mmap() to preserve the lock ordering.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Reported-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Rik van Riel <riel@surriel.com>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Reviewed-by: Barry Song <baohua@kernel.org>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: SJ Park <sj@kernel.org>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-2-d6437171ecc3@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: Retained mm->user_ns as the third argument to mm_init(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/fork.c | 20 ++++++++++++++------
mm/mmap.c | 8 +-------
mm/nommu.c | 2 +-
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index bc6078b910a6a..e38d2de6c6b52 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1487,12 +1487,19 @@ static struct mm_struct *dup_mm(struct task_struct *tsk,
if (!mm)
goto fail_nomem;
+ uprobe_start_dup_mmap();
+ if (mmap_write_lock_killable(oldmm)) {
+ free_mm(mm);
+ goto fail_uprobe;
+ }
+
memcpy(mm, oldmm, sizeof(*mm));
- if (!mm_init(mm, tsk, mm->user_ns))
- goto fail_nomem;
+ if (!mm_init(mm, tsk, mm->user_ns)) {
+ mmap_write_unlock(oldmm);
+ goto fail_uprobe;
+ }
- uprobe_start_dup_mmap();
err = dup_mmap(mm, oldmm);
if (err)
goto free_pt;
@@ -1511,9 +1518,10 @@ static struct mm_struct *dup_mm(struct task_struct *tsk,
mm->binfmt = NULL;
mm_init_owner(mm, NULL);
mmput(mm);
- if (err)
- uprobe_end_dup_mmap();
-
+ if (!err)
+ return NULL;
+fail_uprobe:
+ uprobe_end_dup_mmap();
fail_nomem:
return NULL;
}
diff --git a/mm/mmap.c b/mm/mmap.c
index b29b31a29ef66..9bf16cc92f185 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1724,8 +1724,7 @@ __latent_entropy int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
LIST_HEAD(uf);
VMA_ITERATOR(vmi, mm, 0);
- if (mmap_write_lock_killable(oldmm))
- return -EINTR;
+ mmap_assert_write_locked(oldmm);
flush_cache_dup_mm(oldmm);
uprobe_dup_mmap(oldmm, mm);
/*
@@ -1736,11 +1735,6 @@ __latent_entropy int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
/* No ordering required: file already has been exposed. */
dup_mm_exe_file(mm, oldmm);
- mm->total_vm = oldmm->total_vm;
- mm->data_vm = oldmm->data_vm;
- mm->exec_vm = oldmm->exec_vm;
- mm->stack_vm = oldmm->stack_vm;
-
/* Use __mt_dup() to efficiently build an identical maple tree. */
retval = __mt_dup(&oldmm->mm_mt, &mm->mm_mt, GFP_KERNEL);
if (unlikely(retval))
diff --git a/mm/nommu.c b/mm/nommu.c
index d609ecdcf022b..be977f0dd0c10 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -1896,7 +1896,7 @@ subsys_initcall(init_admin_reserve);
int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
{
- mmap_write_lock(oldmm);
+ mmap_assert_write_locked(oldmm);
dup_mm_exe_file(mm, oldmm);
mmap_write_unlock(oldmm);
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0104/2151] hwmon: (gpd-fan) Reset both fans to automatic on duo boards
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (102 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0103/2151] fork: take mmap_lock before copying mm_struct Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0105/2151] ASoC: qcom: q6apm: clear g_apm on driver removal Greg Kroah-Hartman
` (778 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexei Solcanu, Antheas Kapenekakis,
Guenter Roeck, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexei Solcanu <alexei.solcanu@pm.me>
[ Upstream commit d1f60971fbf85c243ab6c78f6535fbc88fa640ce ]
On boards using gpd_duo_drvdata (GPD Duo, GPD Win 5), writing
pwm1_enable=2 only returns the first fan to EC control. The second fan
keeps its last manual duty cycle, e.g. full speed after pwm1=255, so a
fan control tool that exits leaves it running at that speed.
gpd_duo_write_pwm() writes both fan registers (pwm_write and
pwm_write + 1), but switching to automatic only clears pwm_write.
Also clear pwm_write + 1, so both fans return to EC control.
Tested on a GPD Win 5 (G1618-05). Not tested on the GPD Duo.
Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexei Solcanu <alexei.solcanu@pm.me>
Reviewed-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://patch.msgid.link/20260926-gpd-fan-duo-auto-v2-1-0a2ea41ee3b5@pm.me
[groeck: Dropped obsolete 'Assisted-by: tag]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[ sashal: adapted gpd_ecram_write() to the two-argument interface using global gpd_driver_priv.drvdata instead of per-device state ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hwmon/gpd-fan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hwmon/gpd-fan.c b/drivers/hwmon/gpd-fan.c
index f81c3bc422f4c..310f461e1d633 100644
--- a/drivers/hwmon/gpd-fan.c
+++ b/drivers/hwmon/gpd-fan.c
@@ -412,6 +412,7 @@ static void gpd_duo_set_pwm_enable(enum FAN_PWM_ENABLE pwm_enable)
break;
case AUTOMATIC:
gpd_ecram_write(gpd_driver_priv.drvdata->pwm_write, 0);
+ gpd_ecram_write(gpd_driver_priv.drvdata->pwm_write + 1, 0);
break;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0105/2151] ASoC: qcom: q6apm: clear g_apm on driver removal
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (103 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0104/2151] hwmon: (gpd-fan) Reset both fans to automatic on duo boards Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0106/2151] mm: fix deadlock of mremap() against UFFDIO_MOVE Greg Kroah-Hartman
` (777 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ajay Kumar Nandam, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
[ Upstream commit be2172758f2b7c801ae80b9c8d1510b31eeffdaa ]
The global g_apm pointer is set during apm_probe() but never cleared
in apm_remove(). After the driver is removed the devm-managed struct
q6apm is freed, leaving g_apm dangling. A subsequent call to
q6apm_is_adsp_ready() dereferences the freed pointer.
Clear g_apm in apm_remove() before the component is unregistered so
that q6apm_is_adsp_ready() returns false instead of triggering a
use-after-free.
Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support")
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260923-vmid-v4-v6-1-3d61a0319b1c@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/qcom/qdsp6/q6apm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/qcom/qdsp6/q6apm.c b/sound/soc/qcom/qdsp6/q6apm.c
index 7894d4430ff17..f12ae90c0a842 100644
--- a/sound/soc/qcom/qdsp6/q6apm.c
+++ b/sound/soc/qcom/qdsp6/q6apm.c
@@ -798,6 +798,7 @@ static int apm_probe(gpr_device_t *gdev)
static void apm_remove(gpr_device_t *gdev)
{
+ g_apm = NULL;
of_platform_depopulate(&gdev->dev);
snd_soc_unregister_component(&gdev->dev);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0106/2151] mm: fix deadlock of mremap() against UFFDIO_MOVE
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (104 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0105/2151] ASoC: qcom: q6apm: clear g_apm on driver removal Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0107/2151] rose: walk the neighbour list under its lock when a device goes down Greg Kroah-Hartman
` (776 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Mason, Lorenzo Stoakes (ARM),
Muchun Song, Muhammad Usama Anjum, Lance Yang,
David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Mason <mason@kernel.org>
[ Upstream commit d03df42ddae196f20e9cfb775704e60269eb6b44 ]
With per-VMA locks, UFFDIO_MOVE can run concurrently with mremap()
on different VMAs in the same mm. Those VMAs can share page tables, so
both operations can acquire the same pair of page-table locks.
UFFDIO_MOVE orders the locks by address, while mremap() takes the source
lock first. These conflicting orders can deadlock; mremap() holding
mmap_lock for writing no longer helps.
Move double_pt_lock() and double_pt_unlock() to mm/internal.h and use
them for all page-table moves in mremap(). Preserve the source entry
checks after acquiring both locks. Remove the comments claiming that
exclusive mmap_lock makes lock ordering irrelevant.
In move_ptes(), make sure to just recheck source and destination PMD
after taking the locks and drop the overly-long comment.
Fix generated by an LLM and sent by Chris Mason in private.
[ david: use new helpers consistently; simplify description and comments;
move_ptes() fixup ]
Fixes: 867a43a34ff8 ("userfaultfd: use per-vma locks in userfaultfd operations")
Cc: stable@vger.kernel.org
Signed-off-by: Chris Mason <mason@kernel.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Acked-by: Muchun Song <muchun.song@linux.dev>
Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com>
Link: https://patch.msgid.link/20261031-fixes_core-v3-38-d6437171ecc3@kernel.org
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: replaced pmd_is_huge() with the equivalent is_swap_pmd() || pmd_trans_huge() check ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/userfaultfd_k.h | 2 -
mm/huge_memory.c | 19 +++-----
mm/hugetlb.c | 14 ++----
mm/internal.h | 28 +++++++++++
mm/mremap.c | 87 ++++++++++++++---------------------
mm/userfaultfd.c | 27 -----------
6 files changed, 72 insertions(+), 105 deletions(-)
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h
index d65effb5cbff2..ffbf643430bb0 100644
--- a/include/linux/userfaultfd_k.h
+++ b/include/linux/userfaultfd_k.h
@@ -140,8 +140,6 @@ extern long uffd_wp_range(struct vm_area_struct *vma,
unsigned long start, unsigned long len, bool enable_wp);
/* move_pages */
-void double_pt_lock(spinlock_t *ptl1, spinlock_t *ptl2);
-void double_pt_unlock(spinlock_t *ptl1, spinlock_t *ptl2);
ssize_t move_pages(struct userfaultfd_ctx *ctx, unsigned long dst_start,
unsigned long src_start, unsigned long len, __u64 flags);
int move_pages_huge_pmd(struct mm_struct *mm, pmd_t *dst_pmd, pmd_t *src_pmd, pmd_t dst_pmdval,
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 33c0d1bb0ee4d..b1a63681412dd 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2441,15 +2441,11 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,
return false;
}
- /*
- * We don't have to worry about the ordering of src and dst
- * ptlocks because exclusive mmap_lock prevents deadlock.
- */
- old_ptl = __pmd_trans_huge_lock(old_pmd, vma);
- if (old_ptl) {
- new_ptl = pmd_lockptr(mm, new_pmd);
- if (new_ptl != old_ptl)
- spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
+ old_ptl = pmd_lockptr(mm, old_pmd);
+ new_ptl = pmd_lockptr(mm, new_pmd);
+
+ double_pt_lock(old_ptl, new_ptl);
+ if (likely(is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd))) {
pmd = pmdp_huge_get_and_clear(mm, old_addr, old_pmd);
if (pmd_present(pmd))
force_flush = true;
@@ -2466,11 +2462,10 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,
set_pmd_at(mm, new_addr, new_pmd, pmd);
if (force_flush)
flush_pmd_tlb_range(vma, old_addr, old_addr + PMD_SIZE);
- if (new_ptl != old_ptl)
- spin_unlock(new_ptl);
- spin_unlock(old_ptl);
+ double_pt_unlock(old_ptl, new_ptl);
return true;
}
+ double_pt_unlock(old_ptl, new_ptl);
return false;
}
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 32daea7b157fa..44d720da8f388 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5808,15 +5808,9 @@ static void move_huge_pte(struct vm_area_struct *vma, unsigned long old_addr,
spinlock_t *src_ptl, *dst_ptl;
pte_t pte;
- dst_ptl = huge_pte_lock(h, mm, dst_pte);
+ dst_ptl = huge_pte_lockptr(h, mm, dst_pte);
src_ptl = huge_pte_lockptr(h, mm, src_pte);
-
- /*
- * We don't have to worry about the ordering of src and dst ptlocks
- * because exclusive mmap_lock (or the i_mmap_lock) prevents deadlock.
- */
- if (src_ptl != dst_ptl)
- spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING);
+ double_pt_lock(dst_ptl, src_ptl);
pte = huge_ptep_get_and_clear(mm, old_addr, src_pte, sz);
@@ -5832,9 +5826,7 @@ static void move_huge_pte(struct vm_area_struct *vma, unsigned long old_addr,
set_huge_pte_at(mm, new_addr, dst_pte, pte, sz);
}
- if (src_ptl != dst_ptl)
- spin_unlock(src_ptl);
- spin_unlock(dst_ptl);
+ double_pt_unlock(dst_ptl, src_ptl);
}
unsigned long move_hugetlb_page_tables(struct vm_area_struct *vma,
diff --git a/mm/internal.h b/mm/internal.h
index e36c46e865956..4a27dac7a42a8 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -467,6 +467,34 @@ static inline void force_page_cache_readahead(struct address_space *mapping,
force_page_cache_ra(&ractl, nr_to_read);
}
+/*
+ * Take two page table locks at the same level in address order such that
+ * we cannot deadlock.
+ */
+static inline void double_pt_lock(spinlock_t *ptl1, spinlock_t *ptl2)
+ __acquires(ptl1)
+ __acquires(ptl2)
+{
+ if (ptl1 > ptl2)
+ swap(ptl1, ptl2);
+ spin_lock(ptl1);
+ if (ptl1 != ptl2)
+ spin_lock_nested(ptl2, SINGLE_DEPTH_NESTING);
+ else
+ __acquire(ptl2);
+}
+
+static inline void double_pt_unlock(spinlock_t *ptl1, spinlock_t *ptl2)
+ __releases(ptl1)
+ __releases(ptl2)
+{
+ spin_unlock(ptl1);
+ if (ptl1 != ptl2)
+ spin_unlock(ptl2);
+ else
+ __release(ptl2);
+}
+
unsigned find_lock_entries(struct address_space *mapping, pgoff_t *start,
pgoff_t end, struct folio_batch *fbatch, pgoff_t *indices);
unsigned find_get_entries(struct address_space *mapping, pgoff_t *start,
diff --git a/mm/mremap.c b/mm/mremap.c
index 9f7f45281b487..8ac23a56e210e 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -198,7 +198,7 @@ static int move_ptes(struct pagetable_move_control *pmc,
struct mm_struct *mm = vma->vm_mm;
pte_t *old_ptep, *new_ptep;
pte_t old_pte, pte;
- pmd_t dummy_pmdval;
+ pmd_t old_pmdval, new_pmdval;
spinlock_t *old_ptl, *new_ptl;
bool force_flush = false;
unsigned long old_addr = pmc->old_addr;
@@ -230,31 +230,30 @@ static int move_ptes(struct pagetable_move_control *pmc,
if (pmc->need_rmap_locks)
take_rmap_locks(vma);
- /*
- * We don't have to worry about the ordering of src and dst
- * pte locks because exclusive mmap_lock prevents deadlock.
- */
- old_ptep = pte_offset_map_lock(mm, old_pmd, old_addr, &old_ptl);
+ old_ptep = pte_offset_map_rw_nolock(mm, old_pmd, old_addr, &old_pmdval,
+ &old_ptl);
if (!old_ptep) {
err = -EAGAIN;
goto out;
}
- /*
- * Now new_pte is none, so hpage_collapse_scan_file() path can not find
- * this by traversing file->f_mapping, so there is no concurrency with
- * retract_page_tables(). In addition, we already hold the exclusive
- * mmap_lock, so this new_pte page is stable, so there is no need to get
- * pmdval and do pmd_same() check.
- */
- new_ptep = pte_offset_map_rw_nolock(mm, new_pmd, new_addr, &dummy_pmdval,
- &new_ptl);
+ new_ptep = pte_offset_map_rw_nolock(mm, new_pmd, new_addr, &new_pmdval,
+ &new_ptl);
if (!new_ptep) {
- pte_unmap_unlock(old_ptep, old_ptl);
+ pte_unmap(old_ptep);
+ err = -EAGAIN;
+ goto out;
+ }
+
+ double_pt_lock(old_ptl, new_ptl);
+ if (unlikely(!pmd_same(old_pmdval, pmdp_get_lockless(old_pmd)) ||
+ !pmd_same(new_pmdval, pmdp_get_lockless(new_pmd)))) {
+ double_pt_unlock(old_ptl, new_ptl);
+ pte_unmap(new_ptep);
+ pte_unmap(old_ptep);
err = -EAGAIN;
goto out;
}
- if (new_ptl != old_ptl)
- spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
+
flush_tlb_batched_pending(vma->vm_mm);
arch_enter_lazy_mmu_mode();
@@ -304,10 +303,9 @@ static int move_ptes(struct pagetable_move_control *pmc,
arch_leave_lazy_mmu_mode();
if (force_flush)
flush_tlb_range(vma, old_end - len, old_end);
- if (new_ptl != old_ptl)
- spin_unlock(new_ptl);
+ double_pt_unlock(old_ptl, new_ptl);
pte_unmap(new_ptep - 1);
- pte_unmap_unlock(old_ptep - 1, old_ptl);
+ pte_unmap(old_ptep - 1);
out:
if (pmc->need_rmap_locks)
drop_rmap_locks(vma);
@@ -382,14 +380,9 @@ static bool move_normal_pmd(struct pagetable_move_control *pmc,
if (WARN_ON_ONCE(!pmd_none(*new_pmd)))
return false;
- /*
- * We don't have to worry about the ordering of src and dst
- * ptlocks because exclusive mmap_lock prevents deadlock.
- */
- old_ptl = pmd_lock(mm, old_pmd);
+ old_ptl = pmd_lockptr(mm, old_pmd);
new_ptl = pmd_lockptr(mm, new_pmd);
- if (new_ptl != old_ptl)
- spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
+ double_pt_lock(old_ptl, new_ptl);
pmd = *old_pmd;
@@ -405,9 +398,7 @@ static bool move_normal_pmd(struct pagetable_move_control *pmc,
pmd_populate(mm, new_pmd, pmd_pgtable(pmd));
flush_tlb_range(vma, pmc->old_addr, pmc->old_addr + PMD_SIZE);
out_unlock:
- if (new_ptl != old_ptl)
- spin_unlock(new_ptl);
- spin_unlock(old_ptl);
+ double_pt_unlock(old_ptl, new_ptl);
return res;
}
@@ -439,14 +430,10 @@ static bool move_normal_pud(struct pagetable_move_control *pmc,
if (WARN_ON_ONCE(!pud_none(*new_pud)))
return false;
- /*
- * We don't have to worry about the ordering of src and dst
- * ptlocks because exclusive mmap_lock prevents deadlock.
- */
- old_ptl = pud_lock(mm, old_pud);
+ old_ptl = pud_lockptr(mm, old_pud);
new_ptl = pud_lockptr(mm, new_pud);
- if (new_ptl != old_ptl)
- spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
+
+ double_pt_lock(old_ptl, new_ptl);
pud = *old_pud;
if (unlikely(pud_none(pud)))
@@ -460,9 +447,7 @@ static bool move_normal_pud(struct pagetable_move_control *pmc,
pud_populate(mm, new_pud, pud_pgtable(pud));
flush_tlb_range(vma, pmc->old_addr, pmc->old_addr + PUD_SIZE);
out_unlock:
- if (new_ptl != old_ptl)
- spin_unlock(new_ptl);
- spin_unlock(old_ptl);
+ double_pt_unlock(old_ptl, new_ptl);
return true;
}
@@ -490,16 +475,14 @@ static bool move_huge_pud(struct pagetable_move_control *pmc,
if (WARN_ON_ONCE(!pud_none(*new_pud)))
return false;
- /*
- * We don't have to worry about the ordering of src and dst
- * ptlocks because exclusive mmap_lock prevents deadlock.
- */
- old_ptl = __pud_trans_huge_lock(old_pud, vma);
- if (unlikely(!old_ptl))
- return false;
+ old_ptl = pud_lockptr(mm, old_pud);
new_ptl = pud_lockptr(mm, new_pud);
- if (new_ptl != old_ptl)
- spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
+
+ double_pt_lock(old_ptl, new_ptl);
+ if (unlikely(!pud_trans_huge(*old_pud))) {
+ double_pt_unlock(old_ptl, new_ptl);
+ return false;
+ }
/* Clear the pud */
pud = pudp_huge_get_and_clear(mm, pmc->old_addr, old_pud);
@@ -510,9 +493,7 @@ static bool move_huge_pud(struct pagetable_move_control *pmc,
/* mark soft_ditry when we add pud level soft dirty support */
set_pud_at(mm, pmc->new_addr, new_pud, pud);
flush_pud_tlb_range(vma, pmc->old_addr, pmc->old_addr + HPAGE_PUD_SIZE);
- if (new_ptl != old_ptl)
- spin_unlock(new_ptl);
- spin_unlock(old_ptl);
+ double_pt_unlock(old_ptl, new_ptl);
return true;
}
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index afee33a97bc49..0b479d09e313d 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -989,33 +989,6 @@ int mwriteprotect_range(struct userfaultfd_ctx *ctx, unsigned long start,
}
-void double_pt_lock(spinlock_t *ptl1,
- spinlock_t *ptl2)
- __acquires(ptl1)
- __acquires(ptl2)
-{
- if (ptl1 > ptl2)
- swap(ptl1, ptl2);
- /* lock in virtual address order to avoid lock inversion */
- spin_lock(ptl1);
- if (ptl1 != ptl2)
- spin_lock_nested(ptl2, SINGLE_DEPTH_NESTING);
- else
- __acquire(ptl2);
-}
-
-void double_pt_unlock(spinlock_t *ptl1,
- spinlock_t *ptl2)
- __releases(ptl1)
- __releases(ptl2)
-{
- spin_unlock(ptl1);
- if (ptl1 != ptl2)
- spin_unlock(ptl2);
- else
- __release(ptl2);
-}
-
static inline bool is_pte_pages_stable(pte_t *dst_pte, pte_t *src_pte,
pte_t orig_dst_pte, pte_t orig_src_pte,
pmd_t *dst_pmd, pmd_t dst_pmdval)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0107/2151] rose: walk the neighbour list under its lock when a device goes down
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (105 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0106/2151] mm: fix deadlock of mremap() against UFFDIO_MOVE Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0108/2151] rose: hold RTNL while a route is added or deleted Greg Kroah-Hartman
` (775 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
rose_link_device_down() walks rose_neigh_list without
rose_neigh_list_lock. The list can change under it: rose_add_node() and
rose_del_node() from the SIOCADDRT/SIOCDELRT ioctls, and
rose_rt_device_down(), which the same NETDEV_DOWN event calls right
after, all add or free neighbours under that lock. The walk can then
follow a neighbour that has just been freed.
Take the lock around the walk, as rose_link_failed() does around the
very same calls to rose_del_route_by_neigh() and rose_kill_by_neigh().
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit bf7007048732cd8eac6e3c7c68d131692b480f75)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/rose_route.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 00fbe47fffe04..70ed72f4a11cb 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -958,12 +958,14 @@ void rose_link_device_down(struct net_device *dev)
{
struct rose_neigh *rose_neigh;
+ spin_lock_bh(&rose_neigh_list_lock);
for (rose_neigh = rose_neigh_list; rose_neigh != NULL; rose_neigh = rose_neigh->next) {
if (rose_neigh->dev == dev) {
rose_del_route_by_neigh(rose_neigh);
rose_kill_by_neigh(rose_neigh);
}
}
+ spin_unlock_bh(&rose_neigh_list_lock);
}
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0108/2151] rose: hold RTNL while a route is added or deleted
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (106 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0107/2151] rose: walk the neighbour list under its lock when a device goes down Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0109/2151] rose: change the loopback nodes under the neighbour list lock too Greg Kroah-Hartman
` (774 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
rose_ax25_dev_find() says it is called with RTNL, but rose_rt_ioctl()
does not take it for SIOCADDRT and SIOCDELRT. __dev_get_by_name() is
then used without RTNL or RCU, and the device can go down between the
IFF_UP check and rose_add_node(): the NETDEV_DOWN notifier runs
rose_rt_device_down(), finds no neighbour on the device yet, and the
neighbour added right after keeps a pointer to a device that may be
unregistered and freed, since rose_neigh->dev holds no reference.
Commit b4ec82402149 ("rose: device refcount leak") stopped taking a
reference on the device because RTNL would be held, which the ioctl
never did.
Take RTNL around the lookup of the device and the change of the
tables. The notifier runs under RTNL too, so a neighbour is either on
the list before the device goes down, where rose_rt_device_down()
removes it, or not added at all.
Fixes: b4ec82402149 ("rose: device refcount leak")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit 1b9d3d721a9d334e7cd8ab21a2885fe1fa271a80)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/rose_route.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 70ed72f4a11cb..7044496bb214e 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -17,6 +17,7 @@
#include <net/ax25.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
+#include <linux/rtnetlink.h>
#include <net/arp.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
@@ -829,23 +830,29 @@ int rose_rt_ioctl(unsigned int cmd, void __user *arg)
case SIOCADDRT:
if (copy_from_user(&rose_route, arg, sizeof(struct rose_route_struct)))
return -EFAULT;
- if ((dev = rose_ax25_dev_find(rose_route.device)) == NULL)
- return -EINVAL;
if (rose_dev_exists(&rose_route.address)) /* Can't add routes to ourself */
return -EINVAL;
if (rose_route.mask > 10) /* Mask can't be more than 10 digits */
return -EINVAL;
if (rose_route.ndigis > AX25_MAX_DIGIS)
return -EINVAL;
- err = rose_add_node(&rose_route, dev);
+ /*
+ * RTNL keeps the device up until the neighbour that uses it
+ * is on the list, where rose_rt_device_down() finds it.
+ */
+ rtnl_lock();
+ dev = rose_ax25_dev_find(rose_route.device);
+ err = dev ? rose_add_node(&rose_route, dev) : -EINVAL;
+ rtnl_unlock();
return err;
case SIOCDELRT:
if (copy_from_user(&rose_route, arg, sizeof(struct rose_route_struct)))
return -EFAULT;
- if ((dev = rose_ax25_dev_find(rose_route.device)) == NULL)
- return -EINVAL;
- err = rose_del_node(&rose_route, dev);
+ rtnl_lock();
+ dev = rose_ax25_dev_find(rose_route.device);
+ err = dev ? rose_del_node(&rose_route, dev) : -EINVAL;
+ rtnl_unlock();
return err;
case SIOCRSCLRRT:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0109/2151] rose: change the loopback nodes under the neighbour list lock too
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (107 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0108/2151] rose: hold RTNL while a route is added or deleted Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0110/2151] rose: check the length of Restart Request and Diagnostic frames Greg Kroah-Hartman
` (773 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
Since commit fe2c802ab62a ("rose: improving AX25 routing frames via ROSE
network"), rose_route_frame() looks up the node list through
rose_get_neigh() with route_frame set, under rose_neigh_list_lock only:
it cannot take rose_node_list_lock there. Every other writer of
rose_node_list holds both locks for that reason, but
rose_add_loopback_node() and rose_del_loopback_node(), run when a rose
device is opened, closed or given a new address, take
rose_node_list_lock alone. A frame routed at that moment can walk a node
that is being freed.
Take rose_neigh_list_lock inside rose_node_list_lock in both, in the
same order as rose_add_node() and rose_del_node().
Fixes: fe2c802ab62a ("rose: improving AX25 routing frames via ROSE network")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit 0ab5a3287997c348ca74443999abb9e6004beece)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/rose_route.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 7044496bb214e..30dfbe1f14311 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -463,6 +463,7 @@ int rose_add_loopback_node(const rose_address *address)
int err = 0;
spin_lock_bh(&rose_node_list_lock);
+ spin_lock_bh(&rose_neigh_list_lock);
rose_node = rose_node_list;
while (rose_node != NULL) {
@@ -495,6 +496,7 @@ int rose_add_loopback_node(const rose_address *address)
rose_neigh_hold(rose_loopback_neigh);
out:
+ spin_unlock_bh(&rose_neigh_list_lock);
spin_unlock_bh(&rose_node_list_lock);
return err;
@@ -508,6 +510,7 @@ void rose_del_loopback_node(const rose_address *address)
struct rose_node *rose_node;
spin_lock_bh(&rose_node_list_lock);
+ spin_lock_bh(&rose_neigh_list_lock);
rose_node = rose_node_list;
while (rose_node != NULL) {
@@ -527,6 +530,7 @@ void rose_del_loopback_node(const rose_address *address)
rose_neigh_put(rose_loopback_neigh);
out:
+ spin_unlock_bh(&rose_neigh_list_lock);
spin_unlock_bh(&rose_node_list_lock);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0110/2151] rose: check the length of Restart Request and Diagnostic frames
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (108 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0109/2151] rose: change the loopback nodes under the neighbour list lock too Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0111/2151] rose: keep a socket unbound when connect() fails to autobind it Greg Kroah-Hartman
` (772 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
rose_route_frame() only makes sure that a frame holds the three bytes
of the ROSE header before it hands the frames with LCI 0 to
rose_link_rx_restart(). There, a Restart Request has its cause read
from byte 3 to set dce_mode, and a Diagnostic has bytes 3 to 6 printed.
A peer that sends them shorter makes the kernel read past the end of
the frame, and set dce_mode, which decides from which end LCIs are
given out, from whatever lies there.
Only read the restarting cause when the frame has one, and leave
dce_mode as it was otherwise. Ignore a Diagnostic too short to hold
its diagnostic code and the three bytes it reports, as x25 does with
pskb_may_pull().
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit 13db36d85e64fa98f579d5ee38e416baf9fc0dec)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/rose_link.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c
index 912d26f1fe359..7fbdf9c97cc68 100644
--- a/net/rose/rose_link.c
+++ b/net/rose/rose_link.c
@@ -185,7 +185,9 @@ void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigne
rose_link_restarted(neigh);
rose_stop_t0timer(neigh);
neigh->restarted = 1;
- neigh->dce_mode = (skb->data[3] == ROSE_DTE_ORIGINATED);
+ /* The restarting cause, when present, tells if the peer is a DTE */
+ if (skb->len > ROSE_MIN_LEN)
+ neigh->dce_mode = (skb->data[3] == ROSE_DTE_ORIGINATED);
rose_transmit_restart_confirmation(neigh);
break;
@@ -195,6 +197,9 @@ void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigne
break;
case ROSE_DIAGNOSTIC:
+ /* Diagnostic code and the first three bytes of the bad packet */
+ if (skb->len < ROSE_MIN_LEN + 4)
+ break;
pr_warn("ROSE: received diagnostic #%d - %3ph\n", skb->data[3],
skb->data + 4);
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0111/2151] rose: keep a socket unbound when connect() fails to autobind it
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (109 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0110/2151] rose: check the length of Restart Request and Diagnostic frames Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0112/2151] rose: refuse an empty message when the Q bit is included Greg Kroah-Hartman
` (771 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
When connect() is called on a socket that was never bound, it clears
SOCK_ZAPPED first and then looks for a rose device and for the
callsign of the user. If there is no rose device, or no callsign for
the user, connect() fails, but the socket is left marked as bound
although it has no device, no source address and is not on rose_list.
A second connect() on that socket then skips the autobind and places
the call with an all-zero source address and callsign. The socket is
not on rose_list, so rose_new_lci() does not see the LCI it holds and
rose_find_socket() never finds it: the Call Accepted is not delivered
to it and the call can only time out.
Clear SOCK_ZAPPED only once the autobind has succeeded, right before
the socket goes on rose_list, as rose_bind() does.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit f079e74f7889731570e7f53e9a7372e7776e3f9e)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/af_rose.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index fbf0e27ce898b..52f279aa189ee 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -894,8 +894,6 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
if (sock_flag(sk, SOCK_ZAPPED)) { /* Must bind first - autobinding in this may or may not work */
struct net_device *dev;
- sock_reset_flag(sk, SOCK_ZAPPED);
-
dev = rose_dev_first();
if (!dev) {
err = -ENETUNREACH;
@@ -916,6 +914,8 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
GFP_KERNEL);
ax25_uid_put(user);
+ /* Only now is the socket bound: a failed autobind leaves it as it was */
+ sock_reset_flag(sk, SOCK_ZAPPED);
rose_insert_socket(sk); /* Finish the bind */
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0112/2151] rose: refuse an empty message when the Q bit is included
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (110 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0111/2151] rose: keep a socket unbound when connect() fails to autobind it Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0113/2151] rose: give loopback answers LCIs that calls cannot be given Greg Kroah-Hartman
` (770 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
With the ROSE_QBITINCL socket option set, rose_sendmsg() takes the Q
bit from the first byte of the message and pulls that byte off.
Nothing checks that there is a first byte: a send() of zero bytes
reads the Q bit from beyond the data copied from the user, skb_pull()
fails without a word, and an empty data frame goes out with a Q bit
taken from uninitialised memory.
Refuse such a message with EINVAL before anything is allocated.
x25_sendmsg() checks for that byte too, with pskb_may_pull().
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit fd8a23b811b7c46d0b9aefc2a45955ea8f685a8e)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/af_rose.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 52f279aa189ee..5a8585627feb9 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1286,6 +1286,10 @@ static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
if (len > 65535)
return -EMSGSIZE;
+ /* With the Q bit included, the first byte of the data holds it */
+ if (rose->qbitincl && len < 1)
+ return -EINVAL;
+
size = len + AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN;
if ((skb = sock_alloc_send_skb(sk, size, msg->msg_flags & MSG_DONTWAIT, &err)) == NULL)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0113/2151] rose: give loopback answers LCIs that calls cannot be given
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (111 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0112/2151] rose: refuse an empty message when the Q bit is included Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0114/2151] rose: clear the other half of a through route a new call takes over Greg Kroah-Hartman
` (769 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
A call to an address of the node itself goes through the loopback
neighbour, and both ends of it use that neighbour. rose_loopback_timer()
gives the answering end LCI 51 - i for a call on LCI i, so that each
end finds the other. The 51 comes from ROSE_DEFAULT_MAXVC, but the
number of circuits is the maximum_virtual_circuits sysctl, which goes
up to 254, and rose_new_lci() hands out LCIs from 1 up to that value
on the loopback neighbour as on any other.
With more than 50 circuits allowed, the call on LCI 51 is answered on
LCI 0 and the next ones on LCIs that wrap around to huge values: the
answer is never matched to its call. Below that, LCI 51 - i is never
checked to be free, and only the way rose_new_lci() walks the LCIs
keeps it from being one that a call already uses.
Answer on LCI 4096 - i instead, at the top of the 12-bit LCI range, as
was nearly done before commit 1f731b63752d ("rose_loopback_timer sets
VC number <= ROSE_DEFAULT_MAXVC"): 0xFFF - i. That commit moved the
answers below 51 so that /proc/net/rose would not show an LCI above
the number of circuits; it prints the LCI on three hex digits, which
any LCI up to 0xFFF fits. 4096 - i is still its own inverse, so each
end finds the other as before, and rose_new_lci() never gives out an
LCI above 254.
Fixes: 1f731b63752d ("rose_loopback_timer sets VC number <= ROSE_DEFAULT_MAXVC")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit aeddd6cb7ca6e8019ac73c8c0d40e5d9dcbc5c6f)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/rose_loopback.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c
index 6c5c35030e67b..efd4a719ab2ca 100644
--- a/net/rose/rose_loopback.c
+++ b/net/rose/rose_loopback.c
@@ -101,7 +101,12 @@ static void rose_loopback_timer(struct timer_list *unused)
continue;
}
dest = (rose_address *)(skb->data + ROSE_CALL_REQ_DEST_ADDR_OFF);
- lci_o = ROSE_DEFAULT_MAXVC + 1 - lci_i;
+ /*
+ * The call and its answer use the same neighbour: give the
+ * answer the LCI at the other end of the 12-bit range, which
+ * rose_new_lci() never hands out, and get back from it.
+ */
+ lci_o = 0xFFF + 1 - lci_i;
skb_reset_transport_header(skb);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0114/2151] rose: clear the other half of a through route a new call takes over
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (112 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0113/2151] rose: give loopback answers LCIs that calls cannot be given Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0115/2151] rose: disconnect sockets under their lock when a neighbour goes away Greg Kroah-Hartman
` (768 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
When a Call Request comes in on the LCI of an existing through route,
for a call other than the one the route was built for, the neighbour
has evidently lost that call: it gives the LCI out again.
rose_route_frame() then removes the route and goes on with the new
call, but says nothing to the neighbour on the other half. That end
keeps its virtual circuit up with nothing behind it, and its LCI on
our side is freed while it may still send on it.
Do as rose_clear_routes_by_neigh() does when a neighbour goes away:
detach the half that the new call takes over and send a Clear Request
on the other half. The route stays for that half until its Clear
Confirmation, which removes it, and its LCI is not given to another
call meanwhile. The cause is the one given to a socket in the same
case, network congestion. A route that has no other half left is
removed as before.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit 9b1a1d3395bdcf1eca96d3db517eae195d02a632)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/rose_route.c | 40 ++++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 30dfbe1f14311..d23f8d30067ba 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -1145,8 +1145,24 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
120);
goto out;
}
- /* Remove an existing unused route */
- rose_remove_route(rose_route);
+ /*
+ * Another call on the LCI of a through
+ * route: the neighbour no longer has the
+ * call it was built for. Clear the other
+ * half, which keeps the route until its
+ * Clear Confirmation, and leave the LCI
+ * to the new call.
+ */
+ if (rose_route->neigh2 != NULL) {
+ rose_neigh_put(rose_route->neigh1);
+ rose_route->neigh1 = NULL;
+ rose_transmit_clear_request(rose_route->neigh2,
+ rose_route->lci2,
+ ROSE_NETWORK_CONGESTION,
+ 0);
+ } else {
+ rose_remove_route(rose_route);
+ }
break;
} else if (rose_route->neigh2 != NULL) {
skb->data[0] &= 0xF0;
@@ -1180,8 +1196,24 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
120);
goto out;
}
- /* Remove an existing unused route */
- rose_remove_route(rose_route);
+ /*
+ * Another call on the LCI of a through
+ * route: the neighbour no longer has the
+ * call it was built for. Clear the other
+ * half, which keeps the route until its
+ * Clear Confirmation, and leave the LCI
+ * to the new call.
+ */
+ if (rose_route->neigh1 != NULL) {
+ rose_neigh_put(rose_route->neigh2);
+ rose_route->neigh2 = NULL;
+ rose_transmit_clear_request(rose_route->neigh1,
+ rose_route->lci1,
+ ROSE_NETWORK_CONGESTION,
+ 0);
+ } else {
+ rose_remove_route(rose_route);
+ }
break;
} else if (rose_route->neigh1 != NULL) {
skb->data[0] &= 0xF0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0115/2151] rose: disconnect sockets under their lock when a neighbour goes away
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (113 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0114/2151] rose: clear the other half of a through route a new call takes over Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0116/2151] hdlcdrv: close the hardware driver once, and only if it was opened Greg Kroah-Hartman
` (767 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
rose_kill_by_neigh() disconnects every socket that uses a neighbour
whose link has failed, restarted or gone down, holding only
rose_list_lock. rose_disconnect() stops the timers, purges the queues
and changes the state of the socket, but its timers and the frames
received for it work on the same socket under bh_lock_sock() only, on
other CPUs, and are not kept out by rose_list_lock.
Disconnect each socket under its lock. rose_rx_call_request() and
rose_kill_by_device() take the socket lock before rose_list_lock, so
do as rose_kill_by_device() does: take a reference on the sockets that
use the neighbour under rose_list_lock, drop it, and lock each socket
in turn, checking that it still uses the neighbour. The neighbour is
still taken under rose_list_lock as well: rose_release() takes it under
that lock while it owns the socket, which bh_lock_sock() does not keep
out.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit 250c2ad2174f0a1aeb6c306e7bcc259a7fe2178d)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/rose/af_rose.c | 48 +++++++++++++++++++++++++++++++++++++++-------
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 5a8585627feb9..916b8aad03d40 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -162,19 +162,52 @@ static void rose_remove_socket(struct sock *sk)
*/
void rose_kill_by_neigh(struct rose_neigh *neigh)
{
- struct sock *s;
+ struct sock *s, *array[16];
+ bool rescan;
+ int i, cnt;
+ /*
+ * Each socket is disconnected under its lock, which its timers and
+ * the frames received for it hold while they work on it. That lock
+ * is taken before rose_list_lock elsewhere, so collect the sockets
+ * first, as rose_kill_by_device() does. rose_list_lock is still
+ * held around the change of the neighbour, which rose_release()
+ * takes under it while it owns the socket. A socket done with has
+ * no neighbour left and is not collected again.
+ */
+again:
+ rescan = false;
+ cnt = 0;
spin_lock_bh(&rose_list_lock);
sk_for_each(s, &rose_list) {
- struct rose_sock *rose = rose_sk(s);
+ if (rose_sk(s)->neighbour != neigh)
+ continue;
+ if (cnt == ARRAY_SIZE(array)) {
+ rescan = true;
+ break;
+ }
+ sock_hold(s);
+ array[cnt++] = s;
+ }
+ spin_unlock_bh(&rose_list_lock);
+
+ for (i = 0; i < cnt; i++) {
+ struct rose_sock *rose = rose_sk(array[i]);
+ bh_lock_sock(array[i]);
+ /* rose_release() takes the neighbour under rose_list_lock */
+ spin_lock_bh(&rose_list_lock);
if (rose->neighbour == neigh) {
- rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0);
+ rose_disconnect(array[i], ENETUNREACH, ROSE_OUT_OF_ORDER, 0);
rose_neigh_put(rose->neighbour);
rose->neighbour = NULL;
}
+ spin_unlock_bh(&rose_list_lock);
+ bh_unlock_sock(array[i]);
+ sock_put(array[i]);
}
- spin_unlock_bh(&rose_list_lock);
+ if (rescan)
+ goto again;
}
/*
@@ -721,9 +754,10 @@ static int rose_release(struct socket *sock)
* Disconnect before the socket lock is dropped: frames put on
* the backlog meanwhile, a Clear Confirmation for one, then
* find it in state 0 instead of dropping the neighbour
- * reference a second time. rose_kill_by_neigh() does not take
- * the socket lock: take the neighbour under rose_list_lock, as
- * it does, so that only one of them drops the reference.
+ * reference a second time. rose_kill_by_neigh() can run while
+ * the socket is owned here: take the neighbour under
+ * rose_list_lock, as it does, so that only one of them drops
+ * the reference.
*/
rose_disconnect(sk, 0, -1, -1);
spin_lock_bh(&rose_list_lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0116/2151] hdlcdrv: close the hardware driver once, and only if it was opened
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (114 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0115/2151] rose: disconnect sockets under their lock when a neighbour goes away Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0117/2151] mm/shmem: make shmem_file() check the files inode Greg Kroah-Hartman
` (766 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Bernard Pidoux, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bernard Pidoux <bernard.f6bvp@gmail.com>
hdlcdrv_unregister() calls the hardware driver's close() when s->opened
is set and then calls unregister_netdev(). Two things go wrong:
- if the interface is still up, unregister_netdev() closes it through
ndo_stop, so hdlcdrv_close() calls the hardware driver's close() a
second time;
- hdlcdrv_open() sets s->opened before it calls the hardware driver's
open() and leaves it set when that fails, so close() is also called
for a port that was never opened.
The close() methods of the baycom drivers are not written for either
case. baycom_ser_fdx and baycom_ser_hdx call free_irq() and
release_region() for resources they do not hold. baycom_par
dereferences bc->pdev, which is NULL if the port was never opened and
points to an unregistered parport device after a first close.
Set s->opened only once the hardware driver's open() has succeeded,
and let unregister_netdev() do the closing.
Tested in a QEMU guest (6.12.94, KASAN and lockdep) with
baycom_ser_fdx and two ports: bcsf0 at an address without a UART, whose
open fails, and bcsf1 on a UART, left up. Unloading baycom_ser_fdx gave
before the change:
Trying to free already-free IRQ 5
ser12_close+0xa1/0x190 [baycom_ser_fdx]
cleanup_baycomserfdx+0x38/0x50 [baycom_ser_fdx]
resource: Trying to free nonexistent resource <0x300-0x307>
baycom_ser_fdx: close ser_fdx at iobase 0x250 irq 9
Trying to free already-free IRQ 9
resource: Trying to free nonexistent resource <0x250-0x257>
and after the change a single close of bcsf1 and no warning. The
baycom_par case was not reproduced, the test kernel has no parport
support.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Bernard Pidoux <bernard.f6bvp@gmail.com>
Assisted-by: Claude:claude-opus-5-5
(cherry picked from commit 056d9c67e92622d5ec8cc6ce4a49179a16c53ef1)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/hamradio/hdlcdrv.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index 2263029d1a20e..dc4e2c45e2d11 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -441,7 +441,6 @@ static int hdlcdrv_open(struct net_device *dev)
/*
* initialise some variables
*/
- s->opened = 1;
s->hdlcrx.hbuf.rd = s->hdlcrx.hbuf.wr = 0;
s->hdlcrx.in_hdlc_rx = 0;
s->hdlcrx.rx_state = 0;
@@ -458,6 +457,7 @@ static int hdlcdrv_open(struct net_device *dev)
i = s->ops->open(dev);
if (i)
return i;
+ s->opened = 1;
netif_start_queue(dev);
return 0;
}
@@ -725,8 +725,7 @@ void hdlcdrv_unregister(struct net_device *dev)
BUG_ON(s->magic != HDLCDRV_MAGIC);
- if (s->opened && s->ops->close)
- s->ops->close(dev);
+ /* unregister_netdev() closes the device if it is still up */
unregister_netdev(dev);
free_netdev(dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0117/2151] mm/shmem: make shmem_file() check the files inode
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (115 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0116/2151] hdlcdrv: close the hardware driver once, and only if it was opened Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0118/2151] drm/amd/display: Reset DET of HUBPs without a plane before outstanding updates Greg Kroah-Hartman
` (765 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Mason, Pratyush Yadav,
Baolin Wang, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit d3710111839d11339e414b1bb3fea3d05ab83f6e ]
shmem_file() only checks if file->f_mapping is a shmem mapping. This
mapping can belong to another file, however, as with a Coda file backed
by a tmpfs container after mmap().
So it does not guarantee that the file inode is an actual shmem inode.
Seal handling and memfd preservation use this check before accessing
shmem inode state, so they can access an inode of the wrong type.
Let's make shmem_file() check the inode's file operations instead, to
identify shmem inodes reliably. This will identify regular shmem inodes,
including memfds and ordinary tmpfs files, independently of wrapper file
operations.
Use shmem_mapping() in collapse_file() instead to not change the behavior
of collapse_file(): it operates on the page cache and uses mapping->host
for shmem inode operations. Focusing on the file does not seem relevant.
Fixes: c49fcfcda8b5 ("mm/shmem: update file sealing comments and file checking")
Fixes: b3749f174d68 ("mm: memfd_luo: allow preserving memfd")
Cc: stable@vger.kernel.org
Reported-by: Chris Mason <mason@kernel.org>
Suggested-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20261031-fixes_core-v3-3-d6437171ecc3@kernel.org
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: adjusted context for the missing shmem_freeze() helper and combined integer declarations in collapse_file() ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/shmem_fs.h | 15 ++++++---------
mm/khugepaged.c | 2 +-
mm/shmem.c | 5 +++++
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 0e47465ef0fd5..2b49d4d1426ff 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -99,8 +99,14 @@ extern unsigned long shmem_get_unmapped_area(struct file *, unsigned long addr,
unsigned long len, unsigned long pgoff, unsigned long flags);
extern int shmem_lock(struct file *file, int lock, struct ucounts *ucounts);
#ifdef CONFIG_SHMEM
+bool shmem_file(struct file *file);
bool shmem_mapping(const struct address_space *mapping);
#else
+static inline bool shmem_file(struct file *file)
+{
+ return false;
+}
+
static inline bool shmem_mapping(const struct address_space *mapping)
{
return false;
@@ -171,15 +177,6 @@ static inline struct page *shmem_read_mapping_page(
mapping_gfp_mask(mapping));
}
-static inline bool shmem_file(struct file *file)
-{
- if (!IS_ENABLED(CONFIG_SHMEM))
- return false;
- if (!file || !file->f_mapping)
- return false;
- return shmem_mapping(file->f_mapping);
-}
-
/*
* If fallocate(FALLOC_FL_KEEP_SIZE) has been used, there may be pages
* beyond i_size's notion of EOF, which fallocate has committed to reserving:
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 6fa4d9b7e0129..7ca1772c5aa8b 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1860,6 +1860,7 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
struct collapse_control *cc)
{
struct address_space *mapping = file->f_mapping;
+ const bool is_shmem = shmem_mapping(mapping);
struct page *dst;
struct folio *folio, *tmp, *new_folio;
unsigned long new_pfn = -1;
@@ -1867,7 +1868,6 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr,
LIST_HEAD(pagelist);
XA_STATE_ORDER(xas, &mapping->i_pages, start, HPAGE_PMD_ORDER);
int nr_none = 0, result = SCAN_SUCCEED;
- bool is_shmem = shmem_file(file);
bool do_readahead = false;
bool readahead_done = false;
diff --git a/mm/shmem.c b/mm/shmem.c
index e7c4d134b8255..63286a727fe4e 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -275,6 +275,11 @@ static const struct vm_operations_struct shmem_vm_ops;
static const struct vm_operations_struct shmem_anon_vm_ops;
static struct file_system_type shmem_fs_type;
+bool shmem_file(struct file *file)
+{
+ return file && file_inode(file)->i_fop == &shmem_file_operations;
+}
+
bool shmem_mapping(const struct address_space *mapping)
{
return mapping->a_ops == &shmem_aops;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0118/2151] drm/amd/display: Reset DET of HUBPs without a plane before outstanding updates
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (116 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0117/2151] mm/shmem: make shmem_file() check the files inode Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0119/2151] mm/shmem: fix accounting of swapin-error markers Greg Kroah-Hartman
` (764 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dillon Varone, Mario Limonciello,
Alex Deucher, Roman Li, Alex Hung, Dan Wheeler, Leo Li,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roman Li <Roman.Li@amd.com>
[ Upstream commit f3afbf7d832ab138655afc96bd42226775d03ce7 ]
[WHY]
DC asserts with:
WARNING: dc/hubbub/dcn401/dcn401_hubbub.c at dcn401_program_compbuf_segments
Call Trace:
<TASK>
dcn401_program_outstanding_updates+0x36/0x60 [amdgpu]
hwss_process_outstanding_hw_updates+0x33/0x40 [amdgpu]
commit_planes_for_stream+0x171f/0x1ff0 [amdgpu]
dc_update_state_execute+0xaa/0x170 [amdgpu]
dc_update_planes_and_stream+0x42/0x70 [amdgpu]
amdgpu_dm_atomic_commit_tail+0x16a9/0x4020 [amdgpu]
commit_tail+0xc3/0x1b0 [drm_kms_helper]
The DET left by the VBIOS on a HUBP without a plane can be larger than
the DET planned for the new state. The compbuf is sized for the planned
DET, so DET + compbuf can exceed the CRB size. Programming the compbuf
then triggers the ASSERT and sets CONFIG_ERROR in hardware.
[HOW]
Release the DET of HUBPs without a plane before the compbuf is
programmed.
Add hwss_reset_unused_det() and call it in the commit and flip paths,
to cover both seamless and non-seamless boots.
Fixes: 7a1eb6680939 ("drm/amd/display: Perform outstanding programming on full updates")
Cc: Dillon Varone <dillon.varone@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c93f6fc7175b445ba3b7c85a1fc31e4e4951bbc9)
Cc: stable@vger.kernel.org
[ sashal: added the missing header include to expose the complete struct hubbub definition ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++-
.../drm/amd/display/dc/core/dc_hw_sequencer.c | 32 +++++++++++++++++++
.../drm/amd/display/dc/hwss/hw_sequencer.h | 3 ++
3 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1c312f2e128fc..6a6c4aa584d40 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2282,6 +2282,8 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
* update pending complete before optimizing bandwidth.
*/
hwss_wait_for_odm_update_pending_complete(dc, context);
+ /* No DET may stay allocated to a HUBP without a plane (e.g. left over from VBIOS) */
+ hwss_reset_unused_det(dc, context);
/* pplib is notified if disp_num changed */
dc->hwss.optimize_bandwidth(dc, context);
/* Need to do otg sync again as otg could be out of sync due to otg
@@ -4089,8 +4091,10 @@ static void commit_planes_for_stream(struct dc *dc,
dc_exit_ips_for_hw_access(dc);
dc_z10_restore(dc);
- if (update_type == UPDATE_TYPE_FULL && dc->optimized_required)
+ if (update_type == UPDATE_TYPE_FULL && dc->optimized_required) {
+ hwss_reset_unused_det(dc, dc->current_state);
hwss_process_outstanding_hw_updates(dc, dc->current_state);
+ }
if (update_type != UPDATE_TYPE_FAST && dc->res_pool->funcs->prepare_mcache_programming)
dc->res_pool->funcs->prepare_mcache_programming(dc, context);
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
index f28f61787f16e..277d7c1abbe2f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
@@ -32,6 +32,7 @@
#include "resource.h"
#include "dc_dmub_srv.h"
#include "dc_state_priv.h"
+#include "dchubbub.h"
#define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0]))
#define MAX_NUM_MCACHE 8
@@ -1194,6 +1195,37 @@ void hwss_wait_for_odm_update_pending_complete(struct dc *dc, struct dc_state *c
hwss_wait_for_all_blank_complete(dc, context);
}
+void hwss_reset_unused_det(struct dc *dc, struct dc_state *context)
+{
+ struct hubbub *hubbub = dc->res_pool->hubbub;
+ unsigned int i, j;
+
+ if (!hubbub || !hubbub->funcs->program_det_segments)
+ return;
+
+ for (i = 0; i < dc->res_pool->pipe_count; i++) {
+ struct hubp *hubp = dc->res_pool->hubps[i];
+ bool hubp_in_use = false;
+
+ if (!hubp)
+ continue;
+
+ for (j = 0; j < dc->res_pool->pipe_count; j++) {
+ const struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[j];
+
+ /* A plane-less pipe renders from the DPG, its HUBP (assigned with the stream) needs no DET */
+ if (pipe->plane_state && pipe->plane_res.hubp &&
+ pipe->plane_res.hubp->inst == hubp->inst) {
+ hubp_in_use = true;
+ break;
+ }
+ }
+
+ if (!hubp_in_use)
+ hubbub->funcs->program_det_segments(hubbub, hubp->inst, 0);
+ }
+}
+
void hwss_wait_for_no_pipes_pending(struct dc *dc, struct dc_state *context)
{
int i;
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
index 619ac4dfff078..16251963cdf8d 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
+++ b/drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
@@ -566,6 +566,9 @@ void hwss_wait_for_odm_update_pending_complete(struct dc *dc,
void hwss_wait_for_no_pipes_pending(struct dc *dc,
struct dc_state *context);
+void hwss_reset_unused_det(struct dc *dc,
+ struct dc_state *context);
+
void hwss_wait_for_outstanding_hw_updates(struct dc *dc,
struct dc_state *dc_context);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0119/2151] mm/shmem: fix accounting of swapin-error markers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (117 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0118/2151] drm/amd/display: Reset DET of HUBPs without a plane before outstanding updates Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0120/2151] ovl: inherit FMODE_NONOTIFY when reading directory layers Greg Kroah-Hartman
` (763 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregory Price (Meta), Baolin Wang,
David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand (Arm) <david@kernel.org>
[ Upstream commit 66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09 ]
A failed swap read replaces the swap entry with a swapin-error marker in
the page-cache and subtracts its pages from "alloced" and "swapped";
however, it leaves their block charge in place.
Removing the marker during truncate then subtracts from "swapped" again.
This can underflow the counters or make swapped reach zero while other
pages remain swapped out, causing swapoff to loop without finding them.
When installing the marker, subtract only from "swapped" and let
shmem_recalc_inode() reduce "alloced" and release the block charge.
Make shmem_free_swap() report successful removal separately from the
number of swap pages freed, so removing a swapin-error marker does not
subtract from "swapped" again.
It's a bit confusing, but replacing a swapped out page by a swapin-error
marker in shmem_set_folio_swapin_error() behaves as follows:
Initially:
alloced=1, swapped=1, nrpages=0
Calling shmem_recalc_inode(inode, 0, -1)
-> swapped = 0
-> freed = 1 - 0 - 0 = 1
-> alloced -= freed
-> alloced=0, swapped=0, block charge released
Fixes: 6cec2b95dadf ("mm/shmem: fix infinite loop when swap in shmem error at swapoff time")
Cc: stable@vger.kernel.org
Tested-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://patch.msgid.link/20261029-fixes_shmem-v4-14-392fc715d8f6@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
[ sashal: adapted swap-entry handling to !non_swap_entry() and the existing swap-release APIs ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/shmem.c | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index 63286a727fe4e..82216c44f67db 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -945,12 +945,11 @@ static void shmem_delete_from_page_cache(struct folio *folio, void *radswap)
}
/*
- * Remove swap entry from page cache, free the swap and its page cache. Returns
- * the number of pages being freed. 0 means entry not found in XArray (0 pages
- * being freed).
+ * Remove a swap entry or swapin-error marker wholly within [index, end].
+ * Return whether it was removed, counting freed swap pages in nr_swaps_freed.
*/
-static long shmem_free_swap(struct address_space *mapping,
- pgoff_t index, pgoff_t end, void *radswap)
+static bool shmem_free_swap(struct address_space *mapping,
+ pgoff_t index, pgoff_t end, void *radswap, long *nr_swaps_freed)
{
XA_STATE(xas, &mapping->i_pages, index);
const swp_entry_t swp = radix_to_swp_entry(radswap);
@@ -971,8 +970,10 @@ static long shmem_free_swap(struct address_space *mapping,
xas_unlock_irq(&xas);
/* A swapin-error marker holds no swap slot, so just drop it. */
- if (nr_pages && !non_swap_entry(swp))
+ if (nr_pages && !non_swap_entry(swp)) {
free_swap_and_cache_nr(swp, nr_pages);
+ *nr_swaps_freed += nr_pages;
+ }
return nr_pages;
}
@@ -1125,8 +1126,8 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
if (xa_is_value(folio)) {
if (unfalloc)
continue;
- nr_swaps_freed += shmem_free_swap(mapping, indices[i],
- end - 1, folio);
+ shmem_free_swap(mapping, indices[i], end - 1,
+ folio, &nr_swaps_freed);
continue;
}
@@ -1193,13 +1194,11 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
if (xa_is_value(folio)) {
int order;
- long swaps_freed;
if (unfalloc)
continue;
- swaps_freed = shmem_free_swap(mapping, indices[i],
- end - 1, folio);
- if (!swaps_freed) {
+ if (!shmem_free_swap(mapping, indices[i], end - 1,
+ folio, &nr_swaps_freed)) {
pgoff_t base = indices[i];
order = shmem_confirm_swap(mapping, indices[i],
@@ -1220,7 +1219,6 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
index = base;
break;
}
- nr_swaps_freed += swaps_freed;
continue;
}
@@ -2243,11 +2241,10 @@ static void shmem_set_folio_swapin_error(struct inode *inode, pgoff_t index,
if (!skip_swapcache)
swap_cache_del_folio(folio);
/*
- * Don't treat swapin error folio as alloced. Otherwise inode->i_blocks
- * won't be 0 when inode is released and thus trigger WARN_ON(i_blocks)
- * in shmem_evict_inode().
+ * Let shmem_recalc_inode() reduce alloced and release the block charge
+ * for the freed swap pages.
*/
- shmem_recalc_inode(inode, -nr_pages, -nr_pages);
+ shmem_recalc_inode(inode, 0, -nr_pages);
swap_free_nr(swap, nr_pages);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0120/2151] ovl: inherit FMODE_NONOTIFY when reading directory layers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (118 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0119/2151] mm/shmem: fix accounting of swapin-error markers Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0121/2151] comedi: addi_apci_3xxx: fix subdevice count underallocation Greg Kroah-Hartman
` (762 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Edvard Conrad, Amir Goldstein,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amir Goldstein <amir73il@gmail.com>
[ Upstream commit 9ff338af0e002fe217cfa16b1289b76f6b21fc72 ]
Listing a merged or impure overlay directory opens the real layer
directories from ovl_dir_read(), when the readdir cache is filled.
Those opens use plain ovl_path_open(), so when the directory fd is
one that fanotify created for a permission event, they can still raise
FS_OPEN_PERM. A listener that also marks the backing filesystem and
calls getdents() on the event fd before answering then deadlocks the
same way as with the directory open fixed by the previous commit.
Store the overlay user file in struct ovl_readdir_data and pass it to
ovl_path_open_realfile() from ovl_dir_read(), for both the merged and
the impure cache. Internal readers such as ovl_check_empty_dir() and
the mount-time workdir cleanup still pass no user file.
A note about severity and real world impact: The FAN_OPEN_PERM event is
traditionally used by anti-malware protection agents and security/audit
agents. The scope that is often used in those use cases is FAN_MARK_MOUNT
and agents typically monitor multiple mounts in a mount namespace.
FAN_OPEN_PERM from directory open requires user opt-in with FAN_ONDIR.
It is often not the case that anti-malware agents monitor open of
directories. Security/audit engines are more likely to opt-into
FAN_OPEN_PERM on directories, but are less likely to list the content
of a directory within the scope of FAN_OPEN_PERM event, so the real
world impact of this bug is likely not significant.
Reported-by: Edvard Conrad <edvard@tuta.io>
Closes: https://lore.kernel.org/all/P5Qu3co--N-9@tuta.io/
Cc: stable@vger.kernel.org
Tested-by: Edvard Conrad <edvard@tuta.io>
Link: https://lore.kernel.org/ltp/P5WKBbq--F-9@tuta.io/
Co-developed-by: Edvard Conrad <edvard@tuta.io>
Signed-off-by: Edvard Conrad <edvard@tuta.io>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
[ sashal: Retained the dentry declaration still required by ovl_iterate(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/overlayfs/readdir.c | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 3c8fe45b06f12..efa3964041932 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -41,6 +41,7 @@ struct ovl_dir_cache {
struct ovl_readdir_data {
struct dir_context ctx;
+ const struct file *user_file;
struct dentry *dentry;
bool is_lowest;
struct rb_root *root;
@@ -380,7 +381,8 @@ static inline int ovl_dir_read(const struct path *realpath,
struct file *realfile;
int err;
- realfile = ovl_path_open(realpath, O_RDONLY | O_LARGEFILE);
+ realfile = ovl_path_open_realfile(rdd->user_file, realpath,
+ O_RDONLY | O_LARGEFILE);
if (IS_ERR(realfile))
return PTR_ERR(realfile);
@@ -424,13 +426,14 @@ static void ovl_dir_reset(struct file *file)
}
static int ovl_dir_read_merged(struct dentry *dentry, struct list_head *list,
- struct rb_root *root)
+ struct rb_root *root, const struct file *user_file)
{
int err;
struct path realpath;
struct ovl_readdir_data rdd = {
.ctx.actor = ovl_fill_merge,
.ctx.count = INT_MAX,
+ .user_file = user_file,
.dentry = dentry,
.list = list,
.root = root,
@@ -483,9 +486,10 @@ static void ovl_seek_cursor(struct ovl_dir_file *od, loff_t pos)
od->cursor = p;
}
-static struct ovl_dir_cache *ovl_cache_get(struct dentry *dentry)
+static struct ovl_dir_cache *ovl_dir_cache_get(struct file *file)
{
int res;
+ struct dentry *dentry = file->f_path.dentry;
struct ovl_dir_cache *cache;
struct inode *inode = d_inode(dentry);
@@ -505,7 +509,7 @@ static struct ovl_dir_cache *ovl_cache_get(struct dentry *dentry)
INIT_LIST_HEAD(&cache->entries);
cache->root = RB_ROOT;
- res = ovl_dir_read_merged(dentry, &cache->entries, &cache->root);
+ res = ovl_dir_read_merged(dentry, &cache->entries, &cache->root, file);
if (res) {
ovl_cache_free(&cache->entries);
kfree(cache);
@@ -649,8 +653,8 @@ static bool ovl_fill_plain(struct dir_context *ctx, const char *name,
return true;
}
-static int ovl_dir_read_impure(const struct path *path, struct list_head *list,
- struct rb_root *root)
+static int ovl_dir_read_impure(const struct path *path, struct list_head *list,
+ struct rb_root *root, const struct file *user_file)
{
int err;
struct path realpath;
@@ -658,6 +662,7 @@ static int ovl_dir_read_impure(const struct path *path, struct list_head *list,
struct ovl_readdir_data rdd = {
.ctx.actor = ovl_fill_plain,
.ctx.count = INT_MAX,
+ .user_file = user_file,
.list = list,
.root = root,
};
@@ -695,9 +700,10 @@ static int ovl_dir_read_impure(const struct path *path, struct list_head *list,
return 0;
}
-static struct ovl_dir_cache *ovl_cache_get_impure(const struct path *path)
+static struct ovl_dir_cache *ovl_cache_get_impure(struct file *file)
{
int res;
+ const struct path *path = &file->f_path;
struct dentry *dentry = path->dentry;
struct inode *inode = d_inode(dentry);
struct ovl_fs *ofs = OVL_FS(dentry->d_sb);
@@ -715,7 +721,7 @@ static struct ovl_dir_cache *ovl_cache_get_impure(const struct path *path)
if (!cache)
return ERR_PTR(-ENOMEM);
- res = ovl_dir_read_impure(path, &cache->entries, &cache->root);
+ res = ovl_dir_read_impure(path, &cache->entries, &cache->root, file);
if (res) {
ovl_cache_free(&cache->entries);
kfree(cache);
@@ -836,7 +842,7 @@ static int ovl_iterate_real(struct file *file, struct dir_context *ctx)
dput(parent);
if (ovl_is_impure_dir(file)) {
- rdt.cache = ovl_cache_get_impure(&file->f_path);
+ rdt.cache = ovl_cache_get_impure(file);
if (IS_ERR(rdt.cache))
return PTR_ERR(rdt.cache);
}
@@ -884,7 +890,7 @@ static int ovl_iterate(struct file *file, struct dir_context *ctx)
if (!od->cache) {
struct ovl_dir_cache *cache;
- cache = ovl_cache_get(dentry);
+ cache = ovl_dir_cache_get(file);
err = PTR_ERR(cache);
if (IS_ERR(cache))
goto out;
@@ -1086,7 +1092,7 @@ int ovl_check_empty_dir(struct dentry *dentry, struct list_head *list)
const struct cred *old_cred;
old_cred = ovl_override_creds(dentry->d_sb);
- err = ovl_dir_read_merged(dentry, list, &root);
+ err = ovl_dir_read_merged(dentry, list, &root, NULL);
ovl_revert_creds(old_cred);
if (err)
return err;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0121/2151] comedi: addi_apci_3xxx: fix subdevice count underallocation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (119 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0120/2151] ovl: inherit FMODE_NONOTIFY when reading directory layers Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0122/2151] comedi: dt2811: fix shift-out-of-bounds in IRQ check Greg Kroah-Hartman
` (761 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yang Zi, Ian Abbott, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Zi <2959243019@qq.com>
[ Upstream commit 3de5aa458dede472a253266d02902bd95af8e849 ]
In apci3xxx_auto_attach(), the number of subdevices is computed with
n_subdevices = (board->ai_n_chan ? 0 : 1) + board->has_ao + ...
The ternary is inverted: when the board has analog input channels
(ai_n_chan != 0), it counts 0 instead of 1, so the AI subdevice that is
actually created is not accounted for. As a result
comedi_alloc_subdevices() allocates one entry too few, and the later
subdevice initialization (notably the TTL Digital I/O subdevice, which
is populated last) writes past the end of the allocated array, causing a
slab out-of-bounds write.
Flip the ternary to count 1 when ai_n_chan is non-zero and 0 otherwise,
matching the subdevice creation order in the function.
Signed-off-by: Yang Zi <2959243019@qq.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20261014101803.11036-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes: 656e39fedcf0 ("staging: comedi: addi_apci_3xxx: only allocate needed subdevices")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/comedi/drivers/addi_apci_3xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/comedi/drivers/addi_apci_3xxx.c b/drivers/comedi/drivers/addi_apci_3xxx.c
index bc72273e6a291..7355ec454cb40 100644
--- a/drivers/comedi/drivers/addi_apci_3xxx.c
+++ b/drivers/comedi/drivers/addi_apci_3xxx.c
@@ -787,7 +787,7 @@ static int apci3xxx_auto_attach(struct comedi_device *dev,
dev->irq = pcidev->irq;
}
- n_subdevices = (board->ai_n_chan ? 0 : 1) + board->has_ao +
+ n_subdevices = (board->ai_n_chan ? 1 : 0) + board->has_ao +
board->has_dig_in + board->has_dig_out +
board->has_ttl_io;
ret = comedi_alloc_subdevices(dev, n_subdevices);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0122/2151] comedi: dt2811: fix shift-out-of-bounds in IRQ check
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (120 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0121/2151] comedi: addi_apci_3xxx: fix subdevice count underallocation Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0123/2151] ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time Greg Kroah-Hartman
` (760 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+a4cedab706d0a8a3f988,
Pei Xiao, Ian Abbott, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pei Xiao <xiaopei01@kylinos.cn>
[ Upstream commit 471ce96a9c415b8a67bd5081ac2089a458cacc2f ]
The IRQ number passed via comedi_devconfig->options[1] is a signed int
that comes from userspace. The check `it->options[1] <= 7` does not
reject negative values, so a negative IRQ number reaches
`BIT(it->options[1])`, which is undefined behavior and triggers a UBSAN
shift-out-of-bounds warning:
UBSAN: shift-out-of-bounds in drivers/comedi/drivers/dt2811.c:570:31
shift exponent -251 is negative
Add an explicit lower bound check (`it->options[1] >= 0`) so that only
valid IRQ numbers 0..7 are accepted before the shift.
Fixes: f2975a9b2ab9 ("staging: comedi: dt2811: add async command support for AI subdevice")
Reported-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/6ab21240.e548f532.1ca396.0018.GAE@google.com/#R
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Tested-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com
Link: https://patch.msgid.link/02c46315293a26169d2a3862a2047959a1651ef4.1790061387.git.xiaopei01@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/comedi/drivers/dt2811.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/comedi/drivers/dt2811.c b/drivers/comedi/drivers/dt2811.c
index c2ec5e4fb689f..c422317ef1398 100644
--- a/drivers/comedi/drivers/dt2811.c
+++ b/drivers/comedi/drivers/dt2811.c
@@ -566,7 +566,7 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dt2811_reset(dev);
/* IRQ's 2,3,5,7 are valid for async command support */
- if (it->options[1] <= 7 && (BIT(it->options[1]) & 0xac)) {
+ if (it->options[1] >= 0 && it->options[1] <= 7 && (BIT(it->options[1]) & 0xac)) {
ret = request_irq(it->options[1], dt2811_interrupt, 0,
dev->board_name, dev);
if (ret == 0)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0123/2151] ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (121 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0122/2151] comedi: dt2811: fix shift-out-of-bounds in IRQ check Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0124/2151] ALSA: hda/realtek: Enable mute and mic-mute LEDs on HP ENVY 17-cr0xxx Greg Kroah-Hartman
` (759 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Nick, Rafael J. Wysocki,
Florian Wagner, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit a004b8f0d3bc5d82d3f2c91ff93f4b4b7ccb8f76 ]
Prior to commit 57c31e6d620f ("ACPI: scan: Use acpi_setup_gpe_for_wake()
for buttons"), ACPI button wakeup GPEs having handler methods remained
enabled after acpi_wakeup_gpe_init(), but currently they are not enabled
because acpi_setup_gpe_for_wake() disables them.
That causes function keys to stop working on some systems [1] and there
may be other related issues elsewhere.
To address that, make the ACPI button driver enable wakeup GPEs for ACPI
buttons so long as they have handler methods. While this does not
restore the old behavior exactly (the ACPI button driver needs to be
bound to the button devices for the GPEs to be enabled), it should be
sufficient to restore the missing functionality.
For this purpose, introduce acpi_enable_gpe_cond() that enables
a GPE if its dispatch type matches the supplied one and modify
acpi_button_probe() to use that function for enabling the GPEs in
question.
Fixes: 57c31e6d620f ("ACPI: scan: Use acpi_setup_gpe_for_wake() for buttons")
Reported-by: Nick <nick@kousu.ca>
Closes: https://lore.kernel.org/linux-acpi/E2OXET.4X5GTP37VTNC3@kousu.ca/ [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Nick <nick@kousu.ca>
Cc: 7.0+ <stable@vger.kernel.org> # 7.0+
Link: https://patch.msgid.link/9629117.CDJkKcVGEf@rafael.j.wysocki
[ Adjusted for 6.18.y: struct acpi_button has no dev member in this
tree, so use &button->pdev->dev in the two dev_dbg() calls. ]
Signed-off-by: Florian Wagner <florian@wagner-flo.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpica/evxfgpe.c | 50 ++++++++++++++++++++++++++++-------
drivers/acpi/button.c | 22 +++++++++++++++
include/acpi/acpixf.h | 5 ++++
3 files changed, 68 insertions(+), 9 deletions(-)
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 60dacec1b121f..4074b5908db30 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -78,18 +78,22 @@ ACPI_EXPORT_SYMBOL(acpi_update_all_gpes)
/*******************************************************************************
*
- * FUNCTION: acpi_enable_gpe
+ * FUNCTION: acpi_enable_gpe_cond
*
* PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
* gpe_number - GPE level within the GPE block
+ * dispatch_type - GPE dispatch type to match
*
* RETURN: Status
*
- * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
- * hardware-enabled.
+ * DESCRIPTION: Add a reference to a GPE so long as its dispatch type matches
+ * the supplied one, or it is different from ACPI_GPE_DISPATCH_NONE
+ * if the supplied one is ACPI_GPE_DISPATCH_MASK. On the first
+ * reference, the GPE is hardware-enabled.
*
******************************************************************************/
-acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
+acpi_status acpi_enable_gpe_cond(acpi_handle gpe_device, u32 gpe_number,
+ u8 dispatch_type)
{
acpi_status status = AE_BAD_PARAMETER;
struct acpi_gpe_event_info *gpe_event_info;
@@ -100,14 +104,18 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
/*
- * Ensure that we have a valid GPE number and that there is some way
- * of handling the GPE (handler or a GPE method). In other words, we
- * won't allow a valid GPE to be enabled if there is no way to handle it.
+ * Ensure that we have a valid GPE number and that the dispatch type of
+ * the GPE matches the supplied one (or it is not ACPI_GPE_DISPATCH_NONE
+ * if the supplied one is ACPI_GPE_DISPATCH_MASK).
*/
gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
if (gpe_event_info) {
- if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
- ACPI_GPE_DISPATCH_NONE) {
+ if (dispatch_type == ACPI_GPE_DISPATCH_MASK)
+ dispatch_type = ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags);
+ else if (dispatch_type != ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags))
+ dispatch_type = ACPI_GPE_DISPATCH_NONE;
+
+ if (dispatch_type != ACPI_GPE_DISPATCH_NONE) {
status = acpi_ev_add_gpe_reference(gpe_event_info, TRUE);
if (ACPI_SUCCESS(status) &&
ACPI_GPE_IS_POLLING_NEEDED(gpe_event_info)) {
@@ -128,6 +136,30 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
return_ACPI_STATUS(status);
}
+ACPI_EXPORT_SYMBOL(acpi_enable_gpe_cond)
+
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_enable_gpe
+ *
+ * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
+ * gpe_number - GPE level within the GPE block
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
+ * hardware-enabled.
+ *
+ ******************************************************************************/
+acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
+{
+ /*
+ * Ensure that there is some way of handling the GPE (handler or a GPE
+ * method). In other words, we won't allow a valid GPE to be enabled if
+ * there is no way to handle it.
+ */
+ return acpi_enable_gpe_cond(gpe_device, gpe_number, ACPI_GPE_DISPATCH_MASK);
+}
ACPI_EXPORT_SYMBOL(acpi_enable_gpe)
/*******************************************************************************
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 4ddaee8955c30..b507b88df6c37 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -190,6 +190,7 @@ struct acpi_button {
ktime_t last_time;
bool suspended;
bool lid_state_initialized;
+ bool gpe_enabled;
};
static struct acpi_device *lid_device;
@@ -651,6 +652,21 @@ static int acpi_button_probe(struct platform_device *pdev)
status = acpi_install_notify_handler(device->handle,
ACPI_ALL_NOTIFY, handler,
button);
+ if (ACPI_SUCCESS(status) && device->wakeup.flags.valid) {
+ acpi_status st;
+
+ /*
+ * If the wakeup GPE has a handler method, enable it in
+ * case it is also used for signaling runtime events.
+ */
+ st = acpi_enable_gpe_cond(device->wakeup.gpe_device,
+ device->wakeup.gpe_number,
+ ACPI_GPE_DISPATCH_METHOD);
+ button->gpe_enabled = ACPI_SUCCESS(st);
+ if (button->gpe_enabled)
+ dev_dbg(&button->pdev->dev, "Enabled ACPI GPE%02llx\n",
+ device->wakeup.gpe_number);
+ }
break;
}
if (ACPI_FAILURE(status)) {
@@ -694,6 +710,12 @@ static void acpi_button_remove(struct platform_device *pdev)
acpi_button_event);
break;
default:
+ if (button->gpe_enabled) {
+ dev_dbg(&button->pdev->dev, "Disabling ACPI GPE%02llx\n",
+ adev->wakeup.gpe_number);
+ acpi_disable_gpe(adev->wakeup.gpe_device,
+ adev->wakeup.gpe_number);
+ }
acpi_remove_notify_handler(adev->handle, ACPI_ALL_NOTIFY,
button->type == ACPI_BUTTON_TYPE_LID ?
acpi_lid_notify :
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index e65a2afe92504..af796d079656e 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -725,6 +725,11 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
*/
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
+ acpi_enable_gpe_cond(acpi_handle gpe_device,
+ u32 gpe_number,
+ u8 dispatch_type))
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_enable_gpe(acpi_handle gpe_device,
u32 gpe_number))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0124/2151] ALSA: hda/realtek: Enable mute and mic-mute LEDs on HP ENVY 17-cr0xxx
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (122 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0123/2151] ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time Greg Kroah-Hartman
@ 2026-11-18 14:30 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0125/2151] serial: max310x: schedule tx_work directly from the IRQ handler Greg Kroah-Hartman
` (758 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:30 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Alexandr, Takashi Iwai
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandr <youdoit@mail.ru>
commit cf79cc4996bf936fe159af2a600519b3ebd4ccb7 upstream.
The HP ENVY Laptop 17-cr0xxx (subsystem ID 103c:8a2e) has mute and
mic-mute LEDs on the F8 and F5 keys that never light up on Linux: the
existing quirk entry only sets up the CS35L41 amplifiers.
The board uses the same LED wiring as the HP ENVY x360 15-ey0xxx
(103c:8a31): the mute LED is driven by COEF 0x0b bits 3:2 and the
mic-mute LED by GPIO2 with inverted polarity. Both were verified with
hda-verb on the actual hardware. Switch the entry to
ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS, which chains the amplifier
setup with ALC245_FIXUP_HP_X360_MUTE_LEDS, and use the DMI product name
of the board.
Fixes: aa8e3ef4fe53 ("ALSA: hda/realtek: Add quirks for various HP ENVY models")
Cc: <stable@vger.kernel.org>
Signed-off-by: Alexandr <youdoit@mail.ru>
Link: https://patch.msgid.link/20261103142121.74032-1-youdoit@mail.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/hda/codecs/realtek/alc269.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6991,7 +6991,7 @@ static const struct hda_quirk alc269_fix
SND_PCI_QUIRK(0x103c, 0x8a2b, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8a2c, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8a2d, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
- SND_PCI_QUIRK(0x103c, 0x8a2e, "HP Envy 16", ALC287_FIXUP_CS35L41_I2C_2),
+ SND_PCI_QUIRK(0x103c, 0x8a2e, "HP ENVY Laptop 17-cr0xxx", ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS),
SND_PCI_QUIRK(0x103c, 0x8a30, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8a31, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x8a34, "HP Pavilion x360 2-in-1 Laptop 14-ek0xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
^ permalink raw reply [flat|nested] 884+ messages in thread
* [PATCH 6.18 0125/2151] serial: max310x: schedule tx_work directly from the IRQ handler
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (123 preceding siblings ...)
2026-11-18 14:30 ` [PATCH 6.18 0124/2151] ALSA: hda/realtek: Enable mute and mic-mute LEDs on HP ENVY 17-cr0xxx Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0126/2151] x86/cpufeatures: Make X86_FEATURE leaf 17 Linux-specific Greg Kroah-Hartman
` (757 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Tapio Reijonen
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tapio Reijonen <tapio.reijonen@vaisala.com>
commit c06fcc258db0c0c7f607e64a7ce6a157bb2414b1 upstream.
The TXEMPTY interrupt asks for a FIFO refill, and start_tx() does
nothing beyond scheduling tx_work, so going through it makes no
functional difference. It does conflate two distinct events, though:
start_tx() is the serial core starting a new transmission, while
TXEMPTY can only fire for a transmission that is already running -
the bit latches on the FIFO's non-empty to empty transition, and the
IRQ handler's read of IRQSTS consumes the latch, so a stale TXEMPTY
cannot exist on an idle port (if the bit were level-triggered, the
handler's read-until-clear loop would never terminate).
Schedule tx_work directly, keeping the interrupt path a pure FIFO
refill. This is preparation for a following patch that adds
software-timed RS485 RTS control, where start_tx() also starts the
RTS envelope and a refill must not restart it.
No functional change.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-7-6ba881f81e1f@vaisala.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/max310x.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -810,8 +810,12 @@ static irqreturn_t max310x_port_irq(stru
}
if (rxlen)
max310x_handle_rx(port, rxlen);
+ /*
+ * TXEMPTY latches on the FIFO becoming empty, so a stale
+ * interrupt cannot pump data during an RTS setup delay.
+ */
if (ists & MAX310X_IRQ_TXEMPTY_BIT)
- max310x_start_tx(port);
+ schedule_work(&s->p[portno].tx_work);
} while (1);
return res;
^ permalink raw reply [flat|nested] 884+ messages in thread
* [PATCH 6.18 0126/2151] x86/cpufeatures: Make X86_FEATURE leaf 17 Linux-specific
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (124 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0125/2151] serial: max310x: schedule tx_work directly from the IRQ handler Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0127/2151] drm/komeda: Fix bits parsing of GLB_CORE_ID Greg Kroah-Hartman
` (756 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Borislav Petkov (AMD), Breno Leitao
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov (AMD) <bp@alien8.de>
commit ddde4abaa0ecc8395e0fcfa3e92f65d481890cc8 upstream.
That cpuinfo_x86.x86_capability[] element was supposed to mirror CPUID flags
from CPUID_0x80000007_EBX but that leaf has still to this day only three bits
defined in it. So move those bits to scattered.c and free the capability
element for synthetic flags.
No functional changes.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/include/asm/cpufeatures.h | 5 ++++-
arch/x86/kernel/cpu/common.c | 8 ++------
arch/x86/kernel/cpu/scattered.c | 3 +++
arch/x86/kvm/reverse_cpuid.h | 1 -
tools/arch/x86/include/asm/cpufeatures.h | 5 ++++-
6 files changed, 14 insertions(+), 10 deletions(-)
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -30,7 +30,7 @@ enum cpuid_leafs
CPUID_6_EAX,
CPUID_8000_000A_EDX,
CPUID_7_ECX,
- CPUID_8000_0007_EBX,
+ CPUID_LNX_6,
CPUID_7_EDX,
CPUID_8000_001F_EAX,
CPUID_8000_0021_EAX,
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -407,9 +407,12 @@
#define X86_FEATURE_ENQCMD (16*32+29) /* "enqcmd" ENQCMD and ENQCMDS instructions */
#define X86_FEATURE_SGX_LC (16*32+30) /* "sgx_lc" Software Guard Extensions Launch Control */
-/* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */
+/*
+ * Linux-defined word for use with scattered/synthetic bits.
+ */
#define X86_FEATURE_OVERFLOW_RECOV (17*32+ 0) /* "overflow_recov" MCA overflow recovery support */
#define X86_FEATURE_SUCCOR (17*32+ 1) /* "succor" Uncorrectable error containment and recovery */
+
#define X86_FEATURE_SMCA (17*32+ 3) /* "smca" Scalable MCA */
#define X86_FEATURE_BTB_CTX_ISOLATION (17*32+ 4) /* AMD: Branch predictions contexts isolated */
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1025,12 +1025,8 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
c->x86_capability[CPUID_8000_0001_EDX] = edx;
}
- if (c->extended_cpuid_level >= 0x80000007) {
- cpuid(0x80000007, &eax, &ebx, &ecx, &edx);
-
- c->x86_capability[CPUID_8000_0007_EBX] = ebx;
- c->x86_power = edx;
- }
+ if (c->extended_cpuid_level >= 0x80000007)
+ c->x86_power = cpuid_edx(0x80000007);
if (c->extended_cpuid_level >= 0x80000008) {
cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
--- a/arch/x86/kernel/cpu/scattered.c
+++ b/arch/x86/kernel/cpu/scattered.c
@@ -44,6 +44,9 @@ static const struct cpuid_bit cpuid_bits
{ X86_FEATURE_SGX1, CPUID_EAX, 0, 0x00000012, 0 },
{ X86_FEATURE_SGX2, CPUID_EAX, 1, 0x00000012, 0 },
{ X86_FEATURE_SGX_EDECCSSA, CPUID_EAX, 11, 0x00000012, 0 },
+ { X86_FEATURE_OVERFLOW_RECOV, CPUID_EBX, 0, 0x80000007, 0 },
+ { X86_FEATURE_SUCCOR, CPUID_EBX, 1, 0x80000007, 0 },
+ { X86_FEATURE_SMCA, CPUID_EBX, 3, 0x80000007, 0 },
{ X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 },
{ X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 },
{ X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 },
--- a/arch/x86/kvm/reverse_cpuid.h
+++ b/arch/x86/kvm/reverse_cpuid.h
@@ -79,7 +79,6 @@ static const struct cpuid_reg reverse_cp
[CPUID_6_EAX] = { 6, 0, CPUID_EAX},
[CPUID_8000_000A_EDX] = {0x8000000a, 0, CPUID_EDX},
[CPUID_7_ECX] = { 7, 0, CPUID_ECX},
- [CPUID_8000_0007_EBX] = {0x80000007, 0, CPUID_EBX},
[CPUID_7_EDX] = { 7, 0, CPUID_EDX},
[CPUID_7_1_EAX] = { 7, 1, CPUID_EAX},
[CPUID_12_EAX] = {0x00000012, 0, CPUID_EAX},
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -407,9 +407,12 @@
#define X86_FEATURE_ENQCMD (16*32+29) /* "enqcmd" ENQCMD and ENQCMDS instructions */
#define X86_FEATURE_SGX_LC (16*32+30) /* "sgx_lc" Software Guard Extensions Launch Control */
-/* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */
+/*
+ * Linux-defined word for use with scattered/synthetic bits.
+ */
#define X86_FEATURE_OVERFLOW_RECOV (17*32+ 0) /* "overflow_recov" MCA overflow recovery support */
#define X86_FEATURE_SUCCOR (17*32+ 1) /* "succor" Uncorrectable error containment and recovery */
+
#define X86_FEATURE_SMCA (17*32+ 3) /* "smca" Scalable MCA */
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */
^ permalink raw reply [flat|nested] 884+ messages in thread
* [PATCH 6.18 0127/2151] drm/komeda: Fix bits parsing of GLB_CORE_ID
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (125 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0126/2151] x86/cpufeatures: Make X86_FEATURE leaf 17 Linux-specific Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0128/2151] accel/qaic: reject BO sizes that overflow page count Greg Kroah-Hartman
` (755 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Raveendra Talabattula, Liviu Dudau,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raveendra Talabattula <raveendra.talabattula@arm.com>
[ Upstream commit ec902de0221747094f9ccbb61454e9633fbf282f ]
GLB_CORE_ID contains the product and version information returned by the
hardware. The current macros parses VERSION_MINOR as a 4-bit field and
VERSION_STATUS as an 8-bit field, which does not match the register
layout. As a result, the driver reports an incorrect version number.
Fix the parsing macros to match the hardware specification:
- VERSION_MINOR is 8 bits at [11:4]
- VERSION_STATUS is 4 bits at [3:0]
Fixes: bd628c1bed79 ("drm/komeda: komeda_dev/pipeline/component definition and initialzation")
Signed-off-by: Raveendra Talabattula <raveendra.talabattula@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260803142122.4127851-2-raveendra.talabattula@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/arm/display/include/malidp_product.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h b/drivers/gpu/drm/arm/display/include/malidp_product.h
index 16a8a2c22c423..f0c34eff523f1 100644
--- a/drivers/gpu/drm/arm/display/include/malidp_product.h
+++ b/drivers/gpu/drm/arm/display/include/malidp_product.h
@@ -8,14 +8,18 @@
#define _MALIDP_PRODUCT_H_
/* Product identification */
+/* GLB_CORE_ID fields as per HW specification:
+ * MINOR is 8 bits ([11:4]) and STATUS is 4 bits ([3:0]).
+ * Update masks/shifts accordingly.
+ */
#define MALIDP_CORE_ID(__product, __major, __minor, __status) \
((((__product) & 0xFFFF) << 16) | (((__major) & 0xF) << 12) | \
- (((__minor) & 0xF) << 8) | ((__status) & 0xFF))
+ (((__minor) & 0xFF) << 4) | ((__status) & 0xF))
#define MALIDP_CORE_ID_PRODUCT_ID(__core_id) ((__u32)(__core_id) >> 16)
#define MALIDP_CORE_ID_MAJOR(__core_id) (((__u32)(__core_id) >> 12) & 0xF)
-#define MALIDP_CORE_ID_MINOR(__core_id) (((__u32)(__core_id) >> 8) & 0xF)
-#define MALIDP_CORE_ID_STATUS(__core_id) (((__u32)(__core_id)) & 0xFF)
+#define MALIDP_CORE_ID_MINOR(__core_id) (((__u32)(__core_id) >> 4) & 0xFF)
+#define MALIDP_CORE_ID_STATUS(__core_id) ((__u32)(__core_id) & 0xF)
/* Mali-display product IDs */
#define MALIDP_D71_PRODUCT_ID 0x0071
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0128/2151] accel/qaic: reject BO sizes that overflow page count
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (126 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0127/2151] drm/komeda: Fix bits parsing of GLB_CORE_ID Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0129/2151] drm/panfrost: Prevent division by 0 Greg Kroah-Hartman
` (754 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Hao-Qun Huang, Jeff Hugo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hao-Qun Huang <alvinhuang0603@gmail.com>
[ Upstream commit 568d4cb5dcc5ec4e22975699b6ea67a30806884c ]
create_sgt() receives the BO size as a u64 but stores the number of
pages in an int. qaic_create_bo_ioctl() page-aligns the user-supplied
size without an upper bound, so DIV_ROUND_UP(size, PAGE_SIZE) can exceed
INT_MAX and truncate when assigned to nr_pages.
When the page count wraps to a small positive value (for example a BO
larger than 16 TiB on a 4 KiB page kernel), create_sgt() succeeds after
allocating only a handful of pages while the GEM object still records
the full size, so the request never fails with -ENOMEM. The temporary
pages array and the allocation loop both use the truncated count, so the
backing SG table ends up smaller than obj->size. Later slice operations
validate against obj->size and then clone ranges from this short sgt.
Compute the page count as a u64 and reject sizes that do not fit in
nr_pages before the narrowing conversion.
Fixes: ff13be830333 ("accel/qaic: Add datapath")
Assisted-by: Claude:claude-fable-5
Signed-off-by: Hao-Qun Huang <alvinhuang0603@gmail.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patch.msgid.link/20260708031959.966009-1-alvinhuang0603@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/accel/qaic/qaic_data.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
index 3335c92b0d7dc..ebb2bab7a4c2b 100644
--- a/drivers/accel/qaic/qaic_data.c
+++ b/drivers/accel/qaic/qaic_data.c
@@ -15,6 +15,7 @@
#include <linux/math64.h>
#include <linux/mm.h>
#include <linux/moduleparam.h>
+#include <linux/overflow.h>
#include <linux/scatterlist.h>
#include <linux/spinlock.h>
#include <linux/srcu.h>
@@ -454,7 +455,12 @@ static int create_sgt(struct qaic_device *qdev, struct sg_table **sgt_out, u64 s
int order;
if (size) {
- nr_pages = DIV_ROUND_UP(size, PAGE_SIZE);
+ u64 nr_pages_u64 = DIV_ROUND_UP_ULL(size, PAGE_SIZE);
+
+ if (overflows_type(nr_pages_u64, int))
+ return -E2BIG;
+
+ nr_pages = nr_pages_u64;
/*
* calculate how much extra we are going to allocate, to remove
* later
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0129/2151] drm/panfrost: Prevent division by 0
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (127 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0128/2151] accel/qaic: reject BO sizes that overflow page count Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0130/2151] bpf: sched_ext: Mark ops argument container pointer fields as trusted Greg Kroah-Hartman
` (753 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Claude, Steven Price,
Boris Brezillon, Adrián Larumbe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrián Larumbe <adrian.larumbe@collabora.com>
[ Upstream commit fd4227f03546c323b5b21568f727233e9792d298 ]
When updating and debug-printing devfreq stats, in the very unlikely
off-chance that total device time is less than 100 ns, division by 0
would happen. Fix the divisor when relevant and rearrange operands.
Reported-by: Claude <noreply@anthropic.com>
Closes: https://gitlab.freedesktop.org/panfrost/linux/-/work_items/88
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patch.msgid.link/20260820-b4-panfrost-fixes-v1-2-1b2c2376f4bc@collabora.com
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 5d0dce10336ba..9ab4fb3deb145 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -76,7 +76,7 @@ static int panfrost_devfreq_get_dev_status(struct device *dev,
dev_dbg(pfdev->dev, "busy %lu total %lu %lu %% freq %lu MHz\n",
status->busy_time, status->total_time,
- status->busy_time / (status->total_time / 100),
+ status->busy_time * 100 / MAX(status->total_time, 1),
status->current_frequency / 1000 / 1000);
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0130/2151] bpf: sched_ext: Mark ops argument container pointer fields as trusted
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (128 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0129/2151] drm/panfrost: Prevent division by 0 Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0131/2151] drm/omap: dsi: avoid sending bta sync all the time in writes Greg Kroah-Hartman
` (752 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tejun Heo, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
[ Upstream commit aed1bf1a352acd4f5ffd2a81e23d2bb6e8e9b636 ]
Walking an unannotated pointer field of a trusted struct yields a bare
PTR_TO_BTF_ID in non-sleepable programs, which kfuncs and helpers accept,
but PTR_UNTRUSTED in sleepable programs, which they reject. This gets in the
way of making ops.init_task() sleepable, which schedulers want for
allocations. For example, passing args->cgroup into bpf_cgrp_storage_get()
then fails verification and the only recourse is round-tripping through the
cgroup ID with bpf_cgroup_from_id().
The pointer fields in the sched_ext ops argument containers are all pinned
by the callers for the duration of the ops calls and are never NULL. Add
them to the verifier's trusted-fields whitelist so that they are PTR_TRUSTED
in both sleepable and non-sleepable programs.
Fixes: 8195136669661 ("sched_ext: Add cgroup support")
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/95d7ccc17681aa3a4a2eeb1b073f00f7@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/verifier.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index b89a5d717e422..1ce3bfc12b304 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -7304,6 +7304,28 @@ BTF_TYPE_SAFE_TRUSTED(struct file) {
struct inode *f_inode;
};
+/*
+ * The pointer fields in the sched_ext ops argument containers are pinned by the
+ * callers for the duration of the ops calls and are never NULL.
+ */
+BTF_TYPE_SAFE_TRUSTED(struct scx_init_task_args) {
+#ifdef CONFIG_EXT_GROUP_SCHED
+ struct cgroup *cgroup;
+#endif
+};
+
+BTF_TYPE_SAFE_TRUSTED(struct scx_cpu_release_args) {
+ struct task_struct *task;
+};
+
+BTF_TYPE_SAFE_TRUSTED(struct scx_sub_attach_args) {
+ struct sched_ext_ops *ops;
+};
+
+BTF_TYPE_SAFE_TRUSTED(struct scx_sub_detach_args) {
+ struct sched_ext_ops *ops;
+};
+
BTF_TYPE_SAFE_TRUSTED_OR_NULL(struct dentry) {
struct inode *d_inode;
};
@@ -7343,6 +7365,10 @@ static bool type_is_trusted(struct bpf_verifier_env *env,
BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct bpf_iter__task));
BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct linux_binprm));
BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct file));
+ BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct scx_init_task_args));
+ BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct scx_cpu_release_args));
+ BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct scx_sub_attach_args));
+ BTF_TYPE_EMIT(BTF_TYPE_SAFE_TRUSTED(struct scx_sub_detach_args));
return btf_nested_type_is_trusted(&env->log, reg, field_name, btf_id, "__safe_trusted");
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0131/2151] drm/omap: dsi: avoid sending bta sync all the time in writes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (129 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0130/2151] bpf: sched_ext: Mark ops argument container pointer fields as trusted Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0132/2151] drm: of: Fix drm_of_get_data_lanes_count_ep() return value documentation Greg Kroah-Hartman
` (751 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andreas Kemnade, Tomi Valkeinen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Kemnade <andreas@kemnade.info>
[ Upstream commit 20207f78382ff339f3a7f7c5db2c0219b157d32a ]
Some chips need configuration commands to be sent first, before they can
send data. TC358762 for example needs PPI_LPTXTIMECNT configured
and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to
configure such chips, do not send bta sync during writes if no acks are
requested. Instead just wait for the packet to be sent to avoid FIFO
overflows. There might be more to do about acks, but there seem to be
virtually no users of that flag.
This came to light when fiddling with the Epson Moverio BT-200 display
which consists of 2 TC358762 bridges with SPI funneled through
to the unknown display chip. With that patch the bridge can be accessed,
Reading back registers works, when the above-mentioned registers are set.
In Command-Mode update, there was a nop sent, apparently the most
relevant part was the bta sync to actually force low power mode.
Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested.
Fixes: e70965386353e ("drm/omap: dsi: simplify write function")
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://patch.msgid.link/20260629-vm-upstr-v4-1-9f0c62d8808e@kemnade.info
Link: https://patch.msgid.link/20260628-vm-upstr-v3-1-9e9add93378b@kemnade.info
Link: https://patch.msgid.link/20260529-vm-upstr-v2-1-24c30671719f@kernel.org
Link: https://lore.gitlab.freedesktop.org/drm-ai-reviews/review-patch1-20260529-vm-upstr-v2-1-24c30671719f@kernel.org/
Link: https://patch.msgid.link/20260528-vm-upstr-v1-1-fb93ef8cbe47@kernel.org
Link: https://patch.msgid.link/20260804-vm-upstr-v6-1-1bf3748b2fa3@kemnade.info
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/omapdrm/dss/dsi.c | 63 +++++++++++++++----------------
1 file changed, 31 insertions(+), 32 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 7bfd7eb32eba3..8aa0609e5c99b 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -58,9 +58,6 @@ static void dsi_uninit_dispc(struct dsi_data *dsi);
static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel);
-static ssize_t _omap_dsi_host_transfer(struct dsi_data *dsi, int vc,
- const struct mipi_dsi_msg *msg);
-
#ifdef DSI_PERF_MEASURE
static bool dsi_perf;
module_param(dsi_perf, bool, 0644);
@@ -2189,28 +2186,45 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int vc, int channel)
static int dsi_vc_write_common(struct omap_dss_device *dssdev, int vc,
const struct mipi_dsi_msg *msg)
{
+ DECLARE_COMPLETION_ONSTACK(completion);
struct dsi_data *dsi = to_dsi_data(dssdev);
+ u32 err;
int r;
+ /* wait for IRQ for packet transmission confirmation */
+ r = dsi_register_isr_vc(dsi, vc, dsi_completion_handler,
+ &completion, DSI_VC_IRQ_PACKET_SENT);
+ if (r)
+ return r;
+
if (mipi_dsi_packet_format_is_short(msg->type))
r = dsi_vc_send_short(dsi, vc, msg);
else
r = dsi_vc_send_long(dsi, vc, msg);
- if (r < 0)
+ if ((!r) && wait_for_completion_timeout(&completion,
+ msecs_to_jiffies(500)) == 0)
+ r = -EIO;
+
+ dsi_unregister_isr_vc(dsi, vc, dsi_completion_handler,
+ &completion, DSI_VC_IRQ_PACKET_SENT);
+ if (r)
return r;
- /*
- * TODO: we do not always have to do the BTA sync, for example
- * we can improve performance by setting the update window
- * information without sending BTA sync between the commands.
- * In that case we can return early.
- */
+ /* TODO: find out if more needs to be done for MIPI_DSI_MSG_REQ_ACK */
- r = dsi_vc_send_bta_sync(dssdev, vc);
- if (r) {
- DSSERR("bta sync failed\n");
- return r;
+ if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
+ r = dsi_vc_send_bta_sync(dssdev, vc);
+ if (r) {
+ DSSERR("bta sync failed\n");
+ return r;
+ }
+ } else {
+ err = dsi_get_errors(dsi);
+ if (err) {
+ DSSERR("Error while sending: %x\n", err);
+ return -EIO;
+ }
}
/* RX_FIFO_NOT_EMPTY */
@@ -3228,21 +3242,6 @@ static int _dsi_update(struct dsi_data *dsi)
return 0;
}
-static int _dsi_send_nop(struct dsi_data *dsi, int vc, int channel)
-{
- const u8 payload[] = { MIPI_DCS_NOP };
- const struct mipi_dsi_msg msg = {
- .channel = channel,
- .type = MIPI_DSI_DCS_SHORT_WRITE,
- .tx_len = 1,
- .tx_buf = payload,
- };
-
- WARN_ON(!dsi_bus_is_locked(dsi));
-
- return _omap_dsi_host_transfer(dsi, vc, &msg);
-}
-
static int dsi_update_channel(struct omap_dss_device *dssdev, int vc)
{
struct dsi_data *dsi = to_dsi_data(dssdev);
@@ -3263,13 +3262,13 @@ static int dsi_update_channel(struct omap_dss_device *dssdev, int vc)
DSSDBG("dsi_update_channel: %d", vc);
/*
- * Send NOP between the frames. If we don't send something here, the
+ * Transition to LP here. If we don't send something here, the
* updates stop working. This is probably related to DSI spec stating
* that the DSI host should transition to LP at least once per frame.
*/
- r = _dsi_send_nop(dsi, VC_CMD, dsi->dsidev->channel);
+ r = dsi_vc_send_bta_sync(dssdev, VC_CMD);
if (r < 0) {
- DSSWARN("failed to send nop between frames: %d\n", r);
+ DSSWARN("failed to send bta sync between frames: %d\n", r);
goto err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0132/2151] drm: of: Fix drm_of_get_data_lanes_count_ep() return value documentation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (130 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0131/2151] drm/omap: dsi: avoid sending bta sync all the time in writes Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0133/2151] libbpf: Avoid overflow in BTF.ext bounds check Greg Kroah-Hartman
` (750 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Marek Vasut,
Maxime Ripard, Tomi Valkeinen, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <marek.vasut+renesas@mailbox.org>
[ Upstream commit e3eca845ef7d6cd8c407f9b42beb45af94ff096b ]
Update drm_of_get_data_lanes_count_ep() return value documentation
to match the drm_of_get_data_lanes_count() return value documentation.
The drm_of_get_data_lanes_count_ep() is only a wrapper around the
drm_of_get_data_lanes_count() and therefore returns the same error
codes.
Simplify the return code description of drm_of_get_data_lanes_count()
and drm_of_get_data_lanes_count_ep() to -ENODATA and -EINVAL.
Fixes: fc801750b197 ("drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260305205840.95978-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/drm_of.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 4f65ce729a473..e99645103b23d 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -507,8 +507,8 @@ EXPORT_SYMBOL_GPL(drm_of_lvds_get_data_mapping);
*
* Return:
* * min..max - positive integer count of "data-lanes" elements
- * * -ve - the "data-lanes" property is missing or invalid
- * * -EINVAL - the "data-lanes" property is unsupported
+ * * -ENODATA - the property does not have a value.
+ * * -EINVAL - the "data-lanes" property is missing or invalid
*/
int drm_of_get_data_lanes_count(const struct device_node *endpoint,
const unsigned int min, const unsigned int max)
@@ -539,8 +539,8 @@ EXPORT_SYMBOL_GPL(drm_of_get_data_lanes_count);
*
* Return:
* * min..max - positive integer count of "data-lanes" elements
- * * -EINVAL - the "data-mapping" property is unsupported
- * * -ENODEV - the "data-mapping" property is missing
+ * * -ENODATA - the property does not have a value.
+ * * -EINVAL - the "data-lanes" property is missing or invalid
*/
int drm_of_get_data_lanes_count_ep(const struct device_node *port,
int port_reg, int reg,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0133/2151] libbpf: Avoid overflow in BTF.ext bounds check
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (131 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0132/2151] drm: of: Fix drm_of_get_data_lanes_count_ep() return value documentation Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0134/2151] selftests/bpf: Allocate a larger timeout for connection Greg Kroah-Hartman
` (749 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Darren Carreras, Andrii Nakryiko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Darren Carreras <carrerasdarren@gmail.com>
[ Upstream commit e40f61a31688898e7cf81e91074a42f805883e4d ]
A malformed BTF.ext subsection length in an ELF input can wrap the
pointer addition used by btf_ext_parse_sec_info() on 32-bit builds. The
wrapped pointer passes the bounds check and parsing then reads beyond the
copied BTF.ext data.
Ensure the header fits in the copied data, then validate the subsection
offset and length with subtraction before forming its pointer.
Fixes: ae4ab4b4117d ("btf: expose API to work with raw btf_ext data")
Closes: https://issues.oss-fuzz.com/issues/477315119
Signed-off-by: Darren Carreras <carrerasdarren@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260813-b4-libbpf-v6-send-20260813-v6-1-56be61c52758@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/bpf/btf.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index 9f141395c074e..f1ee53a07f17b 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -3013,7 +3013,7 @@ static int btf_ext_parse_sec_info(struct btf_ext *btf_ext,
{
const struct btf_ext_info_sec *sinfo;
struct btf_ext_info *ext_info;
- __u32 info_left, record_size;
+ __u32 data_left, info_left, record_size;
size_t sec_cnt = 0;
void *info;
@@ -3026,16 +3026,20 @@ static int btf_ext_parse_sec_info(struct btf_ext *btf_ext,
return -EINVAL;
}
- /* The start of the info sec (including the __u32 record_size). */
- info = btf_ext->data + btf_ext->hdr->hdr_len + ext_sec->off;
- info_left = ext_sec->len;
+ if (btf_ext->hdr->hdr_len > btf_ext->data_size)
+ return -EINVAL;
- if (btf_ext->data + btf_ext->data_size < info + ext_sec->len) {
+ data_left = btf_ext->data_size - btf_ext->hdr->hdr_len;
+ if (ext_sec->off > data_left || ext_sec->len > data_left - ext_sec->off) {
pr_debug("%s section (off:%u len:%u) is beyond the end of the ELF section .BTF.ext\n",
ext_sec->desc, ext_sec->off, ext_sec->len);
return -EINVAL;
}
+ /* The start of the info sec (including the __u32 record_size). */
+ info = btf_ext->data + btf_ext->hdr->hdr_len + ext_sec->off;
+ info_left = ext_sec->len;
+
/* At least a record size */
if (info_left < sizeof(__u32)) {
pr_debug(".BTF.ext %s record size not found\n", ext_sec->desc);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0134/2151] selftests/bpf: Allocate a larger timeout for connection
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (132 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0133/2151] libbpf: Avoid overflow in BTF.ext bounds check Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0135/2151] bpf: Roll back stream capacity when allocation fails Greg Kroah-Hartman
` (748 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexis Lothoré ,
Andrii Nakryiko, Ihor Solodrai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
[ Upstream commit 669e4fa766000ae4137bb02eb22ce75ba78ad32d ]
Some tests, like tc_tunnel or tc_edt, sporadically fail in CI with the
following logs:
(network_helpers.c:309: errno: Operation now in progress) \
Failed to connect to server
send_and_test_data:FAIL:connect to server unexpected error: -115
This is due to SO_RCVTIMEO and SO_SNDTIMEO being set on the client
socket (see settimeo() in client_socket()), allowing connect() to return
an error and to set errno to EINPROGRESS instead of ETIMEDOUT.
Increasing the timeout value for those tests is likely not a good
solution (and it has already been done by commit 2790db208b44
("selftests/bpf: Improve tc_tunnel test reliability")): some tests
expect some data transfer to fail, and so the timeout value would
increase overall test execution duration again (not only the connection,
but any socket operation).
Another solution is to allocate a timeout budget specific to the
connection: we can apply a larger timeout only for connections, and once
the connection is established, set back the timeout configured through
opts->timeout_ms; this would allow connection to succeed under heavy CI
load, while keeping timeout reasonable for the rest of the test traffic.
Create a dedicated connect helper that sets a large timeout for the
connect step, tries to connect, and if successful, finally sets the
timeout value to the one configured by the test.
Fixes: 99126abec5e5 ("bpf: selftests: A few improvements to network_helpers.c")
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/bpf/20260818-tc_tunnel_flaky-v7-1-aec161e74ef2@bootlin.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/bpf/network_helpers.c | 46 ++++++++++++++-----
1 file changed, 35 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/bpf/network_helpers.c b/tools/testing/selftests/bpf/network_helpers.c
index 2067e12034ba0..39583217c9a9d 100644
--- a/tools/testing/selftests/bpf/network_helpers.c
+++ b/tools/testing/selftests/bpf/network_helpers.c
@@ -49,6 +49,8 @@
errno = __save; \
})
+#define CONNECT_MIN_TIMEOUT_MS 5000
+
struct ipv4_packet pkt_v4 = {
.eth.h_proto = __bpf_constant_htons(ETH_P_IP),
.iph.ihl = 5,
@@ -291,6 +293,37 @@ int client_socket(int family, int type,
return -1;
}
+static int connect_with_timeout(int fd, const struct sockaddr_storage *addr,
+ socklen_t addrlen, int timeout_ms)
+{
+ int connect_timeout_ms = MAX(timeout_ms, CONNECT_MIN_TIMEOUT_MS);
+
+ /*
+ * Override timeout configuration with a larger value for the
+ * connection
+ */
+ if (settimeo(fd, connect_timeout_ms)) {
+ log_err("Failed to set connect timeout");
+ return -1;
+ }
+
+ if (connect(fd, (const struct sockaddr *)addr, addrlen)) {
+ log_err("Failed to connect");
+ return -1;
+ }
+
+ /*
+ * If the timeout configured by the test is different from the
+ * connect timeout, restore it
+ */
+ if (timeout_ms != connect_timeout_ms && settimeo(fd, timeout_ms)) {
+ log_err("Failed to set timeout for connected socket");
+ return -1;
+ }
+
+ return 0;
+}
+
int connect_to_addr(int type, const struct sockaddr_storage *addr, socklen_t addrlen,
const struct network_helper_opts *opts)
{
@@ -305,8 +338,7 @@ int connect_to_addr(int type, const struct sockaddr_storage *addr, socklen_t add
return -1;
}
- if (connect(fd, (const struct sockaddr *)addr, addrlen)) {
- log_err("Failed to connect to server");
+ if (connect_with_timeout(fd, addr, addrlen, opts->timeout_ms)) {
save_errno_close(fd);
return -1;
}
@@ -376,20 +408,12 @@ int connect_fd_to_fd(int client_fd, int server_fd, int timeout_ms)
struct sockaddr_storage addr;
socklen_t len = sizeof(addr);
- if (settimeo(client_fd, timeout_ms))
- return -1;
-
if (getsockname(server_fd, (struct sockaddr *)&addr, &len)) {
log_err("Failed to get server addr");
return -1;
}
- if (connect(client_fd, (const struct sockaddr *)&addr, len)) {
- log_err("Failed to connect to server");
- return -1;
- }
-
- return 0;
+ return connect_with_timeout(client_fd, &addr, len, timeout_ms);
}
int make_sockaddr(int family, const char *addr_str, __u16 port,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0135/2151] bpf: Roll back stream capacity when allocation fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (133 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0134/2151] selftests/bpf: Allocate a larger timeout for connection Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0136/2151] bpf: Fix stream capacity leak in staging path Greg Kroah-Hartman
` (747 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jianlin Shi, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jianlin Shi <shijianlin11@foxmail.com>
[ Upstream commit bd2466ed8fc2ee54408bfe433e75f9f46bfa04f7 ]
bpf_stream_push_str() accounts the string length before allocating a
stream element. If the allocation fails, the length remains charged even
though no element is queued and therefore cannot be released by a reader.
Repeated failures can exhaust the stream capacity permanently until the
BPF program is freed.
Refactor bpf_stream_release_capacity() to take a length so the consume
and release sides are symmetric, and use it to roll back the charge when
creating the stream element fails.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Signed-off-by: Jianlin Shi <shijianlin11@foxmail.com>
Link: https://lore.kernel.org/r/c0ad7b18c59be6695fcc9e4e1200b2f4d5cbbea2.1787492521.git.shijianlin11@foxmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/stream.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/kernel/bpf/stream.c b/kernel/bpf/stream.c
index ff16c631951bb..d2889e54e748b 100644
--- a/kernel/bpf/stream.c
+++ b/kernel/bpf/stream.c
@@ -208,10 +208,8 @@ static int bpf_stream_consume_capacity(struct bpf_stream *stream, int len)
return 0;
}
-static void bpf_stream_release_capacity(struct bpf_stream *stream, struct bpf_stream_elem *elem)
+static void bpf_stream_release_capacity(struct bpf_stream *stream, int len)
{
- int len = elem->total_len;
-
atomic_sub(len, &stream->capacity);
}
@@ -219,7 +217,14 @@ static int bpf_stream_push_str(struct bpf_stream *stream, const char *str, int l
{
int ret = bpf_stream_consume_capacity(stream, len);
- return ret ?: __bpf_stream_push_str(&stream->log, str, len);
+ if (ret)
+ return ret;
+
+ ret = __bpf_stream_push_str(&stream->log, str, len);
+ if (ret)
+ bpf_stream_release_capacity(stream, len);
+
+ return ret;
}
static struct bpf_stream *bpf_stream_get(enum bpf_stream_id stream_id, struct bpf_prog_aux *aux)
@@ -331,7 +336,7 @@ static int bpf_stream_read(struct bpf_stream *stream, void __user *buf, int len)
if (cont)
continue;
bpf_stream_backlog_pop(stream);
- bpf_stream_release_capacity(stream, elem);
+ bpf_stream_release_capacity(stream, elem->total_len);
bpf_stream_free_elem(elem);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0136/2151] bpf: Fix stream capacity leak in staging path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (134 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0135/2151] bpf: Roll back stream capacity when allocation fails Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0137/2151] bpf: Return partial progress from bpf_stream_read on fault Greg Kroah-Hartman
` (746 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jianlin Shi, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jianlin Shi <shijianlin11@foxmail.com>
[ Upstream commit effa6370ba89e7839c9bfeb802d8f05d6843ddf1 ]
bpf_stream_stage_printk() increments ss->len before pushing the
formatted string to the staging log. If element allocation fails,
ss->len remains inflated and bpf_stream_stage_commit() permanently
charges the stream capacity for data that was never queued.
Only account the string length after a successful push, and use
vscnprintf() so the staged length is the truncated payload without
the trailing NUL.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Signed-off-by: Jianlin Shi <shijianlin11@foxmail.com>
Link: https://lore.kernel.org/r/46898fb1ae482b2f8b1da459922b187378dfdc1d.1787492521.git.shijianlin11@foxmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/stream.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/stream.c b/kernel/bpf/stream.c
index d2889e54e748b..612f4a7954f4d 100644
--- a/kernel/bpf/stream.c
+++ b/kernel/bpf/stream.c
@@ -441,17 +441,18 @@ int bpf_stream_stage_printk(struct bpf_stream_stage *ss, const char *fmt, ...)
{
struct bpf_bprintf_buffers *buf;
va_list args;
- int ret;
+ int len, ret;
if (bpf_try_get_buffers(&buf))
return -EBUSY;
va_start(args, fmt);
- ret = vsnprintf(buf->buf, ARRAY_SIZE(buf->buf), fmt, args);
+ len = vscnprintf(buf->buf, ARRAY_SIZE(buf->buf), fmt, args);
va_end(args);
- ss->len += ret;
/* Exclude NULL byte during push. */
- ret = __bpf_stream_push_str(&ss->log, buf->buf, ret);
+ ret = __bpf_stream_push_str(&ss->log, buf->buf, len);
+ if (!ret)
+ ss->len += len;
bpf_put_buffers();
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0137/2151] bpf: Return partial progress from bpf_stream_read on fault
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (135 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0136/2151] bpf: Fix stream capacity leak in staging path Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0138/2151] bpf: Reject oversized bpf_stream_vprintk output with -E2BIG Greg Kroah-Hartman
` (745 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jianlin Shi, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jianlin Shi <shijianlin11@foxmail.com>
[ Upstream commit 16790357a50baae10de1f619b608a85145d54bc2 ]
bpf_stream_read() pops and frees stream elements after a successful
copy_to_user(). If a later copy_to_user() fails, it currently restores
only the current element's consumed_len and returns -EFAULT, hiding
bytes already delivered to userspace and making the consumed data
unrecoverable on retry.
On a short copy, keep the successfully copied prefix of the current
element and return the number of bytes copied. Return -EFAULT only when
no bytes were copied for the call.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Signed-off-by: Jianlin Shi <shijianlin11@foxmail.com>
Link: https://lore.kernel.org/r/7668c5838c6beafeea719df8d55319e2fe08cfef.1787492521.git.shijianlin11@foxmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/stream.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/kernel/bpf/stream.c b/kernel/bpf/stream.c
index 612f4a7954f4d..62af66d6ee391 100644
--- a/kernel/bpf/stream.c
+++ b/kernel/bpf/stream.c
@@ -310,6 +310,7 @@ static int bpf_stream_read(struct bpf_stream *stream, void __user *buf, int len)
while (rem_len) {
int pos = len - rem_len;
+ int chunk, n;
bool cont;
node = bpf_stream_backlog_peek(stream);
@@ -323,13 +324,14 @@ static int bpf_stream_read(struct bpf_stream *stream, void __user *buf, int len)
cons_len = elem->consumed_len;
cont = bpf_stream_consume_elem(elem, &rem_len) == false;
-
- ret = copy_to_user(buf + pos, elem->str + cons_len,
- elem->consumed_len - cons_len);
- /* Restore in case of error. */
- if (ret) {
- ret = -EFAULT;
- elem->consumed_len = cons_len;
+ chunk = elem->consumed_len - cons_len;
+
+ n = copy_to_user(buf + pos, elem->str + cons_len, chunk);
+ if (n) {
+ /* Keep any successfully copied bytes; -EFAULT only if none. */
+ elem->consumed_len -= n;
+ rem_len += n;
+ ret = (len == rem_len) ? -EFAULT : 0;
break;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0138/2151] bpf: Reject oversized bpf_stream_vprintk output with -E2BIG
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (136 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0137/2151] bpf: Return partial progress from bpf_stream_read on fault Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0139/2151] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs Greg Kroah-Hartman
` (744 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jianlin Shi, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jianlin Shi <shijianlin11@foxmail.com>
[ Upstream commit 41c0348f6e65c26df4866d5dc96c57b1995fe36c ]
bstr_printf() returns the would-be length excluding the trailing NUL.
When that value is >= MAX_BPRINTF_BUF the message was truncated, but
bpf_stream_push_str() still tried to allocate with the inflated length
and failed with -ENOMEM. The boundary case of exactly MAX_BPRINTF_BUF
could also copy the trailing NUL into the stream element.
Reject such lengths with -E2BIG before charging stream capacity, and
tighten bpf_stream_elem_alloc() to accept only payloads strictly shorter
than the bprintf buffer.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Signed-off-by: Jianlin Shi <shijianlin11@foxmail.com>
Link: https://lore.kernel.org/r/74387ae5024d7e2996095e97211430285095b525.1787492521.git.shijianlin11@foxmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/stream.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/kernel/bpf/stream.c b/kernel/bpf/stream.c
index 62af66d6ee391..9a65fd2c918c1 100644
--- a/kernel/bpf/stream.c
+++ b/kernel/bpf/stream.c
@@ -165,11 +165,11 @@ static struct bpf_stream_elem *bpf_stream_elem_alloc(int len)
BUILD_BUG_ON(max_len > BPF_STREAM_PAGE_SZ);
/*
- * Length denotes the amount of data to be written as part of stream element,
- * thus includes '\0' byte. We're capped by how much bpf_bprintf_buffers can
- * accomodate, therefore deny allocations that won't fit into them.
+ * Length is the payload pushed into the stream, excluding the
+ * trailing NUL of the bprintf buffer. Reject anything that cannot
+ * fit without copying that NUL into the stream element.
*/
- if (len < 0 || len > max_len)
+ if (len < 0 || len >= max_len)
return NULL;
if (!bpf_stream_page_local_lock(&flags))
@@ -389,6 +389,11 @@ __bpf_kfunc int bpf_stream_vprintk_impl(int stream_id, const char *fmt__str, con
return ret;
ret = bstr_printf(data.buf, MAX_BPRINTF_BUF, fmt__str, data.bin_args);
+ /* Truncation: reject before capacity charge (not -ENOMEM). */
+ if (ret >= MAX_BPRINTF_BUF) {
+ bpf_bprintf_cleanup(&data);
+ return -E2BIG;
+ }
/* Exclude NULL byte during push. */
ret = bpf_stream_push_str(stream, data.buf, ret);
bpf_bprintf_cleanup(&data);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0139/2151] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (137 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0138/2151] bpf: Reject oversized bpf_stream_vprintk output with -E2BIG Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0140/2151] bpf: Reject oversized stream read buffers Greg Kroah-Hartman
` (743 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Boris Brezillon, Nicolas Frattaroli,
Liviu Dudau, Steven Price, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
[ Upstream commit 2d354adc5bbabe2e818be09bbe13f6bfde4a30c7 ]
panthor_gpu_soft_reset() sets pending_reqs to 0 without taking the
requisite reqs_lock.
Fix this by taking the lock for the duration of the modification.
Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260812-panthor-cache-flush-fix-v4-3-751e32901898@collabora.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/panthor/panthor_gpu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c
index 77d0f4ced1206..7f2dc65386fd4 100644
--- a/drivers/gpu/drm/panthor/panthor_gpu.c
+++ b/drivers/gpu/drm/panthor/panthor_gpu.c
@@ -334,7 +334,10 @@ int panthor_gpu_soft_reset(struct panthor_device *ptdev)
return -ETIMEDOUT;
}
- ptdev->gpu->pending_reqs = 0;
+ scoped_guard(spinlock, &ptdev->gpu->reqs_lock) {
+ ptdev->gpu->pending_reqs = 0;
+ }
+
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0140/2151] bpf: Reject oversized stream read buffers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (138 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0139/2151] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0141/2151] gpio: pcf857x: implement get_direction() Greg Kroah-Hartman
` (742 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kumar Kartikeya Dwivedi,
Daniel Borkmann, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
[ Upstream commit ea0b60fae724aa1147d4a07eda5131d3a9a9977e ]
BPF_PROG_STREAM_READ_BY_FD exposes stream_buf_len as a u32, but the
internal stream reader accepts an int. Values above INT_MAX therefore
become negative before bpf_stream_read(), producing negative consumption
lengths. The generic usercopy size check prevents the oversized copy, but
emits a warning and reports EFAULT for an unchecked argument.
Change bpf_prog_stream_read() to accept u32 and reject values that the
signed reader cannot represent.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20260823193202.2389715-2-memxor@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/bpf.h | 2 +-
kernel/bpf/stream.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index d018a74a882d0..d551905c8aae9 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -3712,7 +3712,7 @@ void bpf_put_buffers(void);
void bpf_prog_stream_init(struct bpf_prog *prog);
void bpf_prog_stream_free(struct bpf_prog *prog);
-int bpf_prog_stream_read(struct bpf_prog *prog, enum bpf_stream_id stream_id, void __user *buf, int len);
+int bpf_prog_stream_read(struct bpf_prog *prog, enum bpf_stream_id stream_id, void __user *buf, u32 len);
void bpf_stream_stage_init(struct bpf_stream_stage *ss);
void bpf_stream_stage_free(struct bpf_stream_stage *ss);
__printf(2, 3)
diff --git a/kernel/bpf/stream.c b/kernel/bpf/stream.c
index 9a65fd2c918c1..31ee75cba52df 100644
--- a/kernel/bpf/stream.c
+++ b/kernel/bpf/stream.c
@@ -346,13 +346,15 @@ static int bpf_stream_read(struct bpf_stream *stream, void __user *buf, int len)
return ret ? ret : len - rem_len;
}
-int bpf_prog_stream_read(struct bpf_prog *prog, enum bpf_stream_id stream_id, void __user *buf, int len)
+int bpf_prog_stream_read(struct bpf_prog *prog, enum bpf_stream_id stream_id, void __user *buf, u32 len)
{
struct bpf_stream *stream;
stream = bpf_stream_get(stream_id, prog->aux);
if (!stream)
return -ENOENT;
+ if (len > INT_MAX)
+ return -EINVAL;
return bpf_stream_read(stream, buf, len);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0141/2151] gpio: pcf857x: implement get_direction()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (139 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0140/2151] bpf: Reject oversized stream read buffers Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0142/2151] drm/vkms: Fix limited-range YCbCr to RGB conversion scaling Greg Kroah-Hartman
` (741 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tapio Reijonen, Linus Walleij,
Bartosz Golaszewski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tapio Reijonen <tapio.reijonen@vaisala.com>
[ Upstream commit ed14364ae8c310cc3f3f649ffcbc7f82befe1579 ]
The GPIO core warns (and taints the kernel) when a gpiochip lacks
.get_direction() and a consumer queries a line's direction, for example
via /sys/kernel/debug/gpio. pcf857x provided direction_input/output but
no get_direction.
These quasi-bidirectional expanders cannot report direction in hardware,
and the 'out' software latch alone is ambiguous - a released (input)
line and an output driven high both read back as a set bit. Track the
direction explicitly in a 'dir' latch updated by the direction_input(),
direction_output() and set_multiple() paths, and return it from
get_direction(). Initialise it from the same reset state as 'out':
released lines are inputs, lines flagged in the power-on latch are
driven-low outputs.
Fixes: 15fae37d9f5f ("gpiolib: pcf857x i2c gpio expander support")
Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260825-b4-gpio-pcf857x-get-direction-v1-1-de15996ae354@vaisala.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpio/gpio-pcf857x.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index 3b9de8c3d924c..026bae735a577 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -70,8 +70,9 @@ MODULE_DEVICE_TABLE(of, pcf857x_of_table);
struct pcf857x {
struct gpio_chip chip;
struct i2c_client *client;
- struct mutex lock; /* protect 'out' */
+ struct mutex lock; /* protect 'out' and 'dir' */
unsigned int out; /* software latch */
+ unsigned int dir; /* direction latch (1 = input) */
unsigned int status; /* current status */
unsigned int irq_enabled; /* enabled irqs */
@@ -124,12 +125,21 @@ static int pcf857x_input(struct gpio_chip *chip, unsigned int offset)
mutex_lock(&gpio->lock);
gpio->out |= (1 << offset);
+ gpio->dir |= (1 << offset);
status = gpio->write(gpio->client, gpio->out);
mutex_unlock(&gpio->lock);
return status;
}
+static int pcf857x_get_direction(struct gpio_chip *chip, unsigned int offset)
+{
+ struct pcf857x *gpio = gpiochip_get_data(chip);
+
+ return (gpio->dir & (1 << offset)) ? GPIO_LINE_DIRECTION_IN
+ : GPIO_LINE_DIRECTION_OUT;
+}
+
static int pcf857x_get(struct gpio_chip *chip, unsigned int offset)
{
struct pcf857x *gpio = gpiochip_get_data(chip);
@@ -165,6 +175,7 @@ static int pcf857x_output(struct gpio_chip *chip, unsigned int offset, int value
gpio->out |= bit;
else
gpio->out &= ~bit;
+ gpio->dir &= ~bit;
status = gpio->write(gpio->client, gpio->out);
mutex_unlock(&gpio->lock);
@@ -185,6 +196,7 @@ static int pcf857x_set_multiple(struct gpio_chip *chip, unsigned long *mask,
mutex_lock(&gpio->lock);
gpio->out &= ~*mask;
gpio->out |= *bits & *mask;
+ gpio->dir &= ~*mask;
status = gpio->write(gpio->client, gpio->out);
mutex_unlock(&gpio->lock);
@@ -299,6 +311,7 @@ static int pcf857x_probe(struct i2c_client *client)
gpio->chip.set_multiple = pcf857x_set_multiple;
gpio->chip.direction_input = pcf857x_input;
gpio->chip.direction_output = pcf857x_output;
+ gpio->chip.get_direction = pcf857x_get_direction;
gpio->chip.ngpio = (uintptr_t)i2c_get_match_data(client);
reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_HIGH);
@@ -394,6 +407,7 @@ static int pcf857x_probe(struct i2c_client *client)
* reset state. Otherwise it flags pins to be driven low.
*/
gpio->out = ~n_latch;
+ gpio->dir = ~n_latch;
gpio->status = gpio->read(gpio->client);
/* Enable irqchip if we have an interrupt */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0142/2151] drm/vkms: Fix limited-range YCbCr to RGB conversion scaling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (140 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0141/2151] gpio: pcf857x: implement get_direction() Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0143/2151] bpftool: Fix spurious batch file read error Greg Kroah-Hartman
` (740 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Harry Wentland, Alex Hung,
Robert Mader, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Harry Wentland <harry.wentland@amd.com>
[ Upstream commit 8af5fccd9e8af443efd6f0fec5ba56366f57309a ]
The limited-/studio-range YCbCr to RGB conversion matrices were generated
with colour.matrix_YCbCr(is_legal=True, bits=8), which normalises the
narrow range by 2^bits (256 for 8-bit) rather than by the full-range
maximum 2^bits - 1 (255). As a result the luma scale was 256/219 and the
chroma scale 256/224 instead of the correct 255/219 and 255/224.
This over-scales every limited-range conversion by a factor of 256/255,
producing an error of up to ~3/255 (8-bit) and causing IGT tests that
compare software-computed surfaces against VKMS-processed ones to fail.
Recompute the three limited-range matrices from first principles rather
than relying on colour's is_legal scaling:
1. Start from the standard ITU-R YCbCr -> RGB relations for the luma
weights Kr, Kb (Kg = 1 - Kr - Kb) of each encoding (BT.601, BT.709
and BT.2020 non-constant luminance). These are the same relations
that produce the existing full-range matrices.
2. Expand the studio input range to full range relative to a full-range
maximum of 2^n - 1: the luma coefficient by 255/(235 - 16) and the
chroma coefficients by 255/(240 - 16). This matches the DRM UAPI
definition and IGT's igt_ycbcr_to_rgb_matrix().
3. Convert each coefficient to S31.32 fixed point (round(coeff * 2^32)).
Update the limited-range reference values in the vkms-format KUnit test
accordingly. Provide a python script to show how the kunit test value
are calculated.
Fixes: fe22d21e9342 ("drm/vkms: Add YUV support")
Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Tested-by: Robert Mader <robert.mader@collabora.com>
Link: https://patch.msgid.link/20260814211816.1219597-3-harry.wentland@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../gpu/drm/vkms/tests/gen_yuv_conversion.py | 87 +++++++++++++++++++
drivers/gpu/drm/vkms/tests/vkms_format_test.c | 38 ++++----
drivers/gpu/drm/vkms/vkms_formats.c | 55 ++++++++----
3 files changed, 144 insertions(+), 36 deletions(-)
create mode 100755 drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py
diff --git a/drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py b/drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py
new file mode 100755
index 0000000000000..f4d226137cc2f
--- /dev/null
+++ b/drivers/gpu/drm/vkms/tests/gen_yuv_conversion.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-2.0+
+"""
+Derive the VKMS YCbCr -> RGB conversion constants and the vkms-format KUnit
+reference values.
+
+It produces:
+ 1. The S31.32 fixed-point conversion matrices used in
+ drivers/gpu/drm/vkms/vkms_formats.c and asserted by
+ vkms_format_test_conversion_matrix.
+ 2. The 16-bit reference YCbCr inputs for the limited-range
+ yuv_u16_to_argb_u16 round-trip cases (the values changed by the fix).
+
+Requires numpy.
+"""
+
+import numpy as np
+
+FP = 1 << 32 # S31.32 scale: fixed = round(coeff * 2^32)
+
+# ITU-R luma weights (Kr, Kb); Kg = 1 - Kr - Kb.
+ENCODINGS = {
+ "BT601": (0.299, 0.114),
+ "BT709": (0.2126, 0.0722),
+ "BT2020": (0.2627, 0.0593), # non-constant luminance
+}
+
+# 8-bit studio-range levels: luma 16..235 (range 219), chroma 16..240
+# (range 224, neutral 128); full-range maximum is 2^n - 1 = 255.
+FULL_MAX = 255
+Y_RANGE = 235 - 16 # 219
+C_RANGE = 240 - 16 # 224
+
+# 16-bit RGB test colors.
+COLORS = {
+ "white": (0xffff, 0xffff, 0xffff),
+ "gray": (0x8080, 0x8080, 0x8080),
+ "black": (0x0000, 0x0000, 0x0000),
+ "red": (0xffff, 0x0000, 0x0000),
+ "green": (0x0000, 0xffff, 0x0000),
+ "blue": (0x0000, 0x0000, 0xffff),
+}
+
+
+def rgb_matrix(kr, kb, limited):
+ """Normalized YCbCr -> RGB (Y in [0,1], Cb/Cr in [-0.5, 0.5])."""
+ kg = 1.0 - kr - kb
+ # Standard full-range relations.
+ m = [[1.0, 0.0, 2 * (1 - kr)],
+ [1.0, -2 * (1 - kb) * kb / kg, -2 * (1 - kr) * kr / kg],
+ [1.0, 2 * (1 - kb), 0.0]]
+ if limited:
+ # Expand studio input range to full range: luma by 255/219,
+ # chroma by 255/224 (relative to full-range maximum 2^n - 1).
+ ys, cs = FULL_MAX / Y_RANGE, FULL_MAX / C_RANGE
+ m = [[r[0] * ys, r[1] * cs, r[2] * cs] for r in m]
+ return m
+
+
+def ref_yuv(m, y_offset):
+ """16-bit YCbCr that VKMS decodes back to each RGB color.
+
+ VKMS decode: [R,G,B] = M . [Y - y_offset*257, Cb - 128*257, Cr - 128*257]
+ (8-bit offsets lifted to 16-bit by *257 = 65535/255), so invert and
+ re-add the offsets.
+ """
+ inv = np.linalg.inv(np.array(m, float))
+ off = np.array([y_offset * 257, 128 * 257, 128 * 257])
+ return {name: tuple(int(min(max(round(v), 0), 0xffff))
+ for v in inv @ np.array(rgb, float) + off)
+ for name, rgb in COLORS.items()}
+
+print(f"== RGB REFERENCE VALUES ==")
+for name, rgb in COLORS.items():
+ print(f" {name:6} {{ {rgb[0]:#06x}, {rgb[1]:#06x}, {rgb[2]:#06x} }}")
+print()
+
+for enc, (kr, kb) in ENCODINGS.items():
+ for limited in (False, True):
+ m = rgb_matrix(kr, kb, limited)
+ y_offset = 16 if limited else 0
+ print(f"== {enc} {'LIMITED' if limited else 'FULL'} (y_offset={y_offset}) ==")
+ for row in m:
+ print(" { " + ", ".join(str(round(v * FP)) for v in row) + " },")
+ for name, yuv in ref_yuv(m, y_offset).items():
+ print(f" {name:6} {{ {yuv[0]:#06x}, {yuv[1]:#06x}, {yuv[2]:#06x} }}")
+ print()
diff --git a/drivers/gpu/drm/vkms/tests/vkms_format_test.c b/drivers/gpu/drm/vkms/tests/vkms_format_test.c
index a7788fbc45dcc..d2ae6321383b7 100644
--- a/drivers/gpu/drm/vkms/tests/vkms_format_test.c
+++ b/drivers/gpu/drm/vkms/tests/vkms_format_test.c
@@ -54,6 +54,8 @@ struct yuv_u16_to_argb_u16_case {
* The YUV color representation were acquired via the colour python framework.
* Below are the function calls used for generating each case.
*
+ * The limited-range cases are generated by gen_yuv_conversion.py.
+ *
* For more information got to the docs:
* https://colour.readthedocs.io/en/master/generated/colour.RGB_to_YCbCr.html
*/
@@ -101,12 +103,12 @@ static struct yuv_u16_to_argb_u16_case yuv_u16_to_argb_u16_cases[] = {
.range = DRM_COLOR_YCBCR_LIMITED_RANGE,
.n_colors = 6,
.colors = {
- { "white", { 0xeb00, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
- { "gray", { 0x7dee, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
- { "black", { 0x1000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
- { "red", { 0x517b, 0x5a34, 0xf000 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
- { "green", { 0x908e, 0x35cc, 0x2237 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
- { "blue", { 0x28f7, 0xf000, 0x6dc9 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
+ { "white", { 0xebeb, 0x8080, 0x8080 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
+ { "gray", { 0x7e6c, 0x8080, 0x8080 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
+ { "black", { 0x1010, 0x8080, 0x8080 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
+ { "red", { 0x51cd, 0x5a8e, 0xf0f0 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
+ { "green", { 0x911e, 0x3602, 0x2259 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
+ { "blue", { 0x2920, 0xf0f0, 0x6e37 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
}
},
/*
@@ -151,12 +153,12 @@ static struct yuv_u16_to_argb_u16_case yuv_u16_to_argb_u16_cases[] = {
.range = DRM_COLOR_YCBCR_LIMITED_RANGE,
.n_colors = 6,
.colors = {
- { "white", { 0xeb00, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
- { "gray", { 0x7dee, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
- { "black", { 0x1000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
- { "red", { 0x3e8f, 0x6656, 0xf000 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
- { "green", { 0xaca1, 0x29aa, 0x1a45 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
- { "blue", { 0x1fd0, 0xf000, 0x75bb }, { 0xffff, 0x0000, 0x0000, 0xffff }},
+ { "white", { 0xebeb, 0x8080, 0x8080 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
+ { "gray", { 0x7e6c, 0x8080, 0x8080 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
+ { "black", { 0x1010, 0x8080, 0x8080 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
+ { "red", { 0x3ece, 0x66bc, 0xf0f0 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
+ { "green", { 0xad4e, 0x29d4, 0x1a5f }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
+ { "blue", { 0x1ff0, 0xf0f0, 0x7631 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
}
},
/*
@@ -201,12 +203,12 @@ static struct yuv_u16_to_argb_u16_case yuv_u16_to_argb_u16_cases[] = {
.range = DRM_COLOR_YCBCR_LIMITED_RANGE,
.n_colors = 6,
.colors = {
- { "white", { 0xeb00, 0x8000, 0x8000 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
- { "gray", { 0x7dee, 0x8000, 0x8000 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
- { "black", { 0x1000, 0x8000, 0x8000 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
- { "red", { 0x4988, 0x60b9, 0xf000 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
- { "green", { 0xa47b, 0x2f47, 0x1902 }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
- { "blue", { 0x1cfd, 0xf000, 0x76fe }, { 0xffff, 0x0000, 0x0000, 0xffff }},
+ { "white", { 0xebeb, 0x8080, 0x8080 }, { 0xffff, 0xffff, 0xffff, 0xffff }},
+ { "gray", { 0x7e6c, 0x8080, 0x8080 }, { 0xffff, 0x8080, 0x8080, 0x8080 }},
+ { "black", { 0x1010, 0x8080, 0x8080 }, { 0xffff, 0x0000, 0x0000, 0x0000 }},
+ { "red", { 0x49d2, 0x611a, 0xf0f0 }, { 0xffff, 0xffff, 0x0000, 0x0000 }},
+ { "green", { 0xa520, 0x2f76, 0x191b }, { 0xffff, 0x0000, 0xffff, 0x0000 }},
+ { "blue", { 0x1d1a, 0xf0f0, 0x7775 }, { 0xffff, 0x0000, 0x0000, 0xffff }},
}
},
};
diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c
index dfb8e13cba87a..4d5fcaeb82c58 100644
--- a/drivers/gpu/drm/vkms/vkms_formats.c
+++ b/drivers/gpu/drm/vkms/vkms_formats.c
@@ -788,15 +788,36 @@ static const struct conversion_matrix yuv_bt601_full = {
};
/*
- * numpy.around(colour.matrix_YCbCr(K=colour.WEIGHTS_YCBCR["ITU-R BT.601"],
- * is_legal = True,
- * bits = 8) * 2**32).astype(int)
+ * BT.601 limited-/studio-range YCbCr to full-range RGB.
+ *
+ * The coefficients are derived as follows:
+ *
+ * 1. Take the standard ITU-R YCbCr -> RGB relations for luma weights
+ * Kr, Kb (Kg = 1 - Kr - Kb), with Y in [0, 1] and Cb, Cr in
+ * [-0.5, 0.5]. For BT.601 Kr = 0.299 and Kb = 0.114:
+ *
+ * R = Y + 2 * (1 - Kr) * Cr
+ * G = Y - 2 * (1 - Kb) * Kb / Kg * Cb - 2 * (1 - Kr) * Kr / Kg * Cr
+ * B = Y + 2 * (1 - Kb) * Cb
+ *
+ * These are exactly the yuv_bt601_full coefficients above.
+ *
+ * 2. Expand the studio input range to full range, relative to a
+ * full-range maximum of 2^n - 1 (255 for 8-bit): the luma
+ * coefficient is scaled by 255/(235 - 16) and the chroma
+ * coefficients by 255/(240 - 16). This matches the DRM UAPI
+ * definition and IGT's igt_ycbcr_to_rgb_matrix(). Note this differs
+ * from colour.matrix_YCbCr(is_legal=True), which normalises by 2^n
+ * and is thus off by a factor of 256/255.
+ *
+ * 3. Convert each coefficient to S31.32 fixed point, i.e.
+ * round(coeff * 2^32).
*/
static const struct conversion_matrix yuv_bt601_limited = {
.matrix = {
- { 5020601039, 0, 6881764740 },
- { 5020601039, -1689204679, -3505362278 },
- { 5020601039, 8697922339, 0 },
+ { 5000989317, 0, 6854882848 },
+ { 5000989317, -1682606224, -3491669458 },
+ { 5000989317, 8663946082, 0 },
},
.y_offset = 16,
};
@@ -816,15 +837,14 @@ static const struct conversion_matrix yuv_bt709_full = {
};
/*
- * numpy.around(colour.matrix_YCbCr(K=colour.WEIGHTS_YCBCR["ITU-R BT.709"],
- * is_legal = True,
- * bits = 8) * 2**32).astype(int)
+ * BT.709 limited-range YCbCr to full-range RGB (Kr = 0.2126, Kb = 0.0722).
+ * Derived as described for yuv_bt601_limited.
*/
static const struct conversion_matrix yuv_bt709_limited = {
.matrix = {
- { 5020601039, 0, 7729959424 },
- { 5020601039, -919487572, -2297803934 },
- { 5020601039, 9108275786, 0 },
+ { 5000989317, 0, 7699764272 },
+ { 5000989317, -915895824, -2288828138 },
+ { 5000989317, 9072696586, 0 },
},
.y_offset = 16,
};
@@ -844,15 +864,14 @@ static const struct conversion_matrix yuv_bt2020_full = {
};
/*
- * numpy.around(colour.matrix_YCbCr(K=colour.WEIGHTS_YCBCR["ITU-R BT.2020"],
- * is_legal = True,
- * bits = 8) * 2**32).astype(int)
+ * BT.2020 non-constant-luminance limited-range YCbCr to full-range RGB
+ * (Kr = 0.2627, Kb = 0.0593). Derived as described for yuv_bt601_limited.
*/
static const struct conversion_matrix yuv_bt2020_limited = {
.matrix = {
- { 5020601039, 0, 7238124312 },
- { 5020601039, -807714626, -2804506279 },
- { 5020601039, 9234915964, 0 },
+ { 5000989317, 0, 7209850391 },
+ { 5000989317, -804559491, -2793551177 },
+ { 5000989317, 9198842076, 0 },
},
.y_offset = 16,
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0143/2151] bpftool: Fix spurious batch file read error
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (141 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0142/2151] drm/vkms: Fix limited-range YCbCr to RGB conversion scaling Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0144/2151] regulator: fixed: reject incompatible platform devices Greg Kroah-Hartman
` (739 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yuan Chen, Andrii Nakryiko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuan Chen <chenyuan_fl@163.com>
[ Upstream commit 713c02b59e21840f623a3e31c43d967026c75181 ]
do_batch() checks errno after the read loop to detect read failures,
but fgets() does not clear errno on success, so a stale errno left by
a previously executed command (e.g. map dump's EBADF from a double
close) makes bpftool report a batch file read failure and exit with an
error even though every command succeeded.
Clear errno before each fgets() call, so the post-loop check only
sees the outcome of the last read: zero on success or EOF, E2BIG for
an overlong line, and a genuine errno when fgets() fails.
Since errno is now reset before every read in batch mode, drop the
USE_LIBCAP errno reset in main() that existed only to keep errno clean
for the batch mode.
Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool")
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260824092657.1789956-2-chenyuan_fl@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/main.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c
index a829a6a49037a..429376d1f5446 100644
--- a/tools/bpf/bpftool/main.c
+++ b/tools/bpf/bpftool/main.c
@@ -358,7 +358,11 @@ static int do_batch(int argc, char **argv)
if (json_output)
jsonw_start_array(json_wtr);
- while (fgets(buf, sizeof(buf), fp)) {
+ for (;;) {
+ errno = 0;
+ if (!fgets(buf, sizeof(buf), fp))
+ break;
+
cp = strchr(buf, '#');
if (cp)
*cp = '\0';
@@ -460,16 +464,6 @@ int main(int argc, char **argv)
setlinebuf(stdout);
-#ifdef USE_LIBCAP
- /* Libcap < 2.63 hooks before main() to compute the number of
- * capabilities of the running kernel, and doing so it calls prctl()
- * which may fail and set errno to non-zero.
- * Let's reset errno to make sure this does not interfere with the
- * batch mode.
- */
- errno = 0;
-#endif
-
last_do_help = do_help;
pretty_output = false;
json_output = false;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0144/2151] regulator: fixed: reject incompatible platform devices
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (142 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0143/2151] bpftool: Fix spurious batch file read error Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0145/2151] spi: sh-msiof: propagate setup runtime-PM errors Greg Kroah-Hartman
` (738 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+bfc9e55cf4f98183c636,
Chandradhar Kumar, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandradhar Kumar <chandradhar.2003@gmail.com>
[ Upstream commit f7396c2dbbc1bed6c2c554d1ddf80d16e4780a7d ]
The fixed regulator driver expects non-DT platform devices to provide
their configuration through platform_data as a struct fixed_voltage_config.
An explicitly bound driver can bypass the normal platform device/driver
matching and attach the fixed regulator driver to an unrelated platform
device. This causes the driver's platform_data to be interpreted as a
struct fixed_voltage_config even though it contains data for a different
device.
Reject non-DT platform devices whose name does not match the fixed
regulator driver before accessing their platform data.
Fixes: 4b74ff651249 ("regulator: add support for fixed regulators.")
Reported-by: syzbot+bfc9e55cf4f98183c636@syzkaller.appspotmail.com
Closes: https://syzbot.org/bug?extid=bfc9e55cf4f98183c636
Signed-off-by: Chandradhar Kumar <chandradhar.2003@gmail.com>
Link: https://patch.msgid.link/20260822065519.112441-1-chandradhar.2003@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/fixed.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 254c0a8a45559..0f5451532c883 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -29,6 +29,7 @@
#include <linux/regulator/of_regulator.h>
#include <linux/regulator/machine.h>
#include <linux/clk.h>
+#include <linux/string.h>
/* Default time in millisecond to wait for emergency shutdown */
#define FV_DEF_EMERG_SHUTDWN_TMO 10
@@ -229,6 +230,9 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
enum gpiod_flags gflags;
int ret;
+ if (!pdev->dev.of_node && strcmp(pdev->name, "reg-fixed-voltage"))
+ return -ENODEV;
+
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct fixed_voltage_data),
GFP_KERNEL);
if (!drvdata)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0145/2151] spi: sh-msiof: propagate setup runtime-PM errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (143 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0144/2151] regulator: fixed: reject incompatible platform devices Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0146/2151] iio: humidity: hts221: report available values via read_avail() Greg Kroah-Hartman
` (737 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 152867998da9f331d6235d76aae1c7e1650708a9 ]
sh_msiof_spi_setup() ignores pm_runtime_get_sync() before programming
native chip-select registers and marking the configuration initialized.
Use the checked runtime-PM helper and return failure before register
access.
Fixes: 7ff0b53c4051 ("spi: sh-msiof: Avoid writing to registers from spi_master.setup()")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260830140133.24156-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-sh-msiof.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index a4ae96290aa24..8880f4da9b0fd 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -453,6 +453,7 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
struct sh_msiof_spi_priv *p =
spi_controller_get_devdata(spi->controller);
u32 clr, set, tmp;
+ int ret;
if (spi_get_csgpiod(spi, 0) || spi_controller_is_target(p->ctlr))
return 0;
@@ -468,7 +469,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
clr |= SIMDR1_SYNCAC;
else
set |= SIMDR1_SYNCAC;
- pm_runtime_get_sync(&p->pdev->dev);
+ ret = pm_runtime_resume_and_get(&p->pdev->dev);
+ if (ret < 0)
+ return ret;
tmp = sh_msiof_read(p, SITMDR1) & ~clr;
sh_msiof_write(p, SITMDR1, tmp | set | SIMDR1_TRMD | SITMDR1_PCON);
tmp = sh_msiof_read(p, SIRMDR1) & ~clr;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0146/2151] iio: humidity: hts221: report available values via read_avail()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (144 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0145/2151] spi: sh-msiof: propagate setup runtime-PM errors Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0147/2151] dt-bindings: iio: light: ltr501: Sort compatible enum array Greg Kroah-Hartman
` (736 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Adi Nata, Andy Shevchenko,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adi Nata <adinata.softwareengineer@gmail.com>
[ Upstream commit 003e99cf33e344a380ba10b3e04ccb862f3d9dc3 ]
Replace the custom oversampling_ratio_available sysfs attributes with
the standard IIO read_avail() callback. This lets the IIO core create
and format *_available attributes and exposes the lists to
in-kernel consumers.
As a consequence, the incorrectly named
in_humidity_oversampling_ratio_available attribute is replaced by the
standard in_humidityrelative_oversampling_ratio_available name for the
IIO_HUMIDITYRELATIVE channel. The temperature oversampling and sampling
frequency available attribute names are unchanged.
Fixes: e4a70e3e7d84 ("iio: humidity: add support to hts221 rh/temp combo device")
Signed-off-by: Adi Nata <adinata.softwareengineer@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/humidity/hts221_core.c | 106 +++++++++++------------------
1 file changed, 40 insertions(+), 66 deletions(-)
diff --git a/drivers/iio/humidity/hts221_core.c b/drivers/iio/humidity/hts221_core.c
index bfeb0a60d3afe..76a391f421f5e 100644
--- a/drivers/iio/humidity/hts221_core.c
+++ b/drivers/iio/humidity/hts221_core.c
@@ -10,7 +10,6 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
-#include <linux/iio/sysfs.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/regmap.h>
@@ -49,7 +48,7 @@ struct hts221_odr {
struct hts221_avg {
u8 addr;
u8 mask;
- u16 avg_avl[HTS221_AVG_DEPTH];
+ int avg_avl[HTS221_AVG_DEPTH];
};
static const struct hts221_odr hts221_odr_table[] = {
@@ -58,6 +57,8 @@ static const struct hts221_odr hts221_odr_table[] = {
{ 13, 0x03 }, /* 12.5Hz */
};
+static const int hts221_odr_avail[] = { 1, 7, 13 };
+
static const struct hts221_avg hts221_avg_list[] = {
{
.addr = 0x10,
@@ -97,7 +98,11 @@ static const struct iio_chan_spec hts221_channels[] = {
BIT(IIO_CHAN_INFO_OFFSET) |
BIT(IIO_CHAN_INFO_SCALE) |
BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
+ .info_mask_separate_available =
+ BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),
+ .info_mask_shared_by_all_available =
+ BIT(IIO_CHAN_INFO_SAMP_FREQ),
.scan_index = 0,
.scan_type = {
.sign = 's',
@@ -113,7 +118,11 @@ static const struct iio_chan_spec hts221_channels[] = {
BIT(IIO_CHAN_INFO_OFFSET) |
BIT(IIO_CHAN_INFO_SCALE) |
BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
+ .info_mask_separate_available =
+ BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO),
.info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ),
+ .info_mask_shared_by_all_available =
+ BIT(IIO_CHAN_INFO_SAMP_FREQ),
.scan_index = 1,
.scan_type = {
.sign = 's',
@@ -192,53 +201,35 @@ static int hts221_update_avg(struct hts221_hw *hw,
return 0;
}
-static ssize_t hts221_sysfs_sampling_freq(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- int i;
- ssize_t len = 0;
-
- for (i = 0; i < ARRAY_SIZE(hts221_odr_table); i++)
- len += scnprintf(buf + len, PAGE_SIZE - len, "%d ",
- hts221_odr_table[i].hz);
- buf[len - 1] = '\n';
-
- return len;
-}
-
-static ssize_t
-hts221_sysfs_rh_oversampling_avail(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- const struct hts221_avg *avg = &hts221_avg_list[HTS221_SENSOR_H];
- ssize_t len = 0;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++)
- len += scnprintf(buf + len, PAGE_SIZE - len, "%d ",
- avg->avg_avl[i]);
- buf[len - 1] = '\n';
-
- return len;
-}
-
-static ssize_t
-hts221_sysfs_temp_oversampling_avail(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static int hts221_read_avail(struct iio_dev *indio_dev,
+ struct iio_chan_spec const *chan,
+ const int **vals, int *type, int *length,
+ long mask)
{
- const struct hts221_avg *avg = &hts221_avg_list[HTS221_SENSOR_T];
- ssize_t len = 0;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(avg->avg_avl); i++)
- len += scnprintf(buf + len, PAGE_SIZE - len, "%d ",
- avg->avg_avl[i]);
- buf[len - 1] = '\n';
-
- return len;
+ switch (mask) {
+ case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
+ switch (chan->type) {
+ case IIO_HUMIDITYRELATIVE:
+ *vals = hts221_avg_list[HTS221_SENSOR_H].avg_avl;
+ *length = ARRAY_SIZE(hts221_avg_list[HTS221_SENSOR_H].avg_avl);
+ break;
+ case IIO_TEMP:
+ *vals = hts221_avg_list[HTS221_SENSOR_T].avg_avl;
+ *length = ARRAY_SIZE(hts221_avg_list[HTS221_SENSOR_T].avg_avl);
+ break;
+ default:
+ return -EINVAL;
+ }
+ *type = IIO_VAL_INT;
+ return IIO_AVAIL_LIST;
+ case IIO_CHAN_INFO_SAMP_FREQ:
+ *vals = hts221_odr_avail;
+ *type = IIO_VAL_INT;
+ *length = ARRAY_SIZE(hts221_odr_avail);
+ return IIO_AVAIL_LIST;
+ default:
+ return -EINVAL;
+ }
}
int hts221_set_enable(struct hts221_hw *hw, bool enable)
@@ -521,27 +512,10 @@ static int hts221_validate_trigger(struct iio_dev *iio_dev,
return hw->trig == trig ? 0 : -EINVAL;
}
-static IIO_DEVICE_ATTR(in_humidity_oversampling_ratio_available, S_IRUGO,
- hts221_sysfs_rh_oversampling_avail, NULL, 0);
-static IIO_DEVICE_ATTR(in_temp_oversampling_ratio_available, S_IRUGO,
- hts221_sysfs_temp_oversampling_avail, NULL, 0);
-static IIO_DEV_ATTR_SAMP_FREQ_AVAIL(hts221_sysfs_sampling_freq);
-
-static struct attribute *hts221_attributes[] = {
- &iio_dev_attr_sampling_frequency_available.dev_attr.attr,
- &iio_dev_attr_in_humidity_oversampling_ratio_available.dev_attr.attr,
- &iio_dev_attr_in_temp_oversampling_ratio_available.dev_attr.attr,
- NULL,
-};
-
-static const struct attribute_group hts221_attribute_group = {
- .attrs = hts221_attributes,
-};
-
static const struct iio_info hts221_info = {
- .attrs = &hts221_attribute_group,
.read_raw = hts221_read_raw,
.write_raw = hts221_write_raw,
+ .read_avail = hts221_read_avail,
.validate_trigger = hts221_validate_trigger,
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0147/2151] dt-bindings: iio: light: ltr501: Sort compatible enum array
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (145 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0146/2151] iio: humidity: hts221: report available values via read_avail() Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0148/2151] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Greg Kroah-Hartman
` (735 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski,
Kuppuswamy Sathyanarayanan, Esben Haabendal, Andy Shevchenko,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Esben Haabendal <esben@geanix.com>
[ Upstream commit 6c430006fbcb63dc8baee3c3bf356b264ba7f61e ]
Restore alphabetical sorting of the properties.compatible.enum array.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Acked-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Esben Haabendal <esben@geanix.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Stable-dep-of: 198ed7962e42 ("dt-bindings: iio: light: ltr501: Add missing ltr303 compatible")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
index c8074f180a793..480523ca37500 100644
--- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
+++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
@@ -15,9 +15,9 @@ allOf:
properties:
compatible:
enum:
+ - liteon,ltr301
- liteon,ltr501
- liteon,ltr559
- - liteon,ltr301
reg:
maxItems: 1
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0148/2151] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (146 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0147/2151] dt-bindings: iio: light: ltr501: Sort compatible enum array Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0149/2151] iio: temperature: tmp117: fix calibbias cache update on I2C write failure Greg Kroah-Hartman
` (734 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski,
Kuppuswamy Sathyanarayanan, Esben Haabendal, Andy Shevchenko,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Esben Haabendal <esben@geanix.com>
[ Upstream commit 198ed7962e42f1e45b7f48b9abc70aad9e3185f8 ]
When support for ltr303 was back in 2021, the bindings documentation was
not updated accordingly.
Fixes: 7d71d289e1ba ("iio: light: ltr501: Added ltr303 driver support")
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Acked-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Esben Haabendal <esben@geanix.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
index 480523ca37500..6234e2eaec2e4 100644
--- a/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
+++ b/Documentation/devicetree/bindings/iio/light/liteon,ltr501.yaml
@@ -16,6 +16,7 @@ properties:
compatible:
enum:
- liteon,ltr301
+ - liteon,ltr303
- liteon,ltr501
- liteon,ltr559
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0149/2151] iio: temperature: tmp117: fix calibbias cache update on I2C write failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (147 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0148/2151] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0150/2151] iio: pressure: rohm-bm1390: Fix AVE_NUM initialization Greg Kroah-Hartman
` (733 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Salah Triki, Jonathan Cameron,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Salah Triki <salah.triki@gmail.com>
[ Upstream commit 61fff9cebbfdf39bbd04d366882476d1def14047 ]
The calibbias cache (data->calibbias) was updated before the I2C
write to TMP117_REG_TEMP_OFFSET was known to succeed. If the write
failed, the function correctly returned an error, but the driver's
internal cache had already been updated to the new value.
This causes the cache and the actual hardware register to go out of
sync: a subsequent write of the same value would be silently
skipped by the early "if (off == data->calibbias) return 0;" check,
since the cache matches even though the register was never
successfully updated.
Update data->calibbias only after confirming the I2C write
succeeded, so the cache always reflects the actual state of the
device.
Found by code inspection.
Fixes: df041e737a38 ("iio: temperature: add driver support for ti tmp117")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/temperature/tmp117.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/temperature/tmp117.c b/drivers/iio/temperature/tmp117.c
index 8972083d903a2..ea2d4e0bae871 100644
--- a/drivers/iio/temperature/tmp117.c
+++ b/drivers/iio/temperature/tmp117.c
@@ -95,15 +95,20 @@ static int tmp117_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec
{
struct tmp117_data *data = iio_priv(indio_dev);
s16 off;
+ int ret;
switch (mask) {
case IIO_CHAN_INFO_CALIBBIAS:
off = clamp_t(int, val, S16_MIN, S16_MAX);
if (off == data->calibbias)
return 0;
+
+ ret = i2c_smbus_write_word_swapped(data->client, TMP117_REG_TEMP_OFFSET, off);
+ if (ret)
+ return ret;
+
data->calibbias = off;
- return i2c_smbus_write_word_swapped(data->client,
- TMP117_REG_TEMP_OFFSET, off);
+ return 0;
default:
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0150/2151] iio: pressure: rohm-bm1390: Fix AVE_NUM initialization
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (148 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0149/2151] iio: temperature: tmp117: fix calibbias cache update on I2C write failure Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0151/2151] ata: pata_parport: Fix use-after-free in new_device_store Greg Kroah-Hartman
` (732 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matti Vaittinen, Jonathan Cameron,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matti Vaittinen <mazziesaccount@gmail.com>
[ Upstream commit 64f4173ad1a7f1b247296c84e624f5095be170c7 ]
The BM1390 tries to initialize the AVE_NUM to 110b at the start-up. The
field location is not taken into account, and value is written unsifted.
This causes the AVE_NUM to be initialized to zero.
Use FIELD_PREP() to shift the intended AVE_NUM value to correct field.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes: 81ca5979b6ed ("iio: pressure: Support ROHM BU1390")
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/pressure/rohm-bm1390.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/pressure/rohm-bm1390.c b/drivers/iio/pressure/rohm-bm1390.c
index 3b48c1c86fd2e..f6732781dd567 100644
--- a/drivers/iio/pressure/rohm-bm1390.c
+++ b/drivers/iio/pressure/rohm-bm1390.c
@@ -479,6 +479,7 @@ static const struct iio_info bm1390_info = {
static int bm1390_chip_init(struct bm1390_data *data)
{
+ u8 regval;
int ret;
ret = regmap_write_bits(data->regmap, BM1390_REG_POWER,
@@ -512,8 +513,9 @@ static int bm1390_chip_init(struct bm1390_data *data)
* Default to use IIR filter in "middle" mode. Also the AVE_NUM must
* be fixed when IIR is in use.
*/
+ regval = FIELD_PREP(BM1390_MASK_AVE_NUM, BM1390_IIR_AVE_NUM);
ret = regmap_update_bits(data->regmap, BM1390_REG_MODE_CTRL,
- BM1390_MASK_AVE_NUM, BM1390_IIR_AVE_NUM);
+ BM1390_MASK_AVE_NUM, regval);
if (ret)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0151/2151] ata: pata_parport: Fix use-after-free in new_device_store
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (149 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0150/2151] iio: pressure: rohm-bm1390: Fix AVE_NUM initialization Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0152/2151] ARM: dts: helios4: fix lm75 supply name Greg Kroah-Hartman
` (731 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shuangpeng Bai, Pei Xiao,
Niklas Cassel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pei Xiao <xiaopei01@kylinos.cn>
[ Upstream commit bd46a0b22933fb45f4ff009fa4a3836124df34b3 ]
The function new_device_store() calls driver_find() without any
protection against concurrent driver unregistration. This can lead
to a use-after-free (UAF) when a driver is unloaded (via rmmod)
in parallel with a new device addition via sysfs.
The race window exists because driver_find() returns a pointer to
the driver's private data, but does not increase its reference
count. The caller is responsible for ensuring the driver remains
valid, but new_device_store() did not hold any lock or reference
during the lookup and subsequent use.
Concurrently, pata_parport_unregister_driver() releases the
pi_mutex before calling driver_unregister(), allowing new_device_store
to proceed with a stale pointer after the driver has been freed.
Fix this by expanding the critical section protected by pi_mutex
in both functions:
- In new_device_store(): acquire pi_mutex before calling driver_find(),
and keep it held until all uses of the found driver pointer are
completed.
- In pata_parport_unregister_driver(): hold pi_mutex throughout the
entire unregistration process, including the driver_unregister()
call, so that no concurrent lookup can see a partially removed
driver.
Thread A (new_device_store) | Thread B (pata_parport_unregister_driver)
driver_find("ate") |
| mutex_lock(&pi_mutex)
| idr_remove(&protocols, id)
| mutex_unlock(&pi_mutex)
| driver_unregister(&pr->driver)
| (frees driver_private)
/* continues using stale driv */|
-> UAF! |
Logs:
BUG: KASAN: slab-use-after-free in driver_find+0xd0/0xd4
Read of size 8 at addr ffffff9f970dc690 by task sh/4737
Call trace:
show_stack+0x14/0x1c (C)
dump_stack_lvl+0x70/0x84
print_report+0xf4/0x5a4
kasan_report+0xa0/0xe4
__asan_report_load8_noabort+0x18/0x20
driver_find+0xd0/0xd4
new_device_store+0x140/0x30c [pata_parport]
bus_attr_store+0x5c/0x94
sysfs_kf_write+0x1c4/0x25c
...
Allocated by task 4734:
kasan_save_stack+0x28/0x4c
kasan_save_track+0x1c/0x34
kasan_save_alloc_info+0x3c/0x4c
__kasan_kmalloc+0x98/0xac
__kmalloc_cache_noprof+0x158/0x3cc
bus_add_driver+0x70/0x4d8
driver_register+0xf0/0x3b0
pata_parport_register_driver+0xb8/0x1c4 [pata_parport]
0xffffffc07f5ce014
do_one_initcall+0xb8/0x36c
do_init_module+0x230/0x6d4
...
Freed by task 4737:
kasan_save_stack+0x28/0x4c
kasan_save_track+0x1c/0x34
kasan_save_free_info+0x48/0x8c
__kasan_slab_free+0x5c/0x84
kfree+0x174/0x3e0
driver_release+0x1c/0x7c
kobject_put+0x178/0x47c
driver_find+0x78/0xd4
new_device_store+0x140/0x30c [pata_parport]
bus_attr_store+0x5c/0x94
sysfs_kf_write+0x1c4/0x25c
...
Fixes: 246a1c4c6b7f ("ata: pata_parport: add driver (PARIDE replacement)")
Reported-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
Closes: https://lore.kernel.org/lkml/20260728024015.2014674-1-shuangpeng.kernel@gmail.com/
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Link: https://lore.kernel.org/r/77dad1184ebd0e1e7ea541d4207568f8bc5ec01f.1785381141.git.xiaopei01@kylinos.cn
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/ata/pata_parport/pata_parport.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c
index 22bd3ff6b7ae8..5c6651621dfbe 100644
--- a/drivers/ata/pata_parport/pata_parport.c
+++ b/drivers/ata/pata_parport/pata_parport.c
@@ -626,8 +626,9 @@ void pata_parport_unregister_driver(struct pi_protocol *pr)
break;
}
idr_remove(&protocols, id);
- mutex_unlock(&pi_mutex);
driver_unregister(&pr->driver);
+ mutex_unlock(&pi_mutex);
+
}
EXPORT_SYMBOL_GPL(pata_parport_unregister_driver);
@@ -654,18 +655,18 @@ static ssize_t new_device_store(const struct bus_type *bus, const char *buf, siz
port_wanted = -1;
}
+ mutex_lock(&pi_mutex);
drv = driver_find(protocol, &pata_parport_bus_type);
if (!drv) {
if (strcmp(protocol, "auto")) {
pr_err("protocol %s not found\n", protocol);
+ mutex_unlock(&pi_mutex);
return -EINVAL;
}
pr_wanted = NULL;
} else {
pr_wanted = container_of(drv, struct pi_protocol, driver);
}
-
- mutex_lock(&pi_mutex);
/* walk all parports */
idr_for_each_entry(&parport_list, parport, port_num) {
if (port_num == port_wanted || port_wanted == -1) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0152/2151] ARM: dts: helios4: fix lm75 supply name
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (150 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0151/2151] ata: pata_parport: Fix use-after-free in new_device_store Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0153/2151] ARM: dts: armada-385-clearfog-gtr: fix vmmc property name Greg Kroah-Hartman
` (730 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Gregory CLEMENT,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit ef473a83c63e3173ac472e42727e990b923b99db ]
The lm75 driver requests a regulator named "vs" (the +VS power pin
of the chip). The Helios4 DTS incorrectly used vcc-supply instead
of vs-supply, causing the regulator core to emit:
lm75 0-004c: supply vs not found, using dummy regulator
Fix the property name to match the binding and the driver.
Fixes: ced8025b569e ("ARM: dts: armada388-helios4")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/marvell/armada-388-helios4.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
index 003b0708e9656..f5ae4bea1211f 100644
--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
@@ -200,7 +200,7 @@ usb3-ilimit-hog {
temp_sensor: temp@4c {
compatible = "ti,lm75";
reg = <0x4c>;
- vcc-supply = <®_3p3v>;
+ vs-supply = <®_3p3v>;
};
eeprom@53 {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0153/2151] ARM: dts: armada-385-clearfog-gtr: fix vmmc property name
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (151 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0152/2151] ARM: dts: helios4: fix lm75 supply name Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0154/2151] ARM: dts: armada-395-gp: drop unsupported SDHCI clock-frequency Greg Kroah-Hartman
` (729 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Gregory CLEMENT,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit 337d10963f601d5a3dfb4b7aa273ca8c0b4d5172 ]
The SDHCI node references the 3.3V regulator through a bare "vmmc"
property, which is not part of the mmc controller DT binding; the
correct property is "vmmc-supply".
Fixes: aecc313490ae ("ARM: dts: mvebu: add support for SolidRun Clearfog GTR")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi
index 7aa71a9aa1bbc..16e9a258876ce 100644
--- a/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi
+++ b/arch/arm/boot/dts/marvell/armada-385-clearfog-gtr.dtsi
@@ -235,7 +235,7 @@ sdhci@d8000 {
pinctrl-0 = <&cf_gtr_sdhci_pins>;
pinctrl-names = "default";
status = "okay";
- vmmc = <®_3p3v>;
+ vmmc-supply = <®_3p3v>;
wp-inverted;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0154/2151] ARM: dts: armada-395-gp: drop unsupported SDHCI clock-frequency
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (152 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0153/2151] ARM: dts: armada-385-clearfog-gtr: fix vmmc property name Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0155/2151] ARM: dts: armada-388-helios4: fix vmmc property name Greg Kroah-Hartman
` (728 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Gregory CLEMENT,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit a56183c7f15215d804290808a2b5a1fa997aa9cd ]
The SDHCI node carries a "clock-frequency" property, but the
marvell,armada-380-sdhci binding does not define it and dtbs_check
rejects the node as a result. No driver consumes it either: only a
few other sdhci-pltfm based drivers (imx, mcf, iproc, arasan,
dwcmshc, xenon) read that property, while sdhci-pxav3 derives the
maximum clock from the io clock rate.
Remove the property.
Fixes: 356645123581 ("ARM: dts: mvebu: armada-395-gp: add support for the Armada 395 GP Board")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/marvell/armada-395-gp.dts | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/boot/dts/marvell/armada-395-gp.dts b/arch/arm/boot/dts/marvell/armada-395-gp.dts
index 6dd9e9077f842..9ea447cd35a85 100644
--- a/arch/arm/boot/dts/marvell/armada-395-gp.dts
+++ b/arch/arm/boot/dts/marvell/armada-395-gp.dts
@@ -59,7 +59,6 @@ sata@a8000 {
/* CON18 */
sdhci@d8000 {
- clock-frequency = <200000000>;
broken-cd;
wp-inverted;
bus-width = <8>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0155/2151] ARM: dts: armada-388-helios4: fix vmmc property name
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (153 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0154/2151] ARM: dts: armada-395-gp: drop unsupported SDHCI clock-frequency Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0156/2151] ARM: dts: helios4: fix vbus-supply for USB2 PHY Greg Kroah-Hartman
` (727 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Gregory CLEMENT,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit 008e9faadef8c0aaa9b8a3ff05a2126e3c5b08b7 ]
The sdhci@d8000 node references the 3.3V regulator through a bare
"vmmc" property, which is not part of the mmc controller DT
binding. The binding requires supply properties in the form
"vmmc-supply", so the current entry is ignored by the driver.
Rename the property to "vmmc-supply" so the fixed regulator is
correctly wired up as the card power supply.
Fixes: ced8025b569e ("ARM: dts: armada388-helios4")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/marvell/armada-388-helios4.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
index f5ae4bea1211f..0545452a983fc 100644
--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
@@ -269,7 +269,7 @@ sdhci@d8000 {
&helios_sdhci_cd_pins>;
pinctrl-names = "default";
status = "okay";
- vmmc = <®_3p3v>;
+ vmmc-supply = <®_3p3v>;
wp-inverted;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0156/2151] ARM: dts: helios4: fix vbus-supply for USB2 PHY
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (154 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0155/2151] ARM: dts: armada-388-helios4: fix vmmc property name Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0157/2151] ARM: dts: helios4: fix spi1 location Greg Kroah-Hartman
` (726 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Gregory CLEMENT,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit a132798a133e76a7bb575ba95b2b64eadd245438 ]
The usb-nop-xceiv binding and driver use "vbus-supply"; the driver
acquires the VBUS regulator via devm_regulator_get_exclusive("vbus")
(phy-generic.c). The stale "vbus-regulator" name is never read by
the driver and dtbs_check rejects it as an unknown property. Rename
the property so reg_5p0v_usb is honored.
Fixes: ced8025b569e ("ARM: dts: armada388-helios4")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/marvell/armada-388-helios4.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
index 0545452a983fc..1ed6ddf1719a7 100644
--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
@@ -140,7 +140,7 @@ fan2: j17-pwm {
usb2_phy: usb2-phy {
compatible = "usb-nop-xceiv";
- vbus-regulator = <®_5p0v_usb>;
+ vbus-supply = <®_5p0v_usb>;
};
usb3_phy: usb3-phy {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0157/2151] ARM: dts: helios4: fix spi1 location
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (155 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0156/2151] ARM: dts: helios4: fix vbus-supply for USB2 PHY Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0158/2151] kexec_file: stop the top-down search before it underflows Greg Kroah-Hartman
` (725 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Gregory CLEMENT,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit 5df4320a30a87f9bb918ace7b389026917c8d896 ]
This spi node is specified in armada-38x.dtsi with proper compatible
strings whereas they are not present here. Instead of copy and pasting
various lines, just reference the node in the dtsi.
This dts seems to predate the move of spi from internal-regs to the soc
node so this moves it in line there.
Allows proper probing of SPI at runtime.
Remove the microsom_spi1_cs_pins pinctrl group and its reference in
&spi1. The group only muxed mpp59 to the "spi1" function, but that
pin (SPI1 cs0) is already covered by spi1_pins, which selects the
same function for mpp56-59 in armada-38x.dtsi.
Fixes: ced8025b569e ("ARM: dts: armada388-helios4")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../arm/boot/dts/marvell/armada-388-helios4.dts | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
index 1ed6ddf1719a7..33e30528bc7ca 100644
--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
@@ -254,13 +254,6 @@ sata3: sata-port@1 {
};
};
- spi@10680 {
- pinctrl-0 = <&spi1_pins
- µsom_spi1_cs_pins>;
- pinctrl-names = "default";
- status = "okay";
- };
-
sdhci@d8000 {
bus-width = <4>;
cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
@@ -327,11 +320,13 @@ helios_fan2_pins: helios_fan2_pins {
marvell,pins = "mpp48", "mpp55";
marvell,function = "gpio";
};
- microsom_spi1_cs_pins: spi1-cs-pins {
- marvell,pins = "mpp59";
- marvell,function = "spi1";
- };
};
};
};
};
+
+&spi1 {
+ pinctrl-0 = <&spi1_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0158/2151] kexec_file: stop the top-down search before it underflows
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (156 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0157/2151] ARM: dts: helios4: fix spi1 location Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0159/2151] perf jitdump: Fix extended header read that always fails Greg Kroah-Hartman
` (724 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Breno Leitao, Bradley Morgan,
Mike Rapoport (Microsoft), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <leitao@debian.org>
[ Upstream commit c711461303af9f796b293b5ac06f49a885e46e71 ]
locate_mem_hole_top_down() walks candidates downwards by subtracting
PAGE_SIZE whenever the window conflicts with an existing segment or with
an architecture exclude range.
Nothing stops that subtraction at zero, so a search that reaches the
bottom of the address space wraps temp_start around and continues.
The walk starts inside the range being scanned and only moves down, so
bail out once a candidate ends up above end. That covers every step in
the loop rather than the subtractions alone, and it matches
locate_mem_hole_bottom_up(), which already bounds its candidate on both
sides.
This is a better check than subtracting with check_sub_overflow(), given
that we would have 3 subtractions in this block, and this single fix
would take care of them all (instead of three check_sub_overflow()).
Fixes: cb1052581e2b ("kexec: implementation of new syscall kexec_file_load")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Bradley Morgan <include@grrlz.net>
Link: https://patch.msgid.link/20260812-kexec_posioned-v6-1-e477887086f0@debian.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/kexec_file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 2bfbb2d144e69..dd48efe2d6408 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -483,7 +483,9 @@ static int locate_mem_hole_top_down(unsigned long start, unsigned long end,
/* align down start */
temp_start = ALIGN_DOWN(temp_start, kbuf->buf_align);
- if (temp_start < start || temp_start < kbuf->buf_min)
+ /* A candidate above the range means the walk wrapped around */
+ if (temp_start < start || temp_start < kbuf->buf_min ||
+ temp_start > end)
return 0;
temp_end = temp_start + kbuf->memsz - 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0159/2151] perf jitdump: Fix extended header read that always fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (157 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0158/2151] kexec_file: stop the top-down search before it underflows Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0160/2151] perf jitdump: Fix debug_data and unwinding_data leaks Greg Kroah-Hartman
` (723 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Namhyung Kim, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 598e905931380f0714d5fd50cecfac615a1ec742 ]
jit_open() sets bsz = bs before the fread() that uses bs - bsz as the
read size, making the expression always evaluate to zero. fread() with
size 0 returns 0, which triggers the ret != 1 error path — so extended
jitdump headers (total_size > sizeof(header)) have been silently broken
since the original implementation.
Additionally, when 0 < bs <= bsz the if (bs > bsz) block is skipped
entirely, leaving extended header bytes unread in the stream. Subsequent
jit_get_next_entry() calls then parse those leftover bytes as a
jr_prefix, corrupting the record stream.
Fix by separating the buffer growth from the read: realloc only when
bs > bsz, then unconditionally fread bs bytes when bs > 0.
Fixes: 9b07e27f88b9cd78 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 2a4c14b003b31..c8934a46f7355 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -224,10 +224,12 @@ jit_open(struct jit_buf_desc *jd, const char *name)
n = realloc(buf, bs);
if (!n)
goto error;
- bsz = bs;
buf = n;
- /* read extra we do not know about */
- ret = fread(buf, bs - bsz, 1, jd->in);
+ bsz = bs;
+ }
+ if (bs > 0) {
+ /* consume extended header bytes from the stream */
+ ret = fread(buf, bs, 1, jd->in);
if (ret != 1)
goto error;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0160/2151] perf jitdump: Fix debug_data and unwinding_data leaks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (158 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0159/2151] perf jitdump: Fix extended header read that always fails Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0161/2151] perf jitdump: Validate code_size against total_size in code load Greg Kroah-Hartman
` (722 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 2bd967f3adcba1d3e54f10b0d8b25f950e4f03fd ]
jit_repipe_debug_info() overwrites jd->debug_data without freeing the
previous allocation. If two consecutive JIT_CODE_DEBUG_INFO records
appear without an intervening LOAD record consuming the data, the first
allocation leaks.
The sibling jit_repipe_unwinding_info() already frees the old
jd->unwinding_data before reassignment — add the same pattern to
jit_repipe_debug_info() using zfree().
Also add cleanup of both buffers in jit_close() so they are freed when
the jitdump session ends, even if no LOAD record consumed them.
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index c8934a46f7355..ed489d22c2fd9 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -117,6 +117,8 @@ jit_close(struct jit_buf_desc *jd)
funlockfile(jd->in);
fclose(jd->in);
jd->in = NULL;
+ zfree(&jd->debug_data);
+ zfree(&jd->unwinding_data);
}
static int
@@ -662,6 +664,7 @@ static int jit_repipe_debug_info(struct jit_buf_desc *jd, union jr_entry *jr)
memcpy(data, &jr->info.entries, sz);
+ zfree(&jd->debug_data);
jd->debug_data = data;
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0161/2151] perf jitdump: Validate code_size against total_size in code load
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (159 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0160/2151] perf jitdump: Fix debug_data and unwinding_data leaks Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0162/2151] perf jitdump: Prevent integer underflow in debug info size calculation Greg Kroah-Hartman
` (721 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 06c7cf7a072fcd52e68471628c56630d2bdcc650 ]
jit_repipe_code_load() reads code_size from the jitdump record and uses
it to compute a pointer to the code blob:
code = (unsigned long)jr + jr->load.p.total_size - csize;
An oversized code_size underflows the pointer arithmetic, causing OOB
reads into earlier heap memory. Validate that code_size fits within the
record (total_size - sizeof(jr->load)) before the pointer computation.
code_size is uint64_t but csize is int; values above INT_MAX wrap
negative when narrowed into csize, which defeats the bounds check and
sends the code pointer past the end of the record. Reject those too.
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index ed489d22c2fd9..dedbfec2ecf1f 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -9,6 +9,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <inttypes.h>
+#include <limits.h>
#include <byteswap.h>
#include <sys/stat.h>
#include <sys/mman.h>
@@ -451,6 +452,16 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
csize = jr->load.code_size;
usize = jd->unwinding_mapped_size;
addr = jr->load.code_addr;
+
+ /* code blob lives at the end of the record, validate it fits */
+ if (jr->load.p.total_size < sizeof(jr->load) ||
+ jr->load.code_size > jr->load.p.total_size - sizeof(jr->load) ||
+ jr->load.code_size > INT_MAX) {
+ pr_warning("jitdump: invalid code_size %" PRIu64 " (total_size=%u) in code_load record\n",
+ (uint64_t)jr->load.code_size, jr->load.p.total_size);
+ return -1;
+ }
+
sym = (void *)((unsigned long)jr + sizeof(jr->load));
code = (unsigned long)jr + jr->load.p.total_size - csize;
count = jr->load.code_index;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0162/2151] perf jitdump: Prevent integer underflow in debug info size calculation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (160 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0161/2151] perf jitdump: Validate code_size against total_size in code load Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0163/2151] perf jitdump: Bounds-check debug entry byte-swap loop Greg Kroah-Hartman
` (720 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Stefano Sanfilippo, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit dfe8fe96efca3c32979dc0859f88e15b677d25f1 ]
jit_repipe_debug_info() and jit_repipe_unwinding_info() compute payload
sizes by subtracting the fixed header size from total_size:
sz = jr->prefix.total_size - sizeof(jr->info);
When total_size is smaller than the header struct (from a truncated or
corrupted jitdump record), the subtraction underflows to a massive
value, causing an oversized allocation followed by an OOB memcpy.
Validate that total_size covers at least the fixed header before the
subtraction in both functions.
Fixes: 598b7c6919c7 ("perf jit: add source line info support")
Fixes: 0284fecd13b6 ("perf jit: Add unwinding support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Stefano Sanfilippo <ssanfilippo@chromium.org>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index dedbfec2ecf1f..e1f0e01b851b1 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -668,6 +668,10 @@ static int jit_repipe_debug_info(struct jit_buf_desc *jd, union jr_entry *jr)
if (!(jd && jr))
return -1;
+ /* total_size must cover at least the fixed header */
+ if (jr->prefix.total_size < sizeof(jr->info))
+ return -1;
+
sz = jr->prefix.total_size - sizeof(jr->info);
data = malloc(sz);
if (!data)
@@ -696,6 +700,10 @@ jit_repipe_unwinding_info(struct jit_buf_desc *jd, union jr_entry *jr)
if (!(jd && jr))
return -1;
+ /* total_size must cover at least the fixed header */
+ if (jr->prefix.total_size < sizeof(jr->unwinding))
+ return -1;
+
unwinding_data_size = jr->prefix.total_size - sizeof(jr->unwinding);
unwinding_data = malloc(unwinding_data_size);
if (!unwinding_data)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0163/2151] perf jitdump: Bounds-check debug entry byte-swap loop
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (161 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0162/2151] perf jitdump: Prevent integer underflow in debug info size calculation Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0164/2151] perf jitdump: Check snprintf return before computing header size Greg Kroah-Hartman
` (719 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit ede3cd8151675c2983cd49104b1e9b25a3712ed8 ]
The byte-swap loop for JIT_CODE_DEBUG_INFO uses array indexing
(jr->info.entries[n]) to iterate debug entries. struct debug_entry has
a flexible array member name[], so each entry has a different size.
Array indexing computes offsets assuming fixed-size elements, landing
inside variable-length name strings after the first entry and
byte-swapping garbage.
Additionally, nr_entry is read from untrusted jitdump input without
validation against total_size, so a crafted value causes OOB reads.
Replace the array indexing with debug_entry_next() pointer arithmetic
(which correctly accounts for the variable-length name) and
bounds-check each entry against the record's total_size before
byte-swapping.
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index e1f0e01b851b1..5174946ffe870 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -319,14 +319,32 @@ jit_get_next_entry(struct jit_buf_desc *jd)
switch(id) {
case JIT_CODE_DEBUG_INFO:
if (jd->needs_bswap) {
+ void *end = (void *)jr + jr->prefix.total_size;
+ struct debug_entry *ent;
uint64_t n;
+
jr->info.code_addr = bswap_64(jr->info.code_addr);
jr->info.nr_entry = bswap_64(jr->info.nr_entry);
- for (n = 0 ; n < jr->info.nr_entry; n++) {
- jr->info.entries[n].addr = bswap_64(jr->info.entries[n].addr);
- jr->info.entries[n].lineno = bswap_32(jr->info.entries[n].lineno);
- jr->info.entries[n].discrim = bswap_32(jr->info.entries[n].discrim);
+
+ /*
+ * debug_entry has a variable-length name[], so array
+ * indexing would compute wrong offsets — use
+ * debug_entry_next() and bounds-check each entry.
+ */
+ ent = &jr->info.entries[0];
+ for (n = 0; n < jr->info.nr_entry; n++) {
+ if ((void *)ent + sizeof(*ent) > end)
+ break;
+ /* name must be NUL-terminated within the record */
+ if (!memchr(ent->name, '\0', (char *)end - ent->name))
+ break;
+ ent->addr = bswap_64(ent->addr);
+ ent->lineno = bswap_32(ent->lineno);
+ ent->discrim = bswap_32(ent->discrim);
+ ent = debug_entry_next(ent);
}
+ /* clamp so downstream consumers don't overrun */
+ jr->info.nr_entry = n;
}
break;
case JIT_CODE_UNWINDING_INFO:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0164/2151] perf jitdump: Check snprintf return before computing header size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (162 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0163/2151] perf jitdump: Bounds-check debug entry byte-swap loop Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0165/2151] perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path Greg Kroah-Hartman
` (718 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 0155f05ea6e133c18a04b8b5945cac59870da156 ]
snprintf() returns the would-have-been length on truncation. When the
jitted filename exceeds PATH_MAX, the unclamped 'size' value inflates
sizeof(event->mmap2.filename) - size into a massive underflow, causing
the header.size computation to write an oversized header. The
subsequent write to 'id = event + header.size - idr_size' then corrupts
the heap.
Clamp size to PATH_MAX - 1 after snprintf in both jit_repipe_code_load()
and jit_repipe_code_move().
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 5174946ffe870..8e561a0eeaa7d 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -494,6 +494,9 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
jd->dir,
nspid,
count);
+ /* snprintf returns would-be length on truncation, clamp to buffer */
+ if (size >= sizeof(event->mmap2.filename))
+ size = sizeof(event->mmap2.filename) - 1;
size++; /* for \0 */
@@ -622,6 +625,9 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr)
jd->dir,
nspid,
jr->move.code_index);
+ /* snprintf returns would-be length on truncation, clamp to buffer */
+ if (size >= sizeof(event->mmap2.filename))
+ size = sizeof(event->mmap2.filename) - 1;
size++; /* for \0 */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0165/2151] perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (163 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0164/2151] perf jitdump: Check snprintf return before computing header size Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0166/2151] perf jitdump: Free event in jit_repipe_code_move() Greg Kroah-Hartman
` (717 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit bfde6848c1e24fd979d0138c57c1cc28c35093c3 ]
If the malloc() for the initial read buffer fails, jit_open() jumps to
the error label which calls funlockfile(jd->in). However, flockfile()
is called later in the function, so at this point the stream was never
locked. Calling funlockfile() on an unlocked stream is undefined
behavior per POSIX.
Split the error path into two labels: 'error' (after flockfile) calls
funlockfile before cleanup, 'error_noflock' (before flockfile) skips
the unlock.
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 8e561a0eeaa7d..8694f29d3b652 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -157,7 +157,7 @@ jit_open(struct jit_buf_desc *jd, const char *name)
buf = malloc(bsz);
if (!buf)
- goto error;
+ goto error_noflock;
/*
* protect from writer modifying the file while we are reading it
@@ -245,8 +245,9 @@ jit_open(struct jit_buf_desc *jd, const char *name)
return 0;
error:
- free(buf);
funlockfile(jd->in);
+error_noflock:
+ free(buf);
fclose(jd->in);
return retval;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0166/2151] perf jitdump: Free event in jit_repipe_code_move()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (164 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0165/2151] perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0167/2151] perf: replace strcpy() with strncpy() in util/jitdump.c Greg Kroah-Hartman
` (716 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 7fc5851aac606b9e4143f6857710cc5f346770c5 ]
jit_repipe_code_move() allocates a perf_event with calloc but never
frees it — the 'out' label exits with only perf_sample__exit().
The sibling function jit_repipe_code_load() correctly calls
free(event) at its out label. Add the same free(event) to
jit_repipe_code_move().
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 8694f29d3b652..5f4af5d890ac6 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -682,6 +682,7 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr)
build_id__mark_dso_hit(tool, event, &sample, NULL, jd->machine);
out:
perf_sample__exit(&sample);
+ free(event);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0167/2151] perf: replace strcpy() with strncpy() in util/jitdump.c
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (165 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0166/2151] perf jitdump: Free event in jit_repipe_code_move() Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0168/2151] perf jitdump: Use dirname() return value in jit_open() Greg Kroah-Hartman
` (715 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hrishikesh Suresh, Namhyung Kim,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hrishikesh Suresh <hrishikesh123s@gmail.com>
[ Upstream commit 9bef5cead63d5d8fad3ba7ebaf26f3f4ee172c82 ]
Usage of strcpy() can lead to buffer overflows. Therefore, it has been
replaced with strncpy(). The output file path is provided as a parameter
and might be restricted by command-line by default. But this defensive
patch will prevent any potential overflow, making the code more robust
against future changes in input handling.
Testing:
- ran perf test from tools/perf and did not observe any regression with
the earlier code
Signed-off-by: Hrishikesh Suresh <hrishikesh123s@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Stable-dep-of: 4eddf7d9e341 ("perf jitdump: Use dirname() return value in jit_open()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 5f4af5d890ac6..343ee182b946e 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -239,7 +239,8 @@ jit_open(struct jit_buf_desc *jd, const char *name)
/*
* keep dirname for generating files and mmap records
*/
- strcpy(jd->dir, name);
+ strncpy(jd->dir, name, PATH_MAX);
+ jd->dir[PATH_MAX - 1] = '\0';
dirname(jd->dir);
free(buf);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0168/2151] perf jitdump: Use dirname() return value in jit_open()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (166 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0167/2151] perf: replace strcpy() with strncpy() in util/jitdump.c Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0169/2151] perf jitdump: Validate debug entries on native (non-swap) path Greg Kroah-Hartman
` (714 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 4eddf7d9e341eb8c41704b8aa27b4a91f4e2c7c9 ]
jit_open() calls dirname(jd->dir) but ignores the return value. POSIX
says dirname() may return a pointer to internal static storage — glibc
does this when the path has no '/', returning "." from a static buffer
and leaving jd->dir unchanged with the original filename.
Capture the return value and copy it back to jd->dir when dirname()
returns a different pointer.
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 343ee182b946e..b82a2875a7748 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -146,6 +146,7 @@ jit_open(struct jit_buf_desc *jd, const char *name)
ssize_t bs, bsz = 0;
void *n, *buf = NULL;
int ret, retval = -1;
+ char *dname;
nsinfo__mountns_enter(jd->nsi, &nsc);
jd->in = fopen(name, "r");
@@ -241,7 +242,9 @@ jit_open(struct jit_buf_desc *jd, const char *name)
*/
strncpy(jd->dir, name, PATH_MAX);
jd->dir[PATH_MAX - 1] = '\0';
- dirname(jd->dir);
+ dname = dirname(jd->dir);
+ if (dname != jd->dir)
+ strlcpy(jd->dir, dname, sizeof(jd->dir));
free(buf);
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0169/2151] perf jitdump: Validate debug entries on native (non-swap) path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (167 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0168/2151] perf jitdump: Use dirname() return value in jit_open() Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0170/2151] perf jitdump: Validate sym string NUL-termination in code load Greg Kroah-Hartman
` (713 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 51e14e495f0cea061bbad33e7635f7fd857113ad ]
The bounds-checking and nr_entry clamping added for the byte-swap path
only runs when jd->needs_bswap is true. On native-endian files, nr_entry
passes through unvalidated to jit_repipe_debug_info(), which stores it
as jd->nr_debug_entries. Downstream, jit_process_debug_info() in
genelf_debug.c iterates nr_debug_entries times via debug_entry_next(),
which calls strlen() on each entry's name field — a crafted nr_entry
causes OOB reads and writes.
Add bounds-checked iteration in jit_repipe_debug_info() that validates
each debug_entry fits in the payload and its name is NUL-terminated
before calling debug_entry_next(). Clamp nr_debug_entries to the count
of valid entries.
Fixes: 598b7c6919c7bbcc ("perf jit: add source line info support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index b82a2875a7748..517deb8466493 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -692,8 +692,10 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr)
static int jit_repipe_debug_info(struct jit_buf_desc *jd, union jr_entry *jr)
{
- void *data;
- size_t sz;
+ struct debug_entry *ent;
+ void *data, *end;
+ size_t sz, valid;
+ uint64_t i;
if (!(jd && jr))
return -1;
@@ -713,10 +715,25 @@ static int jit_repipe_debug_info(struct jit_buf_desc *jd, union jr_entry *jr)
jd->debug_data = data;
/*
- * we must use nr_entry instead of size here because
- * we cannot distinguish actual entry from padding otherwise
+ * Clamp nr_debug_entries to entries that actually fit in the
+ * payload. The byte-swap path already does this for cross-endian
+ * files; validate on the native path too, since downstream
+ * jit_process_debug_info() iterates via debug_entry_next() which
+ * calls strlen() on each entry's name field.
*/
- jd->nr_debug_entries = jr->info.nr_entry;
+ end = data + sz;
+ ent = data;
+ valid = 0;
+ for (i = 0; i < jr->info.nr_entry; i++) {
+ if ((void *)ent + sizeof(*ent) > end)
+ break;
+ /* name must be NUL-terminated within the payload */
+ if (!memchr(ent->name, '\0', (char *)end - ent->name))
+ break;
+ ent = debug_entry_next(ent);
+ valid++;
+ }
+ jd->nr_debug_entries = valid;
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0170/2151] perf jitdump: Validate sym string NUL-termination in code load
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (168 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0169/2151] perf jitdump: Validate debug entries on native (non-swap) path Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0171/2151] perf jitdump: Validate unwinding sizes against record payload Greg Kroah-Hartman
` (712 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stephane Eranian, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 98bfe1142ccbaa5ffdca5dcdddd26f238ad33585 ]
jit_repipe_code_load() computes sym = (void *)jr + sizeof(jr->load) and
passes it to jit_emit_elf() which calls strlen(sym) via jit_write_elf().
If code_size equals total_size - sizeof(jr->load), the sym pointer
aliases the code blob with no NUL terminator, and strlen() scans past
the buffer into adjacent heap memory.
Add a memchr() check to verify the symbol name is NUL-terminated within
the region between the load header and the code blob before use.
Fixes: 598b7c6919c7bbcc ("perf jit: add source line info support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 517deb8466493..be56de79eb4ca 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -487,6 +487,13 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
sym = (void *)((unsigned long)jr + sizeof(jr->load));
code = (unsigned long)jr + jr->load.p.total_size - csize;
+
+ /* sym string lives between the load header and the code blob */
+ if (!memchr(sym, '\0', code - (unsigned long)sym)) {
+ pr_warning("jitdump: unterminated symbol name in code_load record\n");
+ return -1;
+ }
+
count = jr->load.code_index;
idr_size = jd->machine->id_hdr_size;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0171/2151] perf jitdump: Validate unwinding sizes against record payload
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (169 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0170/2151] perf jitdump: Validate sym string NUL-termination in code load Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0172/2151] dt-bindings: display: panel: samsung,s6e8aa5x01: Allow common properties Greg Kroah-Hartman
` (711 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Stefano Sanfilippo, Stephane Eranian, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 92d50319b4f0c0bbee8a236a09063272cd22faab ]
jit_repipe_unwinding_info() copies unwinding_size and eh_frame_hdr_size
from the jitdump record into jd-> fields without checking them against
the actual payload size. Downstream, jit_add_eh_frame_info() in
genelf.c computes unwinding_table_size = unwinding_size -
eh_frame_hdr_size, which underflows when eh_frame_hdr_size >
unwinding_size. The result is passed as d->d_size to libelf, causing
an OOB heap read into the output ELF file.
Validate that unwinding_size fits within the record payload and that
eh_frame_hdr_size does not exceed unwinding_size before allocating or
storing the values, so a bogus record cannot force a large allocation
that is then discarded.
mapped_size is likewise taken from the record and was narrowed into an
int for the mmap2 len computation in jit_repipe_code_load() and
jit_repipe_code_move(); values above INT_MAX would turn negative,
producing a wrong mmap2 length. Use uint64_t for usize so the value
cannot truncate.
Fixes: 0284fecd13b6db3e ("perf jit: Add unwinding support")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Stefano Sanfilippo <ssanfilippo@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/jitdump.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index be56de79eb4ca..f0ebc15f6d499 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -462,7 +462,8 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
u16 idr_size;
const char *sym;
uint64_t count;
- int ret, csize, usize;
+ int ret, csize;
+ uint64_t usize;
pid_t nspid, pid, tid;
struct {
u32 pid, tid;
@@ -543,7 +544,7 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
event->mmap2.pgoff = GEN_ELF_TEXT_OFFSET;
event->mmap2.start = addr;
- event->mmap2.len = usize ? ALIGN_8(csize) + usize : csize;
+ event->mmap2.len = usize ? ALIGN_8((uint64_t)csize) + usize : (uint64_t)csize;
event->mmap2.pid = pid;
event->mmap2.tid = tid;
event->mmap2.ino = st.st_ino;
@@ -610,7 +611,7 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr)
char *filename;
size_t size;
struct stat st;
- int usize;
+ uint64_t usize;
u16 idr_size;
int ret;
pid_t nspid, pid, tid;
@@ -759,6 +760,18 @@ jit_repipe_unwinding_info(struct jit_buf_desc *jd, union jr_entry *jr)
return -1;
unwinding_data_size = jr->prefix.total_size - sizeof(jr->unwinding);
+
+ /*
+ * Validate sizes before allocating — jit_add_eh_frame_info()
+ * computes unwinding_size - eh_frame_hdr_size and uses the
+ * result as a buffer length for libelf.
+ */
+ if (jr->unwinding.unwinding_size > unwinding_data_size ||
+ jr->unwinding.eh_frame_hdr_size > jr->unwinding.unwinding_size) {
+ pr_warning("jitdump: invalid unwinding sizes in unwinding_info record\n");
+ return -1;
+ }
+
unwinding_data = malloc(unwinding_data_size);
if (!unwinding_data)
return -1;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0172/2151] dt-bindings: display: panel: samsung,s6e8aa5x01: Allow common properties
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (170 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0171/2151] perf jitdump: Validate unwinding sizes against record payload Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0173/2151] remoteproc: qcom_q6v5_adsp: Fix double jiffies conversion in adsp_start() Greg Kroah-Hartman
` (710 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Konrad Dybcio, Rob Herring (Arm),
Neil Armstrong, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
[ Upstream commit c3fd78f0f3624fff3dcf55d89326f90000367596 ]
Change additionalProperties to unevaluatedProperties to allow
inheriting properties from panel-common.yaml, preventing this warning:
qcom/sm6125-xiaomi-laurel-sprout.dtb: panel@0 (samsung,s6e8fc0-m1906f9): 'port' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml
Fixes: f3e1caef597e ("dt-bindings: display: panel: document Samsung AMS561RA01 panel with S6E8AA5X01 controller")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260818-topic-sprout_panel_warn_fix-v1-1-ded1e8d5f121@oss.qualcomm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml b/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml
index eccfc66d7fe24..8401d067785e6 100644
--- a/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml
+++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml
@@ -31,7 +31,7 @@ required:
- compatible
- reg
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0173/2151] remoteproc: qcom_q6v5_adsp: Fix double jiffies conversion in adsp_start()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (171 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0172/2151] dt-bindings: display: panel: samsung,s6e8aa5x01: Allow common properties Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0174/2151] arm64: dts: qcom: sdm845-sony-xperia-tama: Fix Bluetooth UART pinctrl Greg Kroah-Hartman
` (709 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Anup Vishwakarma, Konrad Dybcio,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
[ Upstream commit f559ef6316971fe39dc5f5edd6a483429ba03768 ]
adsp_start() computes 5 * HZ, an already-converted jiffies count, and
passes it into msecs_to_jiffies(), which expects milliseconds --
reinterpreting the value and shrinking the intended timeout. Every
other caller (q6v5_start() in qcom_q6v5_mss.c, qcom_pas_start() in
qcom_q6v5_pas.c) passes msecs_to_jiffies(5000) directly, matching
qcom_q6v5_wait_for_start()'s kerneldoc, which documents @timeout as
already being in jiffies.
On CONFIG_HZ=250 this shrinks the intended 5 second timeout to
~1.25 seconds, causing a DSP that legitimately takes 2-3 seconds to
signal ready to be spuriously torn down as a boot failure.
Fix by passing msecs_to_jiffies(5000) directly, matching every other
caller.
Signed-off-by: Anup Vishwakarma <anup.vishwakarma@oss.qualcomm.com>
Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260831-b4-adsp_start_jiffies_fix_upstream-v1-1-9f8cf85ea220@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/remoteproc/qcom_q6v5_adsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c
index 004dab45cf3c7..29c65021b4d3e 100644
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -430,7 +430,7 @@ static int adsp_start(struct rproc *rproc)
goto disable_adsp_clks;
}
- ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5 * HZ));
+ ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
if (ret == -ETIMEDOUT) {
dev_err(adsp->dev, "start timed out\n");
goto disable_adsp_clks;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0174/2151] arm64: dts: qcom: sdm845-sony-xperia-tama: Fix Bluetooth UART pinctrl
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (172 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0173/2151] remoteproc: qcom_q6v5_adsp: Fix double jiffies conversion in adsp_start() Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0175/2151] cxl/mce: Avoid alias page retirement for corrected errors Greg Kroah-Hartman
` (708 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shujath Mohd, Konrad Dybcio,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shujath Mohd <shujath@outlook.in>
[ Upstream commit cd0f33393882e2554d46e8e068ab95d00593f385 ]
Use the 4-pin UART6 pinctrl configuration for the WCN3990 Bluetooth
controller on Sony Xperia Tama devices.
This enables the UART hardware flow control required for reliable
Bluetooth communication at higher baud rates.
Fixes: d54331131cde ("arm64: dts: qcom: sdm845-sony-xperia-tama: Add bluetooth")
Fixes: 30a7f99befc6 ("arm64: dts: qcom: Add support for SONY Xperia XZ2 / XZ2C / XZ3 (Tama platform)")
Signed-off-by: Shujath Mohd <shujath@outlook.in>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/PUZPR01MB51413F6FF89A8FA82A9B2755C3A02@PUZPR01MB5141.apcprd01.prod.exchangelabs.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
index f3f4c0900572a..2306b31edad27 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
@@ -755,6 +755,8 @@ int-pins {
};
&uart6 {
+ pinctrl-0 = <&qup_uart6_4pin>;
+
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0175/2151] cxl/mce: Avoid alias page retirement for corrected errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (173 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0174/2151] arm64: dts: qcom: sdm845-sony-xperia-tama: Fix Bluetooth UART pinctrl Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0176/2151] remoteproc: xlnx: Initialize mailbox work before requesting channels Greg Kroah-Hartman
` (707 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shaikh Kamaluddin, Alison Schofield,
Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shaikh Kamaluddin <shaikhkamal2012@gmail.com>
[ Upstream commit 04a7b330c8b60dfff200d9a32dd6615f97b59d07 ]
cxl_handle_mce() offlines the aliased page of an Extended Linear Cache
(ELC) region for any MCE with a usable address in the region. This
includes corrected errors, needlessly reducing usable memory.
Skip ELC alias retirement when mce_is_correctable() identifies the
reported error as corrected. Uncorrected errors with a usable address
in the ELC region continue to retire the aliased page as before.
mce_usable_address() already implements the per-vendor checks that
determine whether the reported address is usable, so no separate
memory-error classification is needed.
On AMD, a corrected legacy bank 4 DRAM ECC error (XEC 8) reports a
usable address and retired the aliased page before this change.
Tested under QEMU with Intel Skylake-Server and AMD EPYC-Milan models.
Fixes: 516e5bd0b6bf ("cxl: Add mce notifier to emit aliased address for extended linear cache")
Signed-off-by: Shaikh Kamaluddin <shaikhkamal2012@gmail.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260824134957.11085-1-shaikhkamal2012@gmail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/mce.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/mce.c b/drivers/cxl/core/mce.c
index 65fed913b2217..3ac6802e750d2 100644
--- a/drivers/cxl/core/mce.c
+++ b/drivers/cxl/core/mce.c
@@ -18,7 +18,13 @@ static int cxl_handle_mce(struct notifier_block *nb, unsigned long val,
u64 spa, spa_alias;
unsigned long pfn;
- if (!mce || !mce_usable_address(mce))
+ if (!mce)
+ return NOTIFY_DONE;
+
+ if (mce_is_correctable(mce))
+ return NOTIFY_DONE;
+
+ if (!mce_usable_address(mce))
return NOTIFY_DONE;
spa = mce->addr & MCI_ADDR_PHYSADDR;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0176/2151] remoteproc: xlnx: Initialize mailbox work before requesting channels
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (174 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0175/2151] cxl/mce: Avoid alias page retirement for corrected errors Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0177/2151] dt-bindings: clock: qcom,milos-camcc: Document interconnect path Greg Kroah-Hartman
` (706 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Runyu Xiao, Mathieu Poirier,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Runyu Xiao <runyu.xiao@seu.edu.cn>
[ Upstream commit 5ca7dea7cb2e47f42c15ac7206c5e0cba23d292d ]
zynqmp_r5_setup_mbox() installs zynqmp_r5_mb_rx_cb() as the mailbox RX
callback before requesting the mailbox channels, but initializes
ipi->mbox_work only after both channels have been requested. Once the RX
channel is active, a notification delivered before the late INIT_WORK()
would make the callback queue an uninitialized work item.
Initialize the work item before requesting channels. Also drain the work
before freeing the mailbox state, after the channels have been released so
no new callbacks can queue it. Use the same drain before freeing ipi from
the channel request error paths, since the callback is already published
there as well.
This issue was found by our static analysis tool and then confirmed by
manual review of the mailbox setup sequence. The callback is published
before the channel requests complete, so the work item should be ready
before the mailbox provider can invoke it.
A QEMU PoC modeled a mailbox notification delivered after the RX callback
became reachable but before the delayed INIT_WORK(). DEBUG_OBJECTS reported
queueing an uninitialized work item from the zynqmp_r5_setup_mbox() path.
This is sent as an RFC because the practical trigger depends on the ZynqMP
IPI mailbox provider and firmware delivery timing. If the provider cannot
invoke the RX callback until after setup returns, this is a defensive
lifecycle cleanup rather than a reachable race on current systems.
Fixes: 5dfb28c257b7 ("remoteproc: xilinx: Add mailbox channels for rpmsg")
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://lore.kernel.org/r/20260818101201.1603947-1-runyu.xiao@seu.edu.cn
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/remoteproc/xlnx_r5_remoteproc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c
index a238b45bf2f2c..3e4364f35cd02 100644
--- a/drivers/remoteproc/xlnx_r5_remoteproc.c
+++ b/drivers/remoteproc/xlnx_r5_remoteproc.c
@@ -271,6 +271,8 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev)
if (!ipi)
return NULL;
+ INIT_WORK(&ipi->mbox_work, handle_event_notified);
+
mbox_cl = &ipi->mbox_cl;
mbox_cl->rx_callback = zynqmp_r5_mb_rx_cb;
mbox_cl->tx_block = false;
@@ -282,6 +284,7 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev)
ipi->tx_chan = mbox_request_channel_byname(mbox_cl, "tx");
if (IS_ERR(ipi->tx_chan)) {
ipi->tx_chan = NULL;
+ cancel_work_sync(&ipi->mbox_work);
kfree(ipi);
dev_warn(cdev, "mbox tx channel request failed\n");
return NULL;
@@ -292,13 +295,12 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev)
mbox_free_channel(ipi->tx_chan);
ipi->rx_chan = NULL;
ipi->tx_chan = NULL;
+ cancel_work_sync(&ipi->mbox_work);
kfree(ipi);
dev_warn(cdev, "mbox rx channel request failed\n");
return NULL;
}
- INIT_WORK(&ipi->mbox_work, handle_event_notified);
-
return ipi;
}
@@ -317,6 +319,8 @@ static void zynqmp_r5_free_mbox(struct mbox_info *ipi)
ipi->rx_chan = NULL;
}
+ cancel_work_sync(&ipi->mbox_work);
+
kfree(ipi);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0177/2151] dt-bindings: clock: qcom,milos-camcc: Document interconnect path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (175 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0176/2151] remoteproc: xlnx: Initialize mailbox work before requesting channels Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0178/2151] dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support Greg Kroah-Hartman
` (705 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Luca Weiss, Krzysztof Kozlowski,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <luca.weiss@fairphone.com>
[ Upstream commit 7e622e74d2700da4d6ed3aa2a4d7e1b7d7293768 ]
Document an interconnect path for camcc which needs to be enabled so
that the CAMSS_TOP_GDSC power domain can turn on successfully.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260501-milos-camcc-icc-v2-2-bb83c1256cc3@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Stable-dep-of: e0f335a4e17f ("dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../devicetree/bindings/clock/qcom,milos-camcc.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml
index f63149ecf3e1b..707b25d2c11e6 100644
--- a/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml
@@ -25,6 +25,10 @@ properties:
- description: Sleep clock source
- description: Camera AHB clock from GCC
+ interconnects:
+ items:
+ - description: Interconnect path to enable the MultiMedia NoC
+
required:
- compatible
- clocks
@@ -37,12 +41,16 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,milos-gcc.h>
+ #include <dt-bindings/interconnect/qcom,icc.h>
+ #include <dt-bindings/interconnect/qcom,milos-rpmh.h>
clock-controller@adb0000 {
compatible = "qcom,milos-camcc";
reg = <0x0adb0000 0x40000>;
clocks = <&bi_tcxo_div2>,
<&sleep_clk>,
<&gcc GCC_CAMERA_AHB_CLK>;
+ interconnects = <&mmss_noc MASTER_CAMNOC_HF QCOM_ICC_TAG_ALWAYS
+ &mmss_noc SLAVE_MNOC_HF_MEM_NOC QCOM_ICC_TAG_ALWAYS>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0178/2151] dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (176 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0177/2151] dt-bindings: clock: qcom,milos-camcc: Document interconnect path Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0179/2151] dt-bindings: clock: qcom,milos-videocc: " Greg Kroah-Hartman
` (704 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski, Taniya Das,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <taniya.das@oss.qualcomm.com>
[ Upstream commit e0f335a4e17f5c80b24b8bd2060802bac072775c ]
The Milos camera clock controller requires the CX and MX power
domains, along with their performance state votes, to be enabled
before the clock controller can be accessed.
Document the 'power-domains' and 'required-opps' properties and add
them to the required properties list and example. Since these
properties become required for the already-documented qcom,milos-camcc
compatible, this is an ABI break for any devicetree using this binding
without specifying them.
Fixes: dbb9d53b7197 ("dt-bindings: clock: qcom: document the Milos Camera Clock Controller")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260806-eliza-mm-cc-v9-v10-1-6ba52dd14343@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../bindings/clock/qcom,milos-camcc.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml b/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml
index 707b25d2c11e6..c4aba40e316ca 100644
--- a/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,milos-camcc.yaml
@@ -29,9 +29,21 @@ properties:
items:
- description: Interconnect path to enable the MultiMedia NoC
+ power-domains:
+ items:
+ - description: CX power domain
+ - description: MX power domain
+
+ required-opps:
+ items:
+ - description: CX performance point
+ - description: MX performance point
+
required:
- compatible
- clocks
+ - power-domains
+ - required-opps
allOf:
- $ref: qcom,gcc.yaml#
@@ -43,6 +55,7 @@ examples:
#include <dt-bindings/clock/qcom,milos-gcc.h>
#include <dt-bindings/interconnect/qcom,icc.h>
#include <dt-bindings/interconnect/qcom,milos-rpmh.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@adb0000 {
compatible = "qcom,milos-camcc";
reg = <0x0adb0000 0x40000>;
@@ -51,6 +64,12 @@ examples:
<&gcc GCC_CAMERA_AHB_CLK>;
interconnects = <&mmss_noc MASTER_CAMNOC_HF QCOM_ICC_TAG_ALWAYS
&mmss_noc SLAVE_MNOC_HF_MEM_NOC QCOM_ICC_TAG_ALWAYS>;
+
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MX>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
+
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0179/2151] dt-bindings: clock: qcom,milos-videocc: Add missing power-domains support
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (177 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0178/2151] dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0180/2151] lsm: dont call security_backing_file_free() multiple times Greg Kroah-Hartman
` (703 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski, Taniya Das,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <taniya.das@oss.qualcomm.com>
[ Upstream commit 3da90acddd2f211549032e9fdad40a5879803442 ]
The Milos video clock controller requires the CX and MX power
domains, along with their performance state votes, to be enabled
before the clock controller can be accessed.
Document the 'power-domains' and 'required-opps' properties and add
them to the required properties list and example. Since these
properties become required for the already-documented
qcom,milos-videocc compatible, this is an ABI break for any devicetree
using this binding without specifying them.
Fixes: a4937e974186 ("dt-bindings: clock: qcom: document the Milos Video Clock Controller")
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260806-eliza-mm-cc-v9-v10-2-6ba52dd14343@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../bindings/clock/qcom,milos-videocc.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,milos-videocc.yaml b/Documentation/devicetree/bindings/clock/qcom,milos-videocc.yaml
index 14c31efe1308a..4d8d109cd304e 100644
--- a/Documentation/devicetree/bindings/clock/qcom,milos-videocc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,milos-videocc.yaml
@@ -26,9 +26,21 @@ properties:
- description: Sleep clock source
- description: Video AHB clock from GCC
+ power-domains:
+ items:
+ - description: CX power domain
+ - description: MX power domain
+
+ required-opps:
+ items:
+ - description: CX performance point
+ - description: MX performance point
+
required:
- compatible
- clocks
+ - power-domains
+ - required-opps
allOf:
- $ref: qcom,gcc.yaml#
@@ -38,6 +50,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,milos-gcc.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
clock-controller@aaf0000 {
compatible = "qcom,milos-videocc";
reg = <0x0aaf0000 0x10000>;
@@ -45,6 +58,12 @@ examples:
<&bi_tcxo_ao_div2>,
<&sleep_clk>,
<&gcc GCC_VIDEO_AHB_CLK>;
+
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_MX>;
+ required-opps = <&rpmhpd_opp_low_svs>,
+ <&rpmhpd_opp_low_svs>;
+
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0180/2151] lsm: dont call security_backing_file_free() multiple times
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (178 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0179/2151] dt-bindings: clock: qcom,milos-videocc: " Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0181/2151] ASoC: wcd-mbhc-v2: Fix incorrect properties names and typos Greg Kroah-Hartman
` (702 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Cai Xinchen, Paul Moore, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cai Xinchen <caixinchen1@huawei.com>
[ Upstream commit 3a84fc1a21577dbc8da7e4b6a49c9d8b07c07000 ]
I found the following path:
alloc_empty_backing-file
init_file(&ff->file, xxx)
-> file_ref_init(&f->f_ref, 1); // only 1
error = init_backing_file
-> security_backing_file_alloc
-> rc = call_int_hook(backing_file_alloc, ...)
if (unlikely(rc))
security_backing_file_free(backing_file); // first call
if (unlikely(error)) {
fput(&ff->file);
-> if (unlikely(file_ref_put(&file->f_ref))) // zero
__fput_deferred(file);
-> ____fput -> __fput -> file_free(file);
-> backing_file_free(backing_file(f));
-> security_backing_file_free(&ff->file); // second call
Currently, only SELinux has the lsm backing_file_alloc hook, and it always
return 0. When security_backing_file_free is called for the first time,
the blobs pointer is set to NULL. Therefore, double free will not occur in
the code.
Fixes: 6af36aeb147a ("lsm: add backing_file LSM hooks")
Signed-off-by: Cai Xinchen <caixinchen1@huawei.com>
[PM: subject line tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/security.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/security/security.c b/security/security.c
index 9285909908ab8..a611a63af574b 100644
--- a/security/security.c
+++ b/security/security.c
@@ -3040,9 +3040,8 @@ void security_backing_file_free(struct file *backing_file)
{
void *blob = backing_file_security(backing_file);
- call_void_hook(backing_file_free, backing_file);
-
if (blob) {
+ call_void_hook(backing_file_free, backing_file);
backing_file_set_security(backing_file, NULL);
kmem_cache_free(lsm_backing_file_cache, blob);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0181/2151] ASoC: wcd-mbhc-v2: Fix incorrect properties names and typos
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (179 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0180/2151] lsm: dont call security_backing_file_free() multiple times Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0182/2151] pwm: renesas-tpu: Fix runtime PM reference leak Greg Kroah-Hartman
` (701 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Heidelberg, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Heidelberg <david@ixit.cz>
[ Upstream commit 17bca5d55446c1e21944d47354ee2f0b80db36d6 ]
Improves debugging experience.
Fixes: 0e5c9e7ff899 ("ASoC: codecs: wcd: add multi button Headset detection support")
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://patch.msgid.link/20260823-wcd-dt-typo-fix-v1-1-a71b458e0d31@ixit.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/wcd-mbhc-v2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c
index 26ebcdadeb7da..ee6d6cbc9b20a 100644
--- a/sound/soc/codecs/wcd-mbhc-v2.c
+++ b/sound/soc/codecs/wcd-mbhc-v2.c
@@ -864,7 +864,7 @@ static int wcd_measure_adc_continuous(struct wcd_mbhc *mbhc)
u8 adc_en;
/* Pre-requisites for ADC continuous measurement */
- /* Read legacy electircal detection and disable */
+ /* Read legacy electrical detection and disable */
wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 0x00);
/* Set ADC to continuous measurement */
wcd_mbhc_write_field(mbhc, WCD_MBHC_ADC_MODE, 1);
@@ -965,7 +965,7 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc)
if (wcd_mbhc_read_field(mbhc, WCD_MBHC_HPH_PA_EN))
return -EINVAL;
- /* Read legacy electircal detection and disable */
+ /* Read legacy electrical detection and disable */
elect_ctl = wcd_mbhc_read_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC);
wcd_mbhc_write_field(mbhc, WCD_MBHC_ELECT_SCHMT_ISRC, 0);
@@ -1470,14 +1470,14 @@ int wcd_dt_parse_mbhc_data(struct device *dev, struct wcd_mbhc_config *cfg)
ret = of_property_read_u32(np, "qcom,mbhc-headset-vthreshold-microvolt",
µvolt);
if (ret)
- dev_dbg(dev, "missing qcom,mbhc-hs-mic-max-vthreshold--microvolt in dt node\n");
+ dev_dbg(dev, "missing qcom,mbhc-headset-vthreshold-microvolt in dt node\n");
else
cfg->hs_thr = microvolt/1000;
ret = of_property_read_u32(np, "qcom,mbhc-headphone-vthreshold-microvolt",
µvolt);
if (ret)
- dev_dbg(dev, "missing qcom,mbhc-hs-mic-min-vthreshold-microvolt entry\n");
+ dev_dbg(dev, "missing qcom,mbhc-headphone-vthreshold-microvolt entry\n");
else
cfg->hph_thr = microvolt/1000;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0182/2151] pwm: renesas-tpu: Fix runtime PM reference leak
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (180 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0181/2151] ASoC: wcd-mbhc-v2: Fix incorrect properties names and typos Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0183/2151] spi: omap2-mcspi: Remove unbalanced pm_runtime_put_sync() calls Greg Kroah-Hartman
` (700 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ruoyu Wang, Uwe Kleine-König,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ruoyu Wang <ruoyuw560@gmail.com>
[ Upstream commit 62cff15fbf2b12ebbb0b01ca720030c2bc12aed1 ]
tpu_pwm_timer_start() used pm_runtime_get_sync() without checking its
return value before touching the TPU clock. A failed runtime resume was
therefore ignored, and the callback continued into register access.
Use pm_runtime_resume_and_get() and propagate a failed resume. Keep the
matching put when clock preparation fails after a successful resume.
tpu_pwm_disable() also needs to propagate a failed start so that the PWM
apply callback does not access registers while runtime PM is inactive.
This issue was found by a static analysis checker and confirmed by manual
source review.
Fixes: 99b82abb0a35 ("pwm: Add Renesas TPU PWM driver")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Link: https://patch.msgid.link/20260814134143.1388120-1-ruoyuw560@gmail.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pwm/pwm-renesas-tpu.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index 2196080b41770..c0bbe275275c8 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -149,10 +149,14 @@ static int tpu_pwm_timer_start(struct tpu_pwm_device *tpd)
if (!tpd->timer_on) {
/* Wake up device and enable clock. */
- pm_runtime_get_sync(&tpd->tpu->pdev->dev);
+ ret = pm_runtime_resume_and_get(&tpd->tpu->pdev->dev);
+ if (ret < 0)
+ return ret;
+
ret = clk_prepare_enable(tpd->tpu->clk);
if (ret) {
dev_err(&tpd->tpu->pdev->dev, "cannot enable clock\n");
+ pm_runtime_put(&tpd->tpu->pdev->dev);
return ret;
}
tpd->timer_on = true;
@@ -382,15 +386,21 @@ static int tpu_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
return 0;
}
-static void tpu_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
+static int tpu_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct tpu_device *tpu = to_tpu_device(chip);
struct tpu_pwm_device *tpd = &tpu->tpd[pwm->hwpwm];
+ int ret;
/* The timer must be running to modify the pin output configuration. */
- tpu_pwm_timer_start(tpd);
+ ret = tpu_pwm_timer_start(tpd);
+ if (ret < 0)
+ return ret;
+
tpu_pwm_set_pin(tpd, TPU_PIN_INACTIVE);
tpu_pwm_timer_stop(tpd);
+
+ return 0;
}
static int tpu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -401,7 +411,10 @@ static int tpu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
if (state->polarity != pwm->state.polarity) {
if (enabled) {
- tpu_pwm_disable(chip, pwm);
+ err = tpu_pwm_disable(chip, pwm);
+ if (err)
+ return err;
+
enabled = false;
}
@@ -412,7 +425,7 @@ static int tpu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
if (!state->enabled) {
if (enabled)
- tpu_pwm_disable(chip, pwm);
+ return tpu_pwm_disable(chip, pwm);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0183/2151] spi: omap2-mcspi: Remove unbalanced pm_runtime_put_sync() calls
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (181 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0182/2151] pwm: renesas-tpu: Fix runtime PM reference leak Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0184/2151] soc: qcom: apr: clean up failed service registrations Greg Kroah-Hartman
` (699 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Felix Gu, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Gu <ustc.gu@gmail.com>
[ Upstream commit 5f01cb141169fe422c42279f7d502479b1ff9fd2 ]
pm_runtime_put_sync() is called in the probe error path and in remove
when nothing holds a runtime PM reference anymore, so it underflows
the usage count.
Fixes: 0e6f357a5deb ("spi: omap2-mcspi: Fix PM regression with deferred probe for pm_runtime_reinit")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260826-mcspi-v1-1-0a8dd7f6dd56@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-omap2-mcspi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 86b3d21e77617..921fc07d9bee7 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1593,7 +1593,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
disable_pm:
pm_runtime_dont_use_autosuspend(&pdev->dev);
- pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
free_ctlr:
omap2_mcspi_release_dma(ctlr);
@@ -1613,7 +1612,6 @@ static void omap2_mcspi_remove(struct platform_device *pdev)
omap2_mcspi_release_dma(ctlr);
pm_runtime_dont_use_autosuspend(mcspi->dev);
- pm_runtime_put_sync(mcspi->dev);
pm_runtime_disable(&pdev->dev);
spi_controller_put(ctlr);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0184/2151] soc: qcom: apr: clean up failed service registrations
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (182 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0183/2151] spi: omap2-mcspi: Remove unbalanced pm_runtime_put_sync() calls Greg Kroah-Hartman
@ 2026-11-18 14:31 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0185/2151] platform/chrome: cros_ec_proto: Fix deferred response Greg Kroah-Hartman
` (698 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:31 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hongyan Xu, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hongyan Xu <getshell@seu.edu.cn>
[ Upstream commit 7dc14f37ca4ee35040c67c4b0180dd7b32079caf ]
apr_add_device() publishes a service in svcs_idr before parsing the
optional protection domain and registering the device. If device
registration fails, put_device() frees the apr_device while its service
remains in the IDR. A received packet can then dereference that stale
entry. The property error path also leaves the service and allocation
behind.
Split device_register() into device_initialize() and device_add() so every
pre-registration error can safely drop the device reference. Remove the
service from the IDR on all failures after publication, then drain the RX
workqueue before dropping the device reference. This prevents an in-flight
lookup from outliving the device.
Fixes: 6adba21eb434 ("soc: qcom: Add APR bus driver")
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
Link: https://lore.kernel.org/r/20260806060541.820-1-getshell@seu.edu.cn
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/soc/qcom/apr.c | 44 +++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c
index a956c407ce030..b80cf8f417b03 100644
--- a/drivers/soc/qcom/apr.c
+++ b/drivers/soc/qcom/apr.c
@@ -434,31 +434,35 @@ static int apr_add_device(struct device *dev, struct device_node *np,
if (np)
snprintf(adev->name, APR_NAME_SIZE, "%pOFn", np);
+ adev->dev.bus = &aprbus;
+ adev->dev.parent = dev;
+ adev->dev.of_node = np;
+ adev->dev.release = apr_dev_release;
+ adev->dev.driver = NULL;
+ device_initialize(&adev->dev);
+
switch (apr->type) {
case PR_TYPE_APR:
- dev_set_name(&adev->dev, "aprsvc:%s:%x:%x", adev->name,
- domain_id, svc_id);
+ ret = dev_set_name(&adev->dev, "aprsvc:%s:%x:%x", adev->name,
+ domain_id, svc_id);
break;
case PR_TYPE_GPR:
- dev_set_name(&adev->dev, "gprsvc:%s:%x:%x", adev->name,
- domain_id, svc_id);
+ ret = dev_set_name(&adev->dev, "gprsvc:%s:%x:%x", adev->name,
+ domain_id, svc_id);
break;
default:
+ ret = -EINVAL;
break;
}
-
- adev->dev.bus = &aprbus;
- adev->dev.parent = dev;
- adev->dev.of_node = np;
- adev->dev.release = apr_dev_release;
- adev->dev.driver = NULL;
+ if (ret)
+ goto out_put_device;
spin_lock(&apr->svcs_lock);
ret = idr_alloc(&apr->svcs_idr, svc, svc_id, svc_id + 1, GFP_ATOMIC);
spin_unlock(&apr->svcs_lock);
if (ret < 0) {
dev_err(dev, "idr_alloc failed: %d\n", ret);
- goto out;
+ goto out_put_device;
}
/* Protection domain is optional, it does not exist on older platforms */
@@ -466,18 +470,26 @@ static int apr_add_device(struct device *dev, struct device_node *np,
1, &adev->service_path);
if (ret < 0 && ret != -EINVAL) {
dev_err(dev, "Failed to read second value of qcom,protection-domain\n");
- goto out;
+ goto out_remove_idr;
}
dev_info(dev, "Adding APR/GPR dev: %s\n", dev_name(&adev->dev));
- ret = device_register(&adev->dev);
+ ret = device_add(&adev->dev);
if (ret) {
- dev_err(dev, "device_register failed: %d\n", ret);
- put_device(&adev->dev);
+ dev_err(dev, "device_add failed: %d\n", ret);
+ goto out_remove_idr;
}
-out:
+ return 0;
+
+out_remove_idr:
+ spin_lock(&apr->svcs_lock);
+ idr_remove(&apr->svcs_idr, svc_id);
+ spin_unlock(&apr->svcs_lock);
+ flush_workqueue(apr->rxwq);
+out_put_device:
+ put_device(&adev->dev);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0185/2151] platform/chrome: cros_ec_proto: Fix deferred response
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (183 preceding siblings ...)
2026-11-18 14:31 ` [PATCH 6.18 0184/2151] soc: qcom: apr: clean up failed service registrations Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0186/2151] staging: rtl8723bs: remove unused private debug counters Greg Kroah-Hartman
` (697 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Rob Barnes, Tzung-Bi Shih,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rob Barnes <robbarnes@google.com>
[ Upstream commit c55749415623a58eba3eb527da023d29b43fbf5d ]
When cros_ec_wait_until_complete() succeeds after an
EC_RES_IN_PROGRESS status, it previously returned the 4-byte
transfer size of EC_CMD_GET_COMMS_STATUS. For 0-byte payload
commands (such as EC_CMD_FLASH_ERASE), userspace received 4
bytes instead of 0, causing response size validation errors.
For commands expecting non-zero response payloads, the kernel
exited without issuing EC_CMD_RESEND_RESPONSE, leaving response
buffers uninitialized.
Refactor cros_ec_wait_until_complete() to pass orig_msg, issue
EC_CMD_RESEND_RESPONSE into orig_msg->data when insize > 0, and
return 0 for 0-byte response commands.
Fixes: 2c7589af3c4d ("mfd: cros_ec: add proto v3 skeleton")
Signed-off-by: Rob Barnes <robbarnes@google.com>
Link: https://lore.kernel.org/r/20260901005126.3344929-1-robbarnes@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/chrome/cros_ec_proto.c | 32 +++-
drivers/platform/chrome/cros_ec_proto_test.c | 158 ++++++++++++++++++-
2 files changed, 183 insertions(+), 7 deletions(-)
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index 1d8d9168ec1aa..6d7c57e381e5e 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -138,7 +138,8 @@ static int cros_ec_xfer_command(struct cros_ec_device *ec_dev, struct cros_ec_co
return ret;
}
-static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev, uint32_t *result)
+static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev,
+ struct cros_ec_command *orig_msg)
{
DEFINE_RAW_FLEX(struct cros_ec_command, msg, data,
sizeof(struct ec_response_get_comms_status));
@@ -161,7 +162,7 @@ static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev, uint32_t *
if (ret < 0)
return ret;
- *result = msg->result;
+ orig_msg->result = msg->result;
if (msg->result != EC_RES_SUCCESS)
return ret;
@@ -170,8 +171,31 @@ static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev, uint32_t *
break;
}
- if (!(status->flags & EC_COMMS_STATUS_PROCESSING))
+ if (!(status->flags & EC_COMMS_STATUS_PROCESSING)) {
+ u32 orig_cmd, orig_outsize, orig_version;
+
+ /* If no response payload is expected, return 0. */
+ if (orig_msg->insize == 0)
+ return 0;
+
+ /*
+ * Request the response using EC_CMD_RESEND_RESPONSE.
+ * Restore the original message fields so it appears
+ * to be a direct response to the original command.
+ */
+ orig_cmd = orig_msg->command;
+ orig_outsize = orig_msg->outsize;
+ orig_version = orig_msg->version;
+
+ orig_msg->command = EC_CMD_RESEND_RESPONSE;
+ orig_msg->outsize = 0;
+ orig_msg->version = 0;
+ ret = cros_ec_xfer_command(ec_dev, orig_msg);
+ orig_msg->command = orig_cmd;
+ orig_msg->outsize = orig_outsize;
+ orig_msg->version = orig_version;
return ret;
+ }
}
if (i >= EC_COMMAND_RETRIES)
@@ -185,7 +209,7 @@ static int cros_ec_send_command(struct cros_ec_device *ec_dev, struct cros_ec_co
int ret = cros_ec_xfer_command(ec_dev, msg);
if (msg->result == EC_RES_IN_PROGRESS)
- ret = cros_ec_wait_until_complete(ec_dev, &msg->result);
+ ret = cros_ec_wait_until_complete(ec_dev, msg);
return ret;
}
diff --git a/drivers/platform/chrome/cros_ec_proto_test.c b/drivers/platform/chrome/cros_ec_proto_test.c
index 3f281996a6863..cbaaf98d6877e 100644
--- a/drivers/platform/chrome/cros_ec_proto_test.c
+++ b/drivers/platform/chrome/cros_ec_proto_test.c
@@ -1744,7 +1744,7 @@ static void cros_ec_proto_test_cmd_xfer_protocol_v2_no_op(struct kunit *test)
KUNIT_EXPECT_EQ(test, ret, -EIO);
}
-static void cros_ec_proto_test_cmd_xfer_in_progress_normal(struct kunit *test)
+static void cros_ec_proto_test_cmd_xfer_in_progress_payload_0byte(struct kunit *test)
{
struct cros_ec_proto_test_priv *priv = test->priv;
struct cros_ec_device *ec_dev = &priv->ec_dev;
@@ -1774,7 +1774,7 @@ static void cros_ec_proto_test_cmd_xfer_in_progress_normal(struct kunit *test)
}
ret = cros_ec_cmd_xfer(ec_dev, &msg);
- KUNIT_EXPECT_EQ(test, ret, sizeof(struct ec_response_get_comms_status));
+ KUNIT_EXPECT_EQ(test, ret, 0);
KUNIT_EXPECT_EQ(test, msg.result, EC_RES_SUCCESS);
@@ -1799,6 +1799,156 @@ static void cros_ec_proto_test_cmd_xfer_in_progress_normal(struct kunit *test)
KUNIT_EXPECT_EQ(test, cros_kunit_ec_pkt_xfer_mock_called, 2);
}
+static void cros_ec_proto_test_cmd_xfer_in_progress_payload_4bytes(struct kunit *test)
+{
+ struct cros_ec_proto_test_priv *priv = test->priv;
+ struct cros_ec_device *ec_dev = &priv->ec_dev;
+ struct ec_xfer_mock *mock;
+ u8 resp_data[4] = {0x11, 0x22, 0x33, 0x44};
+ struct {
+ struct cros_ec_command msg;
+ u8 data[4];
+ } buf;
+ struct cros_ec_command *msg = &buf.msg;
+ int ret;
+
+ memset(&buf, 0, sizeof(buf));
+ msg->version = 1;
+ msg->command = 0x1234;
+ msg->insize = sizeof(buf.data);
+
+ ec_dev->max_response = sizeof(buf.data);
+ ec_dev->pkt_xfer = cros_kunit_ec_pkt_xfer_mock;
+
+ /* For initial command returning EC_RES_IN_PROGRESS. */
+ {
+ mock = cros_kunit_ec_xfer_mock_addx(test, 0, EC_RES_IN_PROGRESS, 0);
+ KUNIT_ASSERT_PTR_NE(test, mock, NULL);
+ }
+
+ /* For EC_CMD_GET_COMMS_STATUS status polling. */
+ {
+ struct ec_response_get_comms_status *data;
+
+ mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data));
+ KUNIT_ASSERT_PTR_NE(test, mock, NULL);
+
+ data = (struct ec_response_get_comms_status *)mock->o_data;
+ data->flags = 0;
+ }
+
+ /* For EC_CMD_RESEND_RESPONSE returning 4 bytes payload. */
+ {
+ mock = cros_kunit_ec_xfer_mock_add(test, sizeof(resp_data));
+ KUNIT_ASSERT_PTR_NE(test, mock, NULL);
+ memcpy(mock->o_data, resp_data, sizeof(resp_data));
+ }
+
+ ret = cros_ec_cmd_xfer(ec_dev, msg);
+ KUNIT_EXPECT_EQ(test, ret, 4);
+ KUNIT_EXPECT_EQ(test, msg->result, EC_RES_SUCCESS);
+ KUNIT_EXPECT_EQ(test, msg->command, 0x1234);
+ KUNIT_EXPECT_EQ(test, msg->insize, sizeof(buf.data));
+ KUNIT_EXPECT_EQ(test, msg->version, 1);
+ KUNIT_EXPECT_EQ(test, memcmp(msg->data, resp_data, sizeof(resp_data)), 0);
+
+ /* Verify mock sequence */
+ {
+ mock = cros_kunit_ec_xfer_mock_next();
+ KUNIT_EXPECT_PTR_NE(test, mock, NULL);
+
+ mock = cros_kunit_ec_xfer_mock_next();
+ KUNIT_EXPECT_PTR_NE(test, mock, NULL);
+ KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_COMMS_STATUS);
+
+ mock = cros_kunit_ec_xfer_mock_next();
+ KUNIT_EXPECT_PTR_NE(test, mock, NULL);
+ KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_RESEND_RESPONSE);
+ KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0);
+ KUNIT_EXPECT_EQ(test, mock->msg.version, 0);
+ KUNIT_EXPECT_EQ(test, mock->msg.insize, 4);
+ }
+
+ KUNIT_EXPECT_EQ(test, cros_kunit_ec_pkt_xfer_mock_called, 3);
+}
+
+static void cros_ec_proto_test_cmd_xfer_in_progress_payload_gt4bytes(struct kunit *test)
+{
+ struct cros_ec_proto_test_priv *priv = test->priv;
+ struct cros_ec_device *ec_dev = &priv->ec_dev;
+ struct ec_xfer_mock *mock;
+ u8 resp_data[16];
+ struct {
+ struct cros_ec_command msg;
+ u8 data[16];
+ } buf;
+ struct cros_ec_command *msg = &buf.msg;
+ int ret, i;
+
+ for (i = 0; i < sizeof(resp_data); ++i)
+ resp_data[i] = (u8)(i + 1);
+
+ memset(&buf, 0, sizeof(buf));
+ msg->version = 0;
+ msg->command = 0x5678;
+ msg->insize = sizeof(buf.data);
+
+ ec_dev->max_response = sizeof(buf.data);
+ ec_dev->pkt_xfer = cros_kunit_ec_pkt_xfer_mock;
+
+ /* For initial command returning EC_RES_IN_PROGRESS. */
+ {
+ mock = cros_kunit_ec_xfer_mock_addx(test, 0, EC_RES_IN_PROGRESS, 0);
+ KUNIT_ASSERT_PTR_NE(test, mock, NULL);
+ }
+
+ /* For EC_CMD_GET_COMMS_STATUS status polling. */
+ {
+ struct ec_response_get_comms_status *data;
+
+ mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data));
+ KUNIT_ASSERT_PTR_NE(test, mock, NULL);
+
+ data = (struct ec_response_get_comms_status *)mock->o_data;
+ data->flags = 0;
+ }
+
+ /* For EC_CMD_RESEND_RESPONSE returning 16 bytes payload. */
+ {
+ mock = cros_kunit_ec_xfer_mock_add(test, sizeof(resp_data));
+ KUNIT_ASSERT_PTR_NE(test, mock, NULL);
+ memcpy(mock->o_data, resp_data, sizeof(resp_data));
+ }
+
+ ret = cros_ec_cmd_xfer(ec_dev, msg);
+ KUNIT_EXPECT_EQ(test, ret, 16);
+ KUNIT_EXPECT_EQ(test, msg->result, EC_RES_SUCCESS);
+ KUNIT_EXPECT_EQ(test, msg->command, 0x5678);
+ KUNIT_EXPECT_EQ(test, msg->outsize, 0);
+ KUNIT_EXPECT_EQ(test, msg->insize, sizeof(buf.data));
+ KUNIT_EXPECT_EQ(test, msg->version, 0);
+ KUNIT_EXPECT_EQ(test, memcmp(msg->data, resp_data, sizeof(resp_data)), 0);
+
+ /* Verify mock sequence */
+ {
+ mock = cros_kunit_ec_xfer_mock_next();
+ KUNIT_EXPECT_PTR_NE(test, mock, NULL);
+
+ mock = cros_kunit_ec_xfer_mock_next();
+ KUNIT_EXPECT_PTR_NE(test, mock, NULL);
+ KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_GET_COMMS_STATUS);
+
+ mock = cros_kunit_ec_xfer_mock_next();
+ KUNIT_EXPECT_PTR_NE(test, mock, NULL);
+ KUNIT_EXPECT_EQ(test, mock->msg.command, EC_CMD_RESEND_RESPONSE);
+ KUNIT_EXPECT_EQ(test, mock->msg.outsize, 0);
+ KUNIT_EXPECT_EQ(test, mock->msg.version, 0);
+ KUNIT_EXPECT_EQ(test, mock->msg.insize, 16);
+ }
+
+ KUNIT_EXPECT_EQ(test, cros_kunit_ec_pkt_xfer_mock_called, 3);
+}
+
static void cros_ec_proto_test_cmd_xfer_in_progress_retries_eagain(struct kunit *test)
{
struct cros_ec_proto_test_priv *priv = test->priv;
@@ -2703,7 +2853,9 @@ static struct kunit_case cros_ec_proto_test_cases[] = {
KUNIT_CASE(cros_ec_proto_test_cmd_xfer_protocol_v3_no_op),
KUNIT_CASE(cros_ec_proto_test_cmd_xfer_protocol_v2_normal),
KUNIT_CASE(cros_ec_proto_test_cmd_xfer_protocol_v2_no_op),
- KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_normal),
+ KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_payload_0byte),
+ KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_payload_4bytes),
+ KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_payload_gt4bytes),
KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_retries_eagain),
KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_retries_status_processing),
KUNIT_CASE(cros_ec_proto_test_cmd_xfer_in_progress_xfer_error),
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0186/2151] staging: rtl8723bs: remove unused private debug counters
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (184 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0185/2151] platform/chrome: cros_ec_proto: Fix deferred response Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0187/2151] staging: rtl8723bs: disable SDIO function on block size failure Greg Kroah-Hartman
` (696 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ethan Tidmore, Dan Carpenter,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ethan Tidmore <ethantidmore06@gmail.com>
[ Upstream commit 7de30d5d76aa614777a02a9807d29ed65b0704a0 ]
The driver maintains a private `struct debug_priv` embedded within
`struct dvobj_priv` to track various error counters (e.g., suspend
errors, alloc failures, RX drops).
These counters are incremented in various files but the data is
never read or exposed to userspace.
Remove the unused `debug_priv` structure definition, the instance
in `dvobj_priv`, and all associated increment operations across
the driver to clean up the code.
This also removes the following helper functions which were used
solely to update these counters:
- rtw_reset_rx_info()
- recv_indicatepkts_pkt_loss_cnt()
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20260131212128.25548-1-ethantidmore06@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: baa84b1bb164 ("staging: rtl8723bs: disable SDIO function on block size failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 13 ------
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 3 --
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 +--
drivers/staging/rtl8723bs/core/rtw_recv.c | 24 +---------
drivers/staging/rtl8723bs/hal/hal_com.c | 13 ------
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 --
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 +---
drivers/staging/rtl8723bs/include/drv_types.h | 41 -----------------
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 15 +------
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 45 +++++--------------
10 files changed, 15 insertions(+), 157 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 039d47f221cfc..c3f6caaccb1ef 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -828,15 +828,6 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
spin_unlock_bh(&scan_queue->lock);
}
-static void rtw_reset_rx_info(struct debug_priv *pdbgpriv)
-{
- pdbgpriv->dbg_rx_ampdu_drop_count = 0;
- pdbgpriv->dbg_rx_ampdu_forced_indicate_count = 0;
- pdbgpriv->dbg_rx_ampdu_loss_count = 0;
- pdbgpriv->dbg_rx_dup_mgt_frame_drop_count = 0;
- pdbgpriv->dbg_rx_ampdu_window_shift_cnt = 0;
-}
-
static void find_network(struct adapter *adapter)
{
struct wlan_network *pwlan = NULL;
@@ -861,8 +852,6 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
{
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
struct wlan_network *tgt_network = &pmlmepriv->cur_network;
- struct dvobj_priv *psdpriv = adapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_AP_STATE)) {
struct sta_info *psta;
@@ -886,8 +875,6 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
if (lock_scanned_queue)
adapter->securitypriv.key_mask = 0;
-
- rtw_reset_rx_info(pdbgpriv);
}
/*
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index 8d33631ab8f0f..025c72795a867 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -448,8 +448,6 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 *pframe = precv_frame->u.hdr.rx_data;
struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
if (GetFrameType(pframe) != WIFI_MGT_TYPE)
return;
@@ -473,7 +471,6 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
if (GetRetry(pframe)) {
if (precv_frame->u.hdr.attrib.seq_num == psta->RxMgmtFrameSeqNum) {
/* drop the duplicate management frame */
- pdbgpriv->dbg_rx_dup_mgt_frame_drop_count++;
return;
}
}
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 7b643ac320f0d..4f329115b7fda 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -139,8 +139,6 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
void rtw_ps_processor(struct adapter *padapter)
{
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
u32 ps_deny = 0;
mutex_lock(&adapter_to_pwrctl(padapter)->lock);
@@ -149,10 +147,8 @@ void rtw_ps_processor(struct adapter *padapter)
if (ps_deny != 0)
goto exit;
- if (pwrpriv->bInSuspend) {/* system suspend or autosuspend */
- pdbgpriv->dbg_ps_insuspend_cnt++;
+ if (pwrpriv->bInSuspend) /* system suspend or autosuspend */
return;
- }
pwrpriv->ps_processing = true;
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index f8ade0bea1da0..04503571faf95 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1779,9 +1779,6 @@ static int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
{
- struct adapter *padapter = preorder_ctrl->padapter;
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
u8 wsize = preorder_ctrl->wsize_b;
u16 wend = (preorder_ctrl->indicate_seq + wsize - 1) % 4096u;
@@ -1807,7 +1804,6 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n
preorder_ctrl->indicate_seq = seq_num + 1 - wsize;
else
preorder_ctrl->indicate_seq = 0xFFF - (wsize - (seq_num + 1)) + 1;
- pdbgpriv->dbg_rx_ampdu_window_shift_cnt++;
}
return true;
@@ -1856,15 +1852,6 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un
}
-static void recv_indicatepkts_pkt_loss_cnt(struct debug_priv *pdbgpriv, u64 prev_seq, u64 current_seq)
-{
- if (current_seq < prev_seq)
- pdbgpriv->dbg_rx_ampdu_loss_count += (4096 + current_seq - prev_seq);
- else
- pdbgpriv->dbg_rx_ampdu_loss_count += (current_seq - prev_seq);
-
-}
-
static int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame)
{
struct recv_priv *precvpriv;
@@ -1911,8 +1898,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
int bPktInBuf = false;
struct recv_priv *precvpriv = &padapter->recvpriv;
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */
/* spin_lock(&ppending_recvframe_queue->lock); */
@@ -1922,7 +1907,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
/* Handling some condition for forced indicate case. */
if (bforced == true) {
- pdbgpriv->dbg_rx_ampdu_forced_indicate_count++;
if (list_empty(phead)) {
/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */
/* spin_unlock(&ppending_recvframe_queue->lock); */
@@ -1932,7 +1916,6 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
prframe = (union recv_frame *)plist;
pattrib = &prframe->u.hdr.attrib;
- recv_indicatepkts_pkt_loss_cnt(pdbgpriv, preorder_ctrl->indicate_seq, pattrib->seq_num);
preorder_ctrl->indicate_seq = pattrib->seq_num;
}
@@ -1992,8 +1975,6 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
struct recv_reorder_ctrl *preorder_ctrl = prframe->u.hdr.preorder_ctrl;
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
if (!pattrib->amsdu) {
/* s1. */
@@ -2039,11 +2020,8 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *
spin_lock_bh(&ppending_recvframe_queue->lock);
/* s2. check if winstart_b(indicate_seq) needs to been updated */
- if (!check_indicate_seq(preorder_ctrl, pattrib->seq_num)) {
- pdbgpriv->dbg_rx_ampdu_drop_count++;
+ if (!check_indicate_seq(preorder_ctrl, pattrib->seq_num))
goto _err_exit;
- }
-
/* s3. Insert all packet into Reorder Queue to maintain its ordering. */
if (!enqueue_reorder_recvframe(preorder_ctrl, prframe)) {
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 07e9d34236517..8c6560a8313cf 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -847,21 +847,8 @@ bool GetU1ByteIntegerFromStringInDecimal(char *Str, u8 *pInt)
void rtw_hal_check_rxfifo_full(struct adapter *adapter)
{
- struct dvobj_priv *psdpriv = adapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
- int save_cnt = false;
-
/* switch counter to RX fifo */
rtw_write8(adapter, REG_RXERR_RPT+3, rtw_read8(adapter, REG_RXERR_RPT+3)|0xf0);
- save_cnt = true;
- /* todo: other chips */
-
- if (save_cnt) {
- /* rtw_write8(adapter, REG_RXERR_RPT+3, rtw_read8(adapter, REG_RXERR_RPT+3)|0xa0); */
- pdbgpriv->dbg_rx_fifo_last_overflow = pdbgpriv->dbg_rx_fifo_curr_overflow;
- pdbgpriv->dbg_rx_fifo_curr_overflow = rtw_read16(adapter, REG_RXERR_RPT);
- pdbgpriv->dbg_rx_fifo_diff_overflow = pdbgpriv->dbg_rx_fifo_curr_overflow-pdbgpriv->dbg_rx_fifo_last_overflow;
- }
}
static u32 Array_kfreemap[] = {
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 18244adad9e04..896079330ebe5 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -304,8 +304,6 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw)
const struct firmware *fw;
struct device *device = dvobj_to_dev(padapter->dvobj);
u8 *fwfilepath;
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
u8 tmp_ps;
pFirmware = kzalloc(sizeof(struct rt_firmware), GFP_KERNEL);
@@ -324,8 +322,6 @@ s32 rtl8723b_FirmwareDownload(struct adapter *padapter, bool bUsedWoWLANFw)
/* 2. read power_state = 0xA0[1:0] */
tmp_ps = rtw_read8(padapter, 0xa0);
tmp_ps &= 0x03;
- if (tmp_ps != 0x01)
- pdbgpriv->dbg_downloadfw_pwr_state_cnt++;
fwfilepath = "rtlwifi/rtl8723bs_nic.bin";
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 7fcb874d0eb3a..c195c0ea148d6 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -886,9 +886,6 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
u32 rtl8723bs_hal_deinit(struct adapter *padapter)
{
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
-
if (padapter->hw_init_completed) {
if (adapter_to_pwrctl(padapter)->bips_processing) {
if (padapter->netif_up) {
@@ -921,18 +918,15 @@ u32 rtl8723bs_hal_deinit(struct adapter *padapter)
adapter_to_pwrctl(padapter)->pre_ips_type = 0;
} else {
- pdbgpriv->dbg_carddisable_cnt++;
CardDisableRTL8723BSdio(padapter);
adapter_to_pwrctl(padapter)->pre_ips_type = 1;
}
} else {
- pdbgpriv->dbg_carddisable_cnt++;
CardDisableRTL8723BSdio(padapter);
}
- } else
- pdbgpriv->dbg_deinit_fail_cnt++;
+ }
return _SUCCESS;
}
diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
index dd9018aa4ee51..cee57218876da 100644
--- a/drivers/staging/rtl8723bs/include/drv_types.h
+++ b/drivers/staging/rtl8723bs/include/drv_types.h
@@ -184,45 +184,6 @@ struct registry_priv {
#define GET_IFACE_NUMS(padapter) (((struct adapter *)padapter)->dvobj->iface_nums)
#define GET_ADAPTER(padapter, iface_id) (((struct adapter *)padapter)->dvobj->padapters[iface_id])
-struct debug_priv {
- u32 dbg_sdio_free_irq_error_cnt;
- u32 dbg_sdio_alloc_irq_error_cnt;
- u32 dbg_sdio_free_irq_cnt;
- u32 dbg_sdio_alloc_irq_cnt;
- u32 dbg_sdio_deinit_error_cnt;
- u32 dbg_sdio_init_error_cnt;
- u32 dbg_suspend_error_cnt;
- u32 dbg_suspend_cnt;
- u32 dbg_resume_cnt;
- u32 dbg_resume_error_cnt;
- u32 dbg_deinit_fail_cnt;
- u32 dbg_carddisable_cnt;
- u32 dbg_carddisable_error_cnt;
- u32 dbg_ps_insuspend_cnt;
- u32 dbg_dev_unload_inIPS_cnt;
- u32 dbg_wow_leave_ps_fail_cnt;
- u32 dbg_scan_pwr_state_cnt;
- u32 dbg_downloadfw_pwr_state_cnt;
- u32 dbg_fw_read_ps_state_fail_cnt;
- u32 dbg_leave_ips_fail_cnt;
- u32 dbg_leave_lps_fail_cnt;
- u32 dbg_h2c_leave32k_fail_cnt;
- u32 dbg_diswow_dload_fw_fail_cnt;
- u32 dbg_enwow_dload_fw_fail_cnt;
- u32 dbg_ips_drvopen_fail_cnt;
- u32 dbg_poll_fail_cnt;
- u32 dbg_rpwm_toggle_cnt;
- u32 dbg_rpwm_timeout_fail_cnt;
- u64 dbg_rx_fifo_last_overflow;
- u64 dbg_rx_fifo_curr_overflow;
- u64 dbg_rx_fifo_diff_overflow;
- u64 dbg_rx_ampdu_drop_count;
- u64 dbg_rx_ampdu_forced_indicate_count;
- u64 dbg_rx_ampdu_loss_count;
- u64 dbg_rx_dup_mgt_frame_drop_count;
- u64 dbg_rx_ampdu_window_shift_cnt;
-};
-
struct rtw_traffic_statistics {
/* tx statistics */
u64 tx_bytes;
@@ -258,8 +219,6 @@ struct dvobj_priv {
s32 processing_dev_remove;
- struct debug_priv drv_dbg;
-
/* for local/global synchronization */
/* */
spinlock_t lock;
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 9f7f6b40093c8..461fab8b2f465 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -974,8 +974,6 @@ void rtw_ndev_destructor(struct net_device *ndev)
void rtw_dev_unload(struct adapter *padapter)
{
struct pwrctrl_priv *pwrctl = adapter_to_pwrctl(padapter);
- struct dvobj_priv *pobjpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &pobjpriv->drv_dbg;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
u8 cnt = 0;
@@ -1005,7 +1003,6 @@ void rtw_dev_unload(struct adapter *padapter)
/* check HW status and SW state */
netdev_dbg(padapter->pnetdev,
"%s: driver in IPS-FWLPS\n", __func__);
- pdbgpriv->dbg_dev_unload_inIPS_cnt++;
LeaveAllPowerSaveMode(padapter);
} else {
netdev_dbg(padapter->pnetdev,
@@ -1089,24 +1086,21 @@ static void rtw_suspend_normal(struct adapter *padapter)
void rtw_suspend_common(struct adapter *padapter)
{
struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(psdpriv);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
unsigned long start_time = jiffies;
netdev_dbg(padapter->pnetdev, " suspend start\n");
- pdbgpriv->dbg_suspend_cnt++;
pwrpriv->bInSuspend = true;
while (pwrpriv->bips_processing)
msleep(1);
- if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved)) {
- pdbgpriv->dbg_suspend_error_cnt++;
+ if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved))
return;
- }
+
rtw_ps_deny(padapter, PS_DENY_SUSPEND);
rtw_cancel_all_timer(padapter);
@@ -1134,8 +1128,6 @@ static int rtw_resume_process_normal(struct adapter *padapter)
struct net_device *pnetdev;
struct pwrctrl_priv *pwrpriv;
struct mlme_priv *pmlmepriv;
- struct dvobj_priv *psdpriv;
- struct debug_priv *pdbgpriv;
int ret = _SUCCESS;
@@ -1147,8 +1139,6 @@ static int rtw_resume_process_normal(struct adapter *padapter)
pnetdev = padapter->pnetdev;
pwrpriv = adapter_to_pwrctl(padapter);
pmlmepriv = &padapter->mlmepriv;
- psdpriv = padapter->dvobj;
- pdbgpriv = &psdpriv->drv_dbg;
/* interface init */
/* if (sdio_init(adapter_to_dvobj(padapter)) != _SUCCESS) */
if ((padapter->intf_init) && (padapter->intf_init(adapter_to_dvobj(padapter)) != _SUCCESS)) {
@@ -1167,7 +1157,6 @@ static int rtw_resume_process_normal(struct adapter *padapter)
if (pm_netdev_open(pnetdev, true) != 0) {
ret = -1;
- pdbgpriv->dbg_resume_error_cnt++;
goto exit;
}
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index e9bf6c3b18af0..32ee0f8f4bb99 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -70,13 +70,10 @@ static int sdio_alloc_irq(struct dvobj_priv *dvobj)
sdio_claim_host(func);
err = sdio_claim_irq(func, &sd_sync_int_hdl);
- if (err) {
- dvobj->drv_dbg.dbg_sdio_alloc_irq_error_cnt++;
+ if (err)
netdev_crit(dvobj->if1->pnetdev, "%s: sdio_claim_irq FAIL(%d)!\n", __func__, err);
- } else {
- dvobj->drv_dbg.dbg_sdio_alloc_irq_cnt++;
+ else
dvobj->irq_alloc = 1;
- }
sdio_release_host(func);
@@ -97,12 +94,10 @@ static void sdio_free_irq(struct dvobj_priv *dvobj)
sdio_claim_host(func);
err = sdio_release_irq(func);
if (err) {
- dvobj->drv_dbg.dbg_sdio_free_irq_error_cnt++;
netdev_err(dvobj->if1->pnetdev,
"%s: sdio_release_irq FAIL(%d)!\n",
__func__, err);
- } else
- dvobj->drv_dbg.dbg_sdio_free_irq_cnt++;
+ }
sdio_release_host(func);
}
dvobj->irq_alloc = 0;
@@ -122,16 +117,13 @@ static u32 sdio_init(struct dvobj_priv *dvobj)
sdio_claim_host(func);
err = sdio_enable_func(func);
- if (err) {
- dvobj->drv_dbg.dbg_sdio_init_error_cnt++;
+ if (err)
goto release;
- }
err = sdio_set_block_size(func, 512);
- if (err) {
- dvobj->drv_dbg.dbg_sdio_init_error_cnt++;
+ if (err)
goto release;
- }
+
psdio_data->block_transfer_len = 512;
psdio_data->tx_block_mode = 1;
psdio_data->rx_block_mode = 1;
@@ -147,22 +139,15 @@ static u32 sdio_init(struct dvobj_priv *dvobj)
static void sdio_deinit(struct dvobj_priv *dvobj)
{
struct sdio_func *func;
- int err;
func = dvobj->intf_data.func;
if (func) {
sdio_claim_host(func);
- err = sdio_disable_func(func);
- if (err)
- dvobj->drv_dbg.dbg_sdio_deinit_error_cnt++;
+ sdio_disable_func(func);
if (dvobj->irq_alloc) {
- err = sdio_release_irq(func);
- if (err)
- dvobj->drv_dbg.dbg_sdio_free_irq_error_cnt++;
- else
- dvobj->drv_dbg.dbg_sdio_free_irq_cnt++;
+ sdio_release_irq(func);
}
sdio_release_host(func);
@@ -437,15 +422,12 @@ static int rtw_sdio_suspend(struct device *dev)
struct dvobj_priv *psdpriv = sdio_get_drvdata(func);
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(psdpriv);
struct adapter *padapter = psdpriv->if1;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
if (padapter->bDriverStopped)
return 0;
- if (pwrpriv->bInSuspend) {
- pdbgpriv->dbg_suspend_error_cnt++;
+ if (pwrpriv->bInSuspend)
return 0;
- }
rtw_suspend_common(padapter);
@@ -455,13 +437,9 @@ static int rtw_sdio_suspend(struct device *dev)
static int rtw_resume_process(struct adapter *padapter)
{
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
- struct dvobj_priv *psdpriv = padapter->dvobj;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
- if (!pwrpriv->bInSuspend) {
- pdbgpriv->dbg_resume_error_cnt++;
+ if (!pwrpriv->bInSuspend)
return -1;
- }
return rtw_resume_common(padapter);
}
@@ -473,9 +451,6 @@ static int rtw_sdio_resume(struct device *dev)
struct adapter *padapter = psdpriv->if1;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
int ret = 0;
- struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
-
- pdbgpriv->dbg_resume_cnt++;
ret = rtw_resume_process(padapter);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0187/2151] staging: rtl8723bs: disable SDIO function on block size failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (185 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0186/2151] staging: rtl8723bs: remove unused private debug counters Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0188/2151] staging: octeon: schedule the TX cleanup tasklet every 1024th packet Greg Kroah-Hartman
` (695 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak,
Dan Carpenter, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit baa84b1bb1648506333fde3e66b6540f9d7d73cc ]
sdio_init() enables the SDIO function before configuring the block
size. If sdio_set_block_size() fails, the function jumps to the release
path and returns the error without disabling the SDIO function. The
caller then frees the dvobj directly, so the enabled SDIO function is
left active on that probe failure path.
Disable the SDIO function before releasing the host when block size
configuration fails.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260731161710.44828-1-mhun512@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 32ee0f8f4bb99..ed5f8ee3de2f2 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -121,8 +121,10 @@ static u32 sdio_init(struct dvobj_priv *dvobj)
goto release;
err = sdio_set_block_size(func, 512);
- if (err)
+ if (err) {
+ sdio_disable_func(func);
goto release;
+ }
psdio_data->block_transfer_len = 512;
psdio_data->tx_block_mode = 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0188/2151] staging: octeon: schedule the TX cleanup tasklet every 1024th packet
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (186 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0187/2151] staging: rtl8723bs: disable SDIO function on block size failure Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0189/2151] clk: fix self-consuming provider module pinning Greg Kroah-Hartman
` (694 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Orgad Shaneh, Dan Carpenter,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Orgad Shaneh <orgads@gmail.com>
[ Upstream commit db57f6517bf65523968ae29cd34a790bfa7d32af ]
cvm_oct_xmit() means to schedule the cleanup tasklet once every 1024
packets, as its comment says, to cover the pathological case of heavy
traffic on one port delaying the cleanup of another port blocked
waiting for it.
The test is inverted: total_to_clean & 0x3ff is true for 1023 of every
1024 values, and false only on the multiples of 1024. So the tasklet is
scheduled on nearly every packet, and skipped on exactly the packet the
comment wants. That costs one TASKLET softirq per transmitted packet,
each walking every port and doing an FAU fetch-and-add per non-empty
queue, and it buys nothing for this port, which already frees its
completed skbs inline from the skb_to_free value it reads out of the
FAU.
Test the mask against zero. On a CN50XX board (2 cores at 300MHz)
carrying ~6.9k transmitted packets/s, TASKLET softirqs drop from 7133/s
to 597/s with no throughput change; the freeing work is conserved, so
this removes softirq entries, not work.
Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner")
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260820113239.8169-1-orgads@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/octeon/ethernet-tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index 1b30fe1bcf43b..4cbed9d75de5e 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -482,7 +482,7 @@ netdev_tx_t cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
cvmx_fau_fetch_and_add32(FAU_TOTAL_TX_TO_CLEAN, 1);
}
- if (total_to_clean & 0x3ff) {
+ if ((total_to_clean & 0x3ff) == 0) {
/*
* Schedule the cleanup tasklet every 1024 packets for
* the pathological case of high traffic on one port
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0189/2151] clk: fix self-consuming provider module pinning
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (187 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0188/2151] staging: octeon: schedule the TX cleanup tasklet every 1024th packet Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0190/2151] microblaze: CCF: fix refcount leak Greg Kroah-Hartman
` (693 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jerome Brunet, Brian Masney,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jerome Brunet <jbrunet@baylibre.com>
[ Upstream commit a1c8d531c694e193dc48ef2428877d5ea2e35134 ]
clk_hw_get_clk() lets a provider get a struct clk for one of its own
struct clk_hw.
When a struct clk is created, the module usage count of the provider
is unconditionally increased. For a self-consuming provider, this means
it pins itself and the module can never be unloaded.
Increasing the module usage count should only be done when the consumer
lives in a different module from the provider. Use THIS_MODULE to
capture caller's module and increase the module usage count accordingly.
It is OK for consumer-only APIs such as clk_get() or of_clk_get() to
pass a NULL owner. As a result, any provider module will get pinned,
same as before.
Fixes: 30d6f8c15d2c ("clk: add api to get clk consumer from clk_hw")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/clk.c | 46 ++++++++++++++++++++----------------
drivers/clk/clk.h | 5 ++--
drivers/clk/clkdev.c | 4 ++--
include/linux/clk-provider.h | 22 ++++++++++++++---
4 files changed, 50 insertions(+), 27 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 85d2f2481acf3..e00b36f5a6cfd 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -115,6 +115,7 @@ struct clk {
unsigned long max_rate;
unsigned int exclusive_count;
struct hlist_node clks_node;
+ bool pinning;
};
/*** runtime pm ***/
@@ -4153,13 +4154,15 @@ static void free_clk(struct clk *clk)
* @hw: clk_hw associated with the clk being consumed
* @dev_id: string describing device name
* @con_id: connection ID string on device
+ * @owner: reference to the module creating the clock
*
* This is the main function used to create a clk pointer for use by clk
* consumers. It connects a consumer to the clk_core and clk_hw structures
* used by the framework and clk provider respectively.
*/
struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
- const char *dev_id, const char *con_id)
+ const char *dev_id, const char *con_id,
+ struct module *owner)
{
struct clk *clk;
struct clk_core *core;
@@ -4174,7 +4177,13 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
return clk;
clk->dev = dev;
- if (!try_module_get(core->owner)) {
+ /*
+ * Pin the provider module only when the consumer lives in a different
+ * module. A provider getting a clk from its own clk_hw would otherwise
+ * pin itself and could never be unloaded.
+ */
+ clk->pinning = owner != core->owner;
+ if (clk->pinning && !try_module_get(core->owner)) {
free_clk(clk);
return ERR_PTR(-ENOENT);
}
@@ -4185,24 +4194,19 @@ struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
return clk;
}
-/**
- * clk_hw_get_clk - get clk consumer given an clk_hw
- * @hw: clk_hw associated with the clk being consumed
- * @con_id: connection ID string on device
- *
- * Returns: new clk consumer
- * This is the function to be used by providers which need
- * to get a consumer clk and act on the clock element
- * Calls to this function must be balanced with calls clk_put()
+/*
+ * Internal helper backing the clk_hw_get_clk() macro, which passes the caller's
+ * module via THIS_MODULE.
*/
-struct clk *clk_hw_get_clk(struct clk_hw *hw, const char *con_id)
+struct clk *__clk_hw_get_clk(struct clk_hw *hw, const char *con_id,
+ struct module *owner)
{
struct device *dev = hw->core->dev;
const char *name = dev ? dev_name(dev) : NULL;
- return clk_hw_create_clk(dev, hw, name, con_id);
+ return clk_hw_create_clk(dev, hw, name, con_id, owner);
}
-EXPORT_SYMBOL(clk_hw_get_clk);
+EXPORT_SYMBOL(__clk_hw_get_clk);
static int clk_cpy_name(const char **dst_p, const char *src, bool must_exist)
{
@@ -4366,8 +4370,9 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
INIT_HLIST_HEAD(&core->clks);
/*
- * Don't call clk_hw_create_clk() here because that would pin the
- * provider module to itself and prevent it from ever being removed.
+ * Don't call clk_hw_create_clk() here because it would systematically
+ * add a consumer to the hw clock and all clocks would appear to have
+ * consumer in the clock summary.
*/
hw->clk = alloc_clk(core, NULL, NULL);
if (IS_ERR(hw->clk)) {
@@ -4724,7 +4729,7 @@ struct clk *devm_clk_hw_get_clk(struct device *dev, struct clk_hw *hw,
if (!clkp)
return ERR_PTR(-ENOMEM);
- clk = clk_hw_get_clk(hw, con_id);
+ clk = __clk_hw_get_clk(hw, con_id, dev->driver->owner);
if (!IS_ERR(clk)) {
*clkp = clk;
devres_add(dev, clkp);
@@ -4771,7 +4776,8 @@ void __clk_put(struct clk *clk)
owner = clk->core->owner;
kref_put(&clk->core->ref, __clk_release);
- module_put(owner);
+ if (clk->pinning)
+ module_put(owner);
free_clk(clk);
}
@@ -5292,7 +5298,7 @@ struct clk *of_clk_get_from_provider(struct of_phandle_args *clkspec)
{
struct clk_hw *hw = of_clk_get_hw_from_clkspec(clkspec);
- return clk_hw_create_clk(NULL, hw, NULL, __func__);
+ return clk_hw_create_clk(NULL, hw, NULL, __func__, NULL);
}
EXPORT_SYMBOL_GPL(of_clk_get_from_provider);
@@ -5319,7 +5325,7 @@ static struct clk *__of_clk_get(struct device_node *np,
{
struct clk_hw *hw = of_clk_get_hw(np, index, con_id);
- return clk_hw_create_clk(NULL, hw, dev_id, con_id);
+ return clk_hw_create_clk(NULL, hw, dev_id, con_id, NULL);
}
struct clk *of_clk_get(struct device_node *np, int index)
diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
index 2d801900cad59..5009380863a9d 100644
--- a/drivers/clk/clk.h
+++ b/drivers/clk/clk.h
@@ -23,13 +23,14 @@ struct clk_hw *clk_find_hw(const char *dev_id, const char *con_id);
#ifdef CONFIG_COMMON_CLK
struct clk *clk_hw_create_clk(struct device *dev, struct clk_hw *hw,
- const char *dev_id, const char *con_id);
+ const char *dev_id, const char *con_id,
+ struct module *owner);
void __clk_put(struct clk *clk);
#else
/* All these casts to avoid ifdefs in clkdev... */
static inline struct clk *
clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id,
- const char *con_id)
+ const char *con_id, struct module *owner)
{
return (struct clk *)hw;
}
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index e0bede6350e11..717e079899d90 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -88,7 +88,7 @@ static struct clk *__clk_get_sys(struct device *dev, const char *dev_id,
{
struct clk_hw *hw = clk_find_hw(dev_id, con_id);
- return clk_hw_create_clk(dev, hw, dev_id, con_id);
+ return clk_hw_create_clk(dev, hw, dev_id, con_id, NULL);
}
struct clk *clk_get_sys(const char *dev_id, const char *con_id)
@@ -105,7 +105,7 @@ struct clk *clk_get(struct device *dev, const char *con_id)
if (dev && dev->of_node) {
hw = of_clk_get_hw(dev->of_node, 0, con_id);
if (!IS_ERR(hw) || PTR_ERR(hw) == -EPROBE_DEFER)
- return clk_hw_create_clk(dev, hw, dev_id, con_id);
+ return clk_hw_create_clk(dev, hw, dev_id, con_id, NULL);
}
return __clk_get_sys(dev, dev_id, con_id);
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 630705a471294..d95cb8624fb4b 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -37,6 +37,7 @@ struct clk;
struct clk_hw;
struct clk_core;
struct dentry;
+struct module;
/**
* struct clk_rate_request - Structure encoding the clk constraints that
@@ -316,8 +317,9 @@ struct clk_init_data {
* @core: pointer to the struct clk_core instance that points back to this
* struct clk_hw instance
*
- * @clk: pointer to the per-user struct clk instance that can be used to call
- * into the clk API
+ * @clk: pointer to the per-user struct clk instance. This will be removed at
+ * some point in the future, Please consider the field obsolete and do not use
+ * it. Use clk_hw_get_clk() to get a per-user struct clk from a struct clk_hw.
*
* @init: pointer to struct clk_init_data that contains the init data shared
* with the common clock framework. This pointer will be set to NULL once
@@ -1395,10 +1397,24 @@ static inline struct clk_hw *__clk_get_hw(struct clk *clk)
}
#endif
-struct clk *clk_hw_get_clk(struct clk_hw *hw, const char *con_id);
+struct clk *__clk_hw_get_clk(struct clk_hw *hw, const char *con_id,
+ struct module *owner);
struct clk *devm_clk_hw_get_clk(struct device *dev, struct clk_hw *hw,
const char *con_id);
+/**
+ * clk_hw_get_clk - get clk consumer given a clk_hw
+ * @hw: clk_hw associated with the clk being consumed
+ * @con_id: connection ID string on device
+ *
+ * Return: new clk consumer
+ * This is the function to be used by providers which need
+ * to get a consumer clk and act on the clock element
+ * Calls to this function must be balanced with calls to clk_put()
+ */
+#define clk_hw_get_clk(hw, con_id) \
+ __clk_hw_get_clk((hw), (con_id), THIS_MODULE)
+
unsigned int clk_hw_get_num_parents(const struct clk_hw *hw);
struct clk_hw *clk_hw_get_parent(const struct clk_hw *hw);
struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0190/2151] microblaze: CCF: fix refcount leak
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (188 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0189/2151] clk: fix self-consuming provider module pinning Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0191/2151] microblaze: prevent ptrace writes to MSR and pt_mode Greg Kroah-Hartman
` (692 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander A. Klimov, Michal Simek,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander A. Klimov <grandmaster@al2klimov.de>
[ Upstream commit aeedf85beac51c7cd8f7bf4c918a0104dfdb8b78 ]
Every value returned from of_clk_get() is supposed to be cleaned up
via clk_put() once not needed anymore.
Fixes: c1120542b99a ("microblaze: Add support for CCF")
Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://patch.msgid.link/20260526184105.18962-4-grandmaster@al2klimov.de
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/microblaze/kernel/cpu/cpuinfo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c
index cd9b4450763b0..32c508e85408a 100644
--- a/arch/microblaze/kernel/cpu/cpuinfo.c
+++ b/arch/microblaze/kernel/cpu/cpuinfo.c
@@ -133,6 +133,7 @@ void __init setup_cpuinfo_clk(void)
cpuinfo.cpu_clock_freq = fcpu(cpu, "timebase-frequency");
} else {
cpuinfo.cpu_clock_freq = clk_get_rate(clk);
+ clk_put(clk);
}
if (!cpuinfo.cpu_clock_freq) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0191/2151] microblaze: prevent ptrace writes to MSR and pt_mode
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (189 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0190/2151] microblaze: CCF: fix refcount leak Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0192/2151] soundwire: intel: initialise quirk_mask before reading it Greg Kroah-Hartman
` (691 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jérémy Jean, Michal Simek,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
[ Upstream commit 8518fd17ccef4a7d77877ccb0403b722106ad1a4 ]
arch_ptrace() accepts PTRACE_POKEUSR for every aligned offset below
PT_SIZE. This includes the saved machine status register and pt_mode,
which are kernel-owned execution state rather than general registers.
On return from an exception, rtbd copies MSR_UMS to the live MSR_UM bit.
An unprivileged same-UID tracer can therefore clear MSR_UMS in its
tracee's saved register frame and make the tracee resume in supervisor
mode. pt_mode also controls whether later entry paths classify the frame
as kernel or user state.
Reject PTRACE_POKEUSR writes to both fields while retaining read access.
Fixes: 2b4384542691 ("microblaze_v8: ptrace support")
Assisted-by: Codex:gpt-5
Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
Link: https://patch.msgid.link/20260821103026.3627292-2-Jeremy.Jean@oss.cyber.gouv.fr
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/microblaze/kernel/ptrace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c
index 5234d0c1dcaad..04700b08842e2 100644
--- a/arch/microblaze/kernel/ptrace.c
+++ b/arch/microblaze/kernel/ptrace.c
@@ -101,6 +101,9 @@ long arch_ptrace(struct task_struct *child, long request,
} else {
rval = -EIO;
}
+ } else if (request == PTRACE_POKEUSR &&
+ (addr == PT_MSR || addr == PT_MODE)) {
+ rval = -EIO;
} else if (addr < PT_SIZE && (addr & 0x3) == 0) {
microblaze_reg_t *reg_addr = reg_save_addr(addr, child);
if (request == PTRACE_PEEKUSR)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0192/2151] soundwire: intel: initialise quirk_mask before reading it
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (190 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0191/2151] microblaze: prevent ptrace writes to MSR and pt_mode Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0193/2151] arm64: dts: rockchip: Correct Device Orientation on Gameforce Ace Greg Kroah-Hartman
` (690 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Boris Faure, Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Faure <boris@fau.re>
[ Upstream commit ee8a8cfe4e8d3c67456e554c988017c252710a25 ]
sdw_master_read_intel_prop() declares quirk_mask without an initialiser
and ignores the return value of fwnode_property_read_u32(). When a BIOS
does not describe "intel-quirk-mask" for a link, the property read leaves
the variable untouched and stack garbage decides whether
SDW_INTEL_QUIRK_MASK_BUS_DISABLE is honoured, so the link may be marked
hw_disabled at random.
Initialise it to 0, matching is_link_enabled() in
sound/hda/core/intel-sdw-acpi.c.
Found by code inspection, not observed at run time.
Fixes: 395713d8ca43 ("soundwire: intel: handle disabled links")
Signed-off-by: Boris Faure <boris@fau.re>
Link: https://patch.msgid.link/20260820212220.226912-1-boris@fau.re
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/soundwire/intel_auxdevice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c
index 347e06ad6edba..a15c79a6d68e1 100644
--- a/drivers/soundwire/intel_auxdevice.c
+++ b/drivers/soundwire/intel_auxdevice.c
@@ -156,7 +156,7 @@ static int sdw_master_read_intel_prop(struct sdw_bus *bus)
struct sdw_intel_prop *intel_prop;
struct fwnode_handle *link;
char name[32];
- u32 quirk_mask;
+ u32 quirk_mask = 0;
/* Find master handle */
snprintf(name, sizeof(name),
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0193/2151] arm64: dts: rockchip: Correct Device Orientation on Gameforce Ace
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (191 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0192/2151] soundwire: intel: initialise quirk_mask before reading it Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0194/2151] cxl/ras: Pass the PCI devices struct device to match_memdev_by_parent() Greg Kroah-Hartman
` (689 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Morgan, Heiko Stuebner,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Morgan <macromorgan@hotmail.com>
[ Upstream commit 0d170ee38e7a943248082cdb4b3e40b45a96e2f6 ]
The display, touchscreen, and IMU are currently not oriented
consistently. The touchscreen is 90 degrees offset and the IMU is using
the default mount matrix which is 180 degrees offset.
Fix the touchscreen alignment and add a mount matrix for the IMU. When
the device is held vertically relative to the display hardware, the
touchscreen 0,0 position is in the top left corner of the display
(next to the home button), and the IMU reads the correct orientation.
Fixes: 4e946c447a04 ("arm64: dts: rockchip: Add GameForce Ace")
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://patch.msgid.link/20260828205331.78185-1-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts b/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
index afac54ba58318..8628d941d80dd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-gameforce-ace.dts
@@ -556,6 +556,7 @@ regulator-state-mem {
&i2c3 {
status = "okay";
+ /* Touchscreen is rotated 90 degrees with 0,0 position near home button. */
touchscreen@14 {
compatible = "goodix,gt911";
reg = <0x14>;
@@ -565,10 +566,8 @@ touchscreen@14 {
pinctrl-0 = <&touch_int>, <&touch_rst>;
pinctrl-names = "default";
reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
- touchscreen-inverted-x;
touchscreen-size-x = <1080>;
touchscreen-size-y = <1920>;
- touchscreen-swapped-x-y;
};
};
@@ -600,11 +599,15 @@ channel@7 {
};
};
+ /* IMU oriented relative to panel, which is rotated 90 degrees. */
imu@68 {
compatible = "invensense,mpu6880";
reg = <0x68>;
interrupt-parent = <&gpio0>;
interrupts = <RK_PD3 IRQ_TYPE_EDGE_RISING>;
+ mount-matrix = "-1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "1";
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0194/2151] cxl/ras: Pass the PCI devices struct device to match_memdev_by_parent()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (192 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0193/2151] arm64: dts: rockchip: Correct Device Orientation on Gameforce Ace Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0195/2151] wifi: rtw88: debugfs: dont vzalloc(0) when rsvd_page is read unconfigured Greg Kroah-Hartman
` (688 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alison Schofield, Terry Bowman,
Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 977eaad352bad4c4aac7cd15683800196c2ead57 ]
cxl_cper_handle_prot_err() hands bus_find_device() the 'struct pci_dev'
where match_memdev_by_parent() expects the embedded 'struct device'. The
comparison never matches. The lookup always fails and CXL endpoint
protocol errors reported via CPER are dropped without a trace event,
leaving only the root port, downstream and upstream cases reporting.
Pass &pdev->dev, and rename the callback parameter to match what it is.
Fixes: 3c70ec71abda ("cxl/ras: Fix CPER handler device confusion")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Terry Bowman <terry.bowman@amd.com>
Link: https://patch.msgid.link/20260828215726.1077498-1-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/ras.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/cxl/core/ras.c b/drivers/cxl/core/ras.c
index f2d99865c6df5..1f8195fb51a93 100644
--- a/drivers/cxl/core/ras.c
+++ b/drivers/cxl/core/ras.c
@@ -70,9 +70,9 @@ cxl_cper_trace_uncorr_prot_err(struct cxl_memdev *cxlmd,
trace_cxl_aer_uncorrectable_error(cxlmd, status, fe, hl);
}
-static int match_memdev_by_parent(struct device *dev, const void *uport)
+static int match_memdev_by_parent(struct device *dev, const void *parent)
{
- if (is_cxl_memdev(dev) && dev->parent == uport)
+ if (is_cxl_memdev(dev) && dev->parent == parent)
return 1;
return 0;
}
@@ -108,7 +108,7 @@ static void cxl_cper_handle_prot_err(struct cxl_cper_prot_err_work_data *data)
return;
struct device *mem_dev __free(put_device) = bus_find_device(
- &cxl_bus_type, NULL, pdev, match_memdev_by_parent);
+ &cxl_bus_type, NULL, &pdev->dev, match_memdev_by_parent);
if (!mem_dev)
return;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0195/2151] wifi: rtw88: debugfs: dont vzalloc(0) when rsvd_page is read unconfigured
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (193 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0194/2151] cxl/ras: Pass the PCI devices struct device to match_memdev_by_parent() Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0196/2151] sched_ext/scx_flatcg: Make cgv_node_less() wraparound-safe Greg Kroah-Hartman
` (687 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abdurrahman Karadag, Ping-Ke Shih,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdurrahman Karadag <abdurrahmankaradag19@gmail.com>
[ Upstream commit 81510c3d6f2199889a4a936d8cf8b9e05911b10e ]
Reading the rsvd_page debugfs entry before writing a page offset and
count to it calls vzalloc() with a size of zero, because
rsvd_page.page_num defaults to 0. vmalloc warns about this:
WARNING: mm/vmalloc.c:4019 at __vmalloc_node_range_noprof+0x9ac/0xa30
...
Call Trace:
__vmalloc_node_noprof+0x4c/0x70
rtw_debugfs_get_rsvd_page+0x4c/0x110 [rtw88_core]
seq_read_iter+0x132/0x4b0
seq_read+0x12e/0x1c0
full_proxy_read+0x6f/0xc0
vfs_read+0xdd/0x490
rtw_fw_dump_fifo() would reject the zero size anyway, but only after
the allocation. Check for a zero buffer size first and print a short
usage hint instead of allocating.
Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
Signed-off-by: Abdurrahman Karadag <abdurrahmankaradag19@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260827131244.35623-1-abdurrahmankaradag19@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/realtek/rtw88/debug.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
index b67d69b01f879..84e45af26f525 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.c
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
@@ -315,6 +315,11 @@ static int rtw_debugfs_get_rsvd_page(struct seq_file *m, void *v)
int i;
int ret;
+ if (!buf_size) {
+ seq_puts(m, "usage: echo <page_offset> <page_num> > rsvd_page\n");
+ return 0;
+ }
+
buf = vzalloc(buf_size);
if (!buf)
return -ENOMEM;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0196/2151] sched_ext/scx_flatcg: Make cgv_node_less() wraparound-safe
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (194 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0195/2151] wifi: rtw88: debugfs: dont vzalloc(0) when rsvd_page is read unconfigured Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0197/2151] fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO Greg Kroah-Hartman
` (686 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Tao Cui, Tejun Heo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tao Cui <cuitao@kylinos.cn>
[ Upstream commit bf2f23dc5a36237c0d4738966829e5cbde973c8a ]
cgv_node_less() compares cvtimes with a plain <, which misorders once
cvtime wraps: the wrapped node lands at the front of the tree while
the unwrapped ones get stuck behind it. Each CPU picking a cgroup
charges it a full slice, making wrap occur earlier than a naive
estimate might suggest.
Use time_before() instead. cgrp_cap_budget() bounds the lag behind
cvtime_now, while the lead is bounded by the slice charge plus pending
cvtime_delta on re-insertion, so the cyclic ordering assumptions of
time_before() hold.
Fixes: a4103eacc2ab ("sched_ext: Add a cgroup scheduler which uses flattened hierarchy")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://lore.kernel.org/r/3f1ce004-e259-4e72-a5f7-14a5050053bd@linux.dev
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/sched_ext/scx_flatcg.bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/sched_ext/scx_flatcg.bpf.c b/tools/sched_ext/scx_flatcg.bpf.c
index 3f01441731b7e..a33c6467d7855 100644
--- a/tools/sched_ext/scx_flatcg.bpf.c
+++ b/tools/sched_ext/scx_flatcg.bpf.c
@@ -144,7 +144,7 @@ static bool cgv_node_less(struct bpf_rb_node *a, const struct bpf_rb_node *b)
cgc_a = container_of(a, struct cgv_node, rb_node);
cgc_b = container_of(b, struct cgv_node, rb_node);
- return cgc_a->cvtime < cgc_b->cvtime;
+ return time_before(cgc_a->cvtime, cgc_b->cvtime);
}
static struct fcg_cpu_ctx *find_cpu_ctx(void)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0197/2151] fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (195 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0196/2151] sched_ext/scx_flatcg: Make cgv_node_less() wraparound-safe Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0198/2151] sched/core: Dont steal a proxy-exec donor Greg Kroah-Hartman
` (685 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yafang Shao, Changyuan Lyu,
Miklos Szeredi, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <mszeredi@redhat.com>
[ Upstream commit 10bd6b32965265688fa277d166ab224de8e86eb2 ]
Yafang Shao reports:
"After upgrading the kernel from 6.1.y to 6.18.y on production servers,
some containers failed to read lxcfs data. The root cause is that our
lxcfs is still at the old v3.0.4, which does not include commit 25982f5
("Set the file size to 4k") [0].
Between 6.1.y and 6.18.y, the FUSE splice_read path was converted from
generic_file_splice_read() to filemap_splice_read() by commit
2cb1e08985e3 ("splice: Use filemap_splice_read() instead of
generic_file_splice_read()"). Unlike generic_file_splice_read(),
filemap_splice_read() strictly checks i_size and refuses to read from
zero-size files, which breaks virtual FUSE filesystems like the old
lxcfs."
Fix by using copy_splice_read() for the FOPEN_DIRECT_IO case, just like the
VFS does for DAX and O_DIRECT files.
Reported-by: Yafang Shao <laoar.shao@gmail.com>
Closes: https://lore.kernel.org/all/20260706025705.58301-1-laoar.shao@gmail.com/
Reported-by: Changyuan Lyu <changyuanl@google.com>
Closes: https://lore.kernel.org/all/20260901213412.1763253-1-changyuanl@google.com/
Fixes: 2cb1e08985e3 ("splice: Use filemap_splice_read() instead of generic_file_splice_read()")
Tested-and-acked-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/fuse/file.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index f72d74e3c5f03..dc61efd829cc2 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1828,7 +1828,10 @@ static ssize_t fuse_splice_read(struct file *in, loff_t *ppos,
struct fuse_file *ff = in->private_data;
/* FOPEN_DIRECT_IO overrides FOPEN_PASSTHROUGH */
- if (fuse_file_passthrough(ff) && !(ff->open_flags & FOPEN_DIRECT_IO))
+
+ if (ff->open_flags & FOPEN_DIRECT_IO)
+ return copy_splice_read(in, ppos, pipe, len, flags);
+ else if (fuse_file_passthrough(ff))
return fuse_passthrough_splice_read(in, ppos, pipe, len, flags);
else
return filemap_splice_read(in, ppos, pipe, len, flags);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0198/2151] sched/core: Dont steal a proxy-exec donor
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (196 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0197/2151] fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0199/2151] dlm: validate lock modes in recovery messages Greg Kroah-Hartman
` (684 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vasily Gorbik, John Stultz,
Peter Zijlstra (Intel), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasily Gorbik <gor@linux.ibm.com>
[ Upstream commit 3dd95f077371f5def65a91c4bb13bd574a62bc3a ]
try_steal_cookie() avoids stealing src->core_pick and src->curr before
moving a task with the same cookie via move_queued_task_locked().
With proxy-exec, src->donor is the current scheduling context and may
differ from src->curr. Stealing it migrates a task that the source rq
still treats as current, leaving src's scheduler state for that task
stale. For CFS this means cfs_rq->curr points at the stolen entity,
and the next pick on the source rq hits the WARN_ON_ONCE in
put_prev_entity().
Commit 7de9d4f94638 ("sched: Start blocked_on chain processing in
find_proxy_task()") tweaked the fair class logic so that the donor task
isn't migrated away while we're running the proxy. Do it similarly for
try_steal_cookie() and skip src->donor as well.
Fixes: 7de9d4f94638 ("sched: Start blocked_on chain processing in find_proxy_task()")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260807035232.1881495-3-jstultz@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 57ba5fcff1339..824888693c414 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6292,7 +6292,7 @@ static bool try_steal_cookie(int this, int that)
return false;
do {
- if (p == src->core_pick || p == src->curr)
+ if (p == src->core_pick || p == src->curr || p == src->donor)
goto next;
if (!is_cpu_allowed(p, this))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0199/2151] dlm: validate lock modes in recovery messages
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (197 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0198/2151] sched/core: Dont steal a proxy-exec donor Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0200/2151] dlm: fix NULL pointer dereference in dlm_dump_rsb_name() Greg Kroah-Hartman
` (683 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander Aring, Danila Chernetsov,
David Teigland, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danila Chernetsov <listdansp@mail.ru>
[ Upstream commit 7bf1aca6d626944091a5cb218b4e487547edff0a ]
The DLM recovery path restores lock state from rcom_lock messages
received from remote nodes. The lock modes in these messages are
copied directly into the local lkb state without validating that they
are within the valid DLM lock mode range.
The rest of the DLM code assumes that lkb_rqmode and lkb_grmode
contain valid lock modes. In particular, LVB callback handling in
dlm_may_skip_callback() uses lock modes as indexes into the
dlm_lvb_operations array:
dlm_lvb_operations[prev_mode + 1][mode + 1]
An invalid lock mode received during recovery could therefore result in
an out-of-bounds read during subsequent LVB callback processing.
Validate rl_rqmode and rl_grmode before storing them into the local LKB
state. This preserves the lock mode invariant required by the rest of
the DLM code.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: e7fd41792fc0 ("[DLM] The core of the DLM for GFS2/CLVM")
Acked-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Danila Chernetsov <listdansp@mail.ru>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/dlm/lock.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index a393ecaf3442a..9be5b26f75314 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -5529,6 +5529,10 @@ static int receive_rcom_lock_args(struct dlm_ls *ls, struct dlm_lkb *lkb,
{
struct rcom_lock *rl = (struct rcom_lock *) rc->rc_buf;
+ if (rl->rl_rqmode < DLM_LOCK_IV || rl->rl_rqmode > DLM_LOCK_EX ||
+ rl->rl_grmode < DLM_LOCK_IV || rl->rl_grmode > DLM_LOCK_EX)
+ return -EINVAL;
+
lkb->lkb_nodeid = le32_to_cpu(rc->rc_header.h_nodeid);
lkb->lkb_ownpid = le32_to_cpu(rl->rl_ownpid);
lkb->lkb_remid = le32_to_cpu(rl->rl_lkid);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0200/2151] dlm: fix NULL pointer dereference in dlm_dump_rsb_name()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (198 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0199/2151] dlm: validate lock modes in recovery messages Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0201/2151] dlm: fix buffer overflow from negative len in dlm_search_rsb_tree Greg Kroah-Hartman
` (682 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander Aring, Danila Chernetsov,
David Teigland, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danila Chernetsov <listdansp@mail.ru>
[ Upstream commit 19982c99a302ab544c69f95d37ca3070c89762d3 ]
The function dlm_dump_rsb_name() is called from receive_rcom_lookup()
when a debug dump is requested via a special RCOM_LOOKUP message with
rc_id == 0xFFFFFFFF.
The resource name passed to dlm_dump_rsb_name() comes from the received
message. There is no guarantee that an RSB with this name exists in the
local hash table.
dlm_search_rsb_tree() returns 0 when the RSB is found and stores a valid
pointer in r. When the lookup fails, it returns -EBADR and leaves r
NULL.
The current error handling is inverted:
if (!error)
goto out;
As a result, dlm_dump_rsb() is called only when the lookup fails and r
is NULL, resulting in a NULL pointer dereference.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 2d90354027ad ("dlm: merge toss and keep hash table lists into one list")
Acked-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Danila Chernetsov <listdansp@mail.ru>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/dlm/lock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 9be5b26f75314..58f3d885c6858 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1421,7 +1421,7 @@ void dlm_dump_rsb_name(struct dlm_ls *ls, const char *name, int len)
rcu_read_lock();
error = dlm_search_rsb_tree(&ls->ls_rsbtbl, name, len, &r);
- if (!error)
+ if (error)
goto out;
dlm_dump_rsb(r);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0201/2151] dlm: fix buffer overflow from negative len in dlm_search_rsb_tree
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (199 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0200/2151] dlm: fix NULL pointer dereference in dlm_dump_rsb_name() Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0202/2151] dlm: fix variable key length lookup Greg Kroah-Hartman
` (681 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander Aring, Joseph Qi,
David Teigland, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joseph Qi <joseph.qi@linux.alibaba.com>
[ Upstream commit d785f7d92f197b72d496bbcf54a160cd54f00263 ]
commit 080e5563f878c ("dlm: validate length in dlm_search_rsb_tree")
only checks for len > DLM_RESNAME_MAXLEN, which does not catch negative
values. While the input 'len' can be negative and a negative int passed
to memcpy() is implicitly converted to a large size_t, causing a stack
buffer overflow on the key[] array.
Fix this by changing the 'len' parameter type from int to unsigned int.
This ensures negative values from callers are implicitly converted to
large unsigned values that are caught by the existing
len > DLM_RESNAME_MAXLEN check.
Acked-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Stable-dep-of: b4e6ae7ba711 ("dlm: fix variable key length lookup")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/dlm/lock.c | 6 ++++--
fs/dlm/lock.h | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 58f3d885c6858..f7f250ffc8eed 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -622,12 +622,14 @@ static int get_rsb_struct(struct dlm_ls *ls, const void *name, int len,
return 0;
}
-int dlm_search_rsb_tree(struct rhashtable *rhash, const void *name, int len,
- struct dlm_rsb **r_ret)
+int dlm_search_rsb_tree(struct rhashtable *rhash, const void *name,
+ unsigned int len, struct dlm_rsb **r_ret)
{
char key[DLM_RESNAME_MAXLEN] = {};
+
if (len > DLM_RESNAME_MAXLEN)
return -EINVAL;
+
memcpy(key, name, len);
*r_ret = rhashtable_lookup_fast(rhash, &key, dlm_rhash_rsb_params);
if (*r_ret)
diff --git a/fs/dlm/lock.h b/fs/dlm/lock.h
index b23d7b854ed46..c75975937331c 100644
--- a/fs/dlm/lock.h
+++ b/fs/dlm/lock.h
@@ -31,8 +31,8 @@ void resume_scan_timer(struct dlm_ls *ls);
int dlm_master_lookup(struct dlm_ls *ls, int from_nodeid, const char *name,
int len, unsigned int flags, int *r_nodeid, int *result);
-int dlm_search_rsb_tree(struct rhashtable *rhash, const void *name, int len,
- struct dlm_rsb **r_ret);
+int dlm_search_rsb_tree(struct rhashtable *rhash, const void *name,
+ unsigned int len, struct dlm_rsb **r_ret);
void dlm_recover_purge(struct dlm_ls *ls, const struct list_head *root_list);
void dlm_purge_mstcpy_locks(struct dlm_rsb *r);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0202/2151] dlm: fix variable key length lookup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (200 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0201/2151] dlm: fix buffer overflow from negative len in dlm_search_rsb_tree Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0203/2151] remoteproc: imx_dsp_rproc: Drop extra space Greg Kroah-Hartman
` (680 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexander Aring, David Teigland,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Aring <aahringo@redhat.com>
[ Upstream commit b4e6ae7ba711758c38d5eb7d5a7a0712273bdf6f ]
Before commit 6c648035cbe7 ("dlm: switch to use rhashtable for rsbs")
the rsb hashtable was dynamic key length. Accidentally it was changed to
switch to static key length which can end in different results. We
fixing this back to the original behaviour by adding the necessary
functionality to rhashtable to handle the objects and lookups as dynamic
key lengths.
Fixes: 6c648035cbe7 ("dlm: switch to use rhashtable for rsbs")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/dlm/config.c | 30 ++++++++++++++++++++++++++++--
fs/dlm/dlm_internal.h | 5 +++++
fs/dlm/lock.c | 6 ++++--
3 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index a0d75b5c83c63..0db5ce43425ca 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -64,11 +64,37 @@ static void release_node(struct config_item *);
static struct configfs_attribute *comm_attrs[];
static struct configfs_attribute *node_attrs[];
+static u32 rsb_hashfn(const void *data, u32 len, u32 seed)
+{
+ const struct dlm_rsb_key *key = data;
+
+ return jhash(key->name, key->len, 0);
+}
+
+static u32 rsb_obj_hashfn(const void *data, u32 len, u32 seed)
+{
+ const struct dlm_rsb *r = data;
+
+ return r->res_hash;
+}
+
+static int rsb_obj_cmpfn(struct rhashtable_compare_arg *arg, const void *obj)
+{
+ const struct dlm_rsb_key *key = arg->key;
+ const struct dlm_rsb *r = obj;
+
+ if (key->len != r->res_length)
+ return -1;
+
+ return memcmp(&r->res_name, key->name, key->len);
+}
+
const struct rhashtable_params dlm_rhash_rsb_params = {
.nelem_hint = 3, /* start small */
- .key_len = DLM_RESNAME_MAXLEN,
- .key_offset = offsetof(struct dlm_rsb, res_name),
.head_offset = offsetof(struct dlm_rsb, res_node),
+ .hashfn = rsb_hashfn,
+ .obj_hashfn = rsb_obj_hashfn,
+ .obj_cmpfn = rsb_obj_cmpfn,
.automatic_shrinking = true,
};
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index d534a4bc162bb..08b903fbce589 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -340,6 +340,11 @@ struct dlm_rsb {
char res_name[DLM_RESNAME_MAXLEN+1];
};
+struct dlm_rsb_key {
+ char name[DLM_RESNAME_MAXLEN];
+ size_t len;
+};
+
/* dlm_master_lookup() flags */
#define DLM_LU_RECOVER_DIR 1
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index f7f250ffc8eed..1d26eb2c192e5 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -625,12 +625,14 @@ static int get_rsb_struct(struct dlm_ls *ls, const void *name, int len,
int dlm_search_rsb_tree(struct rhashtable *rhash, const void *name,
unsigned int len, struct dlm_rsb **r_ret)
{
- char key[DLM_RESNAME_MAXLEN] = {};
+ struct dlm_rsb_key key = {
+ .len = len,
+ };
if (len > DLM_RESNAME_MAXLEN)
return -EINVAL;
- memcpy(key, name, len);
+ memcpy(key.name, name, len);
*r_ret = rhashtable_lookup_fast(rhash, &key, dlm_rhash_rsb_params);
if (*r_ret)
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0203/2151] remoteproc: imx_dsp_rproc: Drop extra space
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (201 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0202/2151] dlm: fix variable key length lookup Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0204/2151] remoteproc: imx_dsp: Acquire runtime PM before adding carveouts Greg Kroah-Hartman
` (679 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Frank Li, Daniel Baluta,
Shengjiu Wang, Iuliana Prodan, Peng Fan, Mathieu Poirier,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit 8049dc7b631e33a42d8413fe48b043113afa914c ]
Drop extra space between return and zero.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20251119-imx-dsp-2025-11-19-v4-5-adafd342d07b@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Stable-dep-of: 13df1fa4f1a3 ("remoteproc: imx_dsp: Acquire runtime PM before adding carveouts")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/remoteproc/imx_dsp_rproc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index c0c2bda4964a7..b66991008d6f1 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -784,7 +784,7 @@ static int imx_dsp_rproc_prepare(struct rproc *rproc)
pm_runtime_get_sync(dev);
- return 0;
+ return 0;
}
/* Unprepare function for rproc_ops */
@@ -792,7 +792,7 @@ static int imx_dsp_rproc_unprepare(struct rproc *rproc)
{
pm_runtime_put_sync(rproc->dev.parent);
- return 0;
+ return 0;
}
/* Kick function for rproc_ops */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0204/2151] remoteproc: imx_dsp: Acquire runtime PM before adding carveouts
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (202 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0203/2151] remoteproc: imx_dsp_rproc: Drop extra space Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0205/2151] arm64: dts: imx95: Avoid 32-bit PCIe window System RAM overlap Greg Kroah-Hartman
` (678 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mathieu Poirier,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 13df1fa4f1a30571442eda64c73d6cac7b9b5c95 ]
The prepare callback publishes DSP carveouts before acquiring the
runtime-PM reference that establishes required clocks and mailbox state.
A PM failure therefore leaves the prepare transaction partially
published.
Acquire runtime PM first and drop that reference if carveout
construction fails, so a failed prepare does not add resources before
its hardware prerequisite.
Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20260830133310.6926-1-pengpeng@iscas.ac.cn
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/remoteproc/imx_dsp_rproc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
index b66991008d6f1..bead9a5ea8baa 100644
--- a/drivers/remoteproc/imx_dsp_rproc.c
+++ b/drivers/remoteproc/imx_dsp_rproc.c
@@ -776,14 +776,17 @@ static int imx_dsp_rproc_prepare(struct rproc *rproc)
struct device *dev = rproc->dev.parent;
int ret;
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret < 0)
+ return ret;
+
ret = imx_dsp_rproc_add_carveout(priv);
if (ret) {
dev_err(dev, "failed on imx_dsp_rproc_add_carveout\n");
+ pm_runtime_put_sync(dev);
return ret;
}
- pm_runtime_get_sync(dev);
-
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0205/2151] arm64: dts: imx95: Avoid 32-bit PCIe window System RAM overlap
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (203 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0204/2151] remoteproc: imx_dsp: Acquire runtime PM before adding carveouts Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0206/2151] x86/crash: Reserve elfcorehdr for CONFIG_NR_CPUS, not CONFIG_NR_CPUS_DEFAULT Greg Kroah-Hartman
` (677 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Richard Zhu, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Zhu <hongxing.zhu@nxp.com>
[ Upstream commit 9094eb07b3e236233dbaac61ed30cc65be9e9c6c ]
Move the PCIe non-prefetchable memory PCI bus address from 0xe0000000
to 0x10000000 to avoid overlap with DRAM. Avoid hit this as a P2P
transfer[1]. The 0x10000000 range is reserved and safe to use.
Fixes: dbecf38e60d4e ("arm64: dts: imx95: Correct PCIe outbound address space configuration")
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Link: https://lore.kernel.org/imx/753fca23-c3eb-45e3-aeac-b7b248fa723a@app.fastmail.com/ [1]
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx95.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi
index 47fd5a5862b4f..6a9524650ba70 100644
--- a/arch/arm64/boot/dts/freescale/imx95.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
@@ -1824,7 +1824,7 @@ pcie0: pcie@4c300000 {
<0 0x4c340000 0 0x4000>;
reg-names = "dbi", "config", "atu", "app";
ranges = <0x43000000 0x9 0x00000000 0x9 0x00000000 0x0 0xe0000000>,
- <0x82000000 0x0 0xe0000000 0x9 0xe0000000 0x0 0x10000000>,
+ <0x82000000 0x0 0x10000000 0x9 0xe0000000 0x0 0x10000000>,
<0x81000000 0x0 0x00000000 0x9 0xf0000000 0x0 0x00100000>;
#address-cells = <3>;
#size-cells = <2>;
@@ -1900,7 +1900,7 @@ pcie1: pcie@4c380000 {
<0 0x4c3c0000 0 0x4000>;
reg-names = "dbi", "config", "atu", "app";
ranges = <0x43000000 0xa 0x00000000 0xa 0x00000000 0x0 0xe0000000>,
- <0x82000000 0x0 0xe0000000 0xa 0xe0000000 0x0 0x10000000>,
+ <0x82000000 0x0 0x10000000 0xa 0xe0000000 0x0 0x10000000>,
<0x81000000 0x0 0x00000000 0xa 0xf0000000 0x0 0x00100000>;
#address-cells = <3>;
#size-cells = <2>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0206/2151] x86/crash: Reserve elfcorehdr for CONFIG_NR_CPUS, not CONFIG_NR_CPUS_DEFAULT
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (204 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0205/2151] arm64: dts: imx95: Avoid 32-bit PCIe window System RAM overlap Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0207/2151] bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively Greg Kroah-Hartman
` (676 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ionut Nechita, Dave Hansen,
Jinjie Ruan, Bradley Morgan, Sourabh Jain, Baoquan He,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ionut Nechita <ionut.nechita@windriver.com>
[ Upstream commit 6664ad1026b558563702f9a1ce637df33e7c001e ]
NR_CPUS_DEFAULT is purely a Kconfig thing. Its entire purpose in life is
to start NR_CPUS at a sane value. There is precisely one (buggy)
reference to it outside of Kconfig in the whole kernel: the x86 crash
code.
That code undersizes the elfcorehdr reservation whenever NR_CPUS exceeds
NR_CPUS_DEFAULT, because the header carries one phdr per possible CPU and
num_possible_cpus() is bounded by NR_CPUS. kexec_file_load(2) then fails
with -EINVAL from sanity_check_segment_list(), and kexec_load(2) silently
truncates the elfcorehdr, which surfaces later as a bad or unusable dump.
Size the elfcorehdr reservation with NR_CPUS instead.
Fixes: ea53ad9cf73b ("x86/crash: add x86 crash hotplug support")
Signed-off-by: Ionut Nechita <ionut.nechita@windriver.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Bradley Morgan <brads@mainlining.org>
Reviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Acked-by: Baoquan He <baoquan.he@linux.dev>
Link: https://patch.msgid.link/20260901071041.16311-2-ionut.nechita@windriver.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/kernel/crash.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 335fd2ee9766d..521ff276f5c5a 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -432,9 +432,9 @@ int crash_load_segments(struct kimage *image)
* maximum CPUs and maximum memory ranges.
*/
if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG))
- pnum = 2 + CONFIG_NR_CPUS_DEFAULT + CONFIG_CRASH_MAX_MEMORY_RANGES;
+ pnum = 2 + CONFIG_NR_CPUS + CONFIG_CRASH_MAX_MEMORY_RANGES;
else
- pnum += 2 + CONFIG_NR_CPUS_DEFAULT;
+ pnum += 2 + CONFIG_NR_CPUS;
if (pnum < (unsigned long)PN_XNUM) {
kbuf.memsz = pnum * sizeof(Elf64_Phdr);
@@ -493,7 +493,7 @@ unsigned int arch_crash_get_elfcorehdr_size(void)
unsigned int sz;
/* kernel_map, VMCOREINFO and maximum CPUs */
- sz = 2 + CONFIG_NR_CPUS_DEFAULT;
+ sz = 2 + CONFIG_NR_CPUS;
if (IS_ENABLED(CONFIG_MEMORY_HOTPLUG))
sz += CONFIG_CRASH_MAX_MEMORY_RANGES;
sz *= sizeof(Elf64_Phdr);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0207/2151] bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (205 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0206/2151] x86/crash: Reserve elfcorehdr for CONFIG_NR_CPUS, not CONFIG_NR_CPUS_DEFAULT Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0208/2151] PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming Greg Kroah-Hartman
` (675 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Toke Høiland-Jørgensen,
Andrii Nakryiko, Larysa Zaremba, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Toke Høiland-Jørgensen <toke@redhat.com>
[ Upstream commit 06d6f845c4bda857a6ae864690f35321b878e827 ]
When setting the XDP hints ifname, bpftool would set the
BPF_F_XDP_DEV_BOUND_ONLY without looking at the existing program flags,
overriding any other flag values. This was always a destructive action,
but after we change libbpf to carry the frags section flag in
prog_flags, this can impact bpftool loading of XDP frags programs.
Change the flag setting to be non-destructive by OR'ing it with the
existing flags.
Fixes: f46392ee3dec ("bpftool: Specify XDP Hints ifname when loading program")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Link: https://lore.kernel.org/bpf/20260901-libbpf-frags-flags-v3-1-4eb6f14968b0@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/prog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 6daf19809ca4a..86ea90cd45408 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -1769,7 +1769,7 @@ static int load_with_options(int argc, char **argv, bool first_prog_only)
}
if (prog_type == BPF_PROG_TYPE_XDP && xdpmeta_ifindex) {
- bpf_program__set_flags(pos, BPF_F_XDP_DEV_BOUND_ONLY);
+ bpf_program__set_flags(pos, bpf_program__flags(pos) | BPF_F_XDP_DEV_BOUND_ONLY);
bpf_program__set_ifindex(pos, xdpmeta_ifindex);
} else {
bpf_program__set_ifindex(pos, offload_ifindex);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0208/2151] PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (206 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0207/2151] bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0209/2151] dmaengine: fsl_raid: dont invoke client callback under desc_lock Greg Kroah-Hartman
` (674 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Koichiro Den, Manivannan Sadhasivam,
Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <den@valinux.co.jp>
[ Upstream commit afe2aa9dc93d904730bab63f5ccb514a318e6464 ]
vntb_epf_mw_set_trans() programs the memory-window BAR through
pci_epc_set_bar() with hardcoded function numbers (0, 0), so the BAR
lands on the wrong function whenever the vNTB EPF is bound to anything
but PF0. The other BAR programming sites in the vNTB driver already pass
the EPF's own numbers.
Pass the EPF's own func_no/vfunc_no here as well.
Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260728172306.2751813-2-den@valinux.co.jp
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/endpoint/functions/pci-epf-vntb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index 39d9844873f53..eef9d0e724381 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -1156,7 +1156,8 @@ static int vntb_epf_mw_set_trans(struct ntb_dev *ndev, int pidx, int idx,
epf_bar->barno = barno;
epf_bar->size = size;
- ret = pci_epc_set_bar(ntb->epf->epc, 0, 0, epf_bar);
+ ret = pci_epc_set_bar(ntb->epf->epc, ntb->epf->func_no,
+ ntb->epf->vfunc_no, epf_bar);
if (ret) {
dev_err(dev, "failure set mw trans\n");
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0209/2151] dmaengine: fsl_raid: dont invoke client callback under desc_lock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (207 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0208/2151] PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0210/2151] dmaengine: fsl_raid: avoid free_q underflow in free_chan_resources Greg Kroah-Hartman
` (673 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit 62c267ce97444f8a381f2bb3cd5d534eb362c540 ]
fsl_re_dequeue() holds re_chan->desc_lock while calling
fsl_re_desc_done(), which synchronously invokes the DMA client completion
callback via dmaengine_desc_get_callback_invoke(). If that callback
submits new work (e.g. fsl_re_tx_submit()), it tries to reacquire the
same desc_lock and deadlocks on the spinlock.
Collect completed descriptors into a local list under the lock, then
release the lock and invoke the callbacks before moving the descriptors
to the ack queue.
Fixes: ad80da658bbc ("dmaengine: Driver support for FSL RaidEngine device.")
Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260718053010.3074329-1-rosenp@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/fsl_raid.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index 6aa97e258a557..ad77694520e9e 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -162,6 +162,7 @@ static void fsl_re_dequeue(struct tasklet_struct *t)
struct fsl_re_hw_desc *hwdesc;
unsigned long flags;
unsigned int count, oub_count;
+ LIST_HEAD(completed);
int found;
fsl_re_cleanup_descs(re_chan);
@@ -182,8 +183,7 @@ static void fsl_re_dequeue(struct tasklet_struct *t)
}
if (found) {
- fsl_re_desc_done(desc);
- list_move_tail(&desc->node, &re_chan->ack_q);
+ list_move_tail(&desc->node, &completed);
} else {
dev_err(re_chan->dev,
"found hwdesc not in sw queue, discard it\n");
@@ -196,6 +196,17 @@ static void fsl_re_dequeue(struct tasklet_struct *t)
FSL_RE_RMVD_JOB(1));
}
spin_unlock_irqrestore(&re_chan->desc_lock, flags);
+
+ /* Invoke the client callbacks outside the channel lock. The callback
+ * may submit new work which re-acquires desc_lock, so holding it here
+ * would deadlock.
+ */
+ list_for_each_entry_safe(desc, _desc, &completed, node) {
+ fsl_re_desc_done(desc);
+ spin_lock_irqsave(&re_chan->desc_lock, flags);
+ list_move_tail(&desc->node, &re_chan->ack_q);
+ spin_unlock_irqrestore(&re_chan->desc_lock, flags);
+ }
}
/* Per Job Ring interrupt handler */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0210/2151] dmaengine: fsl_raid: avoid free_q underflow in free_chan_resources
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (208 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0209/2151] dmaengine: fsl_raid: dont invoke client callback under desc_lock Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0211/2151] RDMA/hns: Fix missing CQE when UD QP use different SL Greg Kroah-Hartman
` (672 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit d805aa5b6088b193debabaa80cc0991bfa2bd057 ]
fsl_re_free_chan_resources() loops alloc_count times calling
list_first_entry() on free_q without checking whether the list still
has entries. If descriptors remain un-acked or pending in submit_q /
active_q / ack_q when the channel resources are freed, free_q becomes
smaller than alloc_count and list_first_entry() returns the list head,
causing list_del() to corrupt the list head and dereference a bogus
pointer.
Walk free_q with list_for_each_entry_safe() until it is empty,
decrementing alloc_count per freed descriptor, instead of relying on
the alloc_count count.
Fixes: ad80da658bbc ("dmaengine: Driver support for FSL RaidEngine device.")
Assisted-by: opencode:hy3-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260718235227.385108-1-rosenp@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/fsl_raid.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index ad77694520e9e..fa8e40fdb005c 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -613,18 +613,15 @@ static int fsl_re_alloc_chan_resources(struct dma_chan *chan)
static void fsl_re_free_chan_resources(struct dma_chan *chan)
{
struct fsl_re_chan *re_chan;
- struct fsl_re_desc *desc;
+ struct fsl_re_desc *desc, *_desc;
re_chan = container_of(chan, struct fsl_re_chan, chan);
- while (re_chan->alloc_count--) {
- desc = list_first_entry(&re_chan->free_q,
- struct fsl_re_desc,
- node);
-
+ list_for_each_entry_safe(desc, _desc, &re_chan->free_q, node) {
list_del(&desc->node);
dma_pool_free(re_chan->re_dev->cf_desc_pool, desc->cf_addr,
desc->cf_paddr);
kfree(desc);
+ re_chan->alloc_count--;
}
if (!list_empty(&re_chan->free_q))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0211/2151] RDMA/hns: Fix missing CQE when UD QP use different SL
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (209 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0210/2151] dmaengine: fsl_raid: avoid free_q underflow in free_chan_resources Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0212/2151] clk: Use the generic OF phandle parsing in only one place Greg Kroah-Hartman
` (671 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chengchang Tang, Junxian Huang,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengchang Tang <tangchengchang@huawei.com>
[ Upstream commit 3547f46c31993d41748f0f7936f9d4dc5b5d4b12 ]
Due to the hardware contraint, CQEs may be dropped when a UD QP
sends with multiple SLs. Pin the SL to the value from the first
post_send on the QP to avoid this issue.
Fixes: 66d86e529dd5 ("RDMA/hns: Add UD support for HIP09")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20260831020324.3540901-2-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/hns/hns_roce_device.h | 1 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 15 ++++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
index 06832c0ac0556..717e48772901c 100644
--- a/drivers/infiniband/hw/hns/hns_roce_device.h
+++ b/drivers/infiniband/hw/hns/hns_roce_device.h
@@ -645,6 +645,7 @@ struct hns_roce_qp {
u8 priority;
spinlock_t flush_lock;
struct hns_roce_dip *dip;
+ bool ud_sl_set;
};
struct hns_roce_ib_iboe {
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 5512a8084b7c2..2336079daa1e0 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -428,7 +428,8 @@ static int set_ud_opcode(struct hns_roce_v2_ud_send_wqe *ud_sq_wqe,
return 0;
}
-static int fill_ud_av(struct hns_roce_v2_ud_send_wqe *ud_sq_wqe,
+static int fill_ud_av(struct hns_roce_qp *qp,
+ struct hns_roce_v2_ud_send_wqe *ud_sq_wqe,
struct hns_roce_ah *ah)
{
struct ib_device *ib_dev = ah->ibah.device;
@@ -438,7 +439,12 @@ static int fill_ud_av(struct hns_roce_v2_ud_send_wqe *ud_sq_wqe,
hr_reg_write(ud_sq_wqe, UD_SEND_WQE_HOPLIMIT, ah->av.hop_limit);
hr_reg_write(ud_sq_wqe, UD_SEND_WQE_TCLASS, ah->av.tclass);
hr_reg_write(ud_sq_wqe, UD_SEND_WQE_FLOW_LABEL, ah->av.flowlabel);
- hr_reg_write(ud_sq_wqe, UD_SEND_WQE_SL, ah->av.sl);
+ if (!qp->ud_sl_set) {
+ qp->sl = ah->av.sl;
+ qp->ud_sl_set = true;
+ }
+
+ hr_reg_write(ud_sq_wqe, UD_SEND_WQE_SL, qp->sl);
ud_sq_wqe->sgid_index = ah->av.gid_index;
@@ -488,12 +494,10 @@ static inline int set_ud_wqe(struct hns_roce_qp *qp,
qp->qkey : ud_wr(wr)->remote_qkey);
hr_reg_write(ud_sq_wqe, UD_SEND_WQE_DQPN, ud_wr(wr)->remote_qpn);
- ret = fill_ud_av(ud_sq_wqe, ah);
+ ret = fill_ud_av(qp, ud_sq_wqe, ah);
if (ret)
return ret;
- qp->sl = to_hr_ah(ud_wr(wr)->ah)->av.sl;
-
set_extend_sge(qp, wr->sg_list, &curr_idx, valid_num_sge);
/*
@@ -5360,6 +5364,7 @@ static void v2_set_flushed_fields(struct ib_qp *ibqp,
hr_reg_write(context, QPC_SQ_PRODUCER_IDX, hr_qp->sq.head);
hr_reg_clear(qpc_mask, QPC_SQ_PRODUCER_IDX);
hr_qp->state = IB_QPS_ERR;
+ hr_qp->ud_sl_set = false;
spin_unlock_irqrestore(&hr_qp->sq.lock, sq_flag);
if (ibqp->srq || ibqp->qp_type == IB_QPT_XRC_INI) /* no RQ */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0212/2151] clk: Use the generic OF phandle parsing in only one place
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (210 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0211/2151] RDMA/hns: Fix missing CQE when UD QP use different SL Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0213/2151] wifi: ath12k: signal regd update completion when reg event is dropped Greg Kroah-Hartman
` (670 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stephen Boyd,
Miquel Raynal (Schneider Electric), Brian Masney, Frank Li,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
[ Upstream commit 57d728b4ab15a8af890013bb0f302e7733f7c1c6 ]
Ideally, there should be one single entry in the OF world. This way, the
DT parsing logic is always identical. At this stage, we call
of_parse_phandle_with_args() in:
- of_parse_clkspec()
- of_clk_get_parent_name()
which kinds of defeats the above statement. Furthermore, when this call
is done from of_clk_get_parent_name(), we fail to parse the
'clock-ranges' property.
Make sure DT world is entered only once by calling of_parse_clkspec()
from of_clk_get_parent_name(). Doing so implies that we do not try the
"clock-ranges" path if we already found a "clocks" property.
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Fixes: 4472287a3b2f5 ("clk: Introduce of_clk_get_hw_from_clkspec()")
Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/clk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index e00b36f5a6cfd..d67bd3a4b47c1 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -5236,6 +5236,8 @@ static int of_parse_clkspec(const struct device_node *np, int index,
* has a "clock-ranges" property, then we can try one of its
* clocks.
*/
+ if (of_property_present(np, "clocks"))
+ break;
np = np->parent;
if (np && !of_property_present(np, "clock-ranges"))
break;
@@ -5380,8 +5382,7 @@ const char *of_clk_get_parent_name(const struct device_node *np, int index)
int count;
struct clk *clk;
- rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
- &clkspec);
+ rc = of_parse_clkspec(np, index, NULL, &clkspec);
if (rc)
return NULL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0213/2151] wifi: ath12k: signal regd update completion when reg event is dropped
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (211 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0212/2151] clk: Use the generic OF phandle parsing in only one place Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0214/2151] wifi: ath11k: disable interrupts during firmware crash recovery Greg Kroah-Hartman
` (669 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Baochen Qiang, Rameshkumar Sundaram,
Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
[ Upstream commit f2576dc0f894ef33045ba7ed057ec417988bba8a ]
During driver bring-up, ath12k_mac_hw_register() reinitializes
ar->regd_update_completed and sends a set current country command to
firmware. It then relies on the regulatory event from firmware to signal
that completion via ath12k_reg_chan_list_event().
However, when the country being set is identical to the one already
applied at boot time, ath12k_reg_validate_reg_info() returns
ATH12K_REG_STATUS_DROP through the "Avoid multiple overwrites to default
regd" path. In that case ath12k_reg_chan_list_event() jumps to mem_free
before assigning pdev_idx, so pdev_idx stays at its initial value of 255,
'ar' remains NULL and complete_all() is never called.
As a result the reinitialized completion is left unsignalled and the next
ath12k_regd_update() waits the full timeout, printing:
Timeout while waiting for regulatory update
Fix this by assigning pdev_idx from the event's phy_id right after it is
extracted, before validation, so that the drop and fallback paths still
reach complete_all(). Change the guard at the end to check the index
against ab->num_radios so that an out-of-range phy_id does not lead to an
invalid pdevs[] access.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Fixes: 906619a00967 ("wifi: ath12k: handle regulatory hints during mac registration")
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20260729-ath12k-regd-wait-timeout-v1-1-504aa6e7e93c@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath12k/wmi.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index 67c9174a30aab..026afd352e2ce 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -6821,6 +6821,14 @@ static int ath12k_reg_chan_list_event(struct ath12k_base *ab, struct sk_buff *sk
goto mem_free;
}
+ /*
+ * Set the valid pdev_idx before validating so that, even when the
+ * event is dropped or falls back, the completion the caller in
+ * ath12k_mac_hw_register() may be waiting on is still signalled at
+ * the end and it does not time out.
+ */
+ pdev_idx = reg_info->phy_id;
+
ret = ath12k_reg_validate_reg_info(ab, reg_info);
if (ret == ATH12K_REG_STATUS_FALLBACK) {
ath12k_warn(ab, "failed to validate reg info %d\n", ret);
@@ -6837,7 +6845,6 @@ static int ath12k_reg_chan_list_event(struct ath12k_base *ab, struct sk_buff *sk
}
/* free old reg_info if it exist */
- pdev_idx = reg_info->phy_id;
if (ab->reg_info[pdev_idx]) {
ath12k_reg_reset_reg_info(ab->reg_info[pdev_idx]);
kfree(ab->reg_info[pdev_idx]);
@@ -6876,7 +6883,7 @@ static int ath12k_reg_chan_list_event(struct ath12k_base *ab, struct sk_buff *sk
out:
/* In some error cases, even a valid pdev_idx might not be available */
- if (pdev_idx != 255)
+ if (pdev_idx < ab->num_radios)
ar = ab->pdevs[pdev_idx].ar;
/* During the boot-time update, 'ar' might not be allocated,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0214/2151] wifi: ath11k: disable interrupts during firmware crash recovery
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (212 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0213/2151] wifi: ath12k: signal regd update completion when reg event is dropped Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0215/2151] wifi: ath11k: fix sporadic WLAN initialization failures Greg Kroah-Hartman
` (668 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Julius Bairaktaris,
Rameshkumar Sundaram, Baochen Qiang, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julius Bairaktaris <julius@bairaktaris.de>
[ Upstream commit f7a74e131d3f0de04335dbe278bfb82bdafcdb3e ]
On IPQ8074 a firmware assert reboots the SoC:
Unable to handle kernel read from unreadable memory at virtual address 0
pc : ath11k_hal_srng_access_begin+0xc/0x60 [ath11k]
lr : ath11k_dp_rx_process_mon_status+0x15c/0xd84 [ath11k]
Call trace:
ath11k_hal_srng_access_begin+0xc/0x60 [ath11k]
ath11k_dp_rx_process_mon_rings+0xa0/0x5d4 [ath11k]
ath11k_dp_service_srng+0x1f4/0x348 [ath11k]
ath11k_ahb_ext_grp_napi_poll+0x34/0xd4 [ath11k_ahb]
__napi_poll+0x38/0x188
net_rx_action+0x120/0x2c0
ath11k_core_reconfigure_on_crash() tears the data path down with
ath11k_dp_pdev_free(), ath11k_dp_free() and ath11k_hal_srng_clear(),
which memsets the ring list. The DP NAPI is still running while that
happens, so it services a ring whose address pointer has just been
cleared.
That function used to disable the interrupts first, until
commit d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path")
moved the disable into ath11k_core_reset(). reset_work is only queued
from mhi.c and from the debugfs hw-restart handler, so AHB parts never
run it on a real firmware crash. Their recovery goes QMI server exit ->
restart_work -> ath11k_core_reconfigure_on_crash() ->
ath11k_core_qmi_firmware_ready(), and nothing disables the interrupts
anywhere along it.
Disable them again on the crash path. The reset path has already done
so by the time it gets here, hence the ab->is_reset check.
This is also why the debugfs hw-restart trigger never showed the
problem: it goes through ath11k_core_reset(), the one path that still
had the disable.
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.12-01460-QCAHKSWPL_SILICONZ-1
Fixes: d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260726221908.104873-3-julius@bairaktaris.de
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/core.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 78a1b0edd8b45..e8b130cd71d49 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -2304,6 +2304,16 @@ static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab)
mutex_lock(&ab->core_lock);
ath11k_thermal_unregister(ab);
+
+ /*
+ * ath11k_core_reset() already disabled the interrupts on the reset
+ * path; only the firmware crash path reaches here with them live.
+ */
+ if (!ab->is_reset) {
+ ath11k_hif_irq_disable(ab);
+ ath11k_hif_ce_irq_disable(ab);
+ }
+
ath11k_dp_pdev_free(ab);
ath11k_spectral_deinit(ab);
ath11k_ce_cleanup_pipes(ab);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0215/2151] wifi: ath11k: fix sporadic WLAN initialization failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (213 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0214/2151] wifi: ath11k: disable interrupts during firmware crash recovery Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0216/2151] wifi: ath11k: fix NULL dereference in ahb remove when QMI init incomplete Greg Kroah-Hartman
` (667 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Miaoqing Pan, Baochen Qiang,
Rameshkumar Sundaram, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
[ Upstream commit 32ec8488d75d122768b1977501bcb5ec799230c4 ]
On WCN6750 platforms, reboot stress testing occasionally results in WLAN
initialization failures after boot. The WPSS firmware reaches the running
state successfully, but no WLAN interface is created.
Analysis shows that ath11k_ahb depends on the QRTR SMD transport for QMI
communication with WPSS firmware. However, this dependency is not
currently expressed in Kconfig, allowing qrtr_smd and ath11k_ahb to load
in either order when built as modules.
If ath11k_ahb is loaded before qrtr_smd becomes available, WLAN
initialization may not complete successfully.
Make the QRTR and QRTR_SMD dependencies explicit and add a soft
dependency to ensure qrtr_smd is loaded before ath11k_ahb.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device")
Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20260806101331.484063-2-miaoqing.pan@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/Kconfig | 3 +++
drivers/net/wireless/ath/ath11k/ahb.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/Kconfig b/drivers/net/wireless/ath/ath11k/Kconfig
index 659ef134ef168..a4519b2b025a6 100644
--- a/drivers/net/wireless/ath/ath11k/Kconfig
+++ b/drivers/net/wireless/ath/ath11k/Kconfig
@@ -15,6 +15,9 @@ config ATH11K_AHB
tristate "Atheros ath11k AHB support"
depends on ATH11K
depends on REMOTEPROC
+ select RPMSG
+ select QRTR
+ select QRTR_SMD
help
This module adds support for AHB bus
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 5d8c0457721cd..b6a146e9abf8a 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1347,5 +1347,6 @@ static struct platform_driver ath11k_ahb_driver = {
module_platform_driver(ath11k_ahb_driver);
+MODULE_SOFTDEP("pre: qrtr_smd");
MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN AHB devices");
MODULE_LICENSE("Dual BSD/GPL");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0216/2151] wifi: ath11k: fix NULL dereference in ahb remove when QMI init incomplete
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (214 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0215/2151] wifi: ath11k: fix sporadic WLAN initialization failures Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0217/2151] wifi: ath11k: unregister PM notifier on QMI init failure path Greg Kroah-Hartman
` (666 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Miaoqing Pan, Baochen Qiang,
Rameshkumar Sundaram, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
[ Upstream commit 1a7bcf5324c8e2de6512eca5b028b6b283181d3f ]
On WCN6750, if QMI messages never arrive (for example when qrtr_smd
is not ready), WLAN initialization stops before the device is fully
registered. In this case ATH11K_FLAG_QMI_FAIL is not set because no
QMI event handler is executed.
When the driver is removed, ath11k_ahb_remove() still calls
ath11k_core_deinit(), which eventually triggers
ath11k_ce_cleanup_pipes() on uninitialized CE pipes and results in a
NULL pointer dereference in ath11k_hal_srng_access_begin():
ath11k_hal_srng_access_begin+0x14/0x68 [ath11k]
ath11k_ce_cleanup_pipes+0x184/0x190 [ath11k]
ath11k_pcic_stop+0x24/0x38 [ath11k]
ath11k_core_deinit+0xfc/0x1c0 [ath11k]
ath11k_ahb_remove+0x38/0xa0 [ath11k_ahb]
Fix this by invoking ath11k_ahb_remove_prepare() before the state
check and skipping ath11k_core_deinit() if ATH11K_FLAG_REGISTERED
is not set, core initialization did not complete and CE pipes may
remain uninitialized, making ath11k_core_deinit() unsafe.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device")
Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20260806101331.484063-3-miaoqing.pan@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/ahb.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index b6a146e9abf8a..db7a762dcf62b 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1300,14 +1300,15 @@ static void ath11k_ahb_remove(struct platform_device *pdev)
{
struct ath11k_base *ab = platform_get_drvdata(pdev);
- if (test_bit(ATH11K_FLAG_QMI_FAIL, &ab->dev_flags)) {
+ ath11k_ahb_remove_prepare(ab);
+
+ if (!test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) {
ath11k_ahb_power_down(ab, false);
ath11k_debugfs_soc_destroy(ab);
ath11k_qmi_deinit_service(ab);
goto qmi_fail;
}
- ath11k_ahb_remove_prepare(ab);
ath11k_core_deinit(ab);
qmi_fail:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0217/2151] wifi: ath11k: unregister PM notifier on QMI init failure path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (215 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0216/2151] wifi: ath11k: fix NULL dereference in ahb remove when QMI init incomplete Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0218/2151] arm64: dts: broadcom: bcm2712: Add V3D device node Greg Kroah-Hartman
` (665 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Miaoqing Pan, Baochen Qiang,
Rameshkumar Sundaram, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
[ Upstream commit 1d8e73163ef933624341075f576e2f36ef9133f7 ]
ath11k_core_init() registers a PM notifier before the QMI server
becomes available. If the QMI server never arrives, the device remove()
path can take the early-exit path introduced for QMI initialization
failures, skipping ath11k_core_deinit().
As a result, the PM notifier remains registered after the ath11k base
object has been freed. A subsequent suspend or resume event may invoke
the stale notifier and trigger a use-after-free.
Fix this by explicitly unregistering the PM notifier in the QMI failure
cleanup path before releasing ath11k resources.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
Fixes: 32d93b51bc7e ("wifi: ath11k: choose default PM policy for hibernation")
Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20260806101331.484063-4-miaoqing.pan@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/ahb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index db7a762dcf62b..e7dcd3eff4a4f 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1306,6 +1306,7 @@ static void ath11k_ahb_remove(struct platform_device *pdev)
ath11k_ahb_power_down(ab, false);
ath11k_debugfs_soc_destroy(ab);
ath11k_qmi_deinit_service(ab);
+ ath11k_core_pm_notifier_unregister(ab);
goto qmi_fail;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0218/2151] arm64: dts: broadcom: bcm2712: Add V3D device node
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (216 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0217/2151] wifi: ath11k: unregister PM notifier on QMI init failure path Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0219/2151] arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to root level Greg Kroah-Hartman
` (664 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Maíra Canal, Stefan Wahren,
Florian Fainelli, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maíra Canal <mcanal@igalia.com>
[ Upstream commit 80ebada3dbcc811f3f64fc65e49d87857fe9272b ]
Commits 0ad5bc1ce463 ("drm/v3d: fix up register addresses for V3D 7.x")
and 6fd9487147c4 ("drm/v3d: add brcm,2712-v3d as a compatible V3D device")
added driver support for V3D on BCM2712, but the corresponding device
tree node is still missing.
Add the V3D device tree node to the BCM2712 DTS.
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/r/20260114120610.82531-1-mcanal@igalia.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Stable-dep-of: 1cda59c6790b ("arm64: dts: broadcom: bcm2712: adjust display status")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts | 4 ++++
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 14 ++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index 04738bf281ebd..dbfba51ebe915 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -252,3 +252,7 @@ &pcie1 {
&pcie2 {
status = "okay";
};
+
+&v3d {
+ clocks = <&firmware_clocks 5>;
+};
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 45a382f75b5ec..8eeaf7ffd2046 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/bcm2835-pm.h>
/ {
compatible = "brcm,bcm2712";
@@ -640,6 +641,19 @@ mip1: msi-controller@1000131000 {
msi-ranges = <&gicv2 GIC_SPI 247 IRQ_TYPE_EDGE_RISING 8>;
brcm,msi-offset = <8>;
};
+
+ v3d: gpu@1002000000 {
+ compatible = "brcm,2712-v3d";
+ reg = <0x10 0x02000000 0x00 0x4000>,
+ <0x10 0x02008000 0x00 0x6000>,
+ <0x10 0x02030800 0x00 0x0700>;
+ reg-names = "hub", "core0", "sms";
+
+ power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>;
+ resets = <&pm BCM2835_RESET_V3D>;
+ interrupts = <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
+ };
};
timer {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0219/2151] arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to root level
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (217 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0218/2151] arm64: dts: broadcom: bcm2712: Add V3D device node Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0220/2151] arm64: dts: broadcom: bcm2712: adjust display status Greg Kroah-Hartman
` (663 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rob Herring (Arm), Florian Fainelli,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rob Herring (Arm) <robh@kernel.org>
[ Upstream commit 0acb1de2b4df426a62dba33bcd80f3939636f97b ]
The 'gpu' and 'firmware' nodes are not MMIO devices, so they should not
be under a 'simple-bus', but at the root level.
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20260320154809.1246064-2-robh@kernel.org
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Stable-dep-of: 1cda59c6790b ("arm64: dts: broadcom: bcm2712: adjust display status")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts | 51 +++++++++----------
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 8 +--
2 files changed, 28 insertions(+), 31 deletions(-)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index dbfba51ebe915..b7a6bc34ae1ab 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -44,6 +44,30 @@ power_button: power-button {
};
};
+ firmware {
+ firmware: rpi-firmware {
+ compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
+
+ mboxes = <&mailbox>;
+
+ firmware_clocks: clocks {
+ compatible = "raspberrypi,firmware-clocks";
+ #clock-cells = <1>;
+ };
+
+ reset: reset {
+ compatible = "raspberrypi,firmware-reset";
+ #reset-cells = <1>;
+ };
+
+ power: power {
+ compatible = "raspberrypi,bcm2835-power";
+ firmware = <&firmware>;
+ #power-domain-cells = <1>;
+ };
+ };
+ };
+
sd_io_1v8_reg: sd-io-1v8-reg {
compatible = "regulator-gpio";
regulator-name = "vdd-sd-io";
@@ -189,33 +213,6 @@ wifi: wifi@1 {
};
};
-&soc {
- firmware: firmware {
- compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
- #address-cells = <1>;
- #size-cells = <1>;
-
- mboxes = <&mailbox>;
- dma-ranges;
-
- firmware_clocks: clocks {
- compatible = "raspberrypi,firmware-clocks";
- #clock-cells = <1>;
- };
-
- reset: reset {
- compatible = "raspberrypi,firmware-reset";
- #reset-cells = <1>;
- };
- };
-
- power: power {
- compatible = "raspberrypi,bcm2835-power";
- firmware = <&firmware>;
- #power-domain-cells = <1>;
- };
-};
-
/* uarta communicates with the BT module */
&uarta {
uart-has-rtscts;
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 8eeaf7ffd2046..9add69f1726fd 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -503,10 +503,6 @@ axi: axi {
<0x18 0x00000000 0x18 0x00000000 0x04 0x00000000>,
<0x1c 0x00000000 0x1c 0x00000000 0x04 0x00000000>;
- vc4: gpu {
- compatible = "brcm,bcm2712-vc6";
- };
-
pcie0: pcie@1000100000 {
compatible = "brcm,bcm2712-pcie";
reg = <0x10 0x00100000 0x00 0x9310>;
@@ -656,6 +652,10 @@ v3d: gpu@1002000000 {
};
};
+ vc4: gpu {
+ compatible = "brcm,bcm2712-vc6";
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0220/2151] arm64: dts: broadcom: bcm2712: adjust display status
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (218 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0219/2151] arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to root level Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0221/2151] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Greg Kroah-Hartman
` (662 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Peter Robinson, Florian Fainelli,
Dave Stevenson, Andrea della Porta, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Robinson <pbrobinson@gmail.com>
[ Upstream commit 1cda59c6790be4ae93c76bffd81a003b88083ae9 ]
Typically non critical IP in a SoC are disabled by
default in the SoC .dtsi and enabled on board specific
configs. There are usecases, such as some CM5 carrier
boards, where display output may not be desired or
connected. So disable them on the SoC .dtsi and enable
them on the RPi5 board.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Andrea della Porta <andrea.porta@suse.com>
Fixes: 25d77bdd7df2 ("arm64: dts: broadcom: Add display pipeline support to BCM2712")
Link: https://lore.kernel.org/r/20260801165430.598302-1-pbrobinson@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts | 35 +++++++++++++++++++
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 11 ++++++
2 files changed, 46 insertions(+)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
index b7a6bc34ae1ab..d998bfae91acb 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
@@ -104,6 +104,18 @@ wl_on_reg: wl-on-reg {
};
};
+&ddc0 {
+ status = "okay";
+};
+
+&ddc1 {
+ status = "okay";
+};
+
+&disp_intr {
+ status = "okay";
+};
+
&pinctrl {
bt_shutdown_default: bt-shutdown-default-state {
function = "gpio";
@@ -230,16 +242,27 @@ bluetooth: bluetooth {
&hvs {
clocks = <&firmware_clocks 4>, <&firmware_clocks 16>;
clock-names = "core", "disp";
+ status = "okay";
};
&hdmi0 {
clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
clock-names = "hdmi", "bvb", "audio", "cec";
+ status = "okay";
};
&hdmi1 {
clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
clock-names = "hdmi", "bvb", "audio", "cec";
+ status = "okay";
+};
+
+&mop {
+ status = "okay";
+};
+
+&moplet {
+ status = "okay";
};
&pcie1 {
@@ -250,6 +273,18 @@ &pcie2 {
status = "okay";
};
+&pixelvalve0 {
+ status = "okay";
+};
+
+&pixelvalve1 {
+ status = "okay";
+};
+
&v3d {
clocks = <&firmware_clocks 5>;
};
+
+&vc4 {
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 9add69f1726fd..f27f999f89bc0 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -353,12 +353,14 @@ pixelvalve0: pixelvalve@7c410000 {
compatible = "brcm,bcm2712-pixelvalve0";
reg = <0x7c410000 0x100>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
};
pixelvalve1: pixelvalve@7c411000 {
compatible = "brcm,bcm2712-pixelvalve1";
reg = <0x7c411000 0x100>;
interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
};
mop: mop@7c500000 {
@@ -366,6 +368,7 @@ mop: mop@7c500000 {
reg = <0x7c500000 0x28>;
interrupt-parent = <&disp_intr>;
interrupts = <1>;
+ status = "disabled";
};
moplet: moplet@7c501000 {
@@ -373,6 +376,7 @@ moplet: moplet@7c501000 {
reg = <0x7c501000 0x20>;
interrupt-parent = <&disp_intr>;
interrupts = <0>;
+ status = "disabled";
};
disp_intr: interrupt-controller@7c502000 {
@@ -381,6 +385,7 @@ disp_intr: interrupt-controller@7c502000 {
interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
+ status = "disabled";
};
dvp: clock@7c700000 {
@@ -399,6 +404,7 @@ ddc0: i2c@7d508200 {
clock-frequency = <97500>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
ddc1: i2c@7d508280 {
@@ -409,6 +415,7 @@ ddc1: i2c@7d508280 {
clock-frequency = <97500>;
#address-cells = <1>;
#size-cells = <0>;
+ status = "disabled";
};
bsc_irq: interrupt-controller@7d508380 {
@@ -454,6 +461,7 @@ hdmi0: hdmi@7c701400 {
interrupt-names = "cec-tx", "cec-rx", "cec-low",
"hpd-connected", "hpd-removed";
ddc = <&ddc0>;
+ status = "disabled";
};
hdmi1: hdmi@7c706400 {
@@ -483,6 +491,7 @@ hdmi1: hdmi@7c706400 {
interrupt-names = "cec-tx", "cec-rx", "cec-low",
"hpd-connected", "hpd-removed";
ddc = <&ddc1>;
+ status = "disabled";
};
};
@@ -654,6 +663,7 @@ v3d: gpu@1002000000 {
vc4: gpu {
compatible = "brcm,bcm2712-vc6";
+ status = "disabled";
};
timer {
@@ -688,5 +698,6 @@ hvs: hvs@107c580000 {
interrupt-parent = <&disp_intr>;
interrupts = <2>, <9>, <16>;
interrupt-names = "ch0-eof", "ch1-eof", "ch2-eof";
+ status = "disabled";
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0221/2151] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (219 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0220/2151] arm64: dts: broadcom: bcm2712: adjust display status Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0222/2151] selftests/clone3: tighten CLONE_CLEAR_SIGHAND conflict test Greg Kroah-Hartman
` (661 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregor Herburger, Stefan Wahren,
Krzysztof Kozlowski, Florian Fainelli, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregor Herburger <gregor.herburger@linutronix.de>
[ Upstream commit ef76568f51914937d22e5efd05874bd42f478903 ]
The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
and in a c Stepping. There are two separate dts files. The
bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
the d Stepping. The d stepping does not set its own compatible/model
string but uses "raspberrypi,5-model-b" through its include.
These two steppings are not compatible. Booting with the wrong dtb file
causes a crash at boot.
Add a compatibles string "raspberrypi,5-model-b-d0" together with a
"bcm2712-d0" string to allow us to distinguish between those two
steppings.
Fixes: 44839e2ac8ec ("arm64: dts: broadcom: Add DT for D-step version of BCM2712")
Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260810-bcm2712-d-stepping-compatible-v4-2-73f74479539c@linutronix.de
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
index 127be0fc27c22..ae4b7c587dbc5 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
@@ -3,6 +3,11 @@
#include "bcm2712-rpi-5-b.dts"
+/ {
+ compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712-d0";
+ model = "Raspberry Pi 5 d0 Stepping";
+};
+
&gio_aon {
brcm,gpio-bank-widths = <15 6>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0222/2151] selftests/clone3: tighten CLONE_CLEAR_SIGHAND conflict test
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (220 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0221/2151] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0223/2151] selftests/pidfd: fix PPID values in error message Greg Kroah-Hartman
` (660 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Paul Dolan,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Dolan <paul.dolan.dev@gmail.com>
[ Upstream commit aeebb4884f0e8feb9929f013067488b7f2081f33 ]
The CLONE_CLEAR_SIGHAND test intends to verify that
CLONE_CLEAR_SIGHAND and CLONE_SIGHAND are mutually exclusive. However,
CLONE_SIGHAND without CLONE_VM is independently invalid, so the test
input has another reason to fail with EINVAL.
Add CLONE_VM so that CLONE_SIGHAND is otherwise valid, and require
clone3() to fail with EINVAL. This ensures the test exercises the
intended flag conflict and does not accept an unrelated failure.
Fixes: de5287235631 ("tests: test CLONE_CLEAR_SIGHAND")
Signed-off-by: Paul Dolan <paul.dolan.dev@gmail.com>
Link: https://patch.msgid.link/20260902174939.15135-1-paul.dolan.dev@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/clone3/clone3_clear_sighand.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/clone3/clone3_clear_sighand.c b/tools/testing/selftests/clone3/clone3_clear_sighand.c
index ce04267868288..2be0221104456 100644
--- a/tools/testing/selftests/clone3/clone3_clear_sighand.c
+++ b/tools/testing/selftests/clone3/clone3_clear_sighand.c
@@ -50,12 +50,12 @@ static void test_clone3_clear_sighand(void)
* Check that CLONE_CLEAR_SIGHAND and CLONE_SIGHAND are mutually
* exclusive.
*/
- args.flags |= CLONE_CLEAR_SIGHAND | CLONE_SIGHAND;
+ args.flags |= CLONE_VM | CLONE_CLEAR_SIGHAND | CLONE_SIGHAND;
args.exit_signal = SIGCHLD;
pid = sys_clone3(&args, sizeof(args));
- if (pid > 0)
+ if (pid != -1 || errno != EINVAL)
ksft_exit_fail_msg(
- "clone3(CLONE_CLEAR_SIGHAND | CLONE_SIGHAND) succeeded\n");
+ "clone3(CLONE_CLEAR_SIGHAND | CLONE_SIGHAND) did not fail with EINVAL\n");
act.sa_handler = nop_handler;
ret = sigemptyset(&act.sa_mask);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0223/2151] selftests/pidfd: fix PPID values in error message
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (221 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0222/2151] selftests/clone3: tighten CLONE_CLEAR_SIGHAND conflict test Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0224/2151] wifi: mac80211: dont seed an S1G stas last_rate Greg Kroah-Hartman
` (659 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Paul Dolan,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Dolan <paul.dolan.dev@gmail.com>
[ Upstream commit b4ad6eb49532a43ad06c4d59ec5d8c80a012eb3f ]
The PIDFD_GET_INFO PPID check compares info.ppid against getppid(), but
its failure message prints pid and info.pid from the preceding PID
check.
Print the PPID values being compared so that a failure reports the
correct information.
Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info")
Signed-off-by: Paul Dolan <paul.dolan.dev@gmail.com>
Link: https://patch.msgid.link/20260902162615.11531-1-paul.dolan.dev@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/pidfd/pidfd_open_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/pidfd/pidfd_open_test.c b/tools/testing/selftests/pidfd/pidfd_open_test.c
index cd3de40e49771..ffa4443c48538 100644
--- a/tools/testing/selftests/pidfd/pidfd_open_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_open_test.c
@@ -168,7 +168,7 @@ int main(int argc, char **argv)
}
if (info.ppid != getppid()) {
ksft_print_msg("ppid %d does not match ppid from ioctl %d\n",
- pid, info.pid);
+ getppid(), info.ppid);
goto on_error;
}
if (info.ruid != getuid()) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0224/2151] wifi: mac80211: dont seed an S1G stas last_rate
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (222 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0223/2151] selftests/pidfd: fix PPID values in error message Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0225/2151] wifi: mac80211: fix unauthorised port check for encap offload Greg Kroah-Hartman
` (658 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lachlan Hodges, Johannes Berg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lachlan Hodges <lachlan.hodges@morsemicro.com>
[ Upstream commit 00f623647c331d31df8629af958f7582a7fc874c ]
When initialising the rate control system, ieee80211_s1g_sta_rate_init()
is called for S1G stations during association where it initialises a
last rate of type STA_STATS_RATE_TYPE_S1G but does not initialise
nss, mcs bw etc. Since the last_rate no longer has a value equivalent
to STA_STATS_RATE_INVALID, the invalid rate will be decoded and
the NL80211_STA_INFO_RX_BITRATE flag will be set.
As a result, there is a period during association before the first
data frame is rx'ed where the seeded value is overwritten by
ieee80211_rx_h_sta_process() while this invalid last_rate lives. If
the sta is desroyed during this process, nl80211_put_sta_rate() will
call into cfg80211_calculate_bitrate() and attempt to calculate
the bitrate using the invalid last_rate leading to a WARN:
4,336,675067400,-;------------[ cut here ]------------
4,337,675067524,-;WARNING: net/wireless/util.c:1960 at cfg80211_calculate_bitrate+0x4d8/0x8b0 [cfg80211], CPU#3: kworker/u16:3/874
4,338,675068176,-;invalid rate bw=0, mcs=0, nss=0
[snip loaded modules]
4,341,675068954,-;Hardware name: BCM2711
4,342,675068961,-;Workqueue: events_unbound cfg80211_wiphy_work [cfg80211]
4,343,675069386,-;Call trace:
4,344,675069392,-; unwind_backtrace from show_stack+0x10/0x14
4,345,675069440,-; show_stack from dump_stack_lvl+0xa8/0xb8
4,346,675069475,-; dump_stack_lvl from __warn+0x90/0x224
4,347,675069517,-; __warn from warn_slowpath_fmt+0x130/0x1a8
4,348,675069559,-; warn_slowpath_fmt from cfg80211_calculate_bitrate+0x4d8/0x8b0 [cfg80211]
4,349,675070005,-; cfg80211_calculate_bitrate [cfg80211] from nl80211_put_sta_rate+0x48/0x590 [cfg80211]
4,350,675070819,-; nl80211_put_sta_rate [cfg80211] from nl80211_put_sta_info_common+0x4f4/0xd50 [cfg80211]
4,351,675071616,-; nl80211_put_sta_info_common [cfg80211] from nl80211_send_station.constprop.0+0x114/0x424 [cfg80211]
4,352,675072427,-; nl80211_send_station.constprop.0 [cfg80211] from cfg80211_del_sta_sinfo+0xc4/0x368 [cfg80211]
4,353,675073222,-; cfg80211_del_sta_sinfo [cfg80211] from __sta_info_destroy_part2+0x108/0x2c0 [mac80211]
4,354,675074178,-; __sta_info_destroy_part2 [mac80211] from sta_info_destroy_addr+0x4c/0x88 [mac80211]
4,355,675075243,-; sta_info_destroy_addr [mac80211] from ieee80211_destroy_assoc_data+0x194/0x2d8 [mac80211]
4,356,675075920,-; ieee80211_destroy_assoc_data [mac80211] from ieee80211_rx_mgmt_assoc_resp+0x220/0x1d4c [mac80211]
4,357,675076558,-; ieee80211_rx_mgmt_assoc_resp [mac80211] from ieee80211_iface_work+0x1c0/0x5d0 [mac80211]
4,358,675077187,-; ieee80211_iface_work [mac80211] from cfg80211_wiphy_work+0x110/0x368 [cfg80211]
4,359,675077763,-; cfg80211_wiphy_work [cfg80211] from process_one_work+0x260/0x868
4,360,675078022,-; process_one_work from worker_thread+0x1bc/0x3ec
4,361,675078042,-; worker_thread from kthread+0x120/0x154
4,362,675078060,-; kthread from ret_from_fork+0x14/0x20
4,363,675078074,-;Exception stack(0xf0ac1fb0 to 0xf0ac1ff8)
4,364,675078081,-;1fa0: 00000000 00000000 00000000 00000000
4,365,675078088,-;1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
4,366,675078093,-;1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
4,367,675080226,-;irq event stamp: 15780967
4,368,675080287,-;hardirqs last enabled at (15780975): [<c050c154>] __up_console_sem+0x50/0x60
4,369,675080395,-;hardirqs last disabled at (15780982): [<c050c140>] __up_console_sem+0x3c/0x60
4,370,675080497,-;softirqs last enabled at (15780966): [<c0476f14>] handle_softirqs+0x398/0x650
4,371,675080608,-;softirqs last disabled at (15780939): [<c0477388>] __irq_exit_rcu+0x150/0x1f0
4,372,675080715,-;---[ end trace 0000000000000000 ]---
To fix, we can simply not seed this psuedo rate. It was originally
implemented to avoid errornous paths that S1G shouldn't take, but those
have since been fixed / cleaned up. While we are here, we also don't
need to initialise the tx side's last rate with
IEEE80211_TX_RC_S1G_MCS (which is equivalent to
IEEE80211_TX_RC_VHT_MCS). The entire tx reporting side does not
support S1G widths and is assumed to be handled by the driver so
we can just remove the entire function.
Fixes: 12bf8fad4ca3 ("mac80211: initialize last_rate for S1G STAs")
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20260827054456.254573-1-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/ieee80211_i.h | 1 -
net/mac80211/mlme.c | 14 +++++---------
net/mac80211/rate.c | 1 -
net/mac80211/s1g.c | 8 --------
4 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 43ae7200875c5..a0b0eb4b2f2ae 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -2326,7 +2326,6 @@ ieee80211_he_op_ie_to_bss_conf(struct ieee80211_vif *vif,
const struct ieee80211_he_operation *he_op_ie_elem);
/* S1G */
-void ieee80211_s1g_sta_rate_init(struct sta_info *sta);
bool ieee80211_s1g_is_twt_setup(struct sk_buff *skb);
void ieee80211_s1g_rx_twt_action(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 4f42108aafd4f..2ca905b9da224 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -5637,7 +5637,6 @@ static bool ieee80211_assoc_config_link(struct ieee80211_link_data *link,
}
static int ieee80211_mgd_setup_link_sta(struct ieee80211_link_data *link,
- struct sta_info *sta,
struct link_sta_info *link_sta,
struct cfg80211_bss *cbss)
{
@@ -5652,11 +5651,9 @@ static int ieee80211_mgd_setup_link_sta(struct ieee80211_link_data *link,
memcpy(link_sta->addr, cbss->bssid, ETH_ALEN);
memcpy(link_sta->pub->addr, cbss->bssid, ETH_ALEN);
- /* TODO: S1G Basic Rate Set is expressed elsewhere */
- if (cbss->channel->band == NL80211_BAND_S1GHZ) {
- ieee80211_s1g_sta_rate_init(sta);
+ /* S1G does not use basic rates */
+ if (cbss->channel->band == NL80211_BAND_S1GHZ)
return 0;
- }
sband = local->hw.wiphy->bands[cbss->channel->band];
@@ -6394,7 +6391,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
}
}
- err = ieee80211_mgd_setup_link_sta(link, sta, link_sta,
+ err = ieee80211_mgd_setup_link_sta(link, link_sta,
assoc_data->link[link_id].bss);
if (err)
goto out_err;
@@ -9070,8 +9067,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
goto out_err;
}
- err = ieee80211_mgd_setup_link_sta(link, new_sta,
- link_sta, cbss);
+ err = ieee80211_mgd_setup_link_sta(link, link_sta, cbss);
if (err) {
rcu_read_unlock();
sta_info_free(local, new_sta);
@@ -10424,7 +10420,7 @@ void ieee80211_process_ml_reconf_resp(struct ieee80211_sub_if_data *sdata,
goto disconnect;
}
- if (ieee80211_mgd_setup_link_sta(link, sta, link_sta,
+ if (ieee80211_mgd_setup_link_sta(link, link_sta,
add_links_data->link[link_id].bss))
goto disconnect;
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index e441f85416037..4880d1e63e984 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -59,7 +59,6 @@ void rate_control_rate_init(struct link_sta_info *link_sta)
/* TODO: check for minstrel_s1g ? */
if (sband->band == NL80211_BAND_S1GHZ) {
- ieee80211_s1g_sta_rate_init(sta);
rcu_read_unlock();
return;
}
diff --git a/net/mac80211/s1g.c b/net/mac80211/s1g.c
index 1e2f07090a436..f5fe8a982a4c5 100644
--- a/net/mac80211/s1g.c
+++ b/net/mac80211/s1g.c
@@ -9,14 +9,6 @@
#include "ieee80211_i.h"
#include "driver-ops.h"
-void ieee80211_s1g_sta_rate_init(struct sta_info *sta)
-{
- /* avoid indicating legacy bitrates for S1G STAs */
- sta->deflink.tx_stats.last_rate.flags |= IEEE80211_TX_RC_S1G_MCS;
- sta->deflink.rx_stats.last_rate =
- STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_S1G);
-}
-
bool ieee80211_s1g_is_twt_setup(struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0225/2151] wifi: mac80211: fix unauthorised port check for encap offload
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (223 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0224/2151] wifi: mac80211: dont seed an S1G stas last_rate Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0226/2151] wifi: mac80211: fix key selection for encap offload frames Greg Kroah-Hartman
` (657 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit d59b9bf7df49367e01b06e82dd0f6e7ad3be493c ]
The check in ieee80211_tx_dequeue() reads frame_control, addr1 and
addr2 out of the skb, but for encapsulation offload that's just a
random part of the ethernet addresses, so dropping depends on bits
in the destination address. This is obviously wrong.
Refactor the check and short-circuit for ethernet format frames,
it only needs the port-control flag check since those are locally
generated and not forwarded frames.
Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support")
Link: https://patch.msgid.link/20260802105818.dd5da579813d.I51ed0121154bb652bebc97bb0597b1fae9ac978f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 48 +++++++++++++++++++++++++++++++++--------------
1 file changed, 34 insertions(+), 14 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 85c90f7c24d8e..4f2cf65514a6a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3865,6 +3865,38 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
return true;
}
+static bool ieee80211_drop_unauth_port(struct ieee80211_tx_data *tx)
+{
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
+ struct ieee80211_hdr *hdr;
+
+ if (likely(test_sta_flag(tx->sta, WLAN_STA_AUTHORIZED)))
+ return false;
+
+ if (info->flags & IEEE80211_TX_CTL_INJECTED)
+ return false;
+
+ if (ieee80211_vif_is_mesh(&tx->sdata->vif) ||
+ tx->sdata->vif.type == NL80211_IFTYPE_OCB)
+ return false;
+
+ /* no need to check forwarding here */
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
+ return !(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO);
+
+ hdr = (struct ieee80211_hdr *)tx->skb->data;
+
+ if (!ieee80211_is_data_present(hdr->frame_control) ||
+ is_multicast_ether_addr(hdr->addr1))
+ return false;
+
+ if ((info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO) &&
+ ieee80211_is_our_addr(tx->sdata, hdr->addr2, NULL))
+ return false;
+
+ return true;
+}
+
struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
struct ieee80211_txq *txq)
{
@@ -3931,20 +3963,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
if (txq->sta) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
- /*
- * Drop unicast frames to unauthorised stations unless they are
- * injected frames or EAPOL frames from the local station.
- */
- if (unlikely(!(info->flags & IEEE80211_TX_CTL_INJECTED) &&
- ieee80211_is_data_present(hdr->frame_control) &&
- !ieee80211_vif_is_mesh(&tx.sdata->vif) &&
- tx.sdata->vif.type != NL80211_IFTYPE_OCB &&
- !is_multicast_ether_addr(hdr->addr1) &&
- !test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) &&
- (!(info->control.flags &
- IEEE80211_TX_CTRL_PORT_CTRL_PROTO) ||
- !ieee80211_is_our_addr(tx.sdata, hdr->addr2,
- NULL)))) {
+
+ if (unlikely(ieee80211_drop_unauth_port(&tx))) {
I802_DEBUG_INC(local->tx_handlers_drop_unauth_port);
ieee80211_free_txskb(&local->hw, skb);
goto begin;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0226/2151] wifi: mac80211: fix key selection for encap offload frames
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (224 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0225/2151] wifi: mac80211: fix unauthorised port check for encap offload Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0227/2151] wifi: mac80211: dont send encap offload frames unencrypted Greg Kroah-Hartman
` (656 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit 0e80db08668b560b3522849cb705623148bcd4b5 ]
ieee80211_tx_h_select_key() assumes the frame is in 802.11 format
for picking the key, at least when there's no pairwise TK for the
STA to transmit with.
For unicast this is likely not relevant because if there's no
pairwise TK for the STA there's probably not going to be any other
key either. But multicast encapsulation offload frames have no
STA, so it looks at the ethernet header as if it was 802.11. This
may not matter very much since multicast encapsulation offload is
likely to ignore the key selection, but it's still wrong.
Create a separate selection function that doesn't (need to) look
at the frame header - it's data anyway, so either unicast to a
station (with sta pointer) or multicast. For MLO, the driver has
to duplicate the frame and select the key anyway, so just skip
it in that case entirely.
Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support")
Link: https://patch.msgid.link/20260802105818.0feb7ad61047.Ia506ca211176a3c466bc60e4cc3e506df34a4a67@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 37 +++++++++++++++++++++++++++++++------
1 file changed, 31 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4f2cf65514a6a..4e7a3e93904b9 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -574,6 +574,34 @@ ieee80211_select_link_key(struct ieee80211_tx_data *tx)
return NULL;
}
+/*
+ * An 802.3 frame is always a data frame, so there are no 802.11 addresses to
+ * look at: with a station the pairwise key is all that can apply, without one
+ * the frame is group addressed. On an MLD the driver has to pick the group key
+ * itself, as the same frame goes out on several links that each have their own.
+ */
+static ieee80211_tx_result
+ieee80211_select_key_8023(struct ieee80211_tx_data *tx)
+{
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
+
+ if (unlikely(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT))
+ return TX_CONTINUE;
+
+ if (tx->sta) {
+ tx->key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]);
+ if (!tx->key)
+ tx->key = rcu_dereference(tx->sdata->default_unicast_key);
+ } else if (!ieee80211_vif_is_mld(&tx->sdata->vif)) {
+ tx->key = rcu_dereference(tx->sdata->deflink.default_multicast_key);
+ }
+
+ if (tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
+ info->control.hw_key = &tx->key->conf;
+
+ return TX_CONTINUE;
+}
+
static ieee80211_tx_result debug_noinline
ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
{
@@ -581,6 +609,9 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
+ if (info->control.flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
+ return ieee80211_select_key_8023(tx);
+
if (unlikely(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
tx->key = NULL;
return TX_CONTINUE;
@@ -597,12 +628,6 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
else
tx->key = NULL;
- if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
- if (tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
- info->control.hw_key = &tx->key->conf;
- return TX_CONTINUE;
- }
-
if (tx->key) {
bool skip_hw = false;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0227/2151] wifi: mac80211: dont send encap offload frames unencrypted
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (225 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0226/2151] wifi: mac80211: fix key selection for encap offload frames Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0228/2151] wifi: mac80211: drop encap offload frames with a tainted key Greg Kroah-Hartman
` (655 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit a48daf145fed445d41ef422573411500785415c8 ]
For 802.11 frames, ieee80211_tx_h_select_key() drops a data frame
that ended up without a key if the station requires encryption, so
that traffic can never leak out unprotected. Encapsulation offload
erroneously didn't get this code path. Fix that.
Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support")
Link: https://patch.msgid.link/20260802085818.1336616-7-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4e7a3e93904b9..aa96d575849b8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -592,6 +592,9 @@ ieee80211_select_key_8023(struct ieee80211_tx_data *tx)
tx->key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]);
if (!tx->key)
tx->key = rcu_dereference(tx->sdata->default_unicast_key);
+
+ if (!tx->key && test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION))
+ return TX_DROP;
} else if (!ieee80211_vif_is_mld(&tx->sdata->vif)) {
tx->key = rcu_dereference(tx->sdata->deflink.default_multicast_key);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0228/2151] wifi: mac80211: drop encap offload frames with a tainted key
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (226 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0227/2151] wifi: mac80211: dont send encap offload frames unencrypted Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0229/2151] wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup Greg Kroah-Hartman
` (654 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit c8ddbe1e8c43f6d008591c50f8be8de39cdce267 ]
When a key is tainted, which happens in some WoWLAN and extended
key ID scenarios, frames that would use it should be dropped.
Fix that for encapsulation offload frames.
Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support")
Link: https://patch.msgid.link/20260802105818.870b6ef31374.Ib87175b55b9fd94c16ba6d9cd816b7a09248df87@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index aa96d575849b8..f7cf7dc46cbb5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -599,7 +599,13 @@ ieee80211_select_key_8023(struct ieee80211_tx_data *tx)
tx->key = rcu_dereference(tx->sdata->deflink.default_multicast_key);
}
- if (tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
+ if (!tx->key)
+ return TX_CONTINUE;
+
+ if (unlikely(tx->key->flags & KEY_FLAG_TAINTED))
+ return TX_DROP;
+
+ if (tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
info->control.hw_key = &tx->key->conf;
return TX_CONTINUE;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0229/2151] wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (227 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0228/2151] wifi: mac80211: drop encap offload frames with a tainted key Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0230/2151] wifi: wfx: fix possible device hang during init Greg Kroah-Hartman
` (653 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit e035900ffe9e8978f7c0d7b61811b6b578751697 ]
In ieee80211_build_hdr(), IEEE80211_TX_CTL_REQ_TX_STATUS is checked
in ctrl_flags, which is wrong - IEEE80211_TX_CTL_REQ_TX_STATUS is in
info->flags, so the check is for IEEE80211_TX_CTRL_PORT_CTRL_PROTO
instead. This works out OK because the only place setting _that_ at
a point before this gets called is in fact ieee80211_tx_control_port()
which was intended here. This is actually needed for correctness, if
jt were checking info->flags instead, TDLS would fill/leak the status
frames created here.
However, we can just fix it by using the cookie instead, that'll be
set for PREAUTH frames via ieee80211_tx_control_port() as well, and
no other frames.
Additionally, the code also erroneously set it, but that just caused
preauth frames to get it set, since storing the ACK SKB will also set
the correct flag. Drop this assignment entirely.
Fixes: a7528198add8 ("mac80211: support control port TX status reporting")
Link: https://patch.msgid.link/20260803141309.292711-10-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f7cf7dc46cbb5..79d0f0141d4ce 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2965,8 +2965,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
}
if (unlikely(!multicast &&
- (sk_requests_wifi_status(skb->sk) ||
- ctrl_flags & IEEE80211_TX_CTL_REQ_TX_STATUS)))
+ (sk_requests_wifi_status(skb->sk) || cookie)))
info_id = ieee80211_store_ack_skb(local, skb, &info_flags,
cookie);
@@ -6554,9 +6553,6 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
if (unencrypted)
flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
- if (cookie)
- ctrl_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
-
flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX;
skb = dev_alloc_skb(local->hw.extra_tx_headroom +
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0230/2151] wifi: wfx: fix possible device hang during init
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (228 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0229/2151] wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0231/2151] hwrng: cctrng - Fix runtime PM usage counter leak Greg Kroah-Hartman
` (652 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gerard Salvatella, Lukas Stockmann,
Jérôme Pouiller, Alexander Sverdlin, Johannes Berg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérôme Pouiller <jerome.pouiller@silabs.com>
[ Upstream commit 102f54dc47be198e9310b18d41305a78d70a0796 ]
The WFxxx device provides an SDIO interface. In addition to the usual
in-band SDIO IRQ, the device also supports out-of-band IRQ line. OOB IRQ
requires a specific initialization described in commit f00dc1d789e1c
("staging: wfx: poll IRQ during init"):
When the chip starts in SDIO mode, the external IRQ (aka Out-Of-Band
IRQ) cannot be used before to configure it. Therefore, the first
exchanges with the chip have to be done without the OOB IRQ.
This patch allow to poll the data until the OOB IRQ is correctly
setup. In order to keep the code simpler, this patch also poll data
even if OOB IRQ is not used.
Commit 57aa557f110d9 ("staging: wfx: introduce a way to poll IRQ")
announce some limitation about the data polling mechanism:
This function [wfx_bh_poll_irq()] must used with care: if an IRQ
fires while the host reads control register, the IRQ can be lost.
However, with last analysis, it seems it does not only impact the IRQ.
When this condition happen the hardware is lost and won't reply the next
commands. The only way to recover the error is to pull the reset pin and
bind the device again.
Currently wfx_bh_poll_irq() is only used during the two first exchanges
with the hardware. Therefore, it has been reported to only happen after
a few hours of bind/rebind in a loop. This explain why it has not been
reported before.
Fortunately, wfx_bh_poll_irq() is only required for OOB IRQ, which is
probably very marginal. The In-Band IRQ case also uses this function,
but only to simplify the code.
This patch limits the use of wfx_bh_poll_irq() to the OOB IRQ. The bus
driver now tells wfx_probe() whether polling is necessary. When it is
not (in-band SDIO IRQ and SPI), the IRQ is subscribed before the first
exchange with the device and wfx_bh_poll_irq() is never called. When it
is (SDIO with OOB IRQ), the behavior is unchanged: the control register
is polled until the PDS file has configured the IRQ line.
To conclude, In-Band users are now safe. Users of OOB IRQ will be still
impacted by the bug, but there is nothing we can do (and nobody
complained during the last 6 years).
Fixes: f00dc1d789e1c ("staging: wfx: poll IRQ during init")
Reported-by: Gerard Salvatella <gerard.salvatella@siemens.com>
Reported-by: Lukas Stockmann <lukas.stockmann@siemens.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/20260901083548.113131-2-jerome.pouiller@silabs.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/silabs/wfx/bh.c | 6 ++--
drivers/net/wireless/silabs/wfx/bus_sdio.c | 1 +
drivers/net/wireless/silabs/wfx/main.c | 34 ++++++++++++++--------
3 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/silabs/wfx/bh.c b/drivers/net/wireless/silabs/wfx/bh.c
index 21dfdcf9cc273..0071659bc9c98 100644
--- a/drivers/net/wireless/silabs/wfx/bh.c
+++ b/drivers/net/wireless/silabs/wfx/bh.c
@@ -284,10 +284,10 @@ void wfx_bh_request_tx(struct wfx_dev *wdev)
}
/* If IRQ is not available, this function allow to manually poll the control register and simulate
- * an IRQ ahen an event happened.
+ * an IRQ when an event happened.
*
- * Note that the device has a bug: If an IRQ raise while host read control register, the IRQ is
- * lost. So, use this function carefully (only duing device initialisation).
+ * Note that the device has a bug: If an IRQ raise while host read control register, the device is
+ * lost. Unfortunately, this is the only way to initialize the SDIO with out-of-band IRQ.
*/
void wfx_bh_poll_irq(struct wfx_dev *wdev)
{
diff --git a/drivers/net/wireless/silabs/wfx/bus_sdio.c b/drivers/net/wireless/silabs/wfx/bus_sdio.c
index ab0793b9908f4..1ca2cc262feb2 100644
--- a/drivers/net/wireless/silabs/wfx/bus_sdio.c
+++ b/drivers/net/wireless/silabs/wfx/bus_sdio.c
@@ -279,6 +279,7 @@ static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *i
goto sdio_release;
}
+ bus->core->poll_irq = !!bus->of_irq;
ret = wfx_probe(bus->core);
if (ret)
goto sdio_release;
diff --git a/drivers/net/wireless/silabs/wfx/main.c b/drivers/net/wireless/silabs/wfx/main.c
index a61128debbadc..4ca874ad26433 100644
--- a/drivers/net/wireless/silabs/wfx/main.c
+++ b/drivers/net/wireless/silabs/wfx/main.c
@@ -362,7 +362,6 @@ int wfx_probe(struct wfx_dev *wdev)
*/
gpio_saved = wdev->pdata.gpio_wakeup;
wdev->pdata.gpio_wakeup = NULL;
- wdev->poll_irq = true;
wdev->bh_wq = alloc_workqueue("wfx_bh_wq", WQ_HIGHPRI, 0);
if (!wdev->bh_wq)
@@ -370,16 +369,24 @@ int wfx_probe(struct wfx_dev *wdev)
wfx_bh_register(wdev);
+ if (!wdev->poll_irq) {
+ err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv);
+ if (err)
+ goto bh_unregister;
+ }
+
err = wfx_init_device(wdev);
if (err)
- goto bh_unregister;
+ goto irq_unsubscribe;
+
+ if (wdev->poll_irq)
+ wfx_bh_poll_irq(wdev);
- wfx_bh_poll_irq(wdev);
err = wait_for_completion_timeout(&wdev->firmware_ready, 1 * HZ);
if (err == 0) {
dev_err(wdev->dev, "timeout while waiting for startup indication\n");
err = -ETIMEDOUT;
- goto bh_unregister;
+ goto irq_unsubscribe;
}
/* FIXME: fill wiphy::hw_version */
@@ -399,12 +406,12 @@ int wfx_probe(struct wfx_dev *wdev)
dev_err(wdev->dev, "unsupported firmware API version (expect 1 while firmware returns %d)\n",
wdev->hw_caps.api_version_major);
err = -EOPNOTSUPP;
- goto bh_unregister;
+ goto irq_unsubscribe;
}
if (wdev->hw_caps.link_mode == SEC_LINK_ENFORCED) {
dev_err(wdev->dev, "chip require secure_link, but can't negotiate it\n");
- goto bh_unregister;
+ goto irq_unsubscribe;
}
if (wdev->hw_caps.region_sel_mode) {
@@ -420,12 +427,14 @@ int wfx_probe(struct wfx_dev *wdev)
dev_dbg(wdev->dev, "sending configuration file %s\n", wdev->pdata.file_pds);
err = wfx_send_pdata_pds(wdev);
if (err < 0 && err != -ENOENT)
- goto bh_unregister;
+ goto irq_unsubscribe;
- wdev->poll_irq = false;
- err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv);
- if (err)
- goto bh_unregister;
+ if (wdev->poll_irq) {
+ err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv);
+ if (err)
+ goto bh_unregister;
+ wdev->poll_irq = false;
+ }
err = wfx_hif_use_multi_tx_conf(wdev, true);
if (err)
@@ -474,7 +483,8 @@ int wfx_probe(struct wfx_dev *wdev)
ieee80211_unregister:
ieee80211_unregister_hw(wdev->hw);
irq_unsubscribe:
- wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv);
+ if (!wdev->poll_irq)
+ wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv);
bh_unregister:
wfx_bh_unregister(wdev);
destroy_workqueue(wdev->bh_wq);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0231/2151] hwrng: cctrng - Fix runtime PM usage counter leak
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (229 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0230/2151] wifi: wfx: fix possible device hang during init Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0232/2151] crypto: asymmetric_keys - fix OOB read in pefile_parse_binary Greg Kroah-Hartman
` (651 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ruoyu Wang, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ruoyu Wang <ruoyuw560@gmail.com>
[ Upstream commit 58d27c41542be6c40edac4f91f35a1dd8bf0d2c2 ]
pm_runtime_get_sync() increments the device usage counter even when
runtime resume fails. cctrng_read() propagates errors from
cc_trng_pm_get() without scheduling the work that later drops the
counter, so a clock or reset-completion failure in cctrng_resume()
leaves the counter elevated.
Use pm_runtime_resume_and_get(), which drops the usage counter when
resume fails and returns zero on success. This preserves the existing
success path while balancing the error path.
This issue was found by a static analysis checker and confirmed by
manual source review.
Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/char/hw_random/cctrng.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index a5be9258037f8..41c338a768ce9 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -86,12 +86,7 @@ static inline u32 cc_ioread(struct cctrng_drvdata *drvdata, u32 reg)
static int cc_trng_pm_get(struct device *dev)
{
- int rc = 0;
-
- rc = pm_runtime_get_sync(dev);
-
- /* pm_runtime_get_sync() can return 1 as a valid return code */
- return (rc == 1 ? 0 : rc);
+ return pm_runtime_resume_and_get(dev);
}
static void cc_trng_pm_put_suspend(struct device *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0232/2151] crypto: asymmetric_keys - fix OOB read in pefile_parse_binary
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (230 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0231/2151] hwrng: cctrng - Fix runtime PM usage counter leak Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0233/2151] wifi: mac80211: fix swapped fq_overlimit/fq_overmemory in aqm debugfs Greg Kroah-Hartman
` (650 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Fabrice Derepas, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabrice Derepas <fabrice.derepas@canonical.com>
[ Upstream commit 37d550172c2d3cdb3a5ace3e6cb0625967d86349 ]
pefile_parse_binary() reads the size field of the certificate table's
data-directory entry, which sits at fixed index 4 of the PE optional
header's data directory:
ctx->certs_size = ddir->certs.size;
but nothing ensures index 4 is present. n_data_dirents (the untrusted
NumberOfRvaAndSizes) is only upper-bounded against header_size and may be
0, and header_size need only satisfy cursor < header_size < datalen. A
crafted PE with n_data_dirents = 0 and a tiny header_size therefore causes
the ddir->certs.size read to land past the end of the image (CWE-125). The
chkaddr() that bounds the certificate blob runs only after this read.
verify_pefile_signature() is reached from kexec_file_load() (the
lockdown/secure-boot enforced PE-image signature path), and the image is
parsed before its signature is checked. The trigger needs CAP_SYS_BOOT and
the access is out-of-bounds read only (no write).
Require the certificate table's data-directory entry (index 4) to be
present; the existing upper-bound check then keeps ddir->certs within
[cursor, header_size).
Fixes: 26d1164be37f ("pefile: Parse a PE binary to find a key and a signature contained therein")
Assisted-by: copilot-cli:claude-opus-4-6 frama-c
Signed-off-by: Fabrice Derepas <fabrice.derepas@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
crypto/asymmetric_keys/verify_pefile.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/crypto/asymmetric_keys/verify_pefile.c b/crypto/asymmetric_keys/verify_pefile.c
index cec99db14129a..1efd5c0d0e9ce 100644
--- a/crypto/asymmetric_keys/verify_pefile.c
+++ b/crypto/asymmetric_keys/verify_pefile.c
@@ -87,6 +87,11 @@ static int pefile_parse_binary(const void *pebuf, unsigned int pelen,
if (ctx->n_data_dirents > (ctx->header_size - cursor) / sizeof(*dde))
return -ELIBBAD;
+ /* the certificate table entry must be present in the data directory */
+ if (ctx->n_data_dirents <=
+ offsetof(struct data_directory, certs) / sizeof(*dde))
+ return -ELIBBAD;
+
ddir = pebuf + cursor;
cursor += sizeof(*dde) * ctx->n_data_dirents;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0233/2151] wifi: mac80211: fix swapped fq_overlimit/fq_overmemory in aqm debugfs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (231 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0232/2151] crypto: asymmetric_keys - fix OOB read in pefile_parse_binary Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0234/2151] irqchip/riscv-imsic: Use GENMASK for base address masks Greg Kroah-Hartman
` (649 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Toke Høiland-Jørgensen,
Julius Bairaktaris, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julius Bairaktaris <julius@bairaktaris.de>
[ Upstream commit 25f3f2ff88ae604a3b473b501fc55d58fcb0f5eb ]
The two scnprintf arguments for fq_overlimit and fq_overmemory are in the
wrong order, which results in the aqm debugfs file showing the overmemory
count under the fq_overlimit label and vice versa.
Fixes: 2a4e675d887b ("mac80211: Export fq memory limit information in debugfs")
Reviewed-by: Toke Høiland-Jørgensen <toke@toke.dk>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Link: https://patch.msgid.link/20260904090626.92727-1-julius@bairaktaris.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 347ae0f63da8c..e0bdef10d53bd 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -96,8 +96,8 @@ static ssize_t aqm_read(struct file *file,
"RW fq_quantum %u\n",
fq->flows_cnt,
fq->backlog,
- fq->overmemory,
fq->overlimit,
+ fq->overmemory,
fq->collisions,
fq->memory_usage,
fq->memory_limit,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0234/2151] irqchip/riscv-imsic: Use GENMASK for base address masks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (232 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0233/2151] wifi: mac80211: fix swapped fq_overlimit/fq_overmemory in aqm debugfs Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0235/2151] memory: brcmstb_dpfe: validate firmware section sizes Greg Kroah-Hartman
` (648 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Thomas Gleixner,
Anup Patel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit bd7d57a03c4b0fa3b0291ec64d688ebfed5edffc ]
The IMSIC DT binding allows riscv,guest-index-bits up to 7 and
riscv,hart-index-bits up to 15. On RV32, guest-index-bits=7 and
hart-index-bits=13, together with the 12-bit IMSIC page offset, is a
binding-valid layout that consumes a 32-bit low-address mask.
The parser accepts this equality case because it rejects only values
larger than the remaining bit budget. The base address canonicalization
then builds the low-address mask with BIT(sum) - 1. When sum is 32 on
RV32, that expression shifts an unsigned long by its full width.
Keep the legal equality layout and express the mask with GENMASK(sum - 1,
0) instead. The existing parser bounds guarantee that sum - 1 is below
BITS_PER_LONG at both mask sites.
Fixes: 21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early driver")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20260718040000.004.929c1ef2-caplitmus-rv@iscas.ac.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/irqchip/irq-riscv-imsic-state.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-riscv-imsic-state.c b/drivers/irqchip/irq-riscv-imsic-state.c
index dc95ad856d80a..e42be461ae670 100644
--- a/drivers/irqchip/irq-riscv-imsic-state.c
+++ b/drivers/irqchip/irq-riscv-imsic-state.c
@@ -7,6 +7,7 @@
#define pr_fmt(fmt) "riscv-imsic: " fmt
#include <linux/acpi.h>
#include <linux/cpu.h>
+#include <linux/bits.h>
#include <linux/bitmap.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
@@ -779,9 +780,9 @@ static int __init imsic_parse_fwnode(struct fwnode_handle *fwnode,
return -EINVAL;
}
global->base_addr = res.start;
- global->base_addr &= ~(BIT(global->guest_index_bits +
- global->hart_index_bits +
- IMSIC_MMIO_PAGE_SHIFT) - 1);
+ global->base_addr &= ~GENMASK(global->guest_index_bits +
+ global->hart_index_bits +
+ IMSIC_MMIO_PAGE_SHIFT - 1, 0);
global->base_addr &= ~((BIT(global->group_index_bits) - 1) <<
global->group_index_shift);
@@ -860,9 +861,9 @@ int __init imsic_setup_state(struct fwnode_handle *fwnode, void *opaque)
}
base_addr = mmios[i].start;
- base_addr &= ~(BIT(global->guest_index_bits +
- global->hart_index_bits +
- IMSIC_MMIO_PAGE_SHIFT) - 1);
+ base_addr &= ~GENMASK(global->guest_index_bits +
+ global->hart_index_bits +
+ IMSIC_MMIO_PAGE_SHIFT - 1, 0);
base_addr &= ~((BIT(global->group_index_bits) - 1) <<
global->group_index_shift);
if (base_addr != global->base_addr) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0235/2151] memory: brcmstb_dpfe: validate firmware section sizes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (233 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0234/2151] irqchip/riscv-imsic: Use GENMASK for base address masks Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0236/2151] arm64: dts: qcom: purwa: Drop the Hamoa workaround for PDC Greg Kroah-Hartman
` (647 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Krzysztof Kozlowski,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit e61c1a1103e2617e8f86288368911a8591e35c1e ]
The firmware header is read before the image has been shown to contain a
complete header. In addition, the final size check adds two
firmware-provided u32 section lengths before comparing the result with
fw->size, so the addition can wrap.
Reject images shorter than the fixed header and checksum before reading
the header. Then derive the available payload length with subtraction and
require the two declared sections to fill it exactly.
Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Assisted-by: Codex:gpt-5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260815134559.47888-1-pengpeng@iscas.ac.cn
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/memory/brcmstb_dpfe.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c
index 7b02c36c7fca7..04ae3cfb449e4 100644
--- a/drivers/memory/brcmstb_dpfe.c
+++ b/drivers/memory/brcmstb_dpfe.c
@@ -533,9 +533,15 @@ static int __verify_firmware(struct init_data *init,
const struct firmware *fw)
{
const struct dpfe_firmware_header *header = (void *)fw->data;
- unsigned int dmem_size, imem_size, total_size;
+ unsigned int dmem_size, imem_size;
bool is_big_endian = false;
const u32 *chksum_ptr;
+ size_t payload_size;
+
+ if (fw->size < sizeof(*header) + sizeof(*chksum_ptr))
+ return ERR_INVALID_SIZE;
+
+ payload_size = fw->size - sizeof(*header) - sizeof(*chksum_ptr);
if (header->magic == DPFE_BE_MAGIC)
is_big_endian = true;
@@ -554,13 +560,8 @@ static int __verify_firmware(struct init_data *init,
if ((dmem_size % sizeof(u32)) != 0 || (imem_size % sizeof(u32)) != 0)
return ERR_INVALID_SIZE;
- /*
- * The header + the data section + the instruction section + the
- * checksum must be equal to the total firmware size.
- */
- total_size = dmem_size + imem_size + sizeof(*header) +
- sizeof(*chksum_ptr);
- if (total_size != fw->size)
+ /* The data and instruction sections must fill the payload exactly. */
+ if (dmem_size > payload_size || imem_size != payload_size - dmem_size)
return ERR_INVALID_SIZE;
/* The checksum comes at the very end. */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0236/2151] arm64: dts: qcom: purwa: Drop the Hamoa workaround for PDC
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (234 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0235/2151] memory: brcmstb_dpfe: validate firmware section sizes Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0237/2151] arm64: dts: ti: k3-j722s-evm: Switch audio codec clock from audio_refclk1 to external clock Greg Kroah-Hartman
` (646 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Maulik Shah, Thomas Gleixner,
Konrad Dybcio, Dmitry Baryshkov, Abel Vesa, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maulik Shah <maulik.shah@oss.qualcomm.com>
[ Upstream commit 13ca1c0b7d8a3ab1e59cb3e780c1dd7441e22515 ]
X1P42100 (Purwa) shares the X1E80100 (Hamoa) PDC device, but the hardware
register bug addressed in commit e9a48ea4d90b ("irqchip/qcom-pdc:
Workaround hardware register bug on X1E80100") is already fixed in
X1P42100 silicon.
X1E80100 compatible forces the software workaround. Use the X1P42100
specific compatible string for the PDC node to remove the workaround.
Fixes: f08edb529916 ("arm64: dts: qcom: Add X1P42100 SoC and CRD")
Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260806-purwa-pdc-v4-3-62467f4b4ddc@oss.qualcomm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/purwa.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/purwa.dtsi b/arch/arm64/boot/dts/qcom/purwa.dtsi
index a02b39f98f0b2..df1a64362516b 100644
--- a/arch/arm64/boot/dts/qcom/purwa.dtsi
+++ b/arch/arm64/boot/dts/qcom/purwa.dtsi
@@ -154,6 +154,11 @@ &pcie6a_phy {
compatible = "qcom,x1p42100-qmp-gen4x4-pcie-phy";
};
+/* X1P42100 PDC is same as X1E80100, but without hardware register bug */
+&pdc {
+ compatible = "qcom,x1p42100-pdc", "qcom,pdc";
+};
+
&qfprom {
gpu_speed_bin: gpu-speed-bin@119 {
reg = <0x119 0x2>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0237/2151] arm64: dts: ti: k3-j722s-evm: Switch audio codec clock from audio_refclk1 to external clock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (235 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0236/2151] arm64: dts: qcom: purwa: Drop the Hamoa workaround for PDC Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0238/2151] cxl/features: Reject feature offset that overflows 16-bit field Greg Kroah-Hartman
` (645 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jared McArthur, Moteen Shah,
Sen Wang, Nishanth Menon, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jared McArthur <j-mcarthur@ti.com>
[ Upstream commit 432bfc86fe62b654c74d9376b03cbe4d3513ac5f ]
In revision PROC170E1 of the J722SXH01EVM [0], the audio codec's
(TLV320AIC3106IRGZT [1]) MCLK was provided by the AUDIO_EXT_REFCLK1
(96MHz). Revisions PROC170E2 and later switched the MCLK's source
to an external LMK6CE012288CDLFT [2] oscillator (12.288MHz). The
PROC170E1 revision of the board is not publicly available.
Fix the audio codec's clock by creating a new fixed clock node with
a frequency of 12.288MHz, and switch the audio codec's clock from
the audio_refclk1 to the new fixed clock. Remove pinmuxing and clock
muxing for the audio_refclk1.
[0] https://www.ti.com/lit/zip/SPRR495
[1] https://www.ti.com/lit/gpn/TLV320AIC3106
[2] https://www.ti.com/lit/gpn/lmk6c
Fixes: 3a36c535dfd2 ("arm64: dts: ti: k3-j722s-evm: Enable analog audio support")
Signed-off-by: Jared McArthur <j-mcarthur@ti.com>
Tested-by: Moteen Shah <m-shah@ti.com>
Tested-by: Sen Wang <sen@ti.com>
Link: https://patch.msgid.link/20260804210558.1455777-1-j-mcarthur@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index e0e303da7e150..0291cc30fac10 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -162,6 +162,12 @@ vsys_io_1v2: regulator-vsys-io-1v2 {
regulator-boot-on;
};
+ tlv320_mclk: clock-12288000 {
+ compatible = "fixed-clock";
+ clock-frequency = <12288000>;
+ #clock-cells = <0>;
+ };
+
codec_audio: sound {
compatible = "simple-audio-card";
simple-audio-card,name = "J722S-EVM";
@@ -187,7 +193,7 @@ simple-audio-card,cpu {
sound_master: simple-audio-card,codec {
sound-dai = <&tlv320aic3106>;
- clocks = <&audio_refclk1>;
+ clocks = <&tlv320_mclk>;
};
};
@@ -353,12 +359,6 @@ J722S_IOPAD(0x0084, PIN_INPUT, 2) /* (N21) GPMC0_ADVn_ALE.MCASP1_AXR2 */
>;
};
- audio_ext_refclk1_pins_default: audio-ext-refclk1-default-pins {
- pinctrl-single,pins = <
- J722S_IOPAD(0x00a0, PIN_OUTPUT, 1) /* (N24) GPMC0_WPn.AUDIO_EXT_REFCLK1 */
- >;
- };
-
pmic_irq_pins_default: pmic-irq-default-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x030, PIN_INPUT, 7) /* (K23) GPIO0_12 */
@@ -557,12 +557,6 @@ ldo3: ldo3 {
};
};
-&k3_clks {
- /* Configure AUDIO_EXT_REFCLK1 pin as output */
- pinctrl-names = "default";
- pinctrl-0 = <&audio_ext_refclk1_pins_default>;
-};
-
&main_i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0238/2151] cxl/features: Reject feature offset that overflows 16-bit field
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (236 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0237/2151] arm64: dts: ti: k3-j722s-evm: Switch audio codec clock from audio_refclk1 to external clock Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0239/2151] cxl/fwctl: Propagate feature RPC delivery errors Greg Kroah-Hartman
` (644 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dave Jiang, Richard Cheng,
Alison Schofield, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Cheng <icheng@nvidia.com>
[ Upstream commit 3eb3376944ace574bf7ae299e944a2a3c30c93ba ]
cxl_get_feature() and cxl_set_feature() build each mailbox command's
offset from the starting offset plus the amount of data already
transferred, then store it in a 16-bit field. A user-controlled fwctl
offset and transfer size can exceed the feature extent, allowing a later
offset to be truncated by cpu_to_le16() and target the wrong feature
data.
Reject requests whose transfer size exceeds the remaining 16-bit feature
range. Express the check as "size > U16_MAX - offset" so the validation
itself cannot wrap on 32-bit systems.
Change cxl_get_feature() to return ssize_t so invalid input and mailbox
failures are reported as negative errno rather than being conflated with
a zero-byte result. Update the EDAC callers to handle negative results.
Keep fwctl behavior unchanged by translating helper failures to the same
header-only RPC response carrying the CXL mailbox return code.
Fixes: 5e5ac21f629d ("cxl/mbox: Add GET_FEATURE mailbox command")
Fixes: 14d502cc2718 ("cxl/mbox: Add SET_FEATURE mailbox command")
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Richard Cheng <icheng@nvidia.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260902053839.25595-2-icheng@nvidia.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/core.h | 8 ++++----
drivers/cxl/core/edac.c | 20 +++++++++++++++-----
drivers/cxl/core/features.c | 28 ++++++++++++++++++----------
3 files changed, 37 insertions(+), 19 deletions(-)
diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h
index 724361195057e..c38cd0fdb04c7 100644
--- a/drivers/cxl/core/core.h
+++ b/drivers/cxl/core/core.h
@@ -182,10 +182,10 @@ int cxl_port_get_possible_dports(struct cxl_port *port);
#ifdef CONFIG_CXL_FEATURES
struct cxl_feat_entry *
cxl_feature_info(struct cxl_features_state *cxlfs, const uuid_t *uuid);
-size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
- enum cxl_get_feat_selection selection,
- void *feat_out, size_t feat_out_size, u16 offset,
- u16 *return_code);
+ssize_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
+ enum cxl_get_feat_selection selection,
+ void *feat_out, size_t feat_out_size, u16 offset,
+ u16 *return_code);
int cxl_set_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
u8 feat_version, const void *feat_data,
size_t feat_data_size, u32 feat_flag, u16 offset,
diff --git a/drivers/cxl/core/edac.c b/drivers/cxl/core/edac.c
index 81160260e26b7..9fa67b1a62567 100644
--- a/drivers/cxl/core/edac.c
+++ b/drivers/cxl/core/edac.c
@@ -78,7 +78,7 @@ static int cxl_mem_scrub_get_attrbs(struct cxl_mailbox *cxl_mbox, u8 *cap,
u16 *cycle, u8 *flags, u8 *min_cycle)
{
size_t rd_data_size = sizeof(struct cxl_scrub_rd_attrbs);
- size_t data_size;
+ ssize_t data_size;
struct cxl_scrub_rd_attrbs *rd_attrbs __free(kfree) =
kzalloc(rd_data_size, GFP_KERNEL);
if (!rd_attrbs)
@@ -87,6 +87,8 @@ static int cxl_mem_scrub_get_attrbs(struct cxl_mailbox *cxl_mbox, u8 *cap,
data_size = cxl_get_feature(cxl_mbox, &CXL_FEAT_PATROL_SCRUB_UUID,
CXL_GET_FEAT_SEL_CURRENT_VALUE, rd_attrbs,
rd_data_size, 0, NULL);
+ if (data_size < 0)
+ return data_size;
if (!data_size)
return -EIO;
@@ -551,7 +553,7 @@ static int cxl_mem_ecs_get_attrbs(struct device *dev,
struct cxl_mailbox *cxl_mbox = &cxlmd->cxlds->cxl_mbox;
struct cxl_ecs_fru_rd_attrbs *fru_rd_attrbs;
size_t rd_data_size;
- size_t data_size;
+ ssize_t data_size;
rd_data_size = cxl_ecs_ctx->get_feat_size;
@@ -563,6 +565,8 @@ static int cxl_mem_ecs_get_attrbs(struct device *dev,
data_size = cxl_get_feature(cxl_mbox, &CXL_FEAT_ECS_UUID,
CXL_GET_FEAT_SEL_CURRENT_VALUE, rd_attrbs,
rd_data_size, 0, NULL);
+ if (data_size < 0)
+ return data_size;
if (!data_size)
return -EIO;
@@ -583,7 +587,7 @@ static int cxl_mem_ecs_set_attrbs(struct device *dev,
struct cxl_ecs_fru_wr_attrbs *fru_wr_attrbs;
size_t rd_data_size, wr_data_size;
u16 num_media_frus, count;
- size_t data_size;
+ ssize_t data_size;
num_media_frus = cxl_ecs_ctx->num_media_frus;
rd_data_size = cxl_ecs_ctx->get_feat_size;
@@ -596,6 +600,8 @@ static int cxl_mem_ecs_set_attrbs(struct device *dev,
data_size = cxl_get_feature(cxl_mbox, &CXL_FEAT_ECS_UUID,
CXL_GET_FEAT_SEL_CURRENT_VALUE, rd_attrbs,
rd_data_size, 0, NULL);
+ if (data_size < 0)
+ return data_size;
if (!data_size)
return -EIO;
@@ -1264,7 +1270,7 @@ cxl_mem_sparing_get_attrbs(struct cxl_mem_sparing_context *cxl_sparing_ctx)
struct cxl_memdev *cxlmd = cxl_sparing_ctx->cxlmd;
struct cxl_mailbox *cxl_mbox = &cxlmd->cxlds->cxl_mbox;
u16 restriction_flags;
- size_t data_size;
+ ssize_t data_size;
u16 return_code;
struct cxl_memdev_sparing_rd_attrbs *rd_attrbs __free(kfree) =
kzalloc(rd_data_size, GFP_KERNEL);
@@ -1274,6 +1280,8 @@ cxl_mem_sparing_get_attrbs(struct cxl_mem_sparing_context *cxl_sparing_ctx)
data_size = cxl_get_feature(cxl_mbox, &cxl_sparing_ctx->repair_uuid,
CXL_GET_FEAT_SEL_CURRENT_VALUE, rd_attrbs,
rd_data_size, 0, &return_code);
+ if (data_size < 0)
+ return data_size;
if (!data_size)
return -EIO;
@@ -1750,7 +1758,7 @@ static int cxl_mem_ppr_get_attrbs(struct cxl_ppr_context *cxl_ppr_ctx)
struct cxl_memdev *cxlmd = cxl_ppr_ctx->cxlmd;
struct cxl_mailbox *cxl_mbox = &cxlmd->cxlds->cxl_mbox;
u16 restriction_flags;
- size_t data_size;
+ ssize_t data_size;
u16 return_code;
struct cxl_memdev_ppr_rd_attrbs *rd_attrbs __free(kfree) =
@@ -1761,6 +1769,8 @@ static int cxl_mem_ppr_get_attrbs(struct cxl_ppr_context *cxl_ppr_ctx)
data_size = cxl_get_feature(cxl_mbox, &cxl_ppr_ctx->repair_uuid,
CXL_GET_FEAT_SEL_CURRENT_VALUE, rd_attrbs,
rd_data_size, 0, &return_code);
+ if (data_size < 0)
+ return data_size;
if (!data_size)
return -EIO;
diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
index 0ea5a31275d38..a7e73d67f5e1a 100644
--- a/drivers/cxl/core/features.c
+++ b/drivers/cxl/core/features.c
@@ -220,10 +220,10 @@ int devm_cxl_setup_features(struct cxl_dev_state *cxlds)
}
EXPORT_SYMBOL_NS_GPL(devm_cxl_setup_features, "CXL");
-size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
- enum cxl_get_feat_selection selection,
- void *feat_out, size_t feat_out_size, u16 offset,
- u16 *return_code)
+ssize_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
+ enum cxl_get_feat_selection selection,
+ void *feat_out, size_t feat_out_size, u16 offset,
+ u16 *return_code)
{
size_t data_to_rd_size;
struct cxl_mbox_get_feat_in pi;
@@ -235,7 +235,10 @@ size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
*return_code = CXL_MBOX_CMD_RC_INPUT;
if (!feat_out || !feat_out_size)
- return 0;
+ return -EINVAL;
+
+ if (feat_out_size > U16_MAX - offset)
+ return -EINVAL;
uuid_copy(&pi.uuid, feat_uuid);
pi.selection = selection;
@@ -259,7 +262,7 @@ size_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
if (rc < 0 || !mbox_cmd.size_out) {
if (return_code)
*return_code = mbox_cmd.return_code;
- return 0;
+ return rc < 0 ? rc : -EIO;
}
data_rcvd_size += mbox_cmd.size_out;
} while (data_rcvd_size < feat_out_size);
@@ -288,6 +291,9 @@ int cxl_set_feature(struct cxl_mailbox *cxl_mbox,
if (return_code)
*return_code = CXL_MBOX_CMD_RC_INPUT;
+ if (feat_data_size > U16_MAX - offset)
+ return -EINVAL;
+
struct cxl_mbox_set_feat_in *pi __free(kfree) =
kzalloc(cxl_mbox->payload_size, GFP_KERNEL);
if (!pi)
@@ -462,6 +468,7 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
const struct cxl_mbox_get_feat_in *feat_in;
u16 offset, count, return_code;
size_t out_size = *out_len;
+ ssize_t data_size;
if (rpc_in->op_size != sizeof(*feat_in))
return ERR_PTR(-EINVAL);
@@ -482,16 +489,17 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
if (!rpc_out)
return ERR_PTR(-ENOMEM);
- out_size = cxl_get_feature(cxl_mbox, &feat_in->uuid,
- feat_in->selection, rpc_out->payload,
- count, offset, &return_code);
+ data_size = cxl_get_feature(cxl_mbox, &feat_in->uuid,
+ feat_in->selection, rpc_out->payload,
+ count, offset, &return_code);
*out_len = sizeof(struct fwctl_rpc_cxl_out);
- if (!out_size) {
+ if (data_size <= 0) {
rpc_out->size = 0;
rpc_out->retval = return_code;
return no_free_ptr(rpc_out);
}
+ out_size = data_size;
rpc_out->size = out_size;
rpc_out->retval = CXL_MBOX_CMD_RC_SUCCESS;
*out_len += out_size;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0239/2151] cxl/fwctl: Propagate feature RPC delivery errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (237 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0238/2151] cxl/features: Reject feature offset that overflows 16-bit field Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0240/2151] selftests/bpf: make cmdline_contains stricter Greg Kroah-Hartman
` (643 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Richard Cheng, Alison Schofield,
Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Cheng <icheng@nvidia.com>
[ Upstream commit 51493ff66ad6b1c8e904cf3ab8c69e9c59aaba0f ]
FWCTL_RPC requires delivery failures to be returned as ioctl errors,
while device errors are reported in the output. Get and Set Feature
instead converted all failures into normal responses, sometimes with a
SUCCESS device status.
Initialize the return code to SUCCESS. When the helper fails without a
device error code, return its errno. Continue reporting actual device
errors through rpc_out->retval.
CXL permits Get Feature to return a nonzero short payload when Offset +
Count runs past the end of the Feature. cxl_internal_send_cmd() reports
that response as -EIO, so preserve the returned bytes as a successful
partial transfer. Fixed-format EDAC callers still require complete
attribute structures, so reject partial payloads before consuming them.
Map an unexpected zero-length result with a SUCCESS device status to
-EIO.
Fixes: 5908f3ed6dc2 ("cxl: Add support to handle user feature commands for get feature")
Fixes: eb5dfcb9e36d ("cxl: Add support to handle user feature commands for set feature")
Signed-off-by: Richard Cheng <icheng@nvidia.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260902053839.25595-8-icheng@nvidia.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/edac.c | 10 +++++-----
drivers/cxl/core/features.c | 28 +++++++++++++++++++---------
2 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/drivers/cxl/core/edac.c b/drivers/cxl/core/edac.c
index 9fa67b1a62567..1f4d2d3f71946 100644
--- a/drivers/cxl/core/edac.c
+++ b/drivers/cxl/core/edac.c
@@ -89,7 +89,7 @@ static int cxl_mem_scrub_get_attrbs(struct cxl_mailbox *cxl_mbox, u8 *cap,
rd_data_size, 0, NULL);
if (data_size < 0)
return data_size;
- if (!data_size)
+ if ((size_t)data_size != rd_data_size)
return -EIO;
*cap = rd_attrbs->scrub_cycle_cap;
@@ -567,7 +567,7 @@ static int cxl_mem_ecs_get_attrbs(struct device *dev,
rd_data_size, 0, NULL);
if (data_size < 0)
return data_size;
- if (!data_size)
+ if ((size_t)data_size != rd_data_size)
return -EIO;
fru_rd_attrbs = rd_attrbs->fru_attrbs;
@@ -602,7 +602,7 @@ static int cxl_mem_ecs_set_attrbs(struct device *dev,
rd_data_size, 0, NULL);
if (data_size < 0)
return data_size;
- if (!data_size)
+ if ((size_t)data_size != rd_data_size)
return -EIO;
struct cxl_ecs_wr_attrbs *wr_attrbs __free(kvfree) =
@@ -1282,7 +1282,7 @@ cxl_mem_sparing_get_attrbs(struct cxl_mem_sparing_context *cxl_sparing_ctx)
rd_data_size, 0, &return_code);
if (data_size < 0)
return data_size;
- if (!data_size)
+ if ((size_t)data_size != rd_data_size)
return -EIO;
cxl_sparing_ctx->op_class = rd_attrbs->hdr.op_class;
@@ -1771,7 +1771,7 @@ static int cxl_mem_ppr_get_attrbs(struct cxl_ppr_context *cxl_ppr_ctx)
rd_data_size, 0, &return_code);
if (data_size < 0)
return data_size;
- if (!data_size)
+ if ((size_t)data_size != rd_data_size)
return -EIO;
cxl_ppr_ctx->op_class = rd_attrbs->hdr.op_class;
diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c
index a7e73d67f5e1a..85c799d28f19d 100644
--- a/drivers/cxl/core/features.c
+++ b/drivers/cxl/core/features.c
@@ -232,7 +232,7 @@ ssize_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
int rc;
if (return_code)
- *return_code = CXL_MBOX_CMD_RC_INPUT;
+ *return_code = CXL_MBOX_CMD_RC_SUCCESS;
if (!feat_out || !feat_out_size)
return -EINVAL;
@@ -259,6 +259,17 @@ ssize_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
.min_out = data_to_rd_size,
};
rc = cxl_internal_send_cmd(cxl_mbox, &mbox_cmd);
+ /*
+ * Per CXL r4.0 8.2.10.6.2, when Offset + Count runs past the
+ * end of the Feature the device returns only the bytes up to
+ * the Feature size. cxl_internal_send_cmd() reports that as
+ * -EIO with a short payload, so stop and return what arrived.
+ */
+ if (rc == -EIO && mbox_cmd.size_out &&
+ mbox_cmd.size_out < data_to_rd_size) {
+ data_rcvd_size += mbox_cmd.size_out;
+ break;
+ }
if (rc < 0 || !mbox_cmd.size_out) {
if (return_code)
*return_code = mbox_cmd.return_code;
@@ -267,9 +278,6 @@ ssize_t cxl_get_feature(struct cxl_mailbox *cxl_mbox, const uuid_t *feat_uuid,
data_rcvd_size += mbox_cmd.size_out;
} while (data_rcvd_size < feat_out_size);
- if (return_code)
- *return_code = CXL_MBOX_CMD_RC_SUCCESS;
-
return data_rcvd_size;
}
@@ -289,7 +297,7 @@ int cxl_set_feature(struct cxl_mailbox *cxl_mbox,
size_t hdr_size;
if (return_code)
- *return_code = CXL_MBOX_CMD_RC_INPUT;
+ *return_code = CXL_MBOX_CMD_RC_SUCCESS;
if (feat_data_size > U16_MAX - offset)
return -EINVAL;
@@ -340,11 +348,8 @@ int cxl_set_feature(struct cxl_mailbox *cxl_mbox,
}
data_sent_size += data_in_size;
- if (data_sent_size >= feat_data_size) {
- if (return_code)
- *return_code = CXL_MBOX_CMD_RC_SUCCESS;
+ if (data_sent_size >= feat_data_size)
return 0;
- }
if ((feat_data_size - data_sent_size) <= (cxl_mbox->payload_size - hdr_size)) {
data_in_size = feat_data_size - data_sent_size;
@@ -492,6 +497,9 @@ static void *cxlctl_get_feature(struct cxl_features_state *cxlfs,
data_size = cxl_get_feature(cxl_mbox, &feat_in->uuid,
feat_in->selection, rpc_out->payload,
count, offset, &return_code);
+ if (data_size <= 0 &&
+ return_code == CXL_MBOX_CMD_RC_SUCCESS)
+ return ERR_PTR(data_size ?: -EIO);
*out_len = sizeof(struct fwctl_rpc_cxl_out);
if (data_size <= 0) {
rpc_out->size = 0;
@@ -544,6 +552,8 @@ static void *cxlctl_set_feature(struct cxl_features_state *cxlfs,
rc = cxl_set_feature(cxl_mbox, &feat_in->uuid,
feat_in->version, feat_in->feat_data,
data_size, flags, offset, &return_code);
+ if (rc && return_code == CXL_MBOX_CMD_RC_SUCCESS)
+ return ERR_PTR(rc);
*out_len = sizeof(*rpc_out);
if (rc) {
rpc_out->retval = return_code;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0240/2151] selftests/bpf: make cmdline_contains stricter
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (238 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0239/2151] cxl/fwctl: Propagate feature RPC delivery errors Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0241/2151] spi: amlogic: spisg: Fix transfer size limit and timeout handling Greg Kroah-Hartman
` (642 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexis Lothoré ,
Alexei Starovoitov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
[ Upstream commit 040ef1f8b02e57b78081581d490ceec04ef5f7c0 ]
cmdline_contains is used by BPF selftests to check the presence of
specific kernel commandline parameters, but it currently suffers from
two issues:
- the read commandline isn't NULL terminated right after the read data
but only at the end of the buffer, leaving uninitialized bytes that
are then possibly tokenized
- the comparison of found tokens is done based on the size of found
token. This could lead to too-short-but-matching tokens to wrongly
match the search pattern.
Enforce stricter checks in cmdline_contains to avoid accidental matches.
Fixes: 399f6185a1c0 ("selftests/bpf: Fix selftests broken by mitigations=off")
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20260903-kasan-v9-6-2407fe99255a@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/bpf/unpriv_helpers.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/unpriv_helpers.c b/tools/testing/selftests/bpf/unpriv_helpers.c
index f997d7ec8fd08..9dadcacaef0c6 100644
--- a/tools/testing/selftests/bpf/unpriv_helpers.c
+++ b/tools/testing/selftests/bpf/unpriv_helpers.c
@@ -72,8 +72,8 @@ static int config_contains(const char *pat)
static bool cmdline_contains(const char *pat)
{
+ int fd, cnt, ret = false;
char cmdline[4096], *c;
- int fd, ret = false;
fd = open("/proc/cmdline", O_RDONLY);
if (fd < 0) {
@@ -81,14 +81,15 @@ static bool cmdline_contains(const char *pat)
return false;
}
- if (read(fd, cmdline, sizeof(cmdline) - 1) < 0) {
+ cnt = read(fd, cmdline, sizeof(cmdline) - 1);
+ if (cnt < 0) {
perror("read /proc/cmdline");
goto out;
}
- cmdline[sizeof(cmdline) - 1] = '\0';
+ cmdline[cnt] = '\0';
for (c = strtok(cmdline, " \n"); c; c = strtok(NULL, " \n")) {
- if (strncmp(c, pat, strlen(c)))
+ if (strcmp(c, pat))
continue;
ret = true;
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0241/2151] spi: amlogic: spisg: Fix transfer size limit and timeout handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (239 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0240/2151] selftests/bpf: make cmdline_contains stricter Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0242/2151] spi: amlogic: spisg: Fix the incorrect keep_ss of the last descriptor Greg Kroah-Hartman
` (641 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Xianwei Zhao, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
[ Upstream commit 754d2bbd92f5ecef0eb4f5b1ac7b1417320a56ca ]
The CFG_BLOCK_NUM field can encode at most 20 bits, so reduce
SPISG_BLOCK_MAX to 0xfffff to avoid programming a zero-length transfer.
Perform the delay calculation in 64-bit arithmetic to avoid overflow
when converting nanoseconds to SPI clock cycles.
Stop the controller on transfer timeout by clearing the descriptor list
register before returning an error.
Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Link: https://patch.msgid.link/20260731-a9-spisg-v3-2-a15da3f70029@amlogic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-amlogic-spisg.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index 8ddb7a1a40567..9e98fcf3d0c12 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -95,7 +95,7 @@
#define SPISG_MAX_REG 0x40
-#define SPISG_BLOCK_MAX 0x100000
+#define SPISG_BLOCK_MAX 0xFFFFF
#define SPISG_OP_MODE_WRITE_CMD 0
#define SPISG_OP_MODE_READ_STS 1
@@ -175,7 +175,7 @@ static int spi_delay_to_sclk(u32 slck_speed_hz, struct spi_delay *delay)
if (ns < 0)
return 0;
- return DIV_ROUND_UP_ULL(slck_speed_hz * ns, NSEC_PER_SEC);
+ return DIV_ROUND_UP_ULL((u64)slck_speed_hz * ns, NSEC_PER_SEC);
}
static inline u32 aml_spisg_sem_down_read(struct spisg_device *spisg)
@@ -566,10 +566,13 @@ static int aml_spisg_transfer_one_message(struct spi_controller *ctlr,
aml_spisg_pending(spisg, descs_paddr, false, true);
if (wait_for_completion_timeout(&spisg->completion,
spi_controller_is_target(spisg->controller) ?
- MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(ms)))
+ MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(ms))) {
ret = spisg->status ? -EIO : 0;
- else
+ } else {
+ /* stop transfer */
+ regmap_write(spisg->map, SPISG_REG_DESC_LIST_H, 0);
ret = -ETIMEDOUT;
+ }
dma_unmap_single(dev, descs_paddr, descs_len, DMA_TO_DEVICE);
end:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0242/2151] spi: amlogic: spisg: Fix the incorrect keep_ss of the last descriptor
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (240 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0241/2151] spi: amlogic: spisg: Fix transfer size limit and timeout handling Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0243/2151] regulator: mp886x: fix vsel_mask Greg Kroah-Hartman
` (640 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sunny Luo, Xianwei Zhao, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sunny Luo <sunny.luo@amlogic.com>
[ Upstream commit 253dfb1839c6bc357aebe8aac4f1b4dcc20ee322 ]
The driver currently unconditionally clears CFG_KEEP_SS on the last
descriptor, causing the last transfer's cs_change setting to be ignored.
Record the cs_change value of the last SPI transfer and use it to
program CFG_KEEP_SS on the final descriptor. When a null descriptor is
inserted to implement the cs-hold delay, keep CFG_KEEP_SS set on the
preceding transfer descriptor and apply the recorded value to the final
descriptor instead.
This ensures the controller handles chip select correctly for the last
transfer regardless of whether a cs-hold delay is required.
Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
Signed-off-by: Sunny Luo <sunny.luo@amlogic.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Link: https://patch.msgid.link/20260731-a9-spisg-v3-3-a15da3f70029@amlogic.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-amlogic-spisg.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index 9e98fcf3d0c12..adeeaa3d058f1 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -490,6 +490,7 @@ static int aml_spisg_transfer_one_message(struct spi_controller *ctlr,
struct spisg_descriptor_extra *exdescs, *exdesc;
dma_addr_t descs_paddr;
int desc_num = 1, descs_len;
+ bool last_xfer_keep_ss = false;
u32 cs_hold_in_sclk = 0;
int ret = -EIO;
@@ -530,9 +531,11 @@ static int aml_spisg_transfer_one_message(struct spi_controller *ctlr,
spi_delay_to_sclk(xfer->effective_speed_hz, &msg->spi->cs_setup));
/* calculate cs-hold delay with the last xfer speed */
- if (list_is_last(&xfer->transfer_list, &msg->transfers))
+ if (list_is_last(&xfer->transfer_list, &msg->transfers)) {
cs_hold_in_sclk =
spi_delay_to_sclk(xfer->effective_speed_hz, &msg->spi->cs_hold);
+ last_xfer_keep_ss = xfer->cs_change;
+ }
desc++;
exdesc++;
@@ -540,13 +543,17 @@ static int aml_spisg_transfer_one_message(struct spi_controller *ctlr,
xfer->effective_speed_hz);
}
- if (cs_hold_in_sclk)
+ if (cs_hold_in_sclk) {
/* additional null-descriptor to achieve the cs-hold delay */
aml_spisg_setup_null_desc(spisg, desc, cs_hold_in_sclk);
- else
desc--;
+ desc->cfg_bus |= FIELD_PREP(CFG_KEEP_SS, 1);
+ desc++;
+ } else {
+ desc--;
+ }
- desc->cfg_bus |= FIELD_PREP(CFG_KEEP_SS, 0);
+ FIELD_MODIFY(CFG_KEEP_SS, &desc->cfg_bus, last_xfer_keep_ss);
desc->cfg_start |= FIELD_PREP(CFG_EOC, 1);
/* some tolerances */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0243/2151] regulator: mp886x: fix vsel_mask
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (241 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0242/2151] spi: amlogic: spisg: Fix the incorrect keep_ss of the last descriptor Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0244/2151] efi/cper: Reject CPER records with an out-of-range error_data_length Greg Kroah-Hartman
` (639 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jisheng Zhang, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jisheng Zhang <jszhang@kernel.org>
[ Upstream commit 24fa0eadc2e3c7e9397924197dca7777ec08b8d7 ]
The MP886X vsel is 7bits, fix the vsel_mask.
Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://patch.msgid.link/20260901043123.5401-2-jszhang@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/mp886x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c
index 9ad16b04c913c..bbad6207ad7bd 100644
--- a/drivers/regulator/mp886x.c
+++ b/drivers/regulator/mp886x.c
@@ -267,7 +267,7 @@ static int mp886x_regulator_register(struct mp886x_device_info *di,
rdesc->min_uV = 600000;
rdesc->uV_step = 10000;
rdesc->vsel_reg = MP886X_VSEL;
- rdesc->vsel_mask = 0x3f;
+ rdesc->vsel_mask = 0x7f;
rdesc->ramp_reg = MP886X_SYSCNTLREG1;
rdesc->ramp_mask = MP886X_SLEW_MASK;
rdesc->ramp_delay_table = di->ci->slew_rates;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0244/2151] efi/cper: Reject CPER records with an out-of-range error_data_length
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (242 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0243/2151] regulator: mp886x: fix vsel_mask Greg Kroah-Hartman
@ 2026-11-18 14:32 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0245/2151] efi/cper: Reject an error status block length that wraps a u32 Greg Kroah-Hartman
` (638 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:32 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Hanjun Guo, Shuai Xue,
Dave Jiang, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit a5a612cd3eecbadf135df1e9b2b40bc9f4c28f1c ]
cper_estatus_check() sizes each section with acpi_hest_get_record_size(),
which adds the firmware-controlled u32 error_data_length to the header size
as a signed int (see <acpi/ghes.h>). A value in the top sizeof(*gdata)
bytes of the u32 range wraps the sum small rather than large, so it slips
past the "record_size > data_len" check: against the 72-byte v300 header,
0xffffffb9 sizes the record at 1 and acpi_hest_get_next() walks it a byte
at a time, off the end. 0xffffffb8 sizes it at 0 and loops forever.
Use check_add_overflow() to reject a sum that will not fit the int those
helpers return, since the walk advances by that value. That subsumes the
"acpi_hest_get_size(gdata) > data_len" test above it, because record_size
is never smaller than the header.
The later "len < sizeof(*foo)" guards rely on this per-section upper bound;
they are lower bounds only.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=1
Fixes: 45b14a4ffcc1 ("efi: cper: Fix possible out-of-bounds access")
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-2-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/efi/cper.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index d4dc69693ece4..bc1d1fcbab865 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -752,7 +752,7 @@ EXPORT_SYMBOL_GPL(cper_estatus_check_header);
int cper_estatus_check(const struct acpi_hest_generic_status *estatus)
{
struct acpi_hest_generic_data *gdata;
- unsigned int data_len, record_size;
+ unsigned int data_len;
int rc;
rc = cper_estatus_check_header(estatus);
@@ -762,10 +762,18 @@ int cper_estatus_check(const struct acpi_hest_generic_status *estatus)
data_len = estatus->data_length;
apei_estatus_for_each_section(estatus, gdata) {
- if (acpi_hest_get_size(gdata) > data_len)
+ int record_size;
+
+ /*
+ * The <acpi/ghes.h> helpers sum these as a signed int, so a
+ * huge error_data_length wraps small rather than large and the
+ * walk then advances by that wrapped value. Reject a size an
+ * int cannot carry.
+ */
+ if (check_add_overflow(acpi_hest_get_size(gdata),
+ gdata->error_data_length, &record_size))
return -EINVAL;
- record_size = acpi_hest_get_record_size(gdata);
if (record_size > data_len)
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0245/2151] efi/cper: Reject an error status block length that wraps a u32
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (243 preceding siblings ...)
2026-11-18 14:32 ` [PATCH 6.18 0244/2151] efi/cper: Reject CPER records with an out-of-range error_data_length Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0246/2151] ACPI: extlog: Validate elog record length before walking sections Greg Kroah-Hartman
` (637 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Jonathan Cameron,
Hanjun Guo, Shuai Xue, Dave Jiang, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 41e25ef5e417c62eb7bf39b187242b283b3ef9f1 ]
cper_estatus_len() sums the firmware-controlled data_length (or
raw_data_offset plus raw_data_length) into a u32. A data_length of
0xffffffec wraps that sum to 0, and a length that reads back short defeats
every bound built on it: bert_print_all() passes its "remain <
estatus_len" check, then advances "estatus += estatus_len" by zero and
loops forever. GHES survives only because __ghes_check_estatus() rejects a
length below sizeof(*estatus) first.
Reject a length that cannot be expressed in a u32 in
cper_estatus_check_header(), which both of today's callers reach: GHES via
__ghes_check_estatus() and BERT via cper_estatus_check(). extlog reaches
neither yet; a later patch routes it through cper_estatus_check(), whose
ELOG_ENTRY_LEN bound needs this to hold.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=1
Fixes: 06d65deade9a ("ACPI, APEI, UEFI Common Platform Error Record (CPER) header")
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-3-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/efi/cper.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index bc1d1fcbab865..254f0564a5778 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -745,6 +745,17 @@ int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus)
estatus->raw_data_offset < sizeof(*estatus) + estatus->data_length)
return -EINVAL;
+ /*
+ * cper_estatus_len() sums these into a u32, and a wrapped sum reads
+ * back smaller than the record. Reject a length that cannot be
+ * expressed so no caller is handed the short value.
+ */
+ if ((u64)sizeof(*estatus) + estatus->data_length > U32_MAX)
+ return -EINVAL;
+ if (estatus->raw_data_length &&
+ (u64)estatus->raw_data_offset + estatus->raw_data_length > U32_MAX)
+ return -EINVAL;
+
return 0;
}
EXPORT_SYMBOL_GPL(cper_estatus_check_header);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0246/2151] ACPI: extlog: Validate elog record length before walking sections
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (244 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0245/2151] efi/cper: Reject an error status block length that wraps a u32 Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0247/2151] ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length Greg Kroah-Hartman
` (636 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Alison Schofield,
Shuai Xue, Hanjun Guo, Dave Jiang, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit e1fd582a8134150aa10c1f0286dbce00cf63b086 ]
extlog_print() copies a fixed ELOG_ENTRY_LEN (4096) bytes from the elog
record into elog_buf, then walks the sections using the firmware-controlled
data_length. Nothing keeps data_length inside the buffer, so a malformed
record walks the section pointer past elog_buf and reads adjacent memory.
Unlike the GHES paths, extlog never calls cper_estatus_check().
Reject a record longer than ELOG_ENTRY_LEN and run cper_estatus_check()
before walking the sections. The length test alone is not enough: a wrapped
length reads back short and passes it, which cper_estatus_check() catches
via the header check added earlier. Drop a malformed record with
NOTIFY_DONE and without MCE_HANDLED_EXTLOG, since extlog did not consume
it.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=6
Fixes: f6ec01da40e4 ("ACPI: extlog: Handle multiple records")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-4-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_extlog.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index f6b9562779de0..d4f21b9b798a3 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -160,6 +160,15 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
tmp = (struct acpi_hest_generic_status *)elog_buf;
+ /*
+ * Bound the length before cper_estatus_check() walks the sections: it
+ * iterates over data_length, which is not yet known to fit elog_buf.
+ * cper_estatus_check_header() then rejects a length that wrapped, which
+ * the bound cannot see.
+ */
+ if (cper_estatus_len(tmp) > ELOG_ENTRY_LEN || cper_estatus_check(tmp))
+ return NOTIFY_DONE;
+
if (!ras_userspace_consumers()) {
print_extlog_rcd(NULL, tmp, cpu);
goto out;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0247/2151] ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (245 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0246/2151] ACPI: extlog: Validate elog record length before walking sections Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0248/2151] ACPI: extlog: Trace CPER Non-standard Section Body Greg Kroah-Hartman
` (635 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Alison Schofield,
Shuai Xue, Jonathan Cameron, Hanjun Guo, Dave Jiang,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit b7a4915a2b43d47f0bbb0b2a4c30e722fa0d3191 ]
cxl_cper_post_event() copies a fixed sizeof(struct cxl_cper_event_rec)
out of the firmware CPER section without checking how long the section
actually is, so a short one reads past the record.
Pass gdata->error_data_length in and reject a section too small to hold
the record before the copy.
Reported-by: sashiko-bot@kernel.org
Link: https://sashiko.dev/#/patchset/20260617-topics-ahmtib01-ras_ffh_arm_internal_review-v6-0-91f725174aa0@arm.com?part=6
Fixes: 5e4a264bf8b5 ("acpi/ghes: Process CXL Component Events")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-9-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/apei/ghes.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index f301bee643318..3031447e1fc0e 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -830,10 +830,15 @@ static DEFINE_RAW_SPINLOCK(cxl_cper_work_lock);
struct work_struct *cxl_cper_work;
static void cxl_cper_post_event(enum cxl_event_type event_type,
- struct cxl_cper_event_rec *rec)
+ struct cxl_cper_event_rec *rec, u32 len)
{
struct cxl_cper_work_data wd;
+ if (len < sizeof(*rec)) {
+ pr_err(FW_WARN "CXL CPER section too small (%u)\n", len);
+ return;
+ }
+
if (rec->hdr.length <= sizeof(rec->hdr) ||
rec->hdr.length > sizeof(*rec)) {
pr_err(FW_WARN "CXL CPER Invalid section length (%u)\n",
@@ -937,15 +942,18 @@ static void ghes_do_proc(struct ghes *ghes,
} else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) {
struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata);
- cxl_cper_post_event(CXL_CPER_EVENT_GEN_MEDIA, rec);
+ cxl_cper_post_event(CXL_CPER_EVENT_GEN_MEDIA, rec,
+ gdata->error_data_length);
} else if (guid_equal(sec_type, &CPER_SEC_CXL_DRAM_GUID)) {
struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata);
- cxl_cper_post_event(CXL_CPER_EVENT_DRAM, rec);
+ cxl_cper_post_event(CXL_CPER_EVENT_DRAM, rec,
+ gdata->error_data_length);
} else if (guid_equal(sec_type, &CPER_SEC_CXL_MEM_MODULE_GUID)) {
struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata);
- cxl_cper_post_event(CXL_CPER_EVENT_MEM_MODULE, rec);
+ cxl_cper_post_event(CXL_CPER_EVENT_MEM_MODULE, rec,
+ gdata->error_data_length);
} else {
void *err = acpi_hest_get_payload(gdata);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0248/2151] ACPI: extlog: Trace CPER Non-standard Section Body
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (246 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0247/2151] ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0249/2151] ACPI: extlog: Trace CPER PCI Express Error Section Greg Kroah-Hartman
` (634 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dan Williams, Dave Jiang,
Jonathan Cameron, Kuppuswamy Sathyanarayanan, Qiuxu Zhuo,
Shuai Xue, Fabio M. De Francesco, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
[ Upstream commit a2995f7dab51bc0cfabd750f9848a5ee7612099d ]
ghes_do_proc() has a catch-all for unknown or unhandled CPER formats
(UEFI v2.11 Appendix N 2.3), extlog_print() does not. This gap was
noticed by a RAS test that injected CXL protocol errors which were
notified to extlog_print() via the IOMCA (I/O Machine Check
Architecture) mechanism. Bring parity to the extlog_print() path by
including a similar log_non_standard_event().
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Link: https://patch.msgid.link/20260114101543.85926-2-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 8bf58815315a ("ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_extlog.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index d4f21b9b798a3..542e8b96a86ae 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -192,6 +192,12 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
(u8)gdata->error_severity);
+ } else {
+ void *err = acpi_hest_get_payload(gdata);
+
+ log_non_standard_event(sec_type, fru_id, fru_text,
+ gdata->error_severity, err,
+ gdata->error_data_length);
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0249/2151] ACPI: extlog: Trace CPER PCI Express Error Section
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (247 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0248/2151] ACPI: extlog: Trace CPER Non-standard Section Body Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0250/2151] ACPI: APEI: GHES: Add helper to copy CPER CXL protocol error info to work struct Greg Kroah-Hartman
` (633 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dave Jiang, Jonathan Cameron,
Fabio M. De Francesco, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
[ Upstream commit e778ffefa34ddcdc32a260452627e390941812eb ]
I/O Machine Check Architecture events may signal failing PCIe components
or links. The AER event contains details on what was happening on the wire
when the error was signaled.
Trace the CPER PCIe Error section (UEFI v2.11, Appendix N.2.7) reported
by the I/O MCA.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Link: https://patch.msgid.link/20260114101543.85926-3-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 8bf58815315a ("ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_extlog.c | 34 ++++++++++++++++++++++++++++++++++
drivers/pci/pcie/aer.c | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 542e8b96a86ae..6a1e4ca9b0881 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -132,6 +132,36 @@ static int print_extlog_rcd(const char *pfx,
return 1;
}
+static void extlog_print_pcie(struct cper_sec_pcie *pcie_err,
+ int severity)
+{
+#ifdef ACPI_APEI_PCIEAER
+ struct aer_capability_regs *aer;
+ struct pci_dev *pdev;
+ unsigned int devfn;
+ unsigned int bus;
+ int aer_severity;
+ int domain;
+
+ if (!(pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID &&
+ pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO))
+ return;
+
+ aer_severity = cper_severity_to_aer(severity);
+ aer = (struct aer_capability_regs *)pcie_err->aer_info;
+ domain = pcie_err->device_id.segment;
+ bus = pcie_err->device_id.bus;
+ devfn = PCI_DEVFN(pcie_err->device_id.device,
+ pcie_err->device_id.function);
+ pdev = pci_get_domain_bus_and_slot(domain, bus, devfn);
+ if (!pdev)
+ return;
+
+ pci_print_aer(pdev, aer_severity, aer);
+ pci_dev_put(pdev);
+#endif
+}
+
static int extlog_print(struct notifier_block *nb, unsigned long val,
void *data)
{
@@ -192,6 +222,10 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
(u8)gdata->error_severity);
+ } else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
+ struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
+
+ extlog_print_pcie(pcie_err, gdata->error_severity);
} else {
void *err = acpi_hest_get_payload(gdata);
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 9ded8dacb62c9..c6a0e8969927e 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -983,7 +983,7 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
pcie_print_tlp_log(dev, &aer->header_log, info.level,
dev_fmt(" "));
}
-EXPORT_SYMBOL_NS_GPL(pci_print_aer, "CXL");
+EXPORT_SYMBOL_GPL(pci_print_aer);
/**
* add_error_device - list device to be handled
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0250/2151] ACPI: APEI: GHES: Add helper to copy CPER CXL protocol error info to work struct
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (248 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0249/2151] ACPI: extlog: Trace CPER PCI Express Error Section Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0251/2151] ACPI: extlog: Trace CPER CXL Protocol Error Section Greg Kroah-Hartman
` (632 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dave Jiang, Jonathan Cameron,
Hanjun Guo, Fabio M. De Francesco, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
[ Upstream commit ba8af8e1f1de32f14c98bd4a7da8b270284ffce3 ]
Make a helper out of cxl_cper_post_prot_err() that checks the CXL agent
type and copy the CPER CXL protocol errors information to a work data
structure.
Export the new symbol for reuse by ELOG.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
[ rjw: Subject tweak ]
Link: https://patch.msgid.link/20260114101543.85926-5-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 8bf58815315a ("ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/apei/ghes.c | 22 +--------------------
drivers/acpi/apei/ghes_helpers.c | 33 ++++++++++++++++++++++++++++++++
include/cxl/event.h | 10 ++++++++++
3 files changed, 44 insertions(+), 21 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 3031447e1fc0e..e386a00515ce0 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -744,7 +744,6 @@ static void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
{
#ifdef CONFIG_ACPI_APEI_PCIEAER
struct cxl_cper_prot_err_work_data wd;
- u8 *dvsec_start, *cap_start;
if (cxl_cper_sec_prot_err_valid(prot_err))
return;
@@ -754,27 +753,8 @@ static void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
if (!cxl_cper_prot_err_work)
return;
- switch (prot_err->agent_type) {
- case RCD:
- case DEVICE:
- case LD:
- case FMLD:
- case RP:
- case DSP:
- case USP:
- memcpy(&wd.prot_err, prot_err, sizeof(wd.prot_err));
-
- dvsec_start = (u8 *)(prot_err + 1);
- cap_start = dvsec_start + prot_err->dvsec_len;
-
- memcpy(&wd.ras_cap, cap_start, sizeof(wd.ras_cap));
- wd.severity = cper_severity_to_aer(severity);
- break;
- default:
- pr_err_ratelimited("CXL CPER invalid agent type: %d\n",
- prot_err->agent_type);
+ if (cxl_cper_setup_prot_err_work_data(&wd, prot_err, severity))
return;
- }
if (!kfifo_put(&cxl_cper_prot_err_fifo, wd)) {
pr_err_ratelimited("CXL CPER kfifo overflow\n");
diff --git a/drivers/acpi/apei/ghes_helpers.c b/drivers/acpi/apei/ghes_helpers.c
index f3d162139a974..bc7111b740afb 100644
--- a/drivers/acpi/apei/ghes_helpers.c
+++ b/drivers/acpi/apei/ghes_helpers.c
@@ -2,6 +2,7 @@
// Copyright(c) 2025 Intel Corporation. All rights reserved
#include <linux/printk.h>
+#include <linux/aer.h>
#include <cxl/event.h>
int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err)
@@ -31,3 +32,35 @@ int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err)
return 0;
}
EXPORT_SYMBOL_GPL(cxl_cper_sec_prot_err_valid);
+
+int cxl_cper_setup_prot_err_work_data(struct cxl_cper_prot_err_work_data *wd,
+ struct cxl_cper_sec_prot_err *prot_err,
+ int severity)
+{
+ u8 *dvsec_start, *cap_start;
+
+ switch (prot_err->agent_type) {
+ case RCD:
+ case DEVICE:
+ case LD:
+ case FMLD:
+ case RP:
+ case DSP:
+ case USP:
+ memcpy(&wd->prot_err, prot_err, sizeof(wd->prot_err));
+
+ dvsec_start = (u8 *)(prot_err + 1);
+ cap_start = dvsec_start + prot_err->dvsec_len;
+
+ memcpy(&wd->ras_cap, cap_start, sizeof(wd->ras_cap));
+ wd->severity = cper_severity_to_aer(severity);
+ break;
+ default:
+ pr_err_ratelimited("CXL CPER invalid agent type: %d\n",
+ prot_err->agent_type);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(cxl_cper_setup_prot_err_work_data);
diff --git a/include/cxl/event.h b/include/cxl/event.h
index 4d7d1036ea9cb..94081aec597ae 100644
--- a/include/cxl/event.h
+++ b/include/cxl/event.h
@@ -322,12 +322,22 @@ static inline int cxl_cper_prot_err_kfifo_get(struct cxl_cper_prot_err_work_data
#ifdef CONFIG_ACPI_APEI_PCIEAER
int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err);
+int cxl_cper_setup_prot_err_work_data(struct cxl_cper_prot_err_work_data *wd,
+ struct cxl_cper_sec_prot_err *prot_err,
+ int severity);
#else
static inline int
cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err)
{
return -EOPNOTSUPP;
}
+static inline int
+cxl_cper_setup_prot_err_work_data(struct cxl_cper_prot_err_work_data *wd,
+ struct cxl_cper_sec_prot_err *prot_err,
+ int severity)
+{
+ return -EOPNOTSUPP;
+}
#endif
#endif /* _LINUX_CXL_EVENT_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0251/2151] ACPI: extlog: Trace CPER CXL Protocol Error Section
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (249 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0250/2151] ACPI: APEI: GHES: Add helper to copy CPER CXL protocol error info to work struct Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0252/2151] ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion Greg Kroah-Hartman
` (631 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dave Jiang, Jonathan Cameron,
Kuppuswamy Sathyanarayanan, Fabio M. De Francesco,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
[ Upstream commit 95350effc3ad62582411f59fd08a7621ac82f314 ]
When Firmware First is enabled, BIOS handles errors first and then it
makes them available to the kernel via the Common Platform Error Record
(CPER) sections (UEFI 2.11 Appendix N.2.13). Linux parses the CPER
sections via one of two similar paths, either ELOG or GHES. The errors
managed by ELOG are signaled to the BIOS by the I/O Machine Check
Architecture (I/O MCA).
Currently, ELOG and GHES show some inconsistencies in how they report to
userspace via trace events.
Therefore, make the two mentioned paths act similarly by tracing the CPER
CXL Protocol Error Section.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Link: https://patch.msgid.link/20260114101543.85926-6-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 8bf58815315a ("ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/Kconfig | 2 ++
drivers/acpi/acpi_extlog.c | 24 ++++++++++++++++++++++++
drivers/cxl/core/ras.c | 3 ++-
include/cxl/event.h | 2 ++
4 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index ca00a5dbcf750..df0ff0764d0d5 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -494,6 +494,8 @@ config ACPI_EXTLOG
tristate "Extended Error Log support"
depends on X86_MCE && X86_LOCAL_APIC && EDAC
select UEFI_CPER
+ select ACPI_APEI
+ select ACPI_APEI_GHES
help
Certain usages such as Predictive Failure Analysis (PFA) require
more information about the error than what can be described in
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 6a1e4ca9b0881..046e92ee195f9 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -12,6 +12,7 @@
#include <linux/ratelimit.h>
#include <linux/edac.h>
#include <linux/ras.h>
+#include <cxl/event.h>
#include <acpi/ghes.h>
#include <asm/cpu.h>
#include <asm/mce.h>
@@ -162,6 +163,23 @@ static void extlog_print_pcie(struct cper_sec_pcie *pcie_err,
#endif
}
+static void
+extlog_cxl_cper_handle_prot_err(struct cxl_cper_sec_prot_err *prot_err,
+ int severity)
+{
+#ifdef ACPI_APEI_PCIEAER
+ struct cxl_cper_prot_err_work_data wd;
+
+ if (cxl_cper_sec_prot_err_valid(prot_err))
+ return;
+
+ if (cxl_cper_setup_prot_err_work_data(&wd, prot_err, severity))
+ return;
+
+ cxl_cper_handle_prot_err(&wd);
+#endif
+}
+
static int extlog_print(struct notifier_block *nb, unsigned long val,
void *data)
{
@@ -222,6 +240,12 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
if (gdata->error_data_length >= sizeof(*mem))
trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
(u8)gdata->error_severity);
+ } else if (guid_equal(sec_type, &CPER_SEC_CXL_PROT_ERR)) {
+ struct cxl_cper_sec_prot_err *prot_err =
+ acpi_hest_get_payload(gdata);
+
+ extlog_cxl_cper_handle_prot_err(prot_err,
+ gdata->error_severity);
} else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
diff --git a/drivers/cxl/core/ras.c b/drivers/cxl/core/ras.c
index 1f8195fb51a93..34fd019da1cdc 100644
--- a/drivers/cxl/core/ras.c
+++ b/drivers/cxl/core/ras.c
@@ -77,7 +77,7 @@ static int match_memdev_by_parent(struct device *dev, const void *parent)
return 0;
}
-static void cxl_cper_handle_prot_err(struct cxl_cper_prot_err_work_data *data)
+void cxl_cper_handle_prot_err(struct cxl_cper_prot_err_work_data *data)
{
unsigned int devfn = PCI_DEVFN(data->prot_err.agent_addr.device,
data->prot_err.agent_addr.function);
@@ -118,6 +118,7 @@ static void cxl_cper_handle_prot_err(struct cxl_cper_prot_err_work_data *data)
else
cxl_cper_trace_uncorr_prot_err(cxlmd, data->ras_cap);
}
+EXPORT_SYMBOL_GPL(cxl_cper_handle_prot_err);
static void cxl_cper_prot_err_work_fn(struct work_struct *work)
{
diff --git a/include/cxl/event.h b/include/cxl/event.h
index 94081aec597ae..ff97fea718d2c 100644
--- a/include/cxl/event.h
+++ b/include/cxl/event.h
@@ -340,4 +340,6 @@ cxl_cper_setup_prot_err_work_data(struct cxl_cper_prot_err_work_data *wd,
}
#endif
+void cxl_cper_handle_prot_err(struct cxl_cper_prot_err_work_data *wd);
+
#endif /* _LINUX_CXL_EVENT_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0252/2151] ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (250 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0251/2151] ACPI: extlog: Trace CPER CXL Protocol Error Section Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0253/2151] ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy Greg Kroah-Hartman
` (630 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Alison Schofield,
Shuai Xue, Jonathan Cameron, Hanjun Guo, Dave Jiang,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 179ef6d7f971d72a0f54b7c499daed1b244ee1a5 ]
extlog_print() calls cxl_cper_handle_prot_err() synchronously while the
MCE notifier chain rwsem is held, and that path takes the PCI device_lock
via guard(device)(). The probe path takes the two in the opposite order,
holding device_lock while mce_register_decode_chain() takes the rwsem, so
they can deadlock AB-BA.
ghes.c already avoids this by posting protocol errors to a kfifo and
handling them from a workqueue via cxl_cper_post_prot_err(). Export that
function and call it instead.
Declare it with the other CONFIG_ACPI_APEI_GHES exports rather than at the
end of the header. No #else stub: ACPI_EXTLOG selects ACPI_APEI_GHES, so
the only caller cannot exist without it.
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/linux-cxl/20260709165457.8BA181F000E9@smtp.kernel.org/
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-5-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 8bf58815315a ("ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_extlog.c | 21 ++-------------------
drivers/acpi/apei/ghes.c | 5 +++--
include/acpi/ghes.h | 4 ++++
3 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 046e92ee195f9..2451362e696dc 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -163,23 +163,6 @@ static void extlog_print_pcie(struct cper_sec_pcie *pcie_err,
#endif
}
-static void
-extlog_cxl_cper_handle_prot_err(struct cxl_cper_sec_prot_err *prot_err,
- int severity)
-{
-#ifdef ACPI_APEI_PCIEAER
- struct cxl_cper_prot_err_work_data wd;
-
- if (cxl_cper_sec_prot_err_valid(prot_err))
- return;
-
- if (cxl_cper_setup_prot_err_work_data(&wd, prot_err, severity))
- return;
-
- cxl_cper_handle_prot_err(&wd);
-#endif
-}
-
static int extlog_print(struct notifier_block *nb, unsigned long val,
void *data)
{
@@ -244,8 +227,8 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
struct cxl_cper_sec_prot_err *prot_err =
acpi_hest_get_payload(gdata);
- extlog_cxl_cper_handle_prot_err(prot_err,
- gdata->error_severity);
+ cxl_cper_post_prot_err(prot_err,
+ gdata->error_severity);
} else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index e386a00515ce0..79b1c3dd8f71f 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -739,8 +739,8 @@ static DEFINE_KFIFO(cxl_cper_prot_err_fifo, struct cxl_cper_prot_err_work_data,
static DEFINE_RAW_SPINLOCK(cxl_cper_prot_err_work_lock);
struct work_struct *cxl_cper_prot_err_work;
-static void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
- int severity)
+void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
+ int severity)
{
#ifdef CONFIG_ACPI_APEI_PCIEAER
struct cxl_cper_prot_err_work_data wd;
@@ -764,6 +764,7 @@ static void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
schedule_work(cxl_cper_prot_err_work);
#endif
}
+EXPORT_SYMBOL_FOR_MODULES(cxl_cper_post_prot_err, "acpi_extlog");
int cxl_cper_register_prot_err_work(struct work_struct *work)
{
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 93db60da5934e..ea0d16af87194 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -73,6 +73,10 @@ void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
struct list_head *ghes_get_devices(void);
void ghes_estatus_pool_region_free(unsigned long addr, u32 size);
+
+struct cxl_cper_sec_prot_err;
+void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
+ int severity);
#else
static inline struct list_head *ghes_get_devices(void) { return NULL; }
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0253/2151] ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (251 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0252/2151] ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0254/2151] efi/cper: Read only validated fields in cper_mem_err_pack() Greg Kroah-Hartman
` (629 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Alison Schofield,
Shuai Xue, Ben Cheatham, Jonathan Cameron, Hanjun Guo, Dave Jiang,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 8bf58815315aeb60125d26404d6fa7d576d5d518 ]
cxl_cper_setup_prot_err_work_data() locates the RAS Capability block at
prot_err + sizeof(*prot_err) + dvsec_len and copies it, but dvsec_len is
firmware controlled and never validated, so it can point the copy outside
the section.
Extend cxl_cper_sec_prot_err_valid() to check that the section can hold
the header, and that the header, DVSEC and RAS Capability block together
fit the reported section length.
Reported-by: sashiko-bot@kernel.org
Link: https://sashiko.dev/#/patchset/20260617-topics-ahmtib01-ras_ffh_arm_internal_review-v6-0-91f725174aa0@arm.com?part=6
Link: https://lore.kernel.org/linux-cxl/20260709165457.8BA181F000E9@smtp.kernel.org/
Fixes: 315c2f0b53ba ("acpi/ghes, cper: Recognize and cache CXL Protocol errors")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Ben Cheatham <benjamin.cheatham@amd.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-10-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_extlog.c | 3 ++-
drivers/acpi/apei/ghes.c | 7 ++++---
drivers/acpi/apei/ghes_helpers.c | 18 +++++++++++++++++-
include/acpi/ghes.h | 2 +-
include/cxl/event.h | 4 ++--
5 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 2451362e696dc..5ad4b02c995d1 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -228,7 +228,8 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
acpi_hest_get_payload(gdata);
cxl_cper_post_prot_err(prot_err,
- gdata->error_severity);
+ gdata->error_severity,
+ gdata->error_data_length);
} else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 79b1c3dd8f71f..58c7caa6d3d3a 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -740,12 +740,12 @@ static DEFINE_RAW_SPINLOCK(cxl_cper_prot_err_work_lock);
struct work_struct *cxl_cper_prot_err_work;
void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
- int severity)
+ int severity, u32 len)
{
#ifdef CONFIG_ACPI_APEI_PCIEAER
struct cxl_cper_prot_err_work_data wd;
- if (cxl_cper_sec_prot_err_valid(prot_err))
+ if (cxl_cper_sec_prot_err_valid(prot_err, len))
return;
guard(raw_spinlock_irqsave)(&cxl_cper_prot_err_work_lock);
@@ -919,7 +919,8 @@ static void ghes_do_proc(struct ghes *ghes,
} else if (guid_equal(sec_type, &CPER_SEC_CXL_PROT_ERR)) {
struct cxl_cper_sec_prot_err *prot_err = acpi_hest_get_payload(gdata);
- cxl_cper_post_prot_err(prot_err, gdata->error_severity);
+ cxl_cper_post_prot_err(prot_err, gdata->error_severity,
+ gdata->error_data_length);
} else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) {
struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata);
diff --git a/drivers/acpi/apei/ghes_helpers.c b/drivers/acpi/apei/ghes_helpers.c
index bc7111b740afb..df41b993f4130 100644
--- a/drivers/acpi/apei/ghes_helpers.c
+++ b/drivers/acpi/apei/ghes_helpers.c
@@ -5,8 +5,15 @@
#include <linux/aer.h>
#include <cxl/event.h>
-int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err)
+int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err, u32 len)
{
+ if (len < sizeof(*prot_err)) {
+ pr_err_ratelimited(FW_WARN
+ "CXL CPER prot err section too small (%u)\n",
+ len);
+ return -EINVAL;
+ }
+
if (!(prot_err->valid_bits & PROT_ERR_VALID_AGENT_ADDRESS)) {
pr_err_ratelimited("CXL CPER invalid agent type\n");
return -EINVAL;
@@ -23,6 +30,15 @@ int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err)
return -EINVAL;
}
+ /* The RAS Capability block sits after a firmware-sized DVSEC. */
+ if (sizeof(*prot_err) + prot_err->dvsec_len +
+ sizeof(struct cxl_ras_capability_regs) > len) {
+ pr_err_ratelimited(FW_WARN
+ "CXL CPER prot err DVSEC (%u) overruns section (%u)\n",
+ prot_err->dvsec_len, len);
+ return -EINVAL;
+ }
+
if ((prot_err->agent_type == RCD || prot_err->agent_type == DEVICE ||
prot_err->agent_type == LD || prot_err->agent_type == FMLD) &&
!(prot_err->valid_bits & PROT_ERR_VALID_SERIAL_NUMBER))
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index ea0d16af87194..0360efc78001d 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -76,7 +76,7 @@ void ghes_estatus_pool_region_free(unsigned long addr, u32 size);
struct cxl_cper_sec_prot_err;
void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
- int severity);
+ int severity, u32 len);
#else
static inline struct list_head *ghes_get_devices(void) { return NULL; }
diff --git a/include/cxl/event.h b/include/cxl/event.h
index ff97fea718d2c..912305bee3bcb 100644
--- a/include/cxl/event.h
+++ b/include/cxl/event.h
@@ -321,13 +321,13 @@ static inline int cxl_cper_prot_err_kfifo_get(struct cxl_cper_prot_err_work_data
#endif
#ifdef CONFIG_ACPI_APEI_PCIEAER
-int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err);
+int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err, u32 len);
int cxl_cper_setup_prot_err_work_data(struct cxl_cper_prot_err_work_data *wd,
struct cxl_cper_sec_prot_err *prot_err,
int severity);
#else
static inline int
-cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err)
+cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err, u32 len)
{
return -EOPNOTSUPP;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0254/2151] efi/cper: Read only validated fields in cper_mem_err_pack()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (252 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0253/2151] ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0255/2151] ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata Greg Kroah-Hartman
` (628 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Hanjun Guo, Shuai Xue,
Dave Jiang, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 92480a2b00a15b0add512b6fc474151ec5340a8e ]
cper_mem_err_pack() copies extended, rank, mem_array_handle and
mem_dev_handle unconditionally. Those live at offsets 73 to 79, past the
end of struct cper_sec_mem_err_old, the 73-byte UEFI 2.1/2.2 layout that
older firmware still emits and that cper_estatus_print_section() admits.
On such a record the copy reads up to seven bytes past the payload, and off
the end of the error status block when that section is the last one.
Copy each of the four only when its validation bit is set, and zero it
otherwise. Nothing is lost: a 2.1/2.2 record leaves those bits clear, and
every consumer of struct cper_mem_err_compact already gates the fields on
the same bits. Zeroing also stops callers reading them back out of the
uninitialised on-stack struct they pass in.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=7
Fixes: 2dfb7d51a61d ("trace, RAS: Add eMCA trace event interface")
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-11-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/efi/cper.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index 254f0564a5778..7fd1dc543130a 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -389,10 +389,28 @@ void cper_mem_err_pack(const struct cper_sec_mem_err *mem,
cmem->requestor_id = mem->requestor_id;
cmem->responder_id = mem->responder_id;
cmem->target_id = mem->target_id;
- cmem->extended = mem->extended;
- cmem->rank = mem->rank;
- cmem->mem_array_handle = mem->mem_array_handle;
- cmem->mem_dev_handle = mem->mem_dev_handle;
+
+ /*
+ * These four sit past the end of the UEFI 2.1/2.2 layout, which older
+ * firmware still emits, so reading them unconditionally runs off a
+ * short record. Every consumer of the compact record gates them on the
+ * same validation bits, so leave them zero when firmware does not
+ * claim them.
+ */
+ cmem->extended = 0;
+ cmem->rank = 0;
+ cmem->mem_array_handle = 0;
+ cmem->mem_dev_handle = 0;
+
+ if (mem->validation_bits &
+ (CPER_MEM_VALID_ROW_EXT | CPER_MEM_VALID_CHIP_ID))
+ cmem->extended = mem->extended;
+ if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER)
+ cmem->rank = mem->rank;
+ if (mem->validation_bits & CPER_MEM_VALID_CARD_HANDLE)
+ cmem->mem_array_handle = mem->mem_array_handle;
+ if (mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE)
+ cmem->mem_dev_handle = mem->mem_dev_handle;
}
EXPORT_SYMBOL_GPL(cper_mem_err_pack);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0255/2151] ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (253 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0254/2151] efi/cper: Read only validated fields in cper_mem_err_pack() Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0256/2151] spi: mtk-nor: fix runtime PM usage count leak in probe error path Greg Kroah-Hartman
` (627 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Alison Schofield,
Shuai Xue, Hanjun Guo, Dave Jiang, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 9c3ad3bfff20d2d7a0c9614db2a58e78123bf0ce ]
ghes_handle_aer() copies sizeof(struct aer_capability_regs) out of the
fixed 96-byte pcie_err->aer_info. The struct is larger, so the copy reads
past the section, and it fills the software-only header_len and flit fields
of the embedded struct pcie_tlp_log from firmware bytes.
pcie_print_tlp_log() uses both to bound a loop over dw[], so a large value
walks past the array. Nothing checks the section can hold a struct
cper_sec_pcie either.
Validate error_data_length, zero the destination, and map aer_info onto the
struct as extlog_print_pcie() does: copy up to the four Header Log DWORDs,
then place the TLP Prefix Log from its own offset. The rest stays zero,
covering header_len and flit.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=3
Fixes: 7e077e6707b3 ("PCI/ERR: Handle TLP Log in Flit mode")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260904172337.1409775-13-dave.jiang@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/apei/ghes.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 58c7caa6d3d3a..b81d5ed50d439 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -647,11 +647,14 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
#ifdef CONFIG_ACPI_APEI_PCIEAER
struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
+ if (gdata->error_data_length < sizeof(*pcie_err))
+ return;
+
if (pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID &&
pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO) {
+ struct aer_capability_regs *aer_info;
unsigned int devfn;
int aer_severity;
- u8 *aer_info;
devfn = PCI_DEVFN(pcie_err->device_id.device,
pcie_err->device_id.function);
@@ -669,13 +672,25 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
sizeof(struct aer_capability_regs));
if (!aer_info)
return;
- memcpy(aer_info, pcie_err->aer_info, sizeof(struct aer_capability_regs));
+
+ /*
+ * Map aer_info onto the struct as extlog_print_pcie() does:
+ * copy up to the four Header Log DWORDs, then place the TLP
+ * Prefix Log from where the hardware keeps it. The rest stays
+ * zero, so firmware cannot drive the pcie_print_tlp_log() loop
+ * over dw[] out of bounds.
+ */
+ memset(aer_info, 0, sizeof(struct aer_capability_regs));
+ memcpy(aer_info, pcie_err->aer_info,
+ offsetof(struct aer_capability_regs, header_log) +
+ PCIE_STD_NUM_TLP_HEADERLOG * sizeof(u32));
+ memcpy(aer_info->header_log.prefix,
+ pcie_err->aer_info + PCI_ERR_PREFIX_LOG,
+ sizeof(aer_info->header_log.prefix));
aer_recover_queue(pcie_err->device_id.segment,
pcie_err->device_id.bus,
- devfn, aer_severity,
- (struct aer_capability_regs *)
- aer_info);
+ devfn, aer_severity, aer_info);
}
#endif
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0256/2151] spi: mtk-nor: fix runtime PM usage count leak in probe error path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (254 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0255/2151] ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0257/2151] remoteproc: imx_rproc: Allow mappings ending at region boundary Greg Kroah-Hartman
` (626 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Felix Gu, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Gu <ustc.gu@gmail.com>
[ Upstream commit 4cee1ed13e2687f1a9fec7dd50e31eb179506d75 ]
mtk_nor_probe() takes a runtime PM reference with
pm_runtime_get_noresume() before registering the controller, but the
error path never drops it.
Balance the get with pm_runtime_put_noidle() in the error path.
Fixes: 3bfd9103c7af ("spi: spi-mtk-nor: Add power management support")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260904-mtk-nor-v1-1-cefdca098f83@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-mtk-nor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-mtk-nor.c b/drivers/spi/spi-mtk-nor.c
index ba41ff42f0dde..6a1ca66dd7293 100644
--- a/drivers/spi/spi-mtk-nor.c
+++ b/drivers/spi/spi-mtk-nor.c
@@ -925,6 +925,7 @@ static int mtk_nor_probe(struct platform_device *pdev)
return 0;
err_probe:
+ pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0257/2151] remoteproc: imx_rproc: Allow mappings ending at region boundary
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (255 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0256/2151] spi: mtk-nor: fix runtime PM usage count leak in probe error path Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0258/2151] perf trace: Fix error checking in btf_struct_scnprintf() Greg Kroah-Hartman
` (625 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Marcel Hofmann, Mathieu Poirier,
Sasha Levin, Peng Fan
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcel Hofmann <marcel.hofmann@ingenics-digital.com>
[ Upstream commit 749eed0c7178c8d53ce4c9acdda4a545721c494b ]
The address range checks in imx_rproc_da_to_sys() and
imx_rproc_da_to_va() use a strict comparison for the exclusive end
address of the requested range.
As a result, a valid request that ends exactly at the end of an address
translation or mapped memory region is rejected. For a region
[start, start + size), a request [addr, addr + len) is contained when:
addr >= start && addr + len <= start + size
This occurs when a loadable ELF segment fills an entire mapped memory
region. This can be produced by a linker script that extends the
resource table section to the end of its designated region:
.resource_table :
{
. = ALIGN(8);
KEEP(*(.resource_table)) /* Resource table */
. = ALIGN(8);
. = ORIGIN(m_rsc_tbl) + LENGTH(m_rsc_tbl);
} > m_rsc_tbl =0x00
This produces a ELF program header like:
LOAD 0x010000 0xa4220000 0xa4220000 0x01000 0x01000 R 0x1000
In this case, the segment size matches the mapped region size exactly,
causing the address translation to fail with:
bad phdr da 0xa4220000 mem 0x1000
Rework the upper-bound checks to allow ranges ending exactly at the region
boundary while guarding against integer overflow.
Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
Signed-off-by: Marcel Hofmann <marcel.hofmann@ingenics-digital.com>
Tested-by: Peng Fan <peng.fan@nxp.com> #i.MX95-19x19-EVK
Link: https://lore.kernel.org/r/20260827123136.438798-1-marcel@hofmania.de
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/remoteproc/imx_rproc.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 8fa81d3779849..d26930c83f7cd 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -397,6 +397,7 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da,
/* parse address translation table */
for (i = 0; i < dcfg->att_size; i++) {
const struct imx_rproc_att *att = &dcfg->att[i];
+ u64 offset;
/*
* Ignore entries not belong to current core:
@@ -409,9 +410,11 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da,
continue;
}
- if (da >= att->da && da + len < att->da + att->size) {
- unsigned int offset = da - att->da;
+ if (da < att->da)
+ continue;
+ offset = da - att->da;
+ if (offset <= att->size && len <= att->size - offset) {
*sys = att->sa + offset;
if (is_iomem)
*is_iomem = att->flags & ATT_IOMEM;
@@ -442,9 +445,14 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *i
return NULL;
for (i = 0; i < IMX_RPROC_MEM_MAX; i++) {
- if (sys >= priv->mem[i].sys_addr && sys + len <
- priv->mem[i].sys_addr + priv->mem[i].size) {
- unsigned int offset = sys - priv->mem[i].sys_addr;
+ u64 offset;
+
+ if (sys < priv->mem[i].sys_addr)
+ continue;
+
+ offset = sys - priv->mem[i].sys_addr;
+ if (offset <= priv->mem[i].size &&
+ len <= priv->mem[i].size - offset) {
/* __force to make sparse happy with type conversion */
va = (__force void *)(priv->mem[i].cpu_addr + offset);
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0258/2151] perf trace: Fix error checking in btf_struct_scnprintf()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (256 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0257/2151] remoteproc: imx_rproc: Allow mappings ending at region boundary Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0259/2151] perf evsel: Validate branch stack before byte swapping Greg Kroah-Hartman
` (624 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Ian Rogers,
Aaron Tomlin, Howard Chu, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Tomlin <atomlin@atomlin.com>
[ Upstream commit 02241f791aa28802cc05223a740e163e14cd5ea2 ]
btf_dump__dump_type_data() returns the positive number of bytes dumped on
success, or a negative error code (e.g., -EINVAL) on failure.
Currently, btf_struct_scnprintf() checks if btf_dump__dump_type_data()
returns 0. When a negative error code is returned on failure, this check
evaluates to false, causing the function to proceed down the success path
and advance arg->augmented.args past the unprinted struct data before
returning 0.
Consequently, when syscall__scnprintf_args() falls back to the default
argument beautifier upon receiving 0 from trace__btf_scnprintf(), the
fallback beautifier or subsequent arguments read from an erroneously
advanced augmented arguments buffer.
Fix this by checking for '<= 0' ensuring that on any failure or 0-byte
dump, 0 is returned without modifying the augmented arguments pointer.
Fixes: cb32035214b9a09d ("perf trace: Pretty print struct data")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
Tested-by: Ian Rogers <irogers@google.com>
Cc: Howard Chu <howardchu95@gmail.com>
[ Restored that call to be a single line ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 2be8c3ed93c96..046db6fcd7f7f 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1063,7 +1063,7 @@ static size_t btf_struct_scnprintf(const struct btf_type *type, struct btf *btf,
return 0;
/* pretty print the struct data here */
- if (btf_dump__dump_type_data(btf_dump, type_id, arg->augmented.args->value, type->size, &dump_data_opts) == 0)
+ if (btf_dump__dump_type_data(btf_dump, type_id, arg->augmented.args->value, type->size, &dump_data_opts) <= 0)
return 0;
consumed = sizeof(*augmented_arg) + augmented_arg->size;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0259/2151] perf evsel: Validate branch stack before byte swapping
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (257 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0258/2151] perf trace: Fix error checking in btf_struct_scnprintf() Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0260/2151] perf evsel: Validate RAW sample " Greg Kroah-Hartman
` (623 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Mark Amirkan,
Madhavan Srinivasan, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Amirkan <markdamirkan@gmail.com>
[ Upstream commit 2148e094671b0f6a44f033787b7da4ed14e96c27 ]
When perf reads an opposite-endian branch stack, __evsel__parse_sample()
swaps each entry before checking whether all entries fit in the event. A
truncated sample can therefore make the swap loop read and write past the
event boundary.
A truncated perf.data file makes perf report crash with SIGSEGV. ASan
reports an out-of-bounds read. A regression test puts an entry just past
the declared end and shows that its flags are changed before the parser
returns -EFAULT.
Move the bounds check before the byte-swap loop. Valid samples are handled
as before.
Fixes: 63c12ae2f246dcdc ("perf evsel: Add bitfield_swap() to handle branch_stack endian issue")
Reviewed-by: Ian Rogers <irogers@google.com>
Assisted-by: Symbolic
Signed-off-by: Mark Amirkan <markdamirkan@gmail.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/tests/sample-parsing.c | 48 +++++++++++++++++++++++++++++++
tools/perf/util/evsel.c | 3 +-
2 files changed, 50 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index a7327c942ca20..09853246efc38 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <stdbool.h>
+#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
@@ -384,6 +385,49 @@ static int do_test(u64 sample_type, u64 sample_regs, u64 read_format)
return ret;
}
+static int test_truncated_branch_stack(void)
+{
+ struct perf_event_attr attr = {
+ .sample_type = PERF_SAMPLE_BRANCH_STACK,
+ };
+ struct {
+ struct perf_event_header header;
+ u64 nr;
+ struct branch_entry entry;
+ } input = {
+ .header = {
+ .type = PERF_RECORD_SAMPLE,
+ .size = sizeof(input.header) + sizeof(input.nr),
+ },
+ .nr = 1,
+ };
+ struct perf_sample sample;
+ struct evsel *evsel;
+ u64 flags = 1;
+ int err;
+
+ input.entry.flags.value = flags;
+ evsel = evsel__new(&attr);
+ if (!evsel)
+ return -1;
+
+ evsel->sample_size = __evsel__sample_size(attr.sample_type);
+ err = __evsel__parse_sample(evsel, (union perf_event *)&input,
+ &sample, /*needs_swap=*/true);
+ perf_sample__exit(&sample);
+ evsel__put(evsel);
+
+ if (err != -EFAULT) {
+ pr_debug("truncated branch stack returned %d, expected -EFAULT\n", err);
+ return -1;
+ }
+ if (input.entry.flags.value != flags) {
+ pr_debug("truncated branch stack modified data past the event\n");
+ return -1;
+ }
+ return 0;
+}
+
/**
* test__sample_parsing - test sample parsing.
*
@@ -400,6 +444,10 @@ static int test__sample_parsing(struct test_suite *test __maybe_unused, int subt
size_t i;
int err;
+ err = test_truncated_branch_stack();
+ if (err)
+ return err;
+
/*
* Fail the test if it has not been updated when new sample format bits
* were added. Please actually update the test rather than just change
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 654e9bbd66f98..3a96f174fcc2a 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -3291,6 +3291,8 @@ int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
e = (struct branch_entry *)&data->branch_stack->hw_idx;
}
+ OVERFLOW_CHECK(array, sz, max_size);
+
if (swapped) {
/*
* struct branch_flag does not have endian
@@ -3306,7 +3308,6 @@ int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
e->flags.value = evsel__bitfield_swap_branch_flags(e->flags.value);
}
- OVERFLOW_CHECK(array, sz, max_size);
array = (void *)array + sz;
if (evsel__has_branch_counters(evsel)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0260/2151] perf evsel: Validate RAW sample before byte swapping
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (258 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0259/2151] perf evsel: Validate branch stack before byte swapping Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0261/2151] RDMA/irdma: Preserve fast-registration IOVA on 32-bit Greg Kroah-Hartman
` (622 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Mark Amirkan, Jiri Olsa,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Amirkan <markdamirkan@gmail.com>
[ Upstream commit 02f6847e1822714a4201b87e42f92b0d43e8549d ]
For an opposite-endian RAW sample, __evsel__parse_sample() passes the
input-controlled size to mem_bswap_64() before checking whether the
payload fits in the event. A truncated record can therefore make the helper
read and write past the event boundary.
A crafted perf.data file makes perf report crash with SIGSEGV. ASan
reports the out-of-bounds access. A regression test puts backed data past
the declared end and shows that it is changed before the parser returns
-EFAULT.
Move the bounds checks before mem_bswap_64(). Check the rounded length too,
because the helper accesses complete 64-bit words. Complete records are
handled as before.
Fixes: f9d8adb345d7adbb ("perf evsel: Fix swap for samples with raw data")
Reviewed-by: Ian Rogers <irogers@google.com>
Assisted-by: Symbolic
Signed-off-by: Mark Amirkan <markdamirkan@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/tests/sample-parsing.c | 61 +++++++++++++++++++++++++++++++
tools/perf/util/evsel.c | 17 +++++----
2 files changed, 70 insertions(+), 8 deletions(-)
diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 09853246efc38..36c5c74bc4848 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -428,6 +428,55 @@ static int test_truncated_branch_stack(void)
return 0;
}
+static int test_truncated_swapped_raw(u16 event_size, u32 raw_size)
+{
+ struct perf_event_attr attr = {
+ .sample_type = PERF_SAMPLE_RAW,
+ };
+ struct {
+ struct perf_event_header header;
+ union {
+ u64 value;
+ u32 words[2];
+ } raw;
+ u64 canary;
+ } input = {
+ .header = {
+ .type = PERF_RECORD_SAMPLE,
+ .size = event_size,
+ },
+ /* Parsing a pre-swapped word exchanges these two u32 values. */
+ .raw.words = { 0x12345678, raw_size },
+ .canary = 0x8877665544332211ULL,
+ };
+ struct perf_sample sample;
+ struct evsel *evsel;
+ u64 raw = input.raw.value;
+ u64 canary = input.canary;
+ int err;
+
+ evsel = evsel__new(&attr);
+ if (!evsel)
+ return -1;
+
+ evsel->sample_size = __evsel__sample_size(attr.sample_type);
+ err = __evsel__parse_sample(evsel, (union perf_event *)&input,
+ &sample, /*needs_swap=*/true);
+ perf_sample__exit(&sample);
+ evsel__put(evsel);
+
+ if (err != -EFAULT) {
+ pr_debug("truncated swapped RAW sample (size %u, raw %u) returned %d, expected -EFAULT\n",
+ event_size, raw_size, err);
+ return -1;
+ }
+ if (input.raw.value != raw || input.canary != canary) {
+ pr_debug("truncated swapped RAW sample modified data before validation\n");
+ return -1;
+ }
+ return 0;
+}
+
/**
* test__sample_parsing - test sample parsing.
*
@@ -448,6 +497,18 @@ static int test__sample_parsing(struct test_suite *test __maybe_unused, int subt
if (err)
return err;
+ /* The declared RAW payload extends past an otherwise aligned event. */
+ err = test_truncated_swapped_raw(sizeof(struct perf_event_header) +
+ sizeof(u64), 16);
+ if (err)
+ return err;
+
+ /* The final complete word touched by mem_bswap_64() extends past it. */
+ err = test_truncated_swapped_raw(sizeof(struct perf_event_header) +
+ sizeof(u32) + 9, 9);
+ if (err)
+ return err;
+
/*
* Fail the test if it has not been updated when new sample format bits
* were added. Please actually update the test rather than just change
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 3a96f174fcc2a..a3d3f49d33a45 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -3236,7 +3236,10 @@ int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
}
if (type & PERF_SAMPLE_RAW) {
+ const __u64 *raw;
+
OVERFLOW_CHECK_u64(array);
+ raw = array;
u.val64 = *array;
/*
@@ -3252,16 +3255,14 @@ int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
}
data->raw_size = u.val32[0];
- /*
- * The raw data is aligned on 64bits including the
- * u32 size, so it's safe to use mem_bswap_64.
- */
- if (swapped)
- mem_bswap_64((void *) array, data->raw_size);
-
array = (void *)array + sizeof(u32);
-
OVERFLOW_CHECK(array, data->raw_size, max_size);
+ if (swapped) {
+ /* mem_bswap_64() accesses complete 64-bit words. */
+ sz = roundup((u64)data->raw_size, sizeof(u64));
+ OVERFLOW_CHECK(raw, sz, max_size);
+ mem_bswap_64((void *)raw, data->raw_size);
+ }
data->raw_data = (void *)array;
array = (void *)array + data->raw_size;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0261/2151] RDMA/irdma: Preserve fast-registration IOVA on 32-bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (259 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0260/2151] perf evsel: Validate RAW sample " Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0262/2151] gpio: crystalcove: add missing MODULE_ALIAS() Greg Kroah-Hartman
` (621 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jacob Moroni, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Romanovsky <leonro@nvidia.com>
[ Upstream commit c470050f2a7a7748ce35367e828885a8e658d712 ]
ib_mr::iova is u64, but the fast-registration path passes it through
void * and uintptr_t. These conversions truncate the upper 32 bits on
32-bit kernels before the WQE is built.
Store the IOVA as u64 and write it directly to the WQE. The sole caller
always uses VA-based addressing, so remove the unused FBO selection and
set the VA-based bit unconditionally.
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Link: https://patch.msgid.link/20260903-64-bit-iova-is-silently-truncated-to-v1-1-96e878ea6873@nvidia.com
Reviewed-by: Jacob Moroni <jmoroni@google.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/irdma/ctrl.c | 6 ++----
drivers/infiniband/hw/irdma/type.h | 4 +---
drivers/infiniband/hw/irdma/verbs.c | 3 +--
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c
index cb970c9090ee0..69ed8e47d81ae 100644
--- a/drivers/infiniband/hw/irdma/ctrl.c
+++ b/drivers/infiniband/hw/irdma/ctrl.c
@@ -1723,9 +1723,7 @@ int irdma_sc_mr_fast_register(struct irdma_sc_qp *qp,
info->wr_id, wqe_idx,
&qp->qp_uk.sq_wrtrk_array[wqe_idx].wrid);
- temp = (info->addr_type == IRDMA_ADDR_TYPE_VA_BASED) ?
- (uintptr_t)info->va : info->fbo;
- set_64bit_val(wqe, 0, temp);
+ set_64bit_val(wqe, 0, info->va);
temp = FIELD_GET(IRDMAQPSQ_FIRSTPMPBLIDXHI,
info->first_pm_pbl_index >> 16);
@@ -1742,7 +1740,7 @@ int irdma_sc_mr_fast_register(struct irdma_sc_qp *qp,
FIELD_PREP(IRDMAQPSQ_LPBLSIZE, info->chunk_size) |
FIELD_PREP(IRDMAQPSQ_HPAGESIZE, page_size) |
FIELD_PREP(IRDMAQPSQ_STAGRIGHTS, info->access_rights) |
- FIELD_PREP(IRDMAQPSQ_VABASEDTO, info->addr_type) |
+ IRDMAQPSQ_VABASEDTO |
FIELD_PREP(IRDMAQPSQ_READFENCE, info->read_fence) |
FIELD_PREP(IRDMAQPSQ_LOCALFENCE, info->local_fence) |
FIELD_PREP(IRDMAQPSQ_SIGCOMPL, info->signaled) |
diff --git a/drivers/infiniband/hw/irdma/type.h b/drivers/infiniband/hw/irdma/type.h
index c1b8f81ea283d..8c53d5c3484bd 100644
--- a/drivers/infiniband/hw/irdma/type.h
+++ b/drivers/infiniband/hw/irdma/type.h
@@ -1161,13 +1161,11 @@ struct irdma_reg_ns_stag_info {
struct irdma_fast_reg_stag_info {
u64 wr_id;
u64 reg_addr_pa;
- u64 fbo;
- void *va;
+ u64 va;
u64 total_len;
u32 page_size;
u32 chunk_size;
u32 first_pm_pbl_index;
- enum irdma_addressing_type addr_type;
irdma_stag_index stag_idx;
u16 access_rights;
u32 pd_id;
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 40443d77365b4..950950038763f 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -4160,8 +4160,7 @@ static int irdma_post_send(struct ib_qp *ibqp,
stag_info.stag_idx = reg_wr(ib_wr)->key >> 8;
stag_info.page_size = reg_wr(ib_wr)->mr->page_size;
stag_info.wr_id = ib_wr->wr_id;
- stag_info.addr_type = IRDMA_ADDR_TYPE_VA_BASED;
- stag_info.va = (void *)(uintptr_t)iwmr->ibmr.iova;
+ stag_info.va = iwmr->ibmr.iova;
stag_info.total_len = iwmr->ibmr.length;
stag_info.reg_addr_pa = *palloc->level1.addr;
stag_info.first_pm_pbl_index = palloc->level1.idx;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0262/2151] gpio: crystalcove: add missing MODULE_ALIAS()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (260 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0261/2151] RDMA/irdma: Preserve fast-registration IOVA on 32-bit Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0263/2151] ABI: sysfs-class-infiniband: Drop the entries of the removed qib driver Greg Kroah-Hartman
` (620 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitry Torokhov, Linus Walleij,
Andy Shevchenko, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[ Upstream commit 32c7f7f80e5f7f2764682fd456054478fc11c8d9 ]
The crystalcove GPIO driver lacks a MODULE_ALIAS() to allow it to be
auto-loaded.
Fix this by adding the missing platform alias.
Fixes: 104fb1d5153c ("gpio: Add support for Intel Crystal Cove PMIC")
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpio/gpio-crystalcove.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index 0fb5c06d08863..ab7fab5b97545 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -396,3 +396,4 @@ module_platform_driver(crystalcove_gpio_driver);
MODULE_AUTHOR("Yang, Bin <bin.yang@intel.com>");
MODULE_DESCRIPTION("Intel Crystal Cove GPIO Driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:crystal_cove_gpio");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0263/2151] ABI: sysfs-class-infiniband: Drop the entries of the removed qib driver
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (261 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0262/2151] gpio: crystalcove: add missing MODULE_ALIAS() Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0264/2151] pwm: loongson: Reload PWM configuration through counter reset Greg Kroah-Hartman
` (619 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 63367df6e7255067ad6a83abe0d2799dfa491876 ]
Commit 24baad32b710 ("RDMA/qib: Remove outdated driver") removed the qib
driver but left its /sys/class/infiniband/qibX/* entries in the stable
ABI file. Nothing creates those files any more.
Remove the block.
Fixes: 24baad32b710 ("RDMA/qib: Remove outdated driver")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260905092057.41306-1-kmehltretter@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../ABI/stable/sysfs-class-infiniband | 118 ------------------
1 file changed, 118 deletions(-)
diff --git a/Documentation/ABI/stable/sysfs-class-infiniband b/Documentation/ABI/stable/sysfs-class-infiniband
index 694f23a03a287..89500d064d239 100644
--- a/Documentation/ABI/stable/sysfs-class-infiniband
+++ b/Documentation/ABI/stable/sysfs-class-infiniband
@@ -422,124 +422,6 @@ Description:
information)
=============== =============================================
-
-sysfs interface for Intel IB driver qib
----------------------------------------
-
-What: /sys/class/infiniband/qibX/version
-What: /sys/class/infiniband/qibX/hw_rev
-What: /sys/class/infiniband/qibX/hca_type
-What: /sys/class/infiniband/qibX/board_id
-What: /sys/class/infiniband/qibX/boardversion
-What: /sys/class/infiniband/qibX/nctxts
-What: /sys/class/infiniband/qibX/localbus_info
-What: /sys/class/infiniband/qibX/tempsense
-What: /sys/class/infiniband/qibX/serial
-What: /sys/class/infiniband/qibX/nfreectxts
-What: /sys/class/infiniband/qibX/chip_reset
-Date: May, 2010
-KernelVersion: v2.6.35
-Contact: linux-rdma@vger.kernel.org
-Description:
- =============== ======================================================
- version: (RO) Display version information of installed software
- and drivers.
-
- hw_rev: (RO) Hardware revision number
-
- hca_type: (RO) Host channel adapter type
-
- board_id: (RO) Manufacturing board id
-
- boardversion: (RO) Current version of the chip architecture
-
- nctxts: (RO) Return the number of user ports (contexts)
- available
-
- localbus_info: (RO) Human readable localbus info
-
- tempsense: (RO) Display temp sense registers in decimal
-
- serial: (RO) Serial number of the HCA
-
- nfreectxts: (RO) The number of free user ports (contexts)
- available.
-
- chip_reset: (WO) Reset the chip if possible by writing
- "reset" to this file. Only allowed if no user
- contexts are open that use chip resources.
- =============== ======================================================
-
-
-What: /sys/class/infiniband/qibX/ports/<N>/sl2vl/[0-15]
-Date: May, 2010
-KernelVersion: v2.6.35
-Contact: linux-rdma@vger.kernel.org
-Description:
- (RO) The directory contains 16 files numbered 0-15 that specify
- the Service Level (SL). Listing the SL files returns the Virtual
- Lane (VL) as programmed by the SL.
-
-What: /sys/class/infiniband/qibX/ports/<N>/CCMgtA/cc_settings_bin
-What: /sys/class/infiniband/qibX/ports/<N>/CCMgtA/cc_table_bin
-Date: May, 2010
-KernelVersion: v2.6.35
-Contact: linux-rdma@vger.kernel.org
-Description:
- Per-port congestion control. Both are binary attributes.
-
- =============== ================================================
- cc_table_bin (RO) Congestion control table size followed by
- table entries.
-
- cc_settings_bin (RO) Congestion settings: port control, control
- map and an array of 16 entries for the
- congestion entries - increase, timer, event log
- trigger threshold and the minimum injection rate
- delay.
- =============== ================================================
-
-What: /sys/class/infiniband/qibX/ports/<N>/linkstate/loopback
-What: /sys/class/infiniband/qibX/ports/<N>/linkstate/led_override
-What: /sys/class/infiniband/qibX/ports/<N>/linkstate/hrtbt_enable
-What: /sys/class/infiniband/qibX/ports/<N>/linkstate/status
-What: /sys/class/infiniband/qibX/ports/<N>/linkstate/status_str
-Date: May, 2010
-KernelVersion: v2.6.35
-Contact: linux-rdma@vger.kernel.org
-Description:
- [to be documented]
-
- =============== ===============================================
- loopback: (WO)
- led_override: (WO)
- hrtbt_enable: (RW)
- status: (RO)
-
- status_str: (RO) Displays information about the link state,
- possible cable/switch problems, and hardware
- errors. Possible states are- "Initted",
- "Present", "IB_link_up", "IB_configured" or
- "Fatal_Hardware_Error".
- =============== ===============================================
-
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/rc_resends
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/seq_naks
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/rdma_seq
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/rnr_naks
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/other_naks
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/rc_timeouts
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/look_pkts
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/pkt_drops
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/dma_wait
-What: /sys/class/infiniband/qibX/ports/<N>/diag_counters/unaligned
-Date: May, 2010
-KernelVersion: v2.6.35
-Contact: linux-rdma@vger.kernel.org
-Description:
- [to be documented]
-
-
sysfs interface for Mellanox Connect-IB HCA driver mlx5
-------------------------------------------------------
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0264/2151] pwm: loongson: Reload PWM configuration through counter reset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (262 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0263/2151] ABI: sysfs-class-infiniband: Drop the entries of the removed qib driver Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0265/2151] drivers/base/node: fix UAF on device_register() failure Greg Kroah-Hartman
` (618 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Keguang Zhang, Uwe Kleine-König,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keguang Zhang <keguang.zhang@gmail.com>
[ Upstream commit 0de9b836a3bc1cd30578ae2c4463d09afd85ed3d ]
The Loongson PWM controller latches the LOW and PERIOD registers only at
the start of each PWM period. After disabling and re-enabling the PWM,
the controller resumes from the previous counter value and completes the
current period before re-latching the updated LOW and PERIOD values.
Reset the PWM counter when disabling the PWM and release it when
enabling the PWM so that the updated LOW and PERIOD values are latched
before the PWM starts running again.
Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support")
Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
Link: https://patch.msgid.link/20260715-pwm-loongson-fix-v3-2-0aab2847eaa7@gmail.com
[ukleinek: Note LOW refers to the register currently named
LOONGSON_PWM_REG_DUTY. That name is wrong, the fix is still under
discussion.]
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pwm/pwm-loongson.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pwm/pwm-loongson.c b/drivers/pwm/pwm-loongson.c
index 31a57edecfd0b..a7bd479aafe01 100644
--- a/drivers/pwm/pwm-loongson.c
+++ b/drivers/pwm/pwm-loongson.c
@@ -99,6 +99,7 @@ static void pwm_loongson_disable(struct pwm_chip *chip, struct pwm_device *pwm)
struct pwm_loongson_ddata *ddata = to_pwm_loongson_ddata(chip);
val = pwm_loongson_readl(ddata, LOONGSON_PWM_REG_CTRL);
+ val |= LOONGSON_PWM_CTRL_REG_RST;
val &= ~LOONGSON_PWM_CTRL_REG_EN;
pwm_loongson_writel(ddata, val, LOONGSON_PWM_REG_CTRL);
}
@@ -109,6 +110,7 @@ static int pwm_loongson_enable(struct pwm_chip *chip, struct pwm_device *pwm)
struct pwm_loongson_ddata *ddata = to_pwm_loongson_ddata(chip);
val = pwm_loongson_readl(ddata, LOONGSON_PWM_REG_CTRL);
+ val &= ~LOONGSON_PWM_CTRL_REG_RST;
val |= LOONGSON_PWM_CTRL_REG_EN;
pwm_loongson_writel(ddata, val, LOONGSON_PWM_REG_CTRL);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0265/2151] drivers/base/node: fix UAF on device_register() failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (263 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0264/2151] pwm: loongson: Reload PWM configuration through counter reset Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0266/2151] irqchip/gic-v3-its: Dont WARN on LPI free allocation failure Greg Kroah-Hartman
` (617 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Linkai Gong, Danilo Krummrich,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linkai Gong <gonglinkai@kylinos.cn>
[ Upstream commit 6d7e9bc51d8f2d73b3403c759c769f880082f9ae ]
node_init_node_access() frees the access node with kfree() if
device_register() fails. After device_register() the embedded device is
initialized and must be released with put_device() so that
node_access_release() can free it.
Fixes: 08d9dbe72b1f ("node: Link memory nodes to their compute nodes")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Link: https://patch.msgid.link/20260907024732.1452228-1-gonglinkai@kylinos.cn
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/base/node.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 83aeb0518e1da..1a1139a953ced 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -167,20 +167,19 @@ static struct node_access_nodes *node_init_node_access(struct node *node,
dev->parent = &node->dev;
dev->release = node_access_release;
dev->groups = node_access_node_groups;
- if (dev_set_name(dev, "access%u", access))
- goto free;
+ if (dev_set_name(dev, "access%u", access)) {
+ kfree(access_node);
+ return NULL;
+ }
- if (device_register(dev))
- goto free_name;
+ if (device_register(dev)) {
+ put_device(dev);
+ return NULL;
+ }
pm_runtime_no_callbacks(dev);
list_add_tail(&access_node->list_node, &node->access_list);
return access_node;
-free_name:
- kfree_const(dev->kobj.name);
-free:
- kfree(access_node);
- return NULL;
}
#ifdef CONFIG_HMEM_REPORTING
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0266/2151] irqchip/gic-v3-its: Dont WARN on LPI free allocation failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (264 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0265/2151] drivers/base/node: fix UAF on device_register() failure Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0267/2151] ASoC: es8326: report resume restore errors Greg Kroah-Hartman
` (616 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+229d761b8a110e6de517,
Karl Mehltretter, Thomas Gleixner, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 135d9e67f7ab4f261c2157ee2de1f93a4de39a41 ]
free_lpi_range() cannot give LPIs back to the allocator without
allocating a struct lpi_range to describe the freed range, so it
returns -ENOMEM (its only failure mode) when that allocation fails,
and its_lpi_free() turns this into a WARN_ON().
syzbot triggers the WARN_ON() by injecting a slab allocation failure
on device teardown, which with panic_on_warn becomes a panic:
WARNING: drivers/irqchip/irq-gic-v3-its.c:2251 at its_msi_teardown+0x3a4/0x424
its_msi_teardown+0x3a4/0x424
msi_remove_device_irq_domain+0x16c/0x27c
msi_device_data_release+0x38/0x9c
The failure is transient and the consequence benign: the freed range
is simply never returned to the allocator. This does not warrant a
WARN_ON() backtrace, so log a rate-limited error instead.
Fixes: 880cb3cddd16 ("irqchip/gic-v3-its: Refactor LPI allocator")
Reported-by: syzbot+229d761b8a110e6de517@syzkaller.appspotmail.com
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Assisted-by: Claude:claude-fable-5
Link: https://patch.msgid.link/20260811095532.48454-1-kmehltretter@gmail.com
Closes: https://syzkaller.appspot.com/bug?extid=229d761b8a110e6de517
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/irqchip/irq-gic-v3-its.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 4443bf46e390d..77662460b086a 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2248,7 +2248,8 @@ static unsigned long *its_lpi_alloc(int nr_irqs, u32 *base, int *nr_ids)
static void its_lpi_free(unsigned long *bitmap, u32 base, u32 nr_ids)
{
- WARN_ON(free_lpi_range(base, nr_ids));
+ if (free_lpi_range(base, nr_ids))
+ pr_err_ratelimited("ITS: failed to free LPI range %u:%u\n", base, nr_ids);
bitmap_free(bitmap);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0267/2151] ASoC: es8326: report resume restore errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (265 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0266/2151] irqchip/gic-v3-its: Dont WARN on LPI free allocation failure Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0268/2151] ASoC: es8375: " Greg Kroah-Hartman
` (615 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit 349e94679968785803cc32c1d2e41e000e8afd5f ]
es8326_resume() ignores the status-register read, the direct clock-state
write and the register-cache replay. A read failure can also leave reg
uninitialized before it selects the reset path, and a cache failure is
followed by jack IRQ processing.
Return these errors before later resume work. The ASoC component wrapper
reports the callback failure while retaining its best-effort resume
contract.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 5c439937775d ("ASoC: codecs: add support for ES8326")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Link: https://patch.msgid.link/20260906034217.85696-2-hppiscas@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8326.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 78c4e68f60024..4cefaa1f51d99 100644
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -1108,18 +1108,28 @@ static int es8326_resume(struct snd_soc_component *component)
{
struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component);
unsigned int reg;
+ int ret;
regcache_cache_only(es8326->regmap, false);
regcache_cache_bypass(es8326->regmap, true);
- regmap_read(es8326->regmap, ES8326_CLK_RESAMPLE, ®);
+ ret = regmap_read(es8326->regmap, ES8326_CLK_RESAMPLE, ®);
regcache_cache_bypass(es8326->regmap, false);
+ if (ret)
+ return ret;
+
/* reset internal clock state */
- if (reg == 0x05)
- regmap_write(es8326->regmap, ES8326_CLK_CTL, ES8326_CLK_ON);
- else
+ if (reg == 0x05) {
+ ret = regmap_write(es8326->regmap, ES8326_CLK_CTL,
+ ES8326_CLK_ON);
+ if (ret)
+ return ret;
+ } else {
es8326_init(component);
+ }
- regcache_sync(es8326->regmap);
+ ret = regcache_sync(es8326->regmap);
+ if (ret)
+ return ret;
es8326_irq(es8326->irq, es8326);
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0268/2151] ASoC: es8375: report resume restore errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (266 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0267/2151] ASoC: es8326: report resume restore errors Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0269/2151] ASoC: codecs: ES8389: Modify volatile_register Greg Kroah-Hartman
` (614 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit 8f43acfd3addf10fbde8d21dd44b1a61e1936ba7 ]
es8375_resume() ignores the clock-status read, bias restoration and
register-cache replay. A read failure can leave reg uninitialized before
it selects the initialization path, and later resume processing cannot
observe a failed restore.
Return the fallible operation results to the ASoC component wrapper, which
reports callback failures while retaining its best-effort resume contract.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Link: https://patch.msgid.link/20260906034217.85696-3-hppiscas@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8375.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/es8375.c b/sound/soc/codecs/es8375.c
index 36b0ebdce514d..c235f91929b31 100644
--- a/sound/soc/codecs/es8375.c
+++ b/sound/soc/codecs/es8375.c
@@ -579,20 +579,24 @@ static int es8375_resume(struct snd_soc_component *component)
{
struct es8375_priv *es8375 = snd_soc_component_get_drvdata(component);
unsigned int reg;
+ int ret;
regcache_cache_only(es8375->regmap, false);
regcache_cache_bypass(es8375->regmap, true);
- regmap_read(es8375->regmap, ES8375_CLK_MGR2, ®);
+ ret = regmap_read(es8375->regmap, ES8375_CLK_MGR2, ®);
regcache_cache_bypass(es8375->regmap, false);
+ if (ret)
+ return ret;
- if (reg == 0x00)
+ if (reg == 0x00) {
es8375_init(component);
- else
- es8375_set_bias_level(component, SND_SOC_BIAS_ON);
-
- regcache_sync(es8375->regmap);
+ } else {
+ ret = es8375_set_bias_level(component, SND_SOC_BIAS_ON);
+ if (ret)
+ return ret;
+ }
- return 0;
+ return regcache_sync(es8375->regmap);
}
static int es8375_codec_probe(struct snd_soc_component *component)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0269/2151] ASoC: codecs: ES8389: Modify volatile_register
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (267 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0268/2151] ASoC: es8375: " Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0270/2151] ASoC: es8389: report resume restore errors Greg Kroah-Hartman
` (613 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Zhang Yi, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Yi <zhangyi@everest-semi.com>
[ Upstream commit 882e55031187791a2b87810d4a93f866a2da6d47 ]
Mark some registers that are not volatile as false
And modified the logic for `cache_bypass` during `8389_resume`.
Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20260630072311.8427-2-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 8f7d23eb8ffb ("ASoC: es8389: report resume restore errors")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8389.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 8960969cfbaa1..20ba0042cb0b0 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -41,10 +41,29 @@ struct es8389_private {
static bool es8389_volatile_register(struct device *dev,
unsigned int reg)
{
- if ((reg <= 0xff))
- return true;
- else
+ switch (reg) {
+ case ES8389_ADCL_VOL:
+ case ES8389_ADCR_VOL:
+ case ES8389_MIC1_GAIN:
+ case ES8389_MIC2_GAIN:
+ case ES8389_DACL_VOL:
+ case ES8389_DACR_VOL:
+ case ES8389_ALC_ON:
+ case ES8389_ALC_CTL:
+ case ES8389_ALC_TARGET:
+ case ES8389_ALC_GAIN:
+ case ES8389_ADC_MUTE:
+ case ES8389_OSR_VOL:
+ case ES8389_DAC_INV:
+ case ES8389_MIX_VOL:
+ case ES8389_DAC_MIX:
+ case ES8389_ADC_RESET:
+ case ES8389_ADC_MODE:
+ case ES8389_DMIC_EN:
return false;
+ default:
+ return true;
+ }
}
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9550, 50, 0);
@@ -804,13 +823,13 @@ static int es8389_resume(struct snd_soc_component *component)
regcache_cache_only(es8389->regmap, false);
regcache_cache_bypass(es8389->regmap, true);
regmap_read(es8389->regmap, ES8389_RESET, ®v);
- regcache_cache_bypass(es8389->regmap, false);
if (regv == 0xff)
es8389_init(component);
else
es8389_set_bias_level(component, SND_SOC_BIAS_ON);
+ regcache_cache_bypass(es8389->regmap, false);
regcache_sync(es8389->regmap);
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0270/2151] ASoC: es8389: report resume restore errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (268 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0269/2151] ASoC: codecs: ES8389: Modify volatile_register Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0271/2151] ASoC: fs210x: report register " Greg Kroah-Hartman
` (612 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit 8f7d23eb8ffb817ba69049577ab8ca55b93c77cf ]
es8389_resume() ignores the reset-register read, bias restoration and
register-cache replay. A failed read can leave regv uninitialized before
it selects the initialization path.
Check those operations and always leave cache bypass before returning an
error. The ASoC component wrapper reports callback failures while retaining
its best-effort resume contract.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 0319c26889f7 ("ASoC: codecs: add support for ES8389")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Link: https://patch.msgid.link/20260906034217.85696-4-hppiscas@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8389.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 20ba0042cb0b0..cf95519a2619f 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -819,20 +819,28 @@ static int es8389_resume(struct snd_soc_component *component)
{
struct es8389_private *es8389 = snd_soc_component_get_drvdata(component);
unsigned int regv;
+ int ret;
regcache_cache_only(es8389->regmap, false);
regcache_cache_bypass(es8389->regmap, true);
- regmap_read(es8389->regmap, ES8389_RESET, ®v);
+ ret = regmap_read(es8389->regmap, ES8389_RESET, ®v);
+ if (ret)
+ goto disable_bypass;
- if (regv == 0xff)
+ if (regv == 0xff) {
es8389_init(component);
- else
- es8389_set_bias_level(component, SND_SOC_BIAS_ON);
+ } else {
+ ret = es8389_set_bias_level(component, SND_SOC_BIAS_ON);
+ if (ret)
+ goto disable_bypass;
+ }
+disable_bypass:
regcache_cache_bypass(es8389->regmap, false);
- regcache_sync(es8389->regmap);
+ if (ret)
+ return ret;
- return 0;
+ return regcache_sync(es8389->regmap);
}
static int es8389_probe(struct snd_soc_component *component)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0271/2151] ASoC: fs210x: report register restore errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (269 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0270/2151] ASoC: es8389: report resume restore errors Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0272/2151] arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmware Greg Kroah-Hartman
` (611 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit aa7d985d85529049fc8c39c168b300f59de4fdf8 ]
fs210x_init_chip() marks the register cache dirty and replays it after
reset and scene setup, but ignores a replay failure and publishes
is_inited. Its resume caller already returns the helper status.
Keep is_inited clear and return a cache replay failure so the ASoC
component wrapper can report the incomplete restoration.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 756117701779 ("ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Link: https://patch.msgid.link/20260906034217.85696-5-hppiscas@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/fs210x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/fs210x.c b/sound/soc/codecs/fs210x.c
index e2207c53c50d5..ae00e942ad027 100644
--- a/sound/soc/codecs/fs210x.c
+++ b/sound/soc/codecs/fs210x.c
@@ -608,8 +608,9 @@ static int fs210x_init_chip(struct fs210x_priv *fs210x)
regcache_cache_bypass(fs210x->regmap, false);
if (!ret) {
regcache_mark_dirty(fs210x->regmap);
- regcache_sync(fs210x->regmap);
- fs210x->is_inited = true;
+ ret = regcache_sync(fs210x->regmap);
+ if (!ret)
+ fs210x->is_inited = true;
}
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0272/2151] arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmware
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (270 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0271/2151] ASoC: fs210x: report register " Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0273/2151] arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header path Greg Kroah-Hartman
` (610 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Brian Norris, Chen-Yu Tsai,
Douglas Anderson, AngeloGioacchino Del Regno, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian Norris <briannorris@chromium.org>
[ Upstream commit 69c1a4fd5272df1d745d6bcc3c613843ebecec61 ]
Chromium/Depthcharge bootloaders may dynamically add a few device nodes
to a system's DTB under a /firmware node. A typical DT looks something
like the following:
/ {
firmware {
ranges;
coreboot {
compatible = "coreboot";
reg = <...>;
...;
};
};
};
Notably, the /firmware node has an empty 'ranges', but does not have
address/size-cells.
Commit 6e5773d52f4a ("of/address: Fix WARN when attempting translating
non-translatable addresses") started requiring #address-cells for a
device's parent if we want to use the reg resource in a device node.
This leads to errors like the following:
[ 7.763870] coreboot_table firmware:coreboot: probe with driver coreboot_table failed with error -22
Add appropriate #{address,size}-cells to work around the problem.
Note that Google has also patched the Depthcharge bootloader source to
add {address,size}-cells [1], but bootloader updates are typically
delivered only via Google OS updates. Not all users install Google
software updates, and even if they do, Google may not produce updated
binaries for all/older devices.
[1] https://lore.kernel.org/all/20241209092809.GA3246424@google.com/
https://crrev.com/c/6051580 ("coreboot: Insert #address-cells and
#size-cells for firmware node")
Closes: https://lore.kernel.org/all/aeKlYzTiL0OB1y3g@google.com/
Fixes: 6e5773d52f4a ("of/address: Fix WARN when attempting translating non-translatable addresses")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 5 +++++
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 +++++
arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi | 5 +++++
arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi | 5 +++++
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 5 +++++
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 5 +++++
6 files changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
index 0d995b342d463..51651b71280db 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
@@ -16,6 +16,11 @@ aliases {
mmc2 = &mmc3;
};
+ firmware {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ };
+
memory@40000000 {
device_type = "memory";
reg = <0 0x40000000 0 0x80000000>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
index 4b87d4940c8c7..553d2cd2b429a 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
@@ -21,6 +21,11 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ firmware {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ };
+
backlight_lcd0: backlight_lcd0 {
compatible = "pwm-backlight";
pwms = <&pwm0 0 500000>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
index ff20376a44d7a..2b327d9ef65ee 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi
@@ -26,6 +26,11 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ firmware {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ };
+
memory@40000000 {
device_type = "memory";
/* The size should be filled in by the bootloader. */
diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
index 7fedbacdac44c..118d6b2ebd2c6 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
@@ -41,6 +41,11 @@ dmic-codec {
wakeup-delay-ms = <100>;
};
+ firmware {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ };
+
memory@40000000 {
device_type = "memory";
/* The size will be filled in by the bootloader */
diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
index ff2eb9e10f364..da60113aa03b6 100644
--- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi
@@ -25,6 +25,11 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ firmware {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ };
+
memory@40000000 {
device_type = "memory";
reg = <0 0x40000000 0 0x80000000>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index b3761b80cac7e..9060b67c04459 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -42,6 +42,11 @@ dmic-codec {
wakeup-delay-ms = <50>;
};
+ firmware {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ };
+
memory@40000000 {
device_type = "memory";
reg = <0 0x40000000 0 0x80000000>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0273/2151] arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (271 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0272/2151] arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmware Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0274/2151] virtio_ccw: fix synchronize_cbs() after interrupt fallback Greg Kroah-Hartman
` (609 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Igor Belwon,
AngeloGioacchino Del Regno, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Igor Belwon <igor.belwon@mentallysanemainliners.org>
[ Upstream commit 863d48714194bfcdb917b2ec35531e40df40cb87 ]
The header resides in the dt-bindings directory and not in the
dts/mediatek directory. Fix it as to avoid a build failure.
Fixes: c0f1fd9eeb317 ("arm64: dts: mediatek: Add MT6893 pinmux macro header file")
Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h b/arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h
index 982bc95c471cc..7cda5c73fb684 100644
--- a/arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h
+++ b/arch/arm64/boot/dts/mediatek/mt6893-pinfunc.h
@@ -7,7 +7,7 @@
#ifndef __MT6893_PINFUNC_H
#define __MT6893_PINFUNC_H
-#include "mt65xx.h"
+#include <dt-bindings/pinctrl/mt65xx.h>
#define PINMUX_GPIO0__FUNC_GPIO0 (MTK_PIN_NO(0) | 0)
#define PINMUX_GPIO0__FUNC_SPI6_CLK (MTK_PIN_NO(0) | 1)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0274/2151] virtio_ccw: fix synchronize_cbs() after interrupt fallback
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (272 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0273/2151] arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header path Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0275/2151] virtio_ccw: always take irq_lock in the classic interrupt handler Greg Kroah-Hartman
` (608 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Michael S. Tsirkin,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 6e484b870b71eb6acb3fa7a10b8e71098e242033 ]
virtio_ccw_synchronize_cbs() assumes the device uses adapter interrupts
when vcdev->airq_info is not NULL. If registering adapter indicators
fails, virtio_ccw_find_vqs() falls back to classic interrupts but can
leave airq_info set.
With VIRTIO_HARDEN_NOTIFICATION enabled,
virtio_ccw_int_handler() invokes callbacks under vcdev->irq_lock.
synchronize_cbs() instead takes the indicator area lock, so it does
not synchronize with those callbacks.
Use vcdev->is_thinint, which the fallback clears, to select the lock.
Keep the airq_info check because is_thinint can be set before the
first find_vqs() call, when airq_info is still NULL.
Fixes: 3a232277c1ac ("virtio-ccw: implement synchronize_cbs()")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260908053817.26065-2-kmehltretter@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/s390/virtio/virtio_ccw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index 4904b831c0a75..98b62bc18228b 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -1061,7 +1061,7 @@ static void virtio_ccw_synchronize_cbs(struct virtio_device *vdev)
struct virtio_ccw_device *vcdev = to_vc_device(vdev);
struct airq_info *info = vcdev->airq_info;
- if (info) {
+ if (vcdev->is_thinint && info) {
/*
* This device uses adapter interrupts: synchronize with
* vring_interrupt() called by virtio_airq_handler()
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0275/2151] virtio_ccw: always take irq_lock in the classic interrupt handler
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (273 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0274/2151] virtio_ccw: fix synchronize_cbs() after interrupt fallback Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0276/2151] pwm: mtk-disp: Fix period readback Greg Kroah-Hartman
` (607 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Michael S. Tsirkin,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 48a355cf5b382570975e60857450ff3d42f268e9 ]
virtio_ccw_int_handler() takes vcdev->irq_lock around its
vring_interrupt() calls only when VIRTIO_HARDEN_NOTIFICATION is enabled.
The virtio shutdown path calls synchronize_cbs() even when notification
hardening is disabled. virtio_reset_device() now does so after the
transport reset too.
For classic interrupts, synchronize_cbs() takes vcdev->irq_lock for
writing, but the interrupt handler does not take the matching read
lock in that configuration. synchronize_cbs() can return while a
callback is still running.
Take the read lock unconditionally so the write side can synchronize
with the callbacks.
Fixes: 8bd2fa086a04 ("virtio: break and reset virtio devices on device_shutdown()")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260908053817.26065-3-kmehltretter@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/s390/virtio/virtio_ccw.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
index 98b62bc18228b..340191410d2c8 100644
--- a/drivers/s390/virtio/virtio_ccw.c
+++ b/drivers/s390/virtio/virtio_ccw.c
@@ -1203,13 +1203,11 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
vcdev->err = -EIO;
}
virtio_ccw_check_activity(vcdev, activity);
-#ifdef CONFIG_VIRTIO_HARDEN_NOTIFICATION
/*
* Paired with virtio_ccw_synchronize_cbs() and interrupts are
* disabled here.
*/
read_lock(&vcdev->irq_lock);
-#endif
for_each_set_bit(i, indicators(vcdev),
sizeof(*indicators(vcdev)) * BITS_PER_BYTE) {
/* The bit clear must happen before the vring kick. */
@@ -1218,9 +1216,7 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev,
vq = virtio_ccw_vq_by_ind(vcdev, i);
vring_interrupt(0, vq);
}
-#ifdef CONFIG_VIRTIO_HARDEN_NOTIFICATION
read_unlock(&vcdev->irq_lock);
-#endif
if (test_bit(0, indicators2(vcdev))) {
virtio_config_changed(&vcdev->vdev);
clear_bit(0, indicators2(vcdev));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0276/2151] pwm: mtk-disp: Fix period readback
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (274 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0275/2151] virtio_ccw: always take irq_lock in the classic interrupt handler Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0277/2151] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key() Greg Kroah-Hartman
` (606 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jitao Shi, Chen-Yu Tsai,
AngeloGioacchino Del Regno, Fei Shao, Uwe Kleine-König,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <wenst@chromium.org>
[ Upstream commit c5b29baad42b2b02389cc6a716697a8a63209930 ]
The period value stored in the register is the number of clock cycles - 1.
Account for the offset when calculating the period in nanoseconds. This
fixes the discrepancy reported by the pwm core when CONFIG_PWM_DEBUG=1:
mediatek-disp-pwm 1100e000.pwm: .apply is not idempotent
(ena=1 pol=0 281500/499875) -> (ena=1 pol=0 281500/499750)
Calculation discrepancy in the driver was found by AI run by a colleague
while debugging another PWM related issue. Check against SoC datasheet
and fix done by the author.
Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
Cc: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Fei Shao <fshao@chromium.org>
Link: https://patch.msgid.link/20260827105738.8570-1-wenst@chromium.org
[ukleinek: Adapt comment accordingly]
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pwm/pwm-mtk-disp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
index bafd6b6195f66..3906342ff45eb 100644
--- a/drivers/pwm/pwm-mtk-disp.c
+++ b/drivers/pwm/pwm-mtk-disp.c
@@ -210,9 +210,9 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
period = FIELD_GET(PWM_PERIOD_MASK, con1);
/*
* period has 12 bits, clk_div 11 and NSEC_PER_SEC has 30,
- * so period * (clk_div + 1) * NSEC_PER_SEC doesn't overflow.
+ * so (period + 1) * (clk_div + 1) * NSEC_PER_SEC doesn't overflow.
*/
- state->period = DIV64_U64_ROUND_UP(period * (clk_div + 1) * NSEC_PER_SEC, rate);
+ state->period = DIV64_U64_ROUND_UP((period + 1) * (clk_div + 1) * NSEC_PER_SEC, rate);
high_width = FIELD_GET(PWM_HIGH_WIDTH_MASK, con1);
state->duty_cycle = DIV64_U64_ROUND_UP(high_width * (clk_div + 1) * NSEC_PER_SEC,
rate);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0277/2151] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (275 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0276/2151] pwm: mtk-disp: Fix period readback Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0278/2151] ASoC: mediatek: mt8186: Fix APLL mux setting error handling Greg Kroah-Hartman
` (605 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bert Karwatzki, Johannes Berg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bert Karwatzki <spasswolf@web.de>
[ Upstream commit 5f2530a4df8e0573e54cc0f4175c06ecb810a4dd ]
Without this ieee80211_select_key_8023() is never called and wifi never
connects.
Fixes: 0e80db08668b ("wifi: mac80211: fix key selection for encap offload frames")
Signed-off-by: Bert Karwatzki <spasswolf@web.de>
Link: https://patch.msgid.link/20260908094341.12196-1-spasswolf@web.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 79d0f0141d4ce..3224288583e20 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -618,7 +618,7 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
- if (info->control.flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
return ieee80211_select_key_8023(tx);
if (unlikely(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0278/2151] ASoC: mediatek: mt8186: Fix APLL mux setting error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (276 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0277/2151] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key() Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0279/2151] ASoC: mediatek: mt8186: Fix clock handling in mux disable path Greg Kroah-Hartman
` (604 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 5ee5987fadf6ae15678a654b4d909225c97f0299 ]
The APLL mux setup functions return immediately when a clock operation
fails, without undoing the clock changes already made. This can leave
clocks enabled or muxes configured to an unexpected parent.
Restore the affected muxes to CLK26M and disable previously enabled
clocks on error before propagating the original error.
Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903051150.178057-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 50 ++++++++++++++++------
1 file changed, 38 insertions(+), 12 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
index daaca36a2d085..aa8b2eaf7b958 100644
--- a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
@@ -98,7 +98,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1], ret);
- return ret;
+ goto ERR_ENABLE_CLK_TOP_MUX_AUD_1;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1],
afe_priv->clk[CLK_TOP_APLL1_CK]);
@@ -106,7 +106,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1],
aud_clks[CLK_TOP_APLL1_CK], ret);
- return ret;
+ goto ERR_SELECT_CLK_TOP_MUX_AUD_1;
}
/* 180.6336 / 8 = 22.5792MHz */
@@ -114,7 +114,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1], ret);
- return ret;
+ goto ERR_ENABLE_CLK_TOP_MUX_AUD_ENG1;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1],
afe_priv->clk[CLK_TOP_APLL1_D8]);
@@ -122,7 +122,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
aud_clks[CLK_TOP_APLL1_D8], ret);
- return ret;
+ goto ERR_SELECT_CLK_TOP_MUX_AUD_ENG1;
}
} else {
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1],
@@ -131,7 +131,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
aud_clks[CLK_CLK26M], ret);
- return ret;
+ goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
@@ -141,12 +141,25 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1],
aud_clks[CLK_CLK26M], ret);
- return ret;
+ goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
}
return 0;
+
+ERR_SELECT_CLK_TOP_MUX_AUD_ENG1:
+ clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1],
+ afe_priv->clk[CLK_CLK26M]);
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
+ERR_ENABLE_CLK_TOP_MUX_AUD_ENG1:
+ERR_SELECT_CLK_TOP_MUX_AUD_1:
+ clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1],
+ afe_priv->clk[CLK_CLK26M]);
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
+ERR_ENABLE_CLK_TOP_MUX_AUD_1:
+EXIT:
+ return ret;
}
static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
@@ -159,7 +172,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2], ret);
- return ret;
+ goto ERR_ENABLE_CLK_TOP_MUX_AUD_2;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_2],
afe_priv->clk[CLK_TOP_APLL2_CK]);
@@ -167,7 +180,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2],
aud_clks[CLK_TOP_APLL2_CK], ret);
- return ret;
+ goto ERR_SELECT_CLK_TOP_MUX_AUD_2;
}
/* 196.608 / 8 = 24.576MHz */
@@ -175,7 +188,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2], ret);
- return ret;
+ goto ERR_ENABLE_CLK_TOP_MUX_AUD_ENG2;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2],
afe_priv->clk[CLK_TOP_APLL2_D8]);
@@ -183,7 +196,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2],
aud_clks[CLK_TOP_APLL2_D8], ret);
- return ret;
+ goto ERR_SELECT_CLK_TOP_MUX_AUD_ENG2;
}
} else {
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2],
@@ -192,7 +205,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2],
aud_clks[CLK_CLK26M], ret);
- return ret;
+ goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]);
@@ -202,12 +215,25 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2],
aud_clks[CLK_CLK26M], ret);
- return ret;
+ goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
}
return 0;
+
+ERR_SELECT_CLK_TOP_MUX_AUD_ENG2:
+ clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2],
+ afe_priv->clk[CLK_CLK26M]);
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]);
+ERR_ENABLE_CLK_TOP_MUX_AUD_ENG2:
+ERR_SELECT_CLK_TOP_MUX_AUD_2:
+ clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_2],
+ afe_priv->clk[CLK_CLK26M]);
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
+ERR_ENABLE_CLK_TOP_MUX_AUD_2:
+EXIT:
+ return ret;
}
int mt8186_afe_enable_cgs(struct mtk_base_afe *afe)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0279/2151] ASoC: mediatek: mt8186: Fix clock handling in mux disable path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (277 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0278/2151] ASoC: mediatek: mt8186: Fix APLL mux setting error handling Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0280/2151] ASoC: mediatek: mt8186: Fix AFE clock error handling Greg Kroah-Hartman
` (603 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit d70109f5510b423e72894dadfbab27087a7b26b0 ]
In the disable path of the appl*_mux_setting() functions,
clk_disable_unprepare() is called after clk_set_parent().
If clk_set_parent() fails, clk_disable_unprepare() is skipped,
potentially leaving one of the clocks enabled.
Remove the goto exit paths so that all teardown steps are attempted
and any errors are only reported.
Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903051150.178057-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
index aa8b2eaf7b958..3edd0dd20eed0 100644
--- a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
@@ -131,7 +131,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
@@ -141,7 +140,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
}
@@ -158,7 +156,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
afe_priv->clk[CLK_CLK26M]);
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
ERR_ENABLE_CLK_TOP_MUX_AUD_1:
-EXIT:
return ret;
}
@@ -205,7 +202,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]);
@@ -215,7 +211,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
}
@@ -232,7 +227,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
afe_priv->clk[CLK_CLK26M]);
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
ERR_ENABLE_CLK_TOP_MUX_AUD_2:
-EXIT:
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0280/2151] ASoC: mediatek: mt8186: Fix AFE clock error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (278 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0279/2151] ASoC: mediatek: mt8186: Fix clock handling in mux disable path Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0281/2151] ASoC: mediatek: mt8186: Fix APLL enable " Greg Kroah-Hartman
` (602 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit eb72060a1966baf9a6ed753186621ee6e39dc889 ]
The error paths in mt8186_afe_enable_clock() do not consistently
undo the clock operations performed before an error.
Fix the goto targets and cleanup order so that the audio internal
bus parent is restored to CLK26M and all previously enabled clocks
are disabled before returning the error.
Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903051150.178057-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
index 3edd0dd20eed0..685dc27c77807 100644
--- a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
@@ -288,7 +288,7 @@ int mt8186_afe_enable_clock(struct mtk_base_afe *afe)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIO],
aud_clks[CLK_CLK26M], ret);
- goto clk_mux_audio_err;
+ goto clk_mux_audio_intbus_err;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_MUX_AUDIOINTBUS]);
@@ -315,24 +315,22 @@ int mt8186_afe_enable_clock(struct mtk_base_afe *afe)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_AFE], ret);
- goto clk_afe_err;
+ goto clk_mux_audio_h_parent_err;
}
return 0;
-clk_afe_err:
- clk_disable_unprepare(afe_priv->clk[CLK_AFE]);
clk_mux_audio_h_parent_err:
-clk_mux_audio_intbus_parent_err:
mt8186_set_audio_int_bus_parent(afe, CLK_CLK26M);
-clk_mux_audio_intbus_err:
+clk_mux_audio_intbus_parent_err:
clk_disable_unprepare(afe_priv->clk[CLK_MUX_AUDIOINTBUS]);
-clk_mux_audio_err:
+clk_mux_audio_intbus_err:
clk_disable_unprepare(afe_priv->clk[CLK_MUX_AUDIO]);
-clk_infra_sys_audio_err:
- clk_disable_unprepare(afe_priv->clk[CLK_INFRA_SYS_AUDIO]);
-clk_infra_audio_26m_err:
+clk_mux_audio_err:
clk_disable_unprepare(afe_priv->clk[CLK_INFRA_AUDIO_26M]);
+clk_infra_audio_26m_err:
+ clk_disable_unprepare(afe_priv->clk[CLK_INFRA_SYS_AUDIO]);
+clk_infra_sys_audio_err:
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0281/2151] ASoC: mediatek: mt8186: Fix APLL enable error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (279 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0280/2151] ASoC: mediatek: mt8186: Fix AFE clock error handling Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0282/2151] ASoC: mediatek: mt8186: Fix MCK " Greg Kroah-Hartman
` (601 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit cb552c6b9abe02f254d44d8c29d0dce1ae21f69f ]
Currently, the mt8186_apll*_enable() functions call mux_setting(afe, true)
but do not check its return value to handle failures.
In addition, the cleanup paths of mt8186_apll*_enable() do not call
mux_setting(afe, false) when the enable operation fails, while the
mt8186_apll*_disable() functions do.
Add error handling for apll*_mux_setting() and call mux_setting(afe, false)
in the cleanup paths when mt8186_apll*_enable() fails.
Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903051150.178057-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
index 685dc27c77807..77a0cbc8ee241 100644
--- a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
@@ -353,7 +353,9 @@ int mt8186_apll1_enable(struct mtk_base_afe *afe)
int ret;
/* setting for APLL */
- apll1_mux_setting(afe, true);
+ ret = apll1_mux_setting(afe, true);
+ if (ret)
+ return ret;
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL22M]);
if (ret) {
@@ -378,9 +380,9 @@ int mt8186_apll1_enable(struct mtk_base_afe *afe)
return 0;
err_clk_apll1_tuner:
- clk_disable_unprepare(afe_priv->clk[CLK_APLL1_TUNER]);
-err_clk_apll22m:
clk_disable_unprepare(afe_priv->clk[CLK_APLL22M]);
+err_clk_apll22m:
+ apll1_mux_setting(afe, false);
return ret;
}
@@ -406,7 +408,9 @@ int mt8186_apll2_enable(struct mtk_base_afe *afe)
int ret;
/* setting for APLL */
- apll2_mux_setting(afe, true);
+ ret = apll2_mux_setting(afe, true);
+ if (ret)
+ return ret;
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL24M]);
if (ret) {
@@ -431,9 +435,9 @@ int mt8186_apll2_enable(struct mtk_base_afe *afe)
return 0;
err_clk_apll2_tuner:
- clk_disable_unprepare(afe_priv->clk[CLK_APLL2_TUNER]);
-err_clk_apll24m:
clk_disable_unprepare(afe_priv->clk[CLK_APLL24M]);
+err_clk_apll24m:
+ apll2_mux_setting(afe, false);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0282/2151] ASoC: mediatek: mt8186: Fix MCK error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (280 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0281/2151] ASoC: mediatek: mt8186: Fix APLL enable " Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0283/2151] ASoC: mediatek: mt6797: fix wrong unwind order and error code in enable_clock Greg Kroah-Hartman
` (600 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 996469c1092e8fa81fac98d819174ce56baff821 ]
The mt8186_mck_enable() function returns immediately when a clock
operation fails, leaving previously enabled clocks active.
Add error paths to disable previously enabled clocks before returning
the error.
Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903051150.178057-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
index 77a0cbc8ee241..62b008b7caca2 100644
--- a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
+++ b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c
@@ -520,7 +520,7 @@ int mt8186_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate)
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[m_sel_id], ret);
- return ret;
+ goto ERR_ENABLE_MCLK;
}
ret = clk_set_parent(afe_priv->clk[m_sel_id],
afe_priv->clk[apll_clk_id]);
@@ -528,7 +528,7 @@ int mt8186_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate)
dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[m_sel_id],
aud_clks[apll_clk_id], ret);
- return ret;
+ goto ERR_SELECT_MCLK;
}
}
@@ -537,16 +537,25 @@ int mt8186_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate)
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[div_clk_id], ret);
- return ret;
+ goto ERR_ENABLE_MCLK_DIV;
}
ret = clk_set_rate(afe_priv->clk[div_clk_id], rate);
if (ret) {
dev_err(afe->dev, "%s(), clk_set_rate %s, rate %d, fail %d\n",
__func__, aud_clks[div_clk_id], rate, ret);
- return ret;
+ goto ERR_SET_MCLK_RATE;
}
return 0;
+
+ERR_SET_MCLK_RATE:
+ clk_disable_unprepare(afe_priv->clk[div_clk_id]);
+ERR_ENABLE_MCLK_DIV:
+ERR_SELECT_MCLK:
+ if (m_sel_id >= 0)
+ clk_disable_unprepare(afe_priv->clk[m_sel_id]);
+ERR_ENABLE_MCLK:
+ return ret;
}
void mt8186_mck_disable(struct mtk_base_afe *afe, int mck_id)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0283/2151] ASoC: mediatek: mt6797: fix wrong unwind order and error code in enable_clock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (281 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0282/2151] ASoC: mediatek: mt8186: Fix MCK " Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0284/2151] pwm: lp3943: fix NULL pointer dereference for an unconfigured channel Greg Kroah-Hartman
` (599 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cezary Rojewski, bui duc phuc,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit e967d479b65c778cd2394ab185e289beefcf996d ]
The error paths in mt6797_afe_enable_clock() use incorrect goto labels,
causing clocks that failed to enable to be disabled during cleanup.
Fix the goto labels to only unwind clocks that were successfully
enabled, and return the actual error code.
Fixes: c5e7fca928d3 ("ASoC: mt6797: add structure define and clock control function for 6797")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260821122840.41266-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt6797/mt6797-afe-clk.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt6797/mt6797-afe-clk.c b/sound/soc/mediatek/mt6797/mt6797-afe-clk.c
index 6f3e6acfcfab2..0ac04d73b7772 100644
--- a/sound/soc/mediatek/mt6797/mt6797-afe-clk.c
+++ b/sound/soc/mediatek/mt6797/mt6797-afe-clk.c
@@ -63,21 +63,21 @@ int mt6797_afe_enable_clock(struct mtk_base_afe *afe)
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_INFRA_SYS_AUD], ret);
- goto CLK_INFRA_SYS_AUDIO_ERR;
+ return ret;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_INFRA_SYS_AUD_26M]);
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_INFRA_SYS_AUD_26M], ret);
- goto CLK_INFRA_SYS_AUD_26M_ERR;
+ goto CLK_INFRA_SYS_AUDIO_ERR;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_TOP_MUX_AUD]);
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD], ret);
- goto CLK_MUX_AUDIO_ERR;
+ goto CLK_INFRA_SYS_AUD_26M_ERR;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD],
@@ -93,13 +93,11 @@ int mt6797_afe_enable_clock(struct mtk_base_afe *afe)
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_BUS], ret);
- goto CLK_MUX_AUDIO_INTBUS_ERR;
+ goto CLK_MUX_AUDIO_ERR;
}
- return ret;
+ return 0;
-CLK_MUX_AUDIO_INTBUS_ERR:
- clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_BUS]);
CLK_MUX_AUDIO_ERR:
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD]);
CLK_INFRA_SYS_AUD_26M_ERR:
@@ -107,7 +105,7 @@ int mt6797_afe_enable_clock(struct mtk_base_afe *afe)
CLK_INFRA_SYS_AUDIO_ERR:
clk_disable_unprepare(afe_priv->clk[CLK_INFRA_SYS_AUD]);
- return 0;
+ return ret;
}
int mt6797_afe_disable_clock(struct mtk_base_afe *afe)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0284/2151] pwm: lp3943: fix NULL pointer dereference for an unconfigured channel
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (282 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0283/2151] ASoC: mediatek: mt6797: fix wrong unwind order and error code in enable_clock Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0285/2151] selftests/sched_ext: Handle CPU hotplug write failures Greg Kroah-Hartman
` (598 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko AI review, Manush Prajwal,
Uwe Kleine-König, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manush Prajwal <manushprajwal555@gmail.com>
[ Upstream commit 17dbb6938d3ab444cd6be1c95506450595a8800d ]
lp3943_pwm_probe() unconditionally registers a pwmchip with
LP3943_NUM_PWMS(2) hwpwm channels, but lp3943_pwm_parse_dt() only
populates pdata->pwms[i] for the channels whose ti,pwm0/ti,pwm1
property is actually present in the devicetree (the binding
explicitly allows each PWM generator to drive zero or more outputs,
and lp3943_pwm_parse_dt() only fails outright with -ENODATA if
*neither* property is present). A devicetree that configures only one
of the two channels leaves pdata->pwms[] NULL for the other.
lp3943_pwm_request_map() dereferences pdata->pwms[hwpwm] with no NULL
check:
pwm_map->output = pdata->pwms[hwpwm]->output;
pwm_map->num_outputs = pdata->pwms[hwpwm]->num_outputs;
so requesting the unconfigured channel (e.g. exporting it from
sysfs) crashes with a NULL pointer dereference instead of failing
cleanly.
Return -ENODEV from lp3943_pwm_request_map() when the channel was
never configured, before the pointer is dereferenced. The caller,
lp3943_pwm_request(), already propagates an ERR_PTR return correctly
(it does so today for the existing -EBUSY case).
Reported-by: Sashiko AI review <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/6a9d4c6b.79b5ea6e.147aa1.5883@mx.google.com?part=1
Signed-off-by: Manush Prajwal <manushprajwal555@gmail.com>
Link: https://patch.msgid.link/6a9d5187.d63de05c.175391.a17c@mx.google.com
Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver")
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pwm/pwm-lp3943.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pwm/pwm-lp3943.c b/drivers/pwm/pwm-lp3943.c
index 90b0733c00c1b..ad761daab4f44 100644
--- a/drivers/pwm/pwm-lp3943.c
+++ b/drivers/pwm/pwm-lp3943.c
@@ -38,6 +38,9 @@ lp3943_pwm_request_map(struct lp3943_pwm *lp3943_pwm, int hwpwm)
struct lp3943_pwm_map *pwm_map = &lp3943_pwm->pwm_map[hwpwm];
int i, offset;
+ if (!pdata->pwms[hwpwm])
+ return ERR_PTR(-ENODEV);
+
pwm_map->output = pdata->pwms[hwpwm]->output;
pwm_map->num_outputs = pdata->pwms[hwpwm]->num_outputs;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0285/2151] selftests/sched_ext: Handle CPU hotplug write failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (283 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0284/2151] pwm: lp3943: fix NULL pointer dereference for an unconfigured channel Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0286/2151] EDAC/i10nm: Fix Granite Rapids ADXL MC mapping Greg Kroah-Hartman
` (597 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Tianyi Chen, Tejun Heo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tianyi Chen <hi@tychen.cc>
[ Upstream commit 49c64ffb2fd996af4c82007196c61e17d74cb1ab ]
toggle_online_status() logs failed CPU state changes but discards the
write result. The hotplug tests can consequently wait indefinitely for
a scheduler exit that the failed operation never triggered.
Return the write result and stop both hotplug tests when a required
CPU state change fails. Release the acquired scheduler resources on
these paths and let the existing cleanup callback retry restoring
CPU1. Also fail the test when its normal CPU restoration fails.
Tested in a two-vCPU VM running a kernel built from the same source
as the selftests. Injecting EIO with strace into each of the ten CPU
state writes makes the fixed test return 1, with CPU1 online and
sched_ext disabled after cleanup. The original test does not finish
within three seconds when either of the first two writes fails.
Normal hotplug tests pass before and after the change. Making the
online file read-only also produces a failure without hanging.
Fixes: a5db7817af78 ("sched_ext: Add selftests")
Assisted-by: LLM
Signed-off-by: Tianyi Chen <hi@tychen.cc>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/sched_ext/hotplug.c | 34 ++++++++++++++-------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/tools/testing/selftests/sched_ext/hotplug.c b/tools/testing/selftests/sched_ext/hotplug.c
index 0cfbb111a2d09..10b8d42bd89be 100644
--- a/tools/testing/selftests/sched_ext/hotplug.c
+++ b/tools/testing/selftests/sched_ext/hotplug.c
@@ -21,15 +21,17 @@ static bool is_cpu_online(void)
return file_read_long(online_path) > 0;
}
-static void toggle_online_status(bool online)
+static int toggle_online_status(bool online)
{
long val = online ? 1 : 0;
int ret;
ret = file_write_long(online_path, val);
if (ret != 0)
- fprintf(stderr, "Failed to bring CPU %s (%s)",
+ fprintf(stderr, "Failed to bring CPU %s (%s)\n",
online ? "online" : "offline", strerror(errno));
+
+ return ret;
}
static enum scx_test_status setup(void **ctx)
@@ -44,6 +46,7 @@ static enum scx_test_status test_hotplug(bool onlining, bool cbs_defined)
{
struct hotplug *skel;
struct bpf_link *link;
+ enum scx_test_status status = SCX_TEST_FAIL;
long kind, code;
SCX_ASSERT(is_cpu_online());
@@ -54,8 +57,8 @@ static enum scx_test_status test_hotplug(bool onlining, bool cbs_defined)
SCX_FAIL_IF(hotplug__load(skel), "Failed to load skel");
/* Testing the offline -> online path, so go offline before starting */
- if (onlining)
- toggle_online_status(0);
+ if (onlining && toggle_online_status(0))
+ goto out_destroy_skel;
if (cbs_defined) {
kind = SCX_KIND_VAL(SCX_EXIT_UNREG_BPF);
@@ -79,7 +82,8 @@ static enum scx_test_status test_hotplug(bool onlining, bool cbs_defined)
return SCX_TEST_FAIL;
}
- toggle_online_status(onlining ? 1 : 0);
+ if (toggle_online_status(onlining ? 1 : 0))
+ goto out_destroy_link;
while (!UEI_EXITED(skel, uei))
sched_yield();
@@ -87,20 +91,23 @@ static enum scx_test_status test_hotplug(bool onlining, bool cbs_defined)
SCX_EQ(skel->data->uei.kind, kind);
SCX_EQ(UEI_REPORT(skel, uei), code);
- if (!onlining)
- toggle_online_status(1);
+ if (!onlining && toggle_online_status(1))
+ goto out_destroy_link;
+ status = SCX_TEST_PASS;
+out_destroy_link:
bpf_link__destroy(link);
+out_destroy_skel:
hotplug__destroy(skel);
- return SCX_TEST_PASS;
+ return status;
}
static enum scx_test_status test_hotplug_attach(void)
{
struct hotplug *skel;
struct bpf_link *link;
- enum scx_test_status status = SCX_TEST_PASS;
+ enum scx_test_status status = SCX_TEST_FAIL;
long kind, code;
SCX_ASSERT(is_cpu_online());
@@ -115,10 +122,12 @@ static enum scx_test_status test_hotplug_attach(void)
* Take the CPU offline to increment the global hotplug seq, which
* should cause attach to fail due to us setting the hotplug seq above
*/
- toggle_online_status(0);
+ if (toggle_online_status(0))
+ goto out_destroy_skel;
link = bpf_map__attach_struct_ops(skel->maps.hotplug_nocb_ops);
- toggle_online_status(1);
+ if (toggle_online_status(1))
+ goto out_destroy_link;
SCX_ASSERT(link);
while (!UEI_EXITED(skel, uei))
@@ -130,7 +139,10 @@ static enum scx_test_status test_hotplug_attach(void)
SCX_EQ(skel->data->uei.kind, kind);
SCX_EQ(UEI_REPORT(skel, uei), code);
+ status = SCX_TEST_PASS;
+out_destroy_link:
bpf_link__destroy(link);
+out_destroy_skel:
hotplug__destroy(skel);
return status;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0286/2151] EDAC/i10nm: Fix Granite Rapids ADXL MC mapping
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (284 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0285/2151] selftests/sched_ext: Handle CPU hotplug write failures Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0287/2151] perf bpf: Fix up build failure due to change of btf_vlen() return type Greg Kroah-Hartman
` (596 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yanhua Wu, Qiuxu Zhuo, Tony Luck,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
[ Upstream commit ba71d9b4e9dd83c1614b3b5cec6c82a39d290f7e ]
ADXL reports memory errors using memory-controller physical indices,
while the EDAC driver identifies memory controllers using logical
indices. On Granite Rapids systems, BIOS may disable some memory
controllers, causing the physical and logical indices to differ.
As a result, ADXL memory errors may be associated with the wrong memory
controller, preventing EDAC from reporting errors for some DIMMs.
Maintain a physical-to-logical MC mapping so that ADXL memory errors are
decoded correctly regardless of the BIOS memory-controller
configuration.
Fixes: ba987eaaabf9 ("EDAC/i10nm: Add Intel Granite Rapids server support")
Reported-by: Yanhua Wu <yanhua1.wu@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20260819025259.266201-1-qiuxu.zhuo@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/edac/i10nm_base.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/edac/i10nm_base.c b/drivers/edac/i10nm_base.c
index 59d359f3f3fb5..37d23a2bc764c 100644
--- a/drivers/edac/i10nm_base.c
+++ b/drivers/edac/i10nm_base.c
@@ -679,6 +679,7 @@ static struct pci_dev *get_gnr_mdev(struct skx_dev *d, int logical_idx, int *phy
if (mdev) {
if (logical == logical_idx) {
*physical_idx = i;
+ skx_set_mc_mapping(d, i, logical_idx);
return mdev;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0287/2151] perf bpf: Fix up build failure due to change of btf_vlen() return type
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (285 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0286/2151] EDAC/i10nm: Fix Granite Rapids ADXL MC mapping Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0288/2151] perf trace: Enhance BTF type formatting to symbolise kernel function pointers Greg Kroah-Hartman
` (595 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alan Maguire, Mark Brown,
Alexei Starovoitov, Linus Torvalds, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <broonie@kernel.org>
[ Upstream commit 3287a1881ca528b89b964d9fa6d28880d277d9e2 ]
Fix:
util/btf.c: In function '__btf_type__find_member_by_name':
util/btf.c:19:43: error: comparison of integer expressions of different signedness: 'int' and '__u32' {aka 'unsigned int'} [-Werror=sign-compare]
19 | for (i = 0, m = btf_members(t); i < btf_vlen(t); i++, m++) {
| ^
builtin-trace.c: In function 'syscall_arg__strtoul_btf_enum':
builtin-trace.c:967:27: error: comparison of integer expressions of different signedness: 'int' and '__u32' {aka 'unsigned int'} [-Werror=sign-compare]
967 | for (int i = 0; i < btf_vlen(bt); ++i, ++be) {
| ^
by making the variable the same type as the function.
Committer note:
Add an extra hunk from Alan Maguire, fixing btf_enum_scnprintf().
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: 024b219744a9 ("perf trace: Add upper bound checks for augmented BTF struct printing")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-trace.c | 6 +++---
tools/perf/util/btf.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 046db6fcd7f7f..19ff67424c5d5 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -970,7 +970,7 @@ static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_
struct btf *btf = arg->trace->btf;
struct btf_enum *be = btf_enum(bt);
- for (int i = 0; i < btf_vlen(bt); ++i, ++be) {
+ for (u32 i = 0; i < btf_vlen(bt); ++i, ++be) {
const char *name = btf__name_by_offset(btf, be->name_off);
int max_len = max(size, strlen(name));
@@ -1015,9 +1015,9 @@ static bool syscall_arg__strtoul_btf_type(char *bf, size_t size, struct syscall_
static size_t btf_enum_scnprintf(const struct btf_type *type, struct btf *btf, char *bf, size_t size, int val)
{
struct btf_enum *be = btf_enum(type);
- const int nr_entries = btf_vlen(type);
+ const unsigned int nr_entries = btf_vlen(type);
- for (int i = 0; i < nr_entries; ++i, ++be) {
+ for (unsigned int i = 0; i < nr_entries; ++i, ++be) {
if (be->val == val) {
return scnprintf(bf, size, "%s",
btf__name_by_offset(btf, be->name_off));
diff --git a/tools/perf/util/btf.c b/tools/perf/util/btf.c
index bb163fe87767c..50d98f3e83bf0 100644
--- a/tools/perf/util/btf.c
+++ b/tools/perf/util/btf.c
@@ -14,7 +14,7 @@ const struct btf_member *__btf_type__find_member_by_name(struct btf *btf,
{
const struct btf_type *t = btf__type_by_id(btf, type_id);
const struct btf_member *m;
- int i;
+ u32 i;
for (i = 0, m = btf_members(t); i < btf_vlen(t); i++, m++) {
const char *current_member_name = btf__name_by_offset(btf, m->name_off);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0288/2151] perf trace: Enhance BTF type formatting to symbolise kernel function pointers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (286 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0287/2151] perf bpf: Fix up build failure due to change of btf_vlen() return type Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0289/2151] perf trace: Add upper bound checks for augmented BTF struct printing Greg Kroah-Hartman
` (594 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aaron Tomlin, Ian Rogers,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Tomlin <atomlin@atomlin.com>
[ Upstream commit c6dd6161815d0c10ed24ad13fdad847bec63d961 ]
When BTF (BPF Type Format) metadata is loaded from vmlinux, 'perf trace'
can inspect the precise C types of tracepoint and system call parameters.
However, function pointer arguments are currently not recognised during
BTF pretty-printing and default to hexadecimal output.
Introduce btf_is_func_ptr() to inspect BTF type hierarchies
(i.e., traversing pointers, typedefs, and type modifiers) to determine
whether a parameter resolves to a function prototype
(BTF_KIND_FUNC_PROTO).
Generalise BTF type caching via syscall_arg_fmt__cache_btf_type() to
handle structs, unions, enums, and function pointers alike. When a field
is identified as a kernel function pointer, trace__btf_scnprintf()
routes its value to syscall_arg__scnprintf_ksym(), enabling automatic
zero-config symbolisation of kernel function pointers whenever BTF is
available.
Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Tested-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: 024b219744a9 ("perf trace: Add upper bound checks for augmented BTF struct printing")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-trace.c | 106 +++++++++++++++++++++++++++++--------
1 file changed, 85 insertions(+), 21 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 19ff67424c5d5..b0e14dfaae1ba 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -122,6 +122,7 @@ struct syscall_arg_fmt {
#ifdef HAVE_LIBBPF_SUPPORT
const struct btf_type *type;
int type_id; /* used in btf_dump */
+ bool btf_type_cached;
#endif
};
@@ -947,21 +948,68 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
#define SCA_GETRANDOM_FLAGS syscall_arg__scnprintf_getrandom_flags
#ifdef HAVE_LIBBPF_SUPPORT
-static void syscall_arg_fmt__cache_btf_enum(struct syscall_arg_fmt *arg_fmt, struct btf *btf, char *type)
+static bool btf_is_func_ptr(const struct btf *btf, const struct btf_type *type)
{
+ int nr_ptrs = 0;
+
+ while (type) {
+ if (btf_is_ptr(type)) {
+ if (++nr_ptrs > 1)
+ return false;
+ type = btf__type_by_id(btf, type->type);
+ } else if (btf_is_typedef(type) || btf_is_mod(type)) {
+ type = btf__type_by_id(btf, type->type);
+ } else {
+ break;
+ }
+ }
+ return nr_ptrs == 1 && type && btf_is_func_proto(type);
+}
+
+static void syscall_arg_fmt__cache_btf_type(struct syscall_arg_fmt *arg_fmt,
+ struct btf *btf, const char *type)
+{
+ char name[128];
+ const char *pos;
+ size_t len = 0;
int id;
- type = strstr(type, "enum ");
+ arg_fmt->btf_type_cached = true;
+
if (type == NULL)
return;
- type += 5; // skip "enum " to get the enumeration name
+ /* Pointers to enums are memory addresses, not scalar enums */
+ if (strstr(type, "enum ") && strchr(type, '*'))
+ return;
+
+ if ((pos = strstr(type, "enum ")) != NULL)
+ pos += 5;
+ else if ((pos = strstr(type, "struct ")) != NULL)
+ pos += 7;
+ else if ((pos = strstr(type, "union ")) != NULL)
+ pos += 6;
+ else
+ pos = type;
+
+ while (isspace(*pos))
+ pos++;
+
+ while ((isalnum(pos[len]) || pos[len] == '_') && len < sizeof(name) - 1) {
+ name[len] = pos[len];
+ len++;
+ }
+ name[len] = '\0';
+
+ if (len == 0)
+ return;
- id = btf__find_by_name(btf, type);
+ id = btf__find_by_name(btf, name);
if (id < 0)
return;
arg_fmt->type = btf__type_by_id(btf, id);
+ arg_fmt->type_id = id;
}
static bool syscall_arg__strtoul_btf_enum(char *bf, size_t size, struct syscall_arg *arg, u64 *val)
@@ -995,10 +1043,8 @@ static bool syscall_arg__strtoul_btf_type(char *bf, size_t size, struct syscall_
if (btf == NULL)
return false;
- if (arg->fmt->type == NULL) {
- // See if this is an enum
- syscall_arg_fmt__cache_btf_enum(arg->fmt, btf, type);
- }
+ if (!arg->fmt->btf_type_cached)
+ syscall_arg_fmt__cache_btf_type(arg->fmt, btf, type);
// Now let's see if we have a BTF type resolved
bt = arg->fmt->type;
@@ -1006,19 +1052,22 @@ static bool syscall_arg__strtoul_btf_type(char *bf, size_t size, struct syscall_
return false;
// If it is an enum:
- if (btf_is_enum(arg->fmt->type))
+ if (btf_is_enum(arg->fmt->type)) {
+ if (type && strchr(type, '*'))
+ return false;
return syscall_arg__strtoul_btf_enum(bf, size, arg, val);
+ }
return false;
}
-static size_t btf_enum_scnprintf(const struct btf_type *type, struct btf *btf, char *bf, size_t size, int val)
+static size_t btf_enum_scnprintf(const struct btf_type *type, struct btf *btf, char *bf, size_t size, unsigned long val)
{
struct btf_enum *be = btf_enum(type);
const unsigned int nr_entries = btf_vlen(type);
for (unsigned int i = 0; i < nr_entries; ++i, ++be) {
- if (be->val == val) {
+ if ((unsigned long)(__u32)be->val == val || (unsigned long)be->val == val) {
return scnprintf(bf, size, "%s",
btf__name_by_offset(btf, be->name_off));
}
@@ -1045,14 +1094,19 @@ static size_t btf_struct_scnprintf(const struct btf_type *type, struct btf *btf,
.bf = bf,
.size = size,
};
- struct augmented_arg *augmented_arg = arg->augmented.args;
+ struct augmented_arg *augmented_arg;
int type_id = arg->fmt->type_id, consumed;
struct btf_dump *btf_dump;
LIBBPF_OPTS(btf_dump_opts, dump_opts);
LIBBPF_OPTS(btf_dump_type_data_opts, dump_data_opts);
- if (arg == NULL || arg->augmented.args == NULL)
+ if (arg == NULL || arg->augmented.args == NULL || arg->augmented.size <= 0 ||
+ arg->fmt == NULL || !arg->fmt->from_user)
+ return 0;
+
+ augmented_arg = arg->augmented.args;
+ if (augmented_arg->size <= 0)
return 0;
dump_data_opts.compact = true;
@@ -1063,8 +1117,10 @@ static size_t btf_struct_scnprintf(const struct btf_type *type, struct btf *btf,
return 0;
/* pretty print the struct data here */
- if (btf_dump__dump_type_data(btf_dump, type_id, arg->augmented.args->value, type->size, &dump_data_opts) <= 0)
+ if (btf_dump__dump_type_data(btf_dump, type_id, arg->augmented.args->value, type->size, &dump_data_opts) <= 0) {
+ btf_dump__free(btf_dump);
return 0;
+ }
consumed = sizeof(*augmented_arg) + augmented_arg->size;
arg->augmented.args = ((void *)arg->augmented.args) + consumed;
@@ -1076,33 +1132,40 @@ static size_t btf_struct_scnprintf(const struct btf_type *type, struct btf *btf,
}
static size_t trace__btf_scnprintf(struct trace *trace, struct syscall_arg *arg, char *bf,
- size_t size, int val, char *type)
+ size_t size, unsigned long val, char *type)
{
struct syscall_arg_fmt *arg_fmt = arg->fmt;
if (trace->btf == NULL)
return 0;
- if (arg_fmt->type == NULL) {
- // Check if this is an enum and if we have the BTF type for it.
- syscall_arg_fmt__cache_btf_enum(arg_fmt, trace->btf, type);
- }
+ if (!arg_fmt->btf_type_cached)
+ syscall_arg_fmt__cache_btf_type(arg_fmt, trace->btf, type);
// Did we manage to find a BTF type for the syscall/tracepoint argument?
if (arg_fmt->type == NULL)
return 0;
+ if (type && strchr(type, '*')) {
+ if (btf_is_enum(arg_fmt->type) || btf_is_func_ptr(trace->btf, arg_fmt->type))
+ return 0;
+ }
+
if (btf_is_enum(arg_fmt->type))
return btf_enum_scnprintf(arg_fmt->type, trace->btf, bf, size, val);
else if (btf_is_struct(arg_fmt->type) || btf_is_union(arg_fmt->type))
return btf_struct_scnprintf(arg_fmt->type, trace->btf, bf, size, arg);
+ else if (btf_is_func_ptr(trace->btf, arg_fmt->type)) {
+ arg->val = val;
+ return syscall_arg__scnprintf_ksym(bf, size, arg);
+ }
return 0;
}
#else // HAVE_LIBBPF_SUPPORT
static size_t trace__btf_scnprintf(struct trace *trace __maybe_unused, struct syscall_arg *arg __maybe_unused,
- char *bf __maybe_unused, size_t size __maybe_unused, int val __maybe_unused,
+ char *bf __maybe_unused, size_t size __maybe_unused, unsigned long val __maybe_unused,
char *type __maybe_unused)
{
return 0;
@@ -2445,7 +2508,8 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
default_scnprintf = sc->arg_fmt[arg.idx].scnprintf;
- if (trace->force_btf || default_scnprintf == NULL || default_scnprintf == SCA_PTR) {
+ if (trace->force_btf || default_scnprintf == NULL ||
+ default_scnprintf == SCA_PTR || default_scnprintf == SCA_KSYM) {
btf_printed = trace__btf_scnprintf(trace, &arg, bf + printed,
size - printed, val, field->type);
if (btf_printed) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0289/2151] perf trace: Add upper bound checks for augmented BTF struct printing
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (287 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0288/2151] perf trace: Enhance BTF type formatting to symbolise kernel function pointers Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0290/2151] libbpf: Fix array comparison in BTF dedup Greg Kroah-Hartman
` (593 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Aaron Tomlin,
Howard Chu, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Tomlin <atomlin@atomlin.com>
[ Upstream commit 024b219744a949419b3c9e8aa23031c04428d9d6 ]
When pretty-printing augmented struct payloads using BTF via
btf_struct_scnprintf(), augmented_arg->size is currently only validated
against values <= 0.
However, several edge cases can result in size mismatches or buffer
over-reads:
1. If arg->augmented.size is smaller than sizeof(*augmented_arg),
dereferencing augmented_arg->size reads past the available
buffer.
2. If augmented_arg->size exceeds arg->augmented.size -
sizeof(*augmented_arg), calculating consumed =
sizeof(*augmented_arg) + augmented_arg->size can overflow signed
integer limits (e.g., with crafted INT_MAX values in an
untrusted perf.data file) or cause arg->augmented.size to
underflow. This advances arg->augmented.args out of bounds,
corrupting the parsing state for subsequent arguments in
multi-argument syscalls.
3. If the captured payload is truncated (e.g., short reads in BPF,
or during cross-architecture analysis such as replaying a 32-bit
perf.data on a 64-bit host where host BTF type->size exceeds the
32-bit target payload), passing type->size to
btf_dump__dump_type_data() causes libbpf to read past the end of
the payload buffer.
Enforce an upper bound on augmented_arg->size against the remaining
buffer (arg->augmented.size - sizeof(*augmented_arg)) and verify that the
captured payload contains at least type->size bytes before passing it to
btf_dump__dump_type_data().
Fixes: cb32035214b9a09d ("perf trace: Pretty print struct data")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
Cc: Howard Chu <howardchu95@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-trace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index b0e14dfaae1ba..da8fce7801ba5 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1101,12 +1101,13 @@ static size_t btf_struct_scnprintf(const struct btf_type *type, struct btf *btf,
LIBBPF_OPTS(btf_dump_opts, dump_opts);
LIBBPF_OPTS(btf_dump_type_data_opts, dump_data_opts);
- if (arg == NULL || arg->augmented.args == NULL || arg->augmented.size <= 0 ||
+ if (arg == NULL || arg->augmented.args == NULL || arg->augmented.size < (int)sizeof(*augmented_arg) ||
arg->fmt == NULL || !arg->fmt->from_user)
return 0;
augmented_arg = arg->augmented.args;
- if (augmented_arg->size <= 0)
+ if (augmented_arg->size <= 0 || augmented_arg->size > arg->augmented.size - (int)sizeof(*augmented_arg) ||
+ (size_t)augmented_arg->size < type->size)
return 0;
dump_data_opts.compact = true;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0290/2151] libbpf: Fix array comparison in BTF dedup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (288 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0289/2151] perf trace: Add upper bound checks for augmented BTF struct printing Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0291/2151] mtd: spinand: Fix spinand_manufacturer_ops kernel-doc Greg Kroah-Hartman
` (592 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mingpei CAO, Andrii Nakryiko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingpei CAO <caomingpei@gmail.com>
[ Upstream commit e62c5b97d6c4c657d6fad7dd3523fda33a936979 ]
btf_dedup_identical_types() reads both array descriptors from t1,
skipping comparisons of their referenced types. This can incorrectly
merge distinct structs and corrupt CO-RE relocation metadata.
Read the second descriptor from t2.
Fixes: 62e23f183839 ("libbpf: Improve BTF dedup handling of "identical" BTF types")
Closes: https://lore.kernel.org/bpf/CABzjXVz3iBuump-pXFkefZ5v+2uu4fG61zqRyWD4xmz3PuBycw@mail.gmail.com/
Signed-off-by: Mingpei CAO <caomingpei@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260908164920.108074-2-caomingpei@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/bpf/btf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index f1ee53a07f17b..7f3b23aeaaba7 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -4455,7 +4455,7 @@ static bool btf_dedup_identical_types(struct btf_dedup *d, __u32 id1, __u32 id2,
return false;
a1 = btf_array(t1);
- a2 = btf_array(t1);
+ a2 = btf_array(t2);
if (a1->index_type != a2->index_type &&
!btf_dedup_identical_types(d, a1->index_type, a2->index_type, depth - 1))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0291/2151] mtd: spinand: Fix spinand_manufacturer_ops kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (289 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0290/2151] libbpf: Fix array comparison in BTF dedup Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0292/2151] ASoC: codecs: sma1307: validate setting firmware layout Greg Kroah-Hartman
` (591 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Miquel Raynal,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 7e874b1750a40f3dc9a629aeb72eba09c77f77e9 ]
The kernel-doc heading for struct spinand_manufacturer_ops misspells
and truncates its name as manufacurer_ops. As a result, kernel-doc cannot
match the comment to the structure declaration.
Use the structure's actual name.
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/mtd/spinand.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index 07e4d87019c64..3f2229be0743b 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -328,7 +328,7 @@ struct spinand_devid {
};
/**
- * struct manufacurer_ops - SPI NAND manufacturer specific operations
+ * struct spinand_manufacturer_ops - SPI NAND manufacturer specific operations
* @init: initialize a SPI NAND device
* @cleanup: cleanup a SPI NAND device
*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0292/2151] ASoC: codecs: sma1307: validate setting firmware layout
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (290 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0291/2151] mtd: spinand: Fix spinand_manufacturer_ops kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0293/2151] ASoC: codecs: sta32x: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
` (590 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit af0f4f7a042e39bf70fa7406351b26efead18dff ]
sma1307_setting_loaded() checks a byte count against an element count, then
reads an eight-int header and a fixed default table from the firmware. It
also trusts the mode count while indexing a five-entry mode_set array.
Validate the byte-to-int conversion, fixed header/default extent, mode
count, and exact mode table layout before parsing the setting file.
Fixes: 576c57e6b4c1 ("ASoC: sma1307: Add driver for Iron Device SMA1307")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260830134428.9550-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/sma1307.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sma1307.c b/sound/soc/codecs/sma1307.c
index c6b6cbadf202b..1bc7c6915ec9a 100644
--- a/sound/soc/codecs/sma1307.c
+++ b/sound/soc/codecs/sma1307.c
@@ -1721,7 +1721,9 @@ static void sma1307_setting_loaded(struct sma1307_priv *sma1307, const char *fil
__func__, setting_file, ERR_PTR(ret));
sma1307->set.status = false;
return;
- } else if ((fw->size) < SMA1307_SETTING_HEADER_SIZE) {
+ } else if (fw->size % sizeof(int) ||
+ fw->size < (SMA1307_SETTING_HEADER_SIZE +
+ SMA1307_SETTING_DEFAULT_SIZE) * sizeof(int)) {
dev_err(sma1307->dev, "%s: Invalid file\n", __func__);
release_firmware(fw);
sma1307->set.status = false;
@@ -1744,6 +1746,10 @@ static void sma1307_setting_loaded(struct sma1307_priv *sma1307, const char *fil
sma1307->set.checksum = data[sma1307->set.header_size - 2];
sma1307->set.num_mode = data[sma1307->set.header_size - 1];
num_mode = sma1307->set.num_mode;
+ if (num_mode < 0 || num_mode > ARRAY_SIZE(sma1307->set.mode_set)) {
+ sma1307->set.status = false;
+ return;
+ }
sma1307->set.header = devm_kmalloc_array(sma1307->dev,
sma1307->set.header_size,
sizeof(int),
@@ -1779,7 +1785,11 @@ static void sma1307_setting_loaded(struct sma1307_priv *sma1307, const char *fil
/* MODE */
offset = sma1307->set.header_size + sma1307->set.def_size;
- sma1307->set.mode_size = DIV_ROUND_CLOSEST(size - offset, num_mode + 1);
+ if ((size - offset) % (num_mode + 1)) {
+ sma1307->set.status = false;
+ return;
+ }
+ sma1307->set.mode_size = (size - offset) / (num_mode + 1);
for (int i = 0; i < num_mode; i++) {
sma1307->set.mode_set[i]
= devm_kzalloc(sma1307->dev,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0293/2151] ASoC: codecs: sta32x: convert to snd_soc_dapm_xxx()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (291 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0292/2151] ASoC: codecs: sma1307: validate setting firmware layout Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0294/2151] ASoC: sta32x: make power restoration transactional Greg Kroah-Hartman
` (589 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kuninori Morimoto, Charles Keepax,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit 8454435315e5a6e2f8e531b5ec038c6db4d6ebfe ]
This patch converts below functions.
dapm->dev -> snd_soc_dapm_to_dev()
dapm->card -> snd_soc_dapm_to_card()
dapm->component -> snd_soc_dapm_to_component()
dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value()
snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()
snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87zf8t1kjp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 3e71dc4508bc ("ASoC: sta32x: make power restoration transactional")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/sta32x.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 24d4b643917da..bba45c813d4cb 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -799,6 +799,7 @@ static int sta32x_set_bias_level(struct snd_soc_component *component,
{
int ret;
struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
dev_dbg(component->dev, "level = %d\n", level);
switch (level) {
@@ -813,7 +814,7 @@ static int sta32x_set_bias_level(struct snd_soc_component *component,
break;
case SND_SOC_BIAS_STANDBY:
- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) {
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) {
ret = regulator_bulk_enable(ARRAY_SIZE(sta32x->supplies),
sta32x->supplies);
if (ret != 0) {
@@ -870,6 +871,7 @@ static struct snd_soc_dai_driver sta32x_dai = {
static int sta32x_probe(struct snd_soc_component *component)
{
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component);
struct sta32x_platform_data *pdata = sta32x->pdata;
int i, ret = 0, thermal = 0;
@@ -974,7 +976,7 @@ static int sta32x_probe(struct snd_soc_component *component)
if (sta32x->pdata->needs_esd_watchdog)
INIT_DELAYED_WORK(&sta32x->watchdog_work, sta32x_watchdog);
- snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY);
+ snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY);
/* Bias level configuration will have done an extra enable */
regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0294/2151] ASoC: sta32x: make power restoration transactional
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (292 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0293/2151] ASoC: codecs: sta32x: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0295/2151] spi: amlogic-spisg: check clk_prepare_enable() return value Greg Kroah-Hartman
` (588 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 3e71dc4508bc84862dc3644e3b6a5b966bff22ad ]
sta32x_set_bias_level() enables the codec supplies, restores the
coefficient and register state, and then starts the watchdog. Register
access errors in the mute and coefficient helpers and the cache replay
are discarded, allowing DAPM to publish STANDBY for a partially restored
codec.
Propagate every operation in the local restore transaction, including
the final standby-state write. Start the watchdog only after that write
succeeds. On failure, hold reset, mark the cache dirty, disable the
supplies and report a cleanup failure while preserving the primary
error. The DAPM bias callback consumes the returned error independently
of component resume handling.
Fixes: 54dc6cabe684 ("ASoC: sta32x: preserve coefficient RAM")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260830141521.33246-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/sta32x.c | 101 +++++++++++++++++++++++++++++---------
1 file changed, 77 insertions(+), 24 deletions(-)
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index bba45c813d4cb..32c818ed587aa 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -345,27 +345,48 @@ static int sta32x_sync_coef_shadow(struct snd_soc_component *component)
{
struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component);
unsigned int cfud;
- int i;
+ int i, ret;
/* preserve reserved bits in STA32X_CFUD */
- regmap_read(sta32x->regmap, STA32X_CFUD, &cfud);
+ ret = regmap_read(sta32x->regmap, STA32X_CFUD, &cfud);
+ if (ret)
+ return ret;
+
cfud &= 0xf0;
for (i = 0; i < STA32X_COEF_COUNT; i++) {
- regmap_write(sta32x->regmap, STA32X_CFADDR2, i);
- regmap_write(sta32x->regmap, STA32X_B1CF1,
- (sta32x->coef_shadow[i] >> 16) & 0xff);
- regmap_write(sta32x->regmap, STA32X_B1CF2,
- (sta32x->coef_shadow[i] >> 8) & 0xff);
- regmap_write(sta32x->regmap, STA32X_B1CF3,
- (sta32x->coef_shadow[i]) & 0xff);
+ ret = regmap_write(sta32x->regmap, STA32X_CFADDR2, i);
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sta32x->regmap, STA32X_B1CF1,
+ (sta32x->coef_shadow[i] >> 16) & 0xff);
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sta32x->regmap, STA32X_B1CF2,
+ (sta32x->coef_shadow[i] >> 8) & 0xff);
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sta32x->regmap, STA32X_B1CF3,
+ sta32x->coef_shadow[i] & 0xff);
+ if (ret)
+ return ret;
+
/*
* chip documentation does not say if the bits are
* self-clearing, so do it explicitly
*/
- regmap_write(sta32x->regmap, STA32X_CFUD, cfud);
- regmap_write(sta32x->regmap, STA32X_CFUD, cfud | 0x01);
+ ret = regmap_write(sta32x->regmap, STA32X_CFUD, cfud);
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sta32x->regmap, STA32X_CFUD, cfud | 0x01);
+ if (ret)
+ return ret;
}
+
return 0;
}
@@ -373,15 +394,24 @@ static int sta32x_cache_sync(struct snd_soc_component *component)
{
struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component);
unsigned int mute;
- int rc;
+ int restore_ret, ret;
/* mute during register sync */
- regmap_read(sta32x->regmap, STA32X_MMUTE, &mute);
- regmap_write(sta32x->regmap, STA32X_MMUTE, mute | STA32X_MMUTE_MMUTE);
- sta32x_sync_coef_shadow(component);
- rc = regcache_sync(sta32x->regmap);
- regmap_write(sta32x->regmap, STA32X_MMUTE, mute);
- return rc;
+ ret = regmap_read(sta32x->regmap, STA32X_MMUTE, &mute);
+ if (ret)
+ return ret;
+
+ ret = regmap_write(sta32x->regmap, STA32X_MMUTE,
+ mute | STA32X_MMUTE_MMUTE);
+ if (ret)
+ return ret;
+
+ ret = sta32x_sync_coef_shadow(component);
+ if (!ret)
+ ret = regcache_sync(sta32x->regmap);
+
+ restore_ret = regmap_write(sta32x->regmap, STA32X_MMUTE, mute);
+ return ret ?: restore_ret;
}
/* work around ESD issue where sta32x resets and loses all configuration */
@@ -797,9 +827,9 @@ static int sta32x_startup_sequence(struct sta32x_priv *sta32x)
static int sta32x_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{
- int ret;
struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
+ int cleanup_ret, ret;
dev_dbg(component->dev, "level = %d\n", level);
switch (level) {
@@ -823,15 +853,28 @@ static int sta32x_set_bias_level(struct snd_soc_component *component,
return ret;
}
- sta32x_startup_sequence(sta32x);
- sta32x_cache_sync(component);
+ ret = sta32x_startup_sequence(sta32x);
+ if (!ret)
+ ret = sta32x_cache_sync(component);
+ if (ret)
+ goto restore_failed;
+
+ ret = regmap_update_bits(sta32x->regmap, STA32X_CONFF,
+ STA32X_CONFF_PWDN | STA32X_CONFF_EAPD,
+ 0);
+ if (ret)
+ goto restore_failed;
+
sta32x_watchdog_start(sta32x);
+ break;
}
/* Power down */
- regmap_update_bits(sta32x->regmap, STA32X_CONFF,
- STA32X_CONFF_PWDN | STA32X_CONFF_EAPD,
- 0);
+ ret = regmap_update_bits(sta32x->regmap, STA32X_CONFF,
+ STA32X_CONFF_PWDN | STA32X_CONFF_EAPD,
+ 0);
+ if (ret)
+ return ret;
break;
@@ -849,6 +892,16 @@ static int sta32x_set_bias_level(struct snd_soc_component *component,
break;
}
return 0;
+
+restore_failed:
+ gpiod_set_value(sta32x->gpiod_nreset, 0);
+ regcache_mark_dirty(sta32x->regmap);
+ cleanup_ret = regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies),
+ sta32x->supplies);
+ if (cleanup_ret)
+ dev_warn(component->dev, "Failed to disable supplies: %d\n",
+ cleanup_ret);
+ return ret;
}
static const struct snd_soc_dai_ops sta32x_dai_ops = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0295/2151] spi: amlogic-spisg: check clk_prepare_enable() return value
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (293 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0294/2151] ASoC: sta32x: make power restoration transactional Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0296/2151] dmaengine: sun6i-dma: Fix use-after-free in error handling paths Greg Kroah-Hartman
` (587 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Li Youhong, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Youhong <liyouhong@kylinos.cn>
[ Upstream commit c595dcbce20f55c98cd9b0003c26db3787e0ddee ]
The driver ignored clk_prepare_enable() failures for sclk during
probe and for core/sclk during runtime resume. Propagate the errors
and, on resume, disable core if enabling sclk fails, so probe/resume
do not continue with clocks disabled or report success falsely.
Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
Signed-off-by: Li Youhong <liyouhong@kylinos.cn>
Link: https://patch.msgid.link/20260831094553.2247003-1-dayou5941@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-amlogic-spisg.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c
index adeeaa3d058f1..e5f18308daf26 100644
--- a/drivers/spi/spi-amlogic-spisg.c
+++ b/drivers/spi/spi-amlogic-spisg.c
@@ -718,7 +718,9 @@ static int aml_spisg_clk_init(struct spisg_device *spisg, void __iomem *base)
return PTR_ERR(spisg->sclk);
}
- clk_prepare_enable(spisg->sclk);
+ ret = clk_prepare_enable(spisg->sclk);
+ if (ret)
+ return ret;
return 0;
}
@@ -856,9 +858,18 @@ static int spisg_suspend_runtime(struct device *dev)
static int spisg_resume_runtime(struct device *dev)
{
struct spisg_device *spisg = dev_get_drvdata(dev);
+ int ret;
+
+ ret = clk_prepare_enable(spisg->core);
+ if (ret)
+ return ret;
+
+ ret = clk_prepare_enable(spisg->sclk);
+ if (ret) {
+ clk_disable_unprepare(spisg->core);
+ return ret;
+ }
- clk_prepare_enable(spisg->core);
- clk_prepare_enable(spisg->sclk);
pinctrl_pm_select_default_state(&spisg->pdev->dev);
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0296/2151] dmaengine: sun6i-dma: Fix use-after-free in error handling paths
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (294 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0295/2151] spi: amlogic-spisg: check clk_prepare_enable() return value Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0297/2151] dmaengine: at_hdmac: Fix use-after-free by proper tasklet cleanup Greg Kroah-Hartman
` (586 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hongling Zeng, Jernej Skrabec,
Frank Li, Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hongling Zeng <zenghongling@kylinos.cn>
[ Upstream commit f472919f4c0650d7fb22bb230eacaada0c6ee951 ]
In error handling paths, the for loop frees v_lli in the loop body,
then accesses v_lli->v_lli_next and v_lli->p_lli_next in the
increment expression, which is use-after-free.
Fix by refactoring the cleanup into a helper function sun6i_dma_free_desc()
that saves both the next virtual and physical pointers before freeing the
current node, preventing the use-after-free.
Fixes: 555859308723 ("dmaengine: sun6i: Add driver for the Allwinner A31 DMA controller")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Suggested-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260727061142.44195-1-zenghongling@kylinos.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/sun6i-dma.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index 69f4d27247a7c..a9a4d7df248f1 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -408,16 +408,12 @@ static inline void sun6i_dma_dump_lli(struct sun6i_vchan *vchan,
v_lli->len, v_lli->para, v_lli->p_lli_next);
}
-static void sun6i_dma_free_desc(struct virt_dma_desc *vd)
+static void sun6i_dma_free_desc(struct sun6i_dma_dev *sdev,
+ struct sun6i_desc *txd)
{
- struct sun6i_desc *txd = to_sun6i_desc(&vd->tx);
- struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(vd->tx.chan->device);
struct sun6i_dma_lli *v_lli, *v_next;
dma_addr_t p_lli, p_next;
- if (unlikely(!txd))
- return;
-
p_lli = txd->p_lli;
v_lli = txd->v_lli;
@@ -434,6 +430,17 @@ static void sun6i_dma_free_desc(struct virt_dma_desc *vd)
kfree(txd);
}
+static void sun6i_dma_free_desc_virt(struct virt_dma_desc *vd)
+{
+ struct sun6i_desc *txd = to_sun6i_desc(&vd->tx);
+ struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(vd->tx.chan->device);
+
+ if (unlikely(!txd))
+ return;
+
+ sun6i_dma_free_desc(sdev, txd);
+}
+
static int sun6i_dma_start_desc(struct sun6i_vchan *vchan)
{
struct sun6i_dma_dev *sdev = to_sun6i_dma_dev(vchan->vc.chan.device);
@@ -790,10 +797,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_slave_sg(
return vchan_tx_prep(&vchan->vc, &txd->vd, flags);
err_lli_free:
- for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli;
- p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next)
- dma_pool_free(sdev->pool, v_lli, p_lli);
- kfree(txd);
+ sun6i_dma_free_desc(sdev, txd);
return NULL;
}
@@ -861,10 +865,7 @@ static struct dma_async_tx_descriptor *sun6i_dma_prep_dma_cyclic(
return vchan_tx_prep(&vchan->vc, &txd->vd, flags);
err_lli_free:
- for (p_lli = txd->p_lli, v_lli = txd->v_lli; v_lli;
- p_lli = v_lli->p_lli_next, v_lli = v_lli->v_lli_next)
- dma_pool_free(sdev->pool, v_lli, p_lli);
- kfree(txd);
+ sun6i_dma_free_desc(sdev, txd);
return NULL;
}
@@ -1419,7 +1420,7 @@ static int sun6i_dma_probe(struct platform_device *pdev)
struct sun6i_vchan *vchan = &sdc->vchans[i];
INIT_LIST_HEAD(&vchan->node);
- vchan->vc.desc_free = sun6i_dma_free_desc;
+ vchan->vc.desc_free = sun6i_dma_free_desc_virt;
vchan_init(&vchan->vc, &sdc->slave);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0297/2151] dmaengine: at_hdmac: Fix use-after-free by proper tasklet cleanup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (295 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0296/2151] dmaengine: sun6i-dma: Fix use-after-free in error handling paths Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0298/2151] dmaengine: mediatek: hsdma: fix runtime PM leak on init failure Greg Kroah-Hartman
` (585 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Hongling Zeng, Frank Li,
Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hongling Zeng <zenghongling@kylinos.cn>
[ Upstream commit 13f2d32a09609d083ace2d589fbdc68e970ae34c ]
Current cleanup paths have a use-after-free vulnerability:
- vchan_init() creates tasklets that access at_dma_chan memory
- free_irq() only waits for IRQ handler, NOT tasklets
- atdma is devm-managed and freed after probe/remove
- Running tasklets accessing freed memory → Use-After-Free!
The fix requires careful ordering:
- free_irq() FIRST to synchronize with running IRQ handlers and prevent
them from scheduling new tasklets
- Then kill tasklets to wait for already-scheduled ones to complete
- Only then free other resources
Fixes: ac803b56860f ("dmaengine: at_hdmac: Convert driver to use virt-dma")
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/all/20260604073945.54B311F00898@smtp.kernel.org/
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Suggested-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260727061705.45169-1-zenghongling@kylinos.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/at_hdmac.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index dffe5becd6c3c..b2715e9427b79 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1940,6 +1940,20 @@ static void at_dma_off(struct at_dma *atdma)
cpu_relax();
}
+static void at_dma_cleanup_channels(struct at_dma *atdma)
+{
+ struct dma_chan *chan, *_chan;
+ int i = 0;
+
+ list_for_each_entry_safe(chan, _chan, &atdma->dma_device.channels,
+ device_node) {
+ /* Disable interrupts */
+ atc_disable_chan_irq(atdma, i++);
+ tasklet_kill(&to_at_dma_chan(chan)->vc.task);
+ list_del(&chan->device_node);
+ }
+}
+
static int __init at_dma_probe(struct platform_device *pdev)
{
struct at_dma *atdma;
@@ -2105,6 +2119,8 @@ static int __init at_dma_probe(struct platform_device *pdev)
err_of_dma_controller_register:
dma_async_device_unregister(&atdma->dma_device);
err_dma_async_device_register:
+ disable_irq(platform_get_irq(pdev, 0));
+ at_dma_cleanup_channels(atdma);
dma_pool_destroy(atdma->memset_pool);
err_memset_pool_create:
dma_pool_destroy(atdma->lli_pool);
@@ -2118,23 +2134,17 @@ static int __init at_dma_probe(struct platform_device *pdev)
static void at_dma_remove(struct platform_device *pdev)
{
struct at_dma *atdma = platform_get_drvdata(pdev);
- struct dma_chan *chan, *_chan;
at_dma_off(atdma);
if (pdev->dev.of_node)
of_dma_controller_free(pdev->dev.of_node);
dma_async_device_unregister(&atdma->dma_device);
- dma_pool_destroy(atdma->memset_pool);
- dma_pool_destroy(atdma->lli_pool);
free_irq(platform_get_irq(pdev, 0), atdma);
- list_for_each_entry_safe(chan, _chan, &atdma->dma_device.channels,
- device_node) {
- /* Disable interrupts */
- atc_disable_chan_irq(atdma, chan->chan_id);
- list_del(&chan->device_node);
- }
+ at_dma_cleanup_channels(atdma);
+ dma_pool_destroy(atdma->memset_pool);
+ dma_pool_destroy(atdma->lli_pool);
clk_disable_unprepare(atdma->clk);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0298/2151] dmaengine: mediatek: hsdma: fix runtime PM leak on init failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (296 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0297/2151] dmaengine: at_hdmac: Fix use-after-free by proper tasklet cleanup Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0299/2151] dmaengine: img-mdc: Fix runtime PM usage counter leak Greg Kroah-Hartman
` (584 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak, Frank Li,
Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit f10d96b1c549a2f43506e9bf847196839808b8dc ]
mtk_hsdma_hw_init() enables runtime PM and gets a runtime PM reference
before enabling the HSDMA clock. It currently ignores failures from
pm_runtime_get_sync(); if runtime resume fails, the usage count remains
held. If clk_prepare_enable() then fails, the usage count remains held.
Use devm_pm_runtime_enable() to manage runtime PM enablement, and use
pm_runtime_resume_and_get() so resume failures do not leak the usage count.
If clk_prepare_enable() fails after a successful runtime resume, drop the
runtime PM reference before returning.
The probe path also ignores the return value from mtk_hsdma_hw_init(), so a
failed hardware init can continue as a successful probe. Propagate
mtk_hsdma_hw_init() failures from probe, while keeping a separate unwind
label so mtk_hsdma_hw_deinit() is only called after hardware init succeeds.
Fixes: 548c4597e984 ("dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260804153924.49627-1-mhun512@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/mediatek/mtk-hsdma.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
index fa77bb24a4307..86fa911c5ac53 100644
--- a/drivers/dma/mediatek/mtk-hsdma.c
+++ b/drivers/dma/mediatek/mtk-hsdma.c
@@ -848,17 +848,27 @@ static int mtk_hsdma_hw_init(struct mtk_hsdma_device *hsdma)
{
int err;
- pm_runtime_enable(hsdma2dev(hsdma));
- pm_runtime_get_sync(hsdma2dev(hsdma));
+ err = devm_pm_runtime_enable(hsdma2dev(hsdma));
+ if (err)
+ return err;
+
+ err = pm_runtime_resume_and_get(hsdma2dev(hsdma));
+ if (err < 0)
+ return err;
err = clk_prepare_enable(hsdma->clk);
if (err)
- return err;
+ goto err_put_pm;
mtk_dma_write(hsdma, MTK_HSDMA_INT_ENABLE, 0);
mtk_dma_write(hsdma, MTK_HSDMA_GLO, MTK_HSDMA_GLO_DEFAULT);
return 0;
+
+err_put_pm:
+ pm_runtime_put_sync(hsdma2dev(hsdma));
+
+ return err;
}
static int mtk_hsdma_hw_deinit(struct mtk_hsdma_device *hsdma)
@@ -868,7 +878,6 @@ static int mtk_hsdma_hw_deinit(struct mtk_hsdma_device *hsdma)
clk_disable_unprepare(hsdma->clk);
pm_runtime_put_sync(hsdma2dev(hsdma));
- pm_runtime_disable(hsdma2dev(hsdma));
return 0;
}
@@ -983,7 +992,9 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
goto err_unregister;
}
- mtk_hsdma_hw_init(hsdma);
+ err = mtk_hsdma_hw_init(hsdma);
+ if (err)
+ goto err_free;
err = devm_request_irq(&pdev->dev, hsdma->irq,
mtk_hsdma_irq, 0,
@@ -991,7 +1002,7 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
if (err) {
dev_err(&pdev->dev,
"request_irq failed with err %d\n", err);
- goto err_free;
+ goto err_deinit;
}
platform_set_drvdata(pdev, hsdma);
@@ -1000,8 +1011,9 @@ static int mtk_hsdma_probe(struct platform_device *pdev)
return 0;
-err_free:
+err_deinit:
mtk_hsdma_hw_deinit(hsdma);
+err_free:
of_dma_controller_free(pdev->dev.of_node);
err_unregister:
dma_async_device_unregister(dd);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0299/2151] dmaengine: img-mdc: Fix runtime PM usage counter leak
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (297 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0298/2151] dmaengine: mediatek: hsdma: fix runtime PM leak on init failure Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0300/2151] dmaengine: zynqmp_dma: Fix chan probe/remove error handling Greg Kroah-Hartman
` (583 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ruoyu Wang, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ruoyu Wang <ruoyuw560@gmail.com>
[ Upstream commit 4a1a2d8b8529cc569b769b92fcd71c53805cbeb2 ]
pm_runtime_get_sync() leaves the IMG MDC device's usage counter
incremented when runtime resume fails. mdc_alloc_chan_resources() returns
that error to the DMA core, so the channel's client count is not
incremented and mdc_free_chan_resources() is not called to drop the
reference. Repeated allocation attempts can therefore accumulate usage
references and prevent runtime suspend.
Use pm_runtime_resume_and_get() so a failed resume does not retain a
usage reference while successful allocations remain paired with
mdc_free_chan_resources(). DMA core only treats negative return values as
allocation failures, so the helper's zero success return preserves
behavior.
This issue was found by a static analysis checker and confirmed by manual
source review.
Fixes: 56d355e6f586 ("dmaengine: img-mdc: Add runtime PM")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260813153143.3953303-1-ruoyuw560@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/img-mdc-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c
index fd55bcd060ab8..be5c10e83af5c 100644
--- a/drivers/dma/img-mdc-dma.c
+++ b/drivers/dma/img-mdc-dma.c
@@ -738,7 +738,7 @@ static int mdc_alloc_chan_resources(struct dma_chan *chan)
struct mdc_chan *mchan = to_mdc_chan(chan);
struct device *dev = mdma2dev(mchan->mdma);
- return pm_runtime_get_sync(dev);
+ return pm_runtime_resume_and_get(dev);
}
static void mdc_free_chan_resources(struct dma_chan *chan)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0300/2151] dmaengine: zynqmp_dma: Fix chan probe/remove error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (298 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0299/2151] dmaengine: img-mdc: Fix runtime PM usage counter leak Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0301/2151] dmaengine: dw-axi-dmac: convert clock handling to clk_bulk API Greg Kroah-Hartman
` (582 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Golla Nagendra, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Golla Nagendra <nagendra.golla@amd.com>
[ Upstream commit 0266dac57019201a14a81245d22750ab221d6c66 ]
Keep the real platform_get_irq() error by returning ret directly, stage
IRQ setup via a local ret variable, and assign chan->irq only after
devm_request_irq() succeeds.
Initialize chan->irq to -1 and initialize chan->common.device_node
before it may be touched by teardown. In channel remove, free IRQ only
for valid IRQ numbers and delete the channel node only when it is linked.
Register the channel node only after successful IRQ setup. On channel
probe failure in zynqmp_dma_probe(), route cleanup through the existing
free_chan_resources teardown path.
Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")
Signed-off-by: Golla Nagendra <nagendra.golla@amd.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260814045616.1661199-4-nagendra.golla@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/xilinx/zynqmp_dma.c | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 23e07d72a5225..59b5199a58a48 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -205,7 +205,7 @@ struct zynqmp_dma_desc_sw {
* @desc_pool_p: Physical allocated descriptor base
* @desc_free_cnt: Descriptor available count
* @dev: The dma device
- * @irq: Channel IRQ
+ * @irq: Linux IRQ number, or -1 when not registered
* @is_dmacoherent: Tells whether dma operations are coherent or not
* @tasklet: Cleanup work after irq
* @idle : Channel status;
@@ -887,10 +887,11 @@ static void zynqmp_dma_chan_remove(struct zynqmp_dma_chan *chan)
if (!chan)
return;
- if (chan->irq)
+ if (chan->irq >= 0)
devm_free_irq(chan->zdev->dev, chan->irq, chan);
tasklet_kill(&chan->tasklet);
- list_del(&chan->common.device_node);
+ if (!list_empty(&chan->common.device_node))
+ list_del(&chan->common.device_node);
}
/**
@@ -906,13 +907,14 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
struct zynqmp_dma_chan *chan;
struct device_node *node = pdev->dev.of_node;
const struct zynqmp_dma_config *match_data;
- int err;
+ int err, ret;
chan = devm_kzalloc(zdev->dev, sizeof(*chan), GFP_KERNEL);
if (!chan)
return -ENOMEM;
chan->dev = zdev->dev;
chan->zdev = zdev;
+ chan->irq = -1;
chan->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(chan->regs))
@@ -945,22 +947,26 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
INIT_LIST_HEAD(&chan->pending_list);
INIT_LIST_HEAD(&chan->done_list);
INIT_LIST_HEAD(&chan->free_list);
+ INIT_LIST_HEAD(&chan->common.device_node);
dma_cookie_init(&chan->common);
chan->common.device = &zdev->common;
- list_add_tail(&chan->common.device_node, &zdev->common.channels);
-
zynqmp_dma_init(chan);
- chan->irq = platform_get_irq(pdev, 0);
- if (chan->irq < 0)
- return -ENXIO;
- err = devm_request_irq(&pdev->dev, chan->irq, zynqmp_dma_irq_handler, 0,
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
+ return ret;
+
+ err = devm_request_irq(&pdev->dev, ret, zynqmp_dma_irq_handler, 0,
"zynqmp-dma", chan);
if (err)
return err;
+ chan->irq = ret;
+
chan->desc_size = sizeof(struct zynqmp_dma_desc_ll);
chan->idle = true;
+ list_add_tail(&chan->common.device_node, &zdev->common.channels);
+
return 0;
}
@@ -1125,7 +1131,7 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
ret = zynqmp_dma_chan_probe(zdev, pdev);
if (ret) {
dev_err_probe(&pdev->dev, ret, "Probing channel failed\n");
- goto err_disable_pm;
+ goto free_chan_resources;
}
p->dst_addr_widths = BIT(zdev->chan->bus_width / 8);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0301/2151] dmaengine: dw-axi-dmac: convert clock handling to clk_bulk API
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (299 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0300/2151] dmaengine: zynqmp_dma: Fix chan probe/remove error handling Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0302/2151] dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction Greg Kroah-Hartman
` (581 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chaithanya Lagisetty, Frank Li,
Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
[ Upstream commit c843417e6d6b55e24318e2edf405566e70786d3b ]
The driver managed its two mandatory clocks (core-clk and cfgr-clk)
individually. This was error prone: axi_dma_resume() enabled cfgr_clk
and then core_clk, and if enabling core_clk failed it returned the
error without disabling cfgr_clk, leaving the clock refcount
unbalanced.
Convert the driver to the clk_bulk API. The two clocks are always
acquired, enabled and disabled together, so a clk_bulk_data array
expresses this naturally and shrinks the get/enable/disable paths.
clk_bulk_prepare_enable() also unwinds any clock it already enabled
when a later one fails, which fixes the resume imbalance.
Fixes: 1fe20f1b8454 ("dmaengine: Introduce DW AXI DMAC driver")
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Link: https://lore.kernel.org/all/20260813105432.2577322-1-nagachaithanya9911@gmail.com/
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260816054858.2667380-1-nagachaithanya9911@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../dma/dw-axi-dmac/dw-axi-dmac-platform.c | 28 ++++++++-----------
drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 3 +-
2 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 343d32eeaa29a..9772a4fdd85e8 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1322,8 +1322,7 @@ static int axi_dma_suspend(struct axi_dma_chip *chip)
axi_dma_irq_disable(chip);
axi_dma_disable(chip);
- clk_disable_unprepare(chip->core_clk);
- clk_disable_unprepare(chip->cfgr_clk);
+ clk_bulk_disable_unprepare(ARRAY_SIZE(chip->clks), chip->clks);
return 0;
}
@@ -1332,11 +1331,7 @@ static int axi_dma_resume(struct axi_dma_chip *chip)
{
int ret;
- ret = clk_prepare_enable(chip->cfgr_clk);
- if (ret < 0)
- return ret;
-
- ret = clk_prepare_enable(chip->core_clk);
+ ret = clk_bulk_prepare_enable(ARRAY_SIZE(chip->clks), chip->clks);
if (ret < 0)
return ret;
@@ -1513,13 +1508,11 @@ static int dw_probe(struct platform_device *pdev)
chip->dw->hdata->use_cfg2 = !!(flags & AXI_DMA_FLAG_USE_CFG2);
- chip->core_clk = devm_clk_get(chip->dev, "core-clk");
- if (IS_ERR(chip->core_clk))
- return PTR_ERR(chip->core_clk);
-
- chip->cfgr_clk = devm_clk_get(chip->dev, "cfgr-clk");
- if (IS_ERR(chip->cfgr_clk))
- return PTR_ERR(chip->cfgr_clk);
+ chip->clks[0].id = "core-clk";
+ chip->clks[1].id = "cfgr-clk";
+ ret = devm_clk_bulk_get(chip->dev, ARRAY_SIZE(chip->clks), chip->clks);
+ if (ret)
+ return dev_err_probe(chip->dev, ret, "failed to get clocks\n");
ret = parse_device_properties(chip);
if (ret)
@@ -1629,10 +1622,13 @@ static void dw_remove(struct platform_device *pdev)
struct dw_axi_dma *dw = chip->dw;
struct axi_dma_chan *chan, *_chan;
u32 i;
+ int ret;
/* Enable clk before accessing to registers */
- clk_prepare_enable(chip->cfgr_clk);
- clk_prepare_enable(chip->core_clk);
+ ret = clk_bulk_prepare_enable(ARRAY_SIZE(chip->clks), chip->clks);
+ if (ret)
+ dev_warn(chip->dev, "failed to enable clocks before remove: %d\n",
+ ret);
axi_dma_irq_disable(chip);
for (i = 0; i < dw->hdata->nr_channels; i++) {
axi_chan_disable(&chip->dw->chan[i]);
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
index b842e6a8d90d3..d6e53f400af25 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
@@ -68,8 +68,7 @@ struct axi_dma_chip {
int irq[DMAC_MAX_CHANNELS];
void __iomem *regs;
void __iomem *apb_regs;
- struct clk *core_clk;
- struct clk *cfgr_clk;
+ struct clk_bulk_data clks[2];
struct dw_axi_dma *dw;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0302/2151] dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (300 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0301/2151] dmaengine: dw-axi-dmac: convert clock handling to clk_bulk API Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0303/2151] dmaengine: xilinx_dma: Move descriptors to done list based on completion bit Greg Kroah-Hartman
` (580 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Radhey Shyam Pandey, Srinivas Neeli,
Frank Li, Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Srinivas Neeli <srinivas.neeli@amd.com>
[ Upstream commit b70ab341088b2114dcbc7be868588f3e97893e6a ]
The MCDMA BD format differs between memory-to-device (MM2S) and
device-to-memory (S2MM) directions, but the driver was using generic
'status' and 'sideband_status' fields for both. This led to incorrect
residue calculations when the hardware updates direction-specific fields.
Refactor the descriptor structure to use unions with direction-specific
field mappings, and update the residue calculation logic to select the
correct status field based on DMA direction.
This matches the hardware descriptor layout and fixes incorrect
residue reporting.
Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support")
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Signed-off-by: Srinivas Neeli <srinivas.neeli@amd.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260818174151.1608971-2-srinivas.neeli@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/xilinx/xilinx_dma.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 94d2e5398dd69..20dc3f4a15c9a 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -223,6 +223,7 @@
#define XILINX_MCDMA_IRQ_ERR_MASK BIT(7)
#define XILINX_MCDMA_BD_EOP BIT(30)
#define XILINX_MCDMA_BD_SOP BIT(31)
+#define XILINX_MCDMA_BD_HW_SIZE 64
/**
* struct xilinx_vdma_desc_hw - Hardware Descriptor
@@ -277,8 +278,10 @@ struct xilinx_axidma_desc_hw {
* @buf_addr_msb: MSB of Buffer address @0x0C
* @rsvd: Reserved field @0x10
* @control: Control Information field @0x14
- * @status: Status field @0x18
- * @sideband_status: Status of sideband signals @0x1C
+ * @mm2s_ctrl_sideband: Sideband control info for mm2s @0x18
+ * @s2mm_status: Status field for s2mm @0x18
+ * @mm2s_status: Status field for mm2s @0x1C
+ * @s2mm_sideband_status: Sideband status for s2mm @0x1C
* @app: APP Fields @0x20 - 0x30
*/
struct xilinx_aximcdma_desc_hw {
@@ -288,10 +291,17 @@ struct xilinx_aximcdma_desc_hw {
u32 buf_addr_msb;
u32 rsvd;
u32 control;
- u32 status;
- u32 sideband_status;
+ union {
+ u32 mm2s_ctrl_sideband;
+ u32 s2mm_status;
+ };
+ union {
+ u32 mm2s_status;
+ u32 s2mm_sideband_status;
+ };
u32 app[XILINX_DMA_NUM_APP_WORDS];
} __aligned(64);
+static_assert(sizeof(struct xilinx_aximcdma_desc_hw) == XILINX_MCDMA_BD_HW_SIZE);
/**
* struct xilinx_cdma_desc_hw - Hardware Descriptor
@@ -1025,9 +1035,11 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_chan *chan,
struct xilinx_aximcdma_tx_segment,
node);
aximcdma_hw = &aximcdma_seg->hw;
- residue +=
- (aximcdma_hw->control & chan->xdev->max_buffer_len) -
- (aximcdma_hw->status & chan->xdev->max_buffer_len);
+ residue += aximcdma_hw->control & chan->xdev->max_buffer_len;
+ if (chan->direction == DMA_DEV_TO_MEM)
+ residue -= aximcdma_hw->s2mm_status & chan->xdev->max_buffer_len;
+ else
+ residue -= aximcdma_hw->mm2s_status & chan->xdev->max_buffer_len;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0303/2151] dmaengine: xilinx_dma: Move descriptors to done list based on completion bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (301 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0302/2151] dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0304/2151] dmaengine: zynqmp_dma: drop redundant label Greg Kroah-Hartman
` (579 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Radhey Shyam Pandey, Srinivas Neeli,
Frank Li, Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Srinivas Neeli <srinivas.neeli@amd.com>
[ Upstream commit 5b585cc8778185ae7a7c9903f8cd70d562b91282 ]
In AXI MCDMA, xilinx_dma_complete_descriptor() walks the channel's
active_list and unconditionally moves every entry to the done_list. The
MCDMA IOC interrupt handler invokes this function on every
interrupt-on-completion, but with interrupt coalescing (IRQThreshold > 1)
an IOC interrupt may fire after only a subset of the queued descriptors
have actually been processed by the hardware. As a result, descriptors
whose completion bit is not yet set in the BD status were being reported
as completed to client drivers.
Add a check for the descriptor completion bit before moving entries from
the active list to the done list, using the appropriate direction-
specific status field (s2mm_status for DMA_DEV_TO_MEM, mm2s_status for
DMA_MEM_TO_DEV).
This mirrors the AXIDMA fix in commit 7bcdaa658102 ("dmaengine:
xilinx_dma: Freeup active list based on descriptor completion bit").
Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support")
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Signed-off-by: Srinivas Neeli <srinivas.neeli@amd.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260818174151.1608971-3-srinivas.neeli@amd.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/xilinx/xilinx_dma.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 20dc3f4a15c9a..797b7b9e7a814 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1770,6 +1770,17 @@ static void xilinx_dma_complete_descriptor(struct xilinx_dma_chan *chan)
struct xilinx_axidma_tx_segment, node);
if (!(seg->hw.status & XILINX_DMA_BD_COMP_MASK) && chan->has_sg)
break;
+ } else if (chan->xdev->dma_config->dmatype == XDMA_TYPE_AXIMCDMA) {
+ struct xilinx_aximcdma_tx_segment *seg;
+ u32 status;
+
+ seg = list_last_entry(&desc->segments,
+ struct xilinx_aximcdma_tx_segment,
+ node);
+ status = (chan->direction == DMA_DEV_TO_MEM) ?
+ seg->hw.s2mm_status : seg->hw.mm2s_status;
+ if (!(status & XILINX_DMA_BD_COMP_MASK))
+ break;
}
if (chan->has_sg && chan->xdev->dma_config->dmatype !=
XDMA_TYPE_VDMA)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0304/2151] dmaengine: zynqmp_dma: drop redundant label
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (302 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0303/2151] dmaengine: xilinx_dma: Move descriptors to done list based on completion bit Greg Kroah-Hartman
@ 2026-11-18 14:33 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0305/2151] ASoC: codecs: nau8822: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
` (578 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:33 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Radhey Shyam Pandey, Frank Li,
Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vinod Koul <vkoul@kernel.org>
[ Upstream commit 08f04d5ab868bc28d3115f7406499e8e5d1d1765 ]
Commit 3f30db282c28 ("dmaengine: zynqmp_dma: Fix chan probe/remove error
handling") dropped the use of err_disable_pm label causing warning:
drivers/dma/xilinx/zynqmp_dma.c: In function ‘zynqmp_dma_probe’:
drivers/dma/xilinx/zynqmp_dma.c:1171:1: error: label ‘err_disable_pm’ defined but not used [-Werror=unused-label]
1171 | err_disable_pm:
Drop it
Fixes: 3f30db282c28 ("dmaengine: zynqmp_dma: Fix chan probe/remove error handling")
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260903170357.1711462-1-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/xilinx/zynqmp_dma.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 59b5199a58a48..1f6bb492be6af 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -1158,7 +1158,6 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
free_chan_resources:
zynqmp_dma_chan_remove(zdev->chan);
-err_disable_pm:
if (!pm_runtime_enabled(zdev->dev))
zynqmp_dma_runtime_suspend(zdev->dev);
pm_runtime_disable(zdev->dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0305/2151] ASoC: codecs: nau8822: convert to snd_soc_dapm_xxx()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (303 preceding siblings ...)
2026-11-18 14:33 ` [PATCH 6.18 0304/2151] dmaengine: zynqmp_dma: drop redundant label Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0306/2151] ASoC: codecs: nau8822: add support for supply regulators Greg Kroah-Hartman
` (577 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kuninori Morimoto, Charles Keepax,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit 8000e233e920062dc08222fc6911e13c193d7719 ]
This patch converts below functions.
dapm->dev -> snd_soc_dapm_to_dev()
dapm->card -> snd_soc_dapm_to_card()
dapm->component -> snd_soc_dapm_to_component()
dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value()
snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()
snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87ldkd4dsp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 9c343445b349 ("ASoC: nau8822: keep regcache offline while supplies are off")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/nau8822.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index 1386ba6041998..7c84e9e4b8b3c 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -959,6 +959,7 @@ static int nau8822_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{
struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
switch (level) {
case SND_SOC_BIAS_ON:
@@ -966,7 +967,7 @@ static int nau8822_set_bias_level(struct snd_soc_component *component,
case SND_SOC_BIAS_PREPARE:
if (nau8822->mclk &&
- snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_ON) {
+ snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_ON) {
int ret = clk_prepare_enable(nau8822->mclk);
if (ret) {
@@ -983,7 +984,7 @@ static int nau8822_set_bias_level(struct snd_soc_component *component,
case SND_SOC_BIAS_STANDBY:
if (nau8822->mclk &&
- snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_OFF)
+ snd_soc_dapm_get_bias_level(dapm) != SND_SOC_BIAS_OFF)
clk_disable_unprepare(nau8822->mclk);
snd_soc_component_update_bits(component,
@@ -991,8 +992,7 @@ static int nau8822_set_bias_level(struct snd_soc_component *component,
NAU8822_IOBUF_EN | NAU8822_ABIAS_EN,
NAU8822_IOBUF_EN | NAU8822_ABIAS_EN);
- if (snd_soc_component_get_bias_level(component) ==
- SND_SOC_BIAS_OFF) {
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) {
snd_soc_component_update_bits(component,
NAU8822_REG_POWER_MANAGEMENT_1,
NAU8822_REFIMP_MASK, NAU8822_REFIMP_3K);
@@ -1055,8 +1055,9 @@ static struct snd_soc_dai_driver nau8822_dai = {
static int nau8822_suspend(struct snd_soc_component *component)
{
struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
- snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
+ snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF);
regcache_mark_dirty(nau8822->regmap);
@@ -1066,10 +1067,11 @@ static int nau8822_suspend(struct snd_soc_component *component)
static int nau8822_resume(struct snd_soc_component *component)
{
struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
regcache_sync(nau8822->regmap);
- snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY);
+ snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0306/2151] ASoC: codecs: nau8822: add support for supply regulators
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (304 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0305/2151] ASoC: codecs: nau8822: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0307/2151] ASoC: nau8822: keep regcache offline while supplies are off Greg Kroah-Hartman
` (576 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Alexey Charkov, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Charkov <alchark@flipper.net>
[ Upstream commit f8e7cd48e5b3b38ec5e1542b73b670a7770d2d7c ]
NAU8822 has four power supply pins: VDDA, VDDB, VDDC, and VDDSPK, which
need to be online and stable before communication with the device is
attempted.
Request and enable these regulators at init time, if provided. Also wait
for 100 us after powering up the supply regulators before attempting to
access the device registers, as recommended by the datasheet.
This helps avoid -ENXIO errors when the codec is probed before the
regulators are ready.
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Link: https://patch.msgid.link/20260525-nau8822-reg-v2-2-7d37ae393e46@flipper.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 9c343445b349 ("ASoC: nau8822: keep regcache offline while supplies are off")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/nau8822.c | 46 +++++++++++++++++++++++++++++++++++---
sound/soc/codecs/nau8822.h | 3 +++
2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index 7c84e9e4b8b3c..978d44ea76eb0 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -19,6 +19,7 @@
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -108,6 +109,10 @@ static const struct reg_default nau8822_reg_defaults[] = {
{ NAU8822_REG_OUTPUT_TIEOFF, 0x0000 },
};
+static const char * const nau8822_supply_names[NAU8822_NUM_SUPPLIES] = {
+ "vdda", "vddb", "vddc", "vddspk",
+};
+
static bool nau8822_readable_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
@@ -1058,6 +1063,7 @@ static int nau8822_suspend(struct snd_soc_component *component)
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF);
+ regulator_bulk_disable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
regcache_mark_dirty(nau8822->regmap);
@@ -1068,6 +1074,15 @@ static int nau8822_resume(struct snd_soc_component *component)
{
struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
+ int ret = regulator_bulk_enable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
+
+ if (ret) {
+ dev_err(component->dev,
+ "Failed to enable regulators: %d\n", ret);
+ return ret;
+ }
+
+ fsleep(100);
regcache_sync(nau8822->regmap);
@@ -1155,7 +1170,7 @@ static int nau8822_i2c_probe(struct i2c_client *i2c)
{
struct device *dev = &i2c->dev;
struct nau8822 *nau8822 = dev_get_platdata(dev);
- int ret;
+ int ret, i;
if (!nau8822) {
nau8822 = devm_kzalloc(dev, sizeof(*nau8822), GFP_KERNEL);
@@ -1169,6 +1184,13 @@ static int nau8822_i2c_probe(struct i2c_client *i2c)
return dev_err_probe(&i2c->dev, PTR_ERR(nau8822->mclk),
"Error getting mclk\n");
+ for (i = 0; i < NAU8822_NUM_SUPPLIES; i++)
+ nau8822->supplies[i].supply = nau8822_supply_names[i];
+
+ ret = devm_regulator_bulk_get(dev, NAU8822_NUM_SUPPLIES, nau8822->supplies);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to get regulators\n");
+
nau8822->regmap = devm_regmap_init_i2c(i2c, &nau8822_regmap_config);
if (IS_ERR(nau8822->regmap)) {
ret = PTR_ERR(nau8822->regmap);
@@ -1177,21 +1199,38 @@ static int nau8822_i2c_probe(struct i2c_client *i2c)
}
nau8822->dev = dev;
+ ret = regulator_bulk_enable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to enable regulators\n");
+
+ fsleep(100);
+
/* Reset the codec */
ret = regmap_write(nau8822->regmap, NAU8822_REG_RESET, 0x00);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to issue reset: %d\n", ret);
- return ret;
+ goto err_reg;
}
ret = devm_snd_soc_register_component(dev, &soc_component_dev_nau8822,
&nau8822_dai, 1);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
- return ret;
+ goto err_reg;
}
return 0;
+
+err_reg:
+ regulator_bulk_disable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
+ return ret;
+}
+
+static void nau8822_i2c_remove(struct i2c_client *i2c)
+{
+ struct nau8822 *nau8822 = i2c_get_clientdata(i2c);
+
+ regulator_bulk_disable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
}
static const struct i2c_device_id nau8822_i2c_id[] = {
@@ -1214,6 +1253,7 @@ static struct i2c_driver nau8822_i2c_driver = {
.of_match_table = of_match_ptr(nau8822_of_match),
},
.probe = nau8822_i2c_probe,
+ .remove = nau8822_i2c_remove,
.id_table = nau8822_i2c_id,
};
module_i2c_driver(nau8822_i2c_driver);
diff --git a/sound/soc/codecs/nau8822.h b/sound/soc/codecs/nau8822.h
index 13fe0a091e9ed..24799c7b5931b 100644
--- a/sound/soc/codecs/nau8822.h
+++ b/sound/soc/codecs/nau8822.h
@@ -211,6 +211,8 @@ struct nau8822_pll {
int freq_out;
};
+#define NAU8822_NUM_SUPPLIES 4
+
/* Codec Private Data */
struct nau8822 {
struct device *dev;
@@ -219,6 +221,7 @@ struct nau8822 {
struct nau8822_pll pll;
int sysclk;
int div_id;
+ struct regulator_bulk_data supplies[NAU8822_NUM_SUPPLIES];
};
#endif /* __NAU8822_H__ */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0307/2151] ASoC: nau8822: keep regcache offline while supplies are off
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (305 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0306/2151] ASoC: codecs: nau8822: add support for supply regulators Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0308/2151] ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310 Greg Kroah-Hartman
` (575 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 9c343445b349422bddebb4cb9668c246bc6f08de ]
nau8822_suspend() disables all codec supplies and marks the register
cache dirty, but leaves regmap in live I/O mode. Resume then attempts
the cache replay without first leaving a corresponding cache-only state.
Enter cache-only mode after the regulators have been disabled
successfully, leave it after the supplies are restored, and stop the
local resume sequence if cache replay fails. Do not power the codec back
down on a resume error, because deferred component resume remains best
effort and continues after the callback.
regulator_bulk_disable() restores regulators already disabled by the
same bulk operation if a later disable fails. Only publish cache-only
state after the whole power-off operation succeeds, so the regmap state
continues to match the hardware state on either outcome.
Fixes: 1e3cb6c321be ("ASoC: nau8822: new codec driver")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260830141828.34419-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/nau8822.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index 978d44ea76eb0..6ca83ad95321f 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -1061,10 +1061,14 @@ static int nau8822_suspend(struct snd_soc_component *component)
{
struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
+ int ret;
snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF);
- regulator_bulk_disable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
+ ret = regulator_bulk_disable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
+ if (ret)
+ return ret;
+ regcache_cache_only(nau8822->regmap, true);
regcache_mark_dirty(nau8822->regmap);
return 0;
@@ -1074,7 +1078,9 @@ static int nau8822_resume(struct snd_soc_component *component)
{
struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
- int ret = regulator_bulk_enable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
+ int ret;
+
+ ret = regulator_bulk_enable(NAU8822_NUM_SUPPLIES, nau8822->supplies);
if (ret) {
dev_err(component->dev,
@@ -1084,7 +1090,10 @@ static int nau8822_resume(struct snd_soc_component *component)
fsleep(100);
- regcache_sync(nau8822->regmap);
+ regcache_cache_only(nau8822->regmap, false);
+ ret = regcache_sync(nau8822->regmap);
+ if (ret)
+ return ret;
snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0308/2151] ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (306 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0307/2151] ASoC: nau8822: keep regcache offline while supplies are off Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0309/2151] ACPI: PM: Drop parent state update from acpi_device_get_power() Greg Kroah-Hartman
` (574 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Gallagher, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Gallagher <cdine@cdine.org>
[ Upstream commit f16c512a07b954aa3b0b3c580e7abb5dd4f5e703 ]
This patch adds a quirk mapping for the "Blade Stealth 13 (Early 2020) -
RZ09-0310" laptop, which exhibits the same issue as the following two
related products already accounted for in this file.
- Razer Blade Stealth 13 Late 2019
- Blade Pro 17 (Early 2020) - RZ09-0329
Summary of the issue this fixes:
The firmware's _LID method still returns "closed" after resume when the
lid was opened during S3, causing systemd-logind to suspend the system
again within several seconds (15-40) after waking.
Signed-off-by: Ian Gallagher <cdine@cdine.org>
Link: https://patch.msgid.link/90ab9b58-da8b-4ffc-bd4b-adf7590545a9@app.fastmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/button.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index b507b88df6c37..44a1f26d6c969 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -143,6 +143,18 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
},
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
},
+ {
+ /*
+ * Razer Blade Stealth 13 early 2020, when the lid is opened
+ * while suspended the open notification is lost and _LID keeps
+ * returning closed after resume, causing spurious re-suspends.
+ */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Razer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Blade Stealth 13 (Early 2020) - RZ09-0310"),
+ },
+ .driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_OPEN,
+ },
{
/*
* Samsung galaxybook2 ,initial _LID device notification returns
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0309/2151] ACPI: PM: Drop parent state update from acpi_device_get_power()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (307 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0308/2151] ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310 Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0310/2151] ACPI: PCI: Introduce acpi_dev_get_pci_dev() Greg Kroah-Hartman
` (573 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Peixin Xie,
Sakari Ailus, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 5636eebb7bb1c6f06f0058d48353686304d4bb47 ]
The parent state update in acpi_device_get_power(), that occurs when the
child device turns out to be in D0 and the parent's power state is still
unknown, is highly questionable because it may cause the reference
counters of the power resources used by the parent in D0 (if any) to
underflow when the parent goes into a low-power state later. Moreover,
there is no reason to do it on reads from the real_power_state sysfs
attribute of the child.
That check had been added by commit 8f7412a792bc ("ACPI / PM: Infer
parent power state from child if unknown, v2") before starting to
handle the "missing _PSC and no power resources" case directly in
acpi_bus_init_power(), as of commit b3785492268f ("ACPI / PM: Do not
power manage devices in unknown initial states"). It is not necessary
any more and commit b3785492268f should have removed it.
Drop it now.
Fixes: b3785492268f ("ACPI / PM: Do not power manage devices in unknown initial states")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Peixin Xie <peixin.xie@linux.spacemit.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/5147279.31r3eYUQgx@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/device_pm.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index 4e0583274b8f4..2b0d248f6394e 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -75,15 +75,14 @@ static int acpi_dev_pm_explicit_get(struct acpi_device *device, int *state)
int acpi_device_get_power(struct acpi_device *device, int *state)
{
int result = ACPI_STATE_UNKNOWN;
- struct acpi_device *parent;
int error;
if (!device || !state)
return -EINVAL;
- parent = acpi_dev_parent(device);
-
if (!device->flags.power_manageable) {
+ struct acpi_device *parent = acpi_dev_parent(device);
+
/* TBD: Non-recursive algorithm for walking up hierarchy. */
*state = parent ? parent->power.state : ACPI_STATE_D0;
goto out;
@@ -119,16 +118,6 @@ int acpi_device_get_power(struct acpi_device *device, int *state)
result = psc > ACPI_STATE_D2 ? ACPI_STATE_D3_HOT : psc;
}
- /*
- * If we were unsure about the device parent's power state up to this
- * point, the fact that the device is in D0 implies that the parent has
- * to be in D0 too, except if ignore_parent is set.
- */
- if (!device->power.flags.ignore_parent && parent &&
- parent->power.state == ACPI_STATE_UNKNOWN &&
- result == ACPI_STATE_D0)
- parent->power.state = ACPI_STATE_D0;
-
*state = result;
out:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0310/2151] ACPI: PCI: Introduce acpi_dev_get_pci_dev()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (308 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0309/2151] ACPI: PM: Drop parent state update from acpi_device_get_power() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0311/2151] ACPI: scan: Stop calling acpi_bus_init_power() early Greg Kroah-Hartman
` (572 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Andy Shevchenko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 9d4f0ecb87fd939207682ec30dcaf128d43f07fb ]
Some acpi_get_pci_dev() callers already have a struct ACPI device for
which they want to get the struct pci_dev pointer of the associated
PCI device, so they don't need to look for one.
For this reason, add acpi_dev_get_pci_dev() that will get a PCI device
for a given ACPI one (if possible) and turn acpi_get_pci_dev() into
a static inline helper passing the acpi_fetch_acpi_dev() return value
directly to acpi_dev_get_pci_dev().
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/3430928.44csPzL39Z@rafael.j.wysocki
Stable-dep-of: 2f4ddf2bd1ba ("ACPI: scan: Stop calling acpi_bus_init_power() early")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/pci_root.c | 22 +++++++++++-----------
include/acpi/acpi_drivers.h | 9 +++++++--
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 34b53dc892b21..cd36373663643 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -294,20 +294,20 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
EXPORT_SYMBOL_GPL(acpi_pci_find_root);
/**
- * acpi_get_pci_dev - convert ACPI CA handle to struct pci_dev
- * @handle: the handle in question
+ * acpi_dev_get_pci_dev - Get a struct pci_dev for a given ACPI device
+ * @adev: Target ACPI device.
*
- * Given an ACPI CA handle, the desired PCI device is located in the
- * list of PCI devices.
+ * Find the PCI device associated with @adev, if any, and bump up its reference
+ * counter.
*
- * If the device is found, its reference count is increased and this
- * function returns a pointer to its data structure. The caller must
- * decrement the reference count by calling pci_dev_put().
- * If no device is found, %NULL is returned.
+ * Callers are responsible for dropping the PCI device reference obtained by
+ * this function.
+ *
+ * Return: The struct pci_dev pointer of a reference-counted PCI device on
+ * success or NULL on failure.
*/
-struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
+struct pci_dev *acpi_dev_get_pci_dev(struct acpi_device *adev)
{
- struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
struct acpi_device_physical_node *pn;
struct pci_dev *pci_dev = NULL;
@@ -328,7 +328,7 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
return pci_dev;
}
-EXPORT_SYMBOL_GPL(acpi_get_pci_dev);
+EXPORT_SYMBOL_GPL(acpi_dev_get_pci_dev);
/**
* acpi_pci_osc_control_set - Request control of PCI root _OSC features.
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index b14d165632e76..3f9e16f44b2bd 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -59,14 +59,19 @@ int acpi_pci_link_free_irq(acpi_handle handle);
struct pci_bus;
#ifdef CONFIG_PCI
-struct pci_dev *acpi_get_pci_dev(acpi_handle);
+struct pci_dev *acpi_dev_get_pci_dev(struct acpi_device *adev);
#else
-static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
+static inline struct pci_dev *acpi_dev_get_pci_dev(struct acpi_device *adev)
{
return NULL;
}
#endif
+static inline struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
+{
+ return acpi_dev_get_pci_dev(acpi_fetch_acpi_dev(handle));
+}
+
/* Arch-defined function to add a bus to the system */
struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0311/2151] ACPI: scan: Stop calling acpi_bus_init_power() early
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (309 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0310/2151] ACPI: PCI: Introduce acpi_dev_get_pci_dev() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0312/2151] ACPI: glue: Reduce debug noise from acpi_device_notify() Greg Kroah-Hartman
` (571 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Peixin Xie,
Sakari Ailus, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 2f4ddf2bd1baf0ee3c8542ec6f382a3585cae607 ]
There is a problem, introduced by commit 9d9bcae47fd5 ("ACPI: delay
enumeration of devices with a _DEP pointing to an INT3472 device")
inadvertently, that devices with missing dependencies may be put
into power state D0 prematurely [1].
Namely, acpi_bus_init_power() called by acpi_bus_get_power_flags()
during the early initialization of ACPI device objects, may discover
that all of the power resources needed by the given device to be in
power state D0 are initially on, so it will reference count those
power resources and transition the device into D0. Later, if
acpi_bus_attach() running for that device notices that it has missing
dependencies, the enumeration of it will be deferred and its
power_manageable flag will be cleared, even though it is still in D0
at that point.
After the dependencies in question have been met, acpi_bus_attach()
runs again for the device and now it calls acpi_bus_init_power() that
takes additional references to the power resources used by the device
in D0. These additional references prevent the power resources from
being turned off when the device goes into D3hot/D3cold.
Another problem, related to the previous one, is that ACPI power state
initialization may be carried out for devices whose parents are not
ready for enumeration which may lead to initialization ordering issues.
To address both, stop calling acpi_bus_init_power() from
acpi_bus_get_power_flags(), but also take the initialization of
PCI devices into account, which needs to be done because they
are initialized and bound to their ACPI companions before
acpi_bus_attach() is called for the latter.
To that end, notice that acpi_power_up_if_adr_present() is used for
powering-up PCI devices in D3cold before walking the bus in order to
discover them and the initial ACPI power state of those devices needs
to be known for this purpose, so add an acpi_bus_init_power() invocation
to that function. [The debug statement printed by it duplicates the
debug statements printed during the acpi_bus_init_power() execution, so
drop it.]
Moreover, since the ACPI companions of PCI devices are associated with
the corresponding PCI devices found on the bus before acpi_bus_attach()
is called for them, it is not necessary or even useful to skip them in
acpi_bus_attach() due to an ACPI status mismatch, so avoid doing that
and complain if the ACPI status does not match the observed situation.
Also use the ACPI power state tracking to decide whether or not
the device's power state needs to be initialized in acpi_bus_attach()
instead of using the "initialized" flag of the ACPI device object
for this purpose, which is fragile and inconvenient, and clear the
power_manageable flag on failure in acpi_bus_init_power() (additionally,
poison the device ACPI power state as "invalid" if the initialization of
it fails). That allows the clearing of the power_manageable flag for
devices with unmet dependencies to be dropped.
While at it, add a debug message pringing statement to
acpi_bus_init_power() to facilitate diagnostics.
Fixes: 9d9bcae47fd5 ("ACPI: delay enumeration of devices with a _DEP pointing to an INT3472 device")
Link: https://lore.kernel.org/linux-acpi/20260820-acpi-power-resource-ref-fix-v2-1-29818173ea13@linux.spacemit.com/ [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Peixin Xie <peixin.xie@linux.spacemit.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/2295263.irdbgypaU6@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/device_pm.c | 62 ++++++++++++++++++++++++++++++++--------
drivers/acpi/scan.c | 40 +++++++++++++++++---------
2 files changed, 76 insertions(+), 26 deletions(-)
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index 2b0d248f6394e..62bce1ae8c1d6 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -23,6 +23,8 @@
#include "fan.h"
#include "internal.h"
+#define ACPI_D_STATE_INVALID ACPI_D_STATE_COUNT
+
/**
* acpi_power_state_string - String representation of ACPI device power state.
* @state: ACPI device power state to return the string representation of.
@@ -293,24 +295,28 @@ int acpi_bus_set_power(acpi_handle handle, int state)
}
EXPORT_SYMBOL(acpi_bus_set_power);
-int acpi_bus_init_power(struct acpi_device *device)
+static int acpi_device_init_power(struct acpi_device *device)
{
int state;
int result;
- if (!device)
- return -EINVAL;
-
- device->power.state = ACPI_STATE_UNKNOWN;
- if (!acpi_device_is_present(device)) {
- device->flags.initialized = false;
- return -ENXIO;
- }
-
result = acpi_device_get_power(device, &state);
if (result)
return result;
+ /*
+ * If the current power state of the device is D0 and it has a parent
+ * whose power state is not ignored, and the parent's power state
+ * initialization has failed, the parent's power state can be updated to
+ * D0 for consistency.
+ */
+ if (!device->power.flags.ignore_parent && state == ACPI_STATE_D0) {
+ struct acpi_device *parent = acpi_dev_parent(device);
+
+ if (parent && parent->power.state == ACPI_D_STATE_INVALID)
+ parent->power.state = ACPI_STATE_D0;
+ }
+
if (state < ACPI_STATE_D3_COLD && device->power.flags.power_resources) {
/* Reference count the power resources. */
result = acpi_power_on_resources(device, state);
@@ -340,9 +346,36 @@ int acpi_bus_init_power(struct acpi_device *device)
state = ACPI_STATE_D0;
}
device->power.state = state;
+
+ acpi_handle_debug(device->handle, "Initial power state: %s\n",
+ acpi_power_state_string(state));
+
return 0;
}
+int acpi_bus_init_power(struct acpi_device *device)
+{
+ int result;
+
+ if (device->power.state != ACPI_STATE_UNKNOWN)
+ return 0;
+
+ /*
+ * The ACPI device power state can be only initialized once. If this
+ * fails, ACPI power management will not be used for the device going
+ * forward.
+ */
+ result = acpi_device_init_power(device);
+ if (result) {
+ device->flags.power_manageable = 0;
+ device->power.state = ACPI_D_STATE_INVALID;
+ acpi_handle_info(device->handle,
+ "Initial power state undetermined, ACPI PM disabled\n");
+ }
+
+ return result;
+}
+
/**
* acpi_device_fix_up_power - Force device with missing _PSC into D0.
* @device: Device object whose power state is to be fixed up.
@@ -464,8 +497,13 @@ static int acpi_power_up_if_adr_present(struct acpi_device *adev, void *not_used
if (!(adev->flags.power_manageable && adev->pnp.type.bus_address))
return 0;
- acpi_handle_debug(adev->handle, "Power state: %s\n",
- acpi_power_state_string(adev->power.state));
+ /*
+ * This is done during the PCI root initialization which occurs before
+ * acpi_bus_attach() is called for the device, so the ACPI power state
+ * of the device needs to be initialized here.
+ */
+ if (acpi_bus_init_power(adev))
+ return 0;
if (adev->power.state == ACPI_STATE_D3_COLD)
return acpi_device_set_power(adev, ACPI_STATE_D0);
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index c382bed50d6cb..3893e44005f40 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -19,6 +19,7 @@
#include <linux/kthread.h>
#include <linux/dmi.h>
#include <linux/dma-map-ops.h>
+#include <linux/pci.h>
#include <linux/platform_data/x86/apple.h>
#include <linux/pgtable.h>
#include <linux/crc32.h>
@@ -1145,8 +1146,7 @@ static void acpi_bus_get_power_flags(struct acpi_device *device)
device->power.states[ACPI_STATE_D3_COLD].flags.valid = 1;
}
- if (acpi_bus_init_power(device))
- device->flags.power_manageable = 0;
+ device->power.state = ACPI_STATE_UNKNOWN;
}
static void acpi_bus_get_flags(struct acpi_device *device)
@@ -2269,38 +2269,50 @@ static int acpi_scan_attach_handler(struct acpi_device *device)
static int acpi_bus_attach(struct acpi_device *device, void *first_pass)
{
bool skip = !first_pass && device->flags.visited;
+ struct pci_dev *pci;
acpi_handle ejd;
int ret;
if (skip)
goto ok;
+ device->flags.initialized = true;
+
if (ACPI_SUCCESS(acpi_bus_get_ejd(device->handle, &ejd)))
register_dock_dependent_device(device, ejd);
acpi_bus_get_status(device);
- /* Skip devices that are not ready for enumeration (e.g. not present) */
- if (!acpi_dev_ready_for_enumeration(device)) {
- device->flags.initialized = false;
+ /*
+ * If the given ACPI device object has been already associated with a
+ * PCI device found on the bus, its status is effectively "present and
+ * enabled", and dependencies are not tracked for PCI devices, so it is
+ * not necessary or even useful to check the device's readiness in that
+ * case.
+ */
+ pci = acpi_dev_get_pci_dev(device);
+ if (pci) {
+ acpi_handle_debug(device->handle, "PCI companion %s found\n",
+ pci_name(pci));
+
+ if (!acpi_device_is_present(device))
+ pci_info(pci, FW_BUG "ACPI status differs from reality\n");
+
+ pci_dev_put(pci);
+ } else if (!acpi_dev_ready_for_enumeration(device)) {
+ /* The device is not ready (e.g. not present), so skip it. */
acpi_device_clear_enumerated(device);
- device->flags.power_manageable = 0;
return 0;
}
+
if (device->handler)
goto ok;
acpi_ec_register_opregions(device);
- if (!device->flags.initialized) {
- device->flags.power_manageable =
- device->power.states[ACPI_STATE_D0].flags.valid;
- if (acpi_bus_init_power(device))
- device->flags.power_manageable = 0;
+ acpi_bus_init_power(device);
- device->flags.initialized = true;
- } else if (device->flags.visited) {
+ if (device->flags.visited)
goto ok;
- }
ret = acpi_scan_attach_handler(device);
if (ret < 0)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0312/2151] ACPI: glue: Reduce debug noise from acpi_device_notify()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (310 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0311/2151] ACPI: scan: Stop calling acpi_bus_init_power() early Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0313/2151] ACPI: glue: Rework the success message in acpi_device_notify() Greg Kroah-Hartman
` (570 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Andy Shevchenko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 5bc1e72f80da4c20ce8b57851be4fad67e855ebd ]
When debug is enabled in the ACPI glue code that handles binding
devices to ACPI companions, acpi_device_notify() produces a lot of
message noise related to devices that have no ACPI companions.
Reduce that noise by checking the most obvious case, ACPI device
objects, directly and returning from acpi_device_notify() in that
case without printing any debug messages. Also avoid printing a
debug message when there is no matching ACPI bus type definition for
the given device, which is the case for the vast majority of devices.
Additionally, make the debug messages that get printed more informative.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/6325978.lOV4Wx5bFT@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: aef7792cddca ("ACPI: glue: Rework the success message in acpi_device_notify()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/glue.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index a194f30876c59..2a782ba508f7b 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -354,22 +354,27 @@ void acpi_device_notify(struct device *dev)
struct acpi_device *adev;
int ret;
+ /* ACPI devices have no ACPI companions. */
+ if (dev->bus == &acpi_bus_type)
+ return;
+
ret = acpi_bind_one(dev, NULL);
if (ret) {
struct acpi_bus_type *type = acpi_get_bus_type(dev);
if (!type)
- goto err;
+ return;
adev = type->find_companion(dev);
if (!adev) {
dev_dbg(dev, "ACPI companion not found\n");
- goto err;
+ return;
}
ret = acpi_bind_one(dev, adev);
- if (ret)
- goto err;
-
+ if (ret) {
+ dev_dbg(dev, "Binding to ACPI companion failed\n");
+ return;
+ }
if (type->setup) {
type->setup(dev);
goto done;
@@ -391,11 +396,6 @@ void acpi_device_notify(struct device *dev)
done:
acpi_handle_debug(ACPI_HANDLE(dev), "Bound to device %s\n",
dev_name(dev));
-
- return;
-
-err:
- dev_dbg(dev, "No ACPI support\n");
}
void acpi_device_notify_remove(struct device *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0313/2151] ACPI: glue: Rework the success message in acpi_device_notify()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (311 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0312/2151] ACPI: glue: Reduce debug noise from acpi_device_notify() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0314/2151] ACPI: utils: Adjust message printing macros for ACPI objects Greg Kroah-Hartman
` (569 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Andy Shevchenko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit aef7792cddcac7ab400912c2947a595401d4a7e8 ]
Using an ACPI handle in the acpi_device_notify() success message is
somewhat misleading because the "physical" device is not bound to an
ACPI namespace object in that function, but to an ACPI device object
attached to it. Moreover, the message is outright confusing for the
"physical" devices bound to ACPI devices without ACPI namespace
objects (for example, fixed event buttons).
Address this by turning that message into a dev_dbg() one printed for
the "physical" device and mentioning the name of the ACPI companion.
Fixes: ab06eb920401 ("ACPI: scan: Register platform devices for fixed event buttons")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/2448150.ElGaqSPkdT@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/glue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 2a782ba508f7b..6c81ac1ff28e5 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -394,8 +394,7 @@ void acpi_device_notify(struct device *dev)
adev->handler->bind(dev);
done:
- acpi_handle_debug(ACPI_HANDLE(dev), "Bound to device %s\n",
- dev_name(dev));
+ dev_dbg(dev, "Bound to ACPI device %s\n", acpi_dev_name(adev));
}
void acpi_device_notify_remove(struct device *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0314/2151] ACPI: utils: Adjust message printing macros for ACPI objects
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (312 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0313/2151] ACPI: glue: Rework the success message in acpi_device_notify() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0315/2151] wifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe() Greg Kroah-Hartman
` (568 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Andy Shevchenko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 78ddbfaa72d68acc98cd5ba12eca071d452702c4 ]
The majority of acpi_handle_<level>() macros use neither pr_fmt() nor
dev_fmt() and acpi_handle_debug() uses pr_fmt() like dev_fmt(), but
only if dynamic debug is compiled in.
For more consistency, redefine all of the macros in question to use
dev_fmt() because they are more similar to the analogous dev_*()
family of macros than to the pr_*() ones and make all of them use it
in the same way.
While at it, rephrase the comment documenting those macros for more
clarity.
Fixes: 45fef5b88d1f ("ACPI: add dynamic_debug support")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/2300525.irdbgypaU6@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/acpi.h | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 8871f2edca712..b44e33fea5126 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1253,34 +1253,34 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c
#endif
/*
- * acpi_handle_<level>: Print message with ACPI prefix and object path
+ * acpi_handle_<level> - Print a message with ACPI prefix and object path
*
- * These interfaces acquire the global namespace mutex to obtain an object
- * path. In interrupt context, it shows the object path as <n/a>.
+ * In thread context, the global namespace mutex is acquired to obtain the
+ * object path. In interrupt context, the object path is shown as <n/a>.
*/
#define acpi_handle_emerg(handle, fmt, ...) \
- acpi_handle_printk(KERN_EMERG, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_EMERG, handle, dev_fmt(fmt), ##__VA_ARGS__)
#define acpi_handle_alert(handle, fmt, ...) \
- acpi_handle_printk(KERN_ALERT, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_ALERT, handle, dev_fmt(fmt), ##__VA_ARGS__)
#define acpi_handle_crit(handle, fmt, ...) \
- acpi_handle_printk(KERN_CRIT, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_CRIT, handle, dev_fmt(fmt), ##__VA_ARGS__)
#define acpi_handle_err(handle, fmt, ...) \
- acpi_handle_printk(KERN_ERR, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_ERR, handle, dev_fmt(fmt), ##__VA_ARGS__)
#define acpi_handle_warn(handle, fmt, ...) \
- acpi_handle_printk(KERN_WARNING, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_WARNING, handle, dev_fmt(fmt), ##__VA_ARGS__)
#define acpi_handle_notice(handle, fmt, ...) \
- acpi_handle_printk(KERN_NOTICE, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_NOTICE, handle, dev_fmt(fmt), ##__VA_ARGS__)
#define acpi_handle_info(handle, fmt, ...) \
- acpi_handle_printk(KERN_INFO, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_INFO, handle, dev_fmt(fmt), ##__VA_ARGS__)
#if defined(DEBUG)
#define acpi_handle_debug(handle, fmt, ...) \
- acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__)
+ acpi_handle_printk(KERN_DEBUG, handle, dev_fmt(fmt), ##__VA_ARGS__)
#else
#if defined(CONFIG_DYNAMIC_DEBUG)
#define acpi_handle_debug(handle, fmt, ...) \
_dynamic_func_call(fmt, __acpi_handle_debug, \
- handle, pr_fmt(fmt), ##__VA_ARGS__)
+ handle, dev_fmt(fmt), ##__VA_ARGS__)
#else
#define acpi_handle_debug(handle, fmt, ...) \
({ \
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0315/2151] wifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (313 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0314/2151] ACPI: utils: Adjust message printing macros for ACPI objects Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0316/2151] wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func() Greg Kroah-Hartman
` (567 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mikhail Lobanov, Baochen Qiang,
Rameshkumar Sundaram, Jeff Johnson, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Lobanov <m.lobanov@rosalinux.ru>
[ Upstream commit 52953d149ab4da0432d54b09f3c8add42b4d4a82 ]
The previous logic in ath11k_ce_rx_post_pipe() incorrectly required both
dest_ring and status_ring to be NULL in order to exit the function.
This caused the function to continue even if only one of the pointers
was NULL, potentially leading to null pointer dereferences in
ath11k_ce_rx_buf_enqueue_pipe().
Fix the condition by modifying the logic so that the function returns
early if either dest_ring or status_ring is NULL.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://patch.msgid.link/20240909150824.28195-1-m.lobanov@rosalinux.ru
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/ce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c
index a7a163621b210..dd4f21a0db73e 100644
--- a/drivers/net/wireless/ath/ath11k/ce.c
+++ b/drivers/net/wireless/ath/ath11k/ce.c
@@ -326,7 +326,7 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe)
dma_addr_t paddr;
int ret = 0;
- if (!(pipe->dest_ring || pipe->status_ring))
+ if (!pipe->dest_ring || !pipe->status_ring)
return 0;
spin_lock_bh(&ab->ce.ce_lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0316/2151] wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (314 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0315/2151] wifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0317/2151] wifi: ath12k: Free allocated CE IRQs on request_irq() failure Greg Kroah-Hartman
` (566 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Baochen Qiang, Nicolas Escande,
Rameshkumar Sundaram, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Escande <nico.escande@gmail.com>
[ Upstream commit c7555d47b1d051e0406474349deccf74b491ae01 ]
In this function, we iterate over dp->reo_cmd_cache_flush_list using
list_for_each_entry_safe(), under dp->reo_cmd_lock for concurrent access,
and for each expired entries we :
- drop the lock
- call ath11k_dp_reo_cache_flush()
- kfree() the entry
- retake the lock to keep on iterating
list_for_each_entry_safe() protects us from deleting the entry during
iteration but doesn't protect for concurrent access. So another thread can
take the lock and modify the list in between and crash like below.
To fix the issue, move all entries that needs to be freed to a local list
while under the lock and then iterate over the list to free the entries
without holding the lock.
BUG: Unable to handle kernel paging request at virtual address 00000010ddbeef8c
Call trace:
ath11k_dp_rx_tid_del_func+0x164/0x3c8
ath11k_dp_process_reo_status+0x1d4/0x2fc
ath11k_dp_service_srng+0x334/0x338
ath11k_pcic_ext_grp_napi_poll+0x30/0xc0
__napi_poll+0x34/0x184
napi_threaded_poll+0xb4/0x1d8
kthread+0xdc/0xe0
ret_from_fork+0x10/0x20
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Suggested-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Link: https://patch.msgid.link/20260813-ath11k-locking-v2-1-f4113a0bd0f4@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/dp_rx.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 51e4170e7662b..939df41047290 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -762,6 +762,9 @@ static void ath11k_dp_rx_tid_del_func(struct ath11k_dp *dp, void *ctx,
struct ath11k_base *ab = dp->ab;
struct dp_rx_tid *rx_tid = ctx;
struct dp_reo_cache_flush_elem *elem, *tmp;
+ struct list_head flush_list;
+
+ INIT_LIST_HEAD(&flush_list);
if (status == HAL_REO_CMD_DRAIN) {
goto free_desc;
@@ -783,23 +786,25 @@ static void ath11k_dp_rx_tid_del_func(struct ath11k_dp *dp, void *ctx,
list_add_tail(&elem->list, &dp->reo_cmd_cache_flush_list);
dp->reo_cmd_cache_flush_count++;
- /* Flush and invalidate aged REO desc from HW cache */
+ /* identify aged REO desc that needs removal */
list_for_each_entry_safe(elem, tmp, &dp->reo_cmd_cache_flush_list,
list) {
if (dp->reo_cmd_cache_flush_count > DP_REO_DESC_FREE_THRESHOLD ||
time_after(jiffies, elem->ts +
msecs_to_jiffies(DP_REO_DESC_FREE_TIMEOUT_MS))) {
- list_del(&elem->list);
+ list_move_tail(&elem->list, &flush_list);
dp->reo_cmd_cache_flush_count--;
- spin_unlock_bh(&dp->reo_cmd_lock);
-
- ath11k_dp_reo_cache_flush(ab, &elem->data);
- kfree(elem);
- spin_lock_bh(&dp->reo_cmd_lock);
}
}
spin_unlock_bh(&dp->reo_cmd_lock);
+ /* remove aged REO desc from HW */
+ list_for_each_entry_safe(elem, tmp, &flush_list, list) {
+ ath11k_dp_reo_cache_flush(ab, &elem->data);
+ list_del(&elem->list);
+ kfree(elem);
+ }
+
return;
free_desc:
dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0317/2151] wifi: ath12k: Free allocated CE IRQs on request_irq() failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (315 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0316/2151] wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0318/2151] wifi: ath12k: Free allocated external " Greg Kroah-Hartman
` (565 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aaradhana Sahu, Rameshkumar Sundaram,
Baochen Qiang, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
[ Upstream commit 12ca935af2e68447e9218a615ebbb5ff7faf1554 ]
When CE IRQ configuration fails, the driver does not release all IRQs
that were successfully requested before the failure. This can leak IRQ
resources during probe failure.
Free the previously requested CE IRQs before returning from the error
path to ensure that partially initialized IRQ resources are properly
cleaned up during probe failure.
Factor out the CE IRQ cleanup into a helper to reuse the cleanup logic
during both error handling and driver teardown.
Also free CE IRQs when external IRQ configuration fails, before
returning from the error path.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260819110215.2485514-2-aaradhana.sahu@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath12k/pci.c | 29 ++++++++++++++++++---------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index c26c41f62feb6..e9053d160ad6c 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -363,6 +363,19 @@ static void ath12k_pci_sw_reset(struct ath12k_base *ab, bool power_on)
ath12k_mhi_set_mhictrl_reset(ab);
}
+static void ath12k_pci_free_ce_irq(struct ath12k_base *ab, int num_ce)
+{
+ int i, irq_idx;
+
+ for (i = 0; i < num_ce; i++) {
+ if (ath12k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
+ continue;
+
+ irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + i;
+ free_irq(ab->irq_num[irq_idx], &ab->ce.ce_pipe[i]);
+ }
+}
+
static void ath12k_pci_free_ext_irq(struct ath12k_base *ab)
{
int i, j;
@@ -380,15 +393,7 @@ static void ath12k_pci_free_ext_irq(struct ath12k_base *ab)
static void ath12k_pci_free_irq(struct ath12k_base *ab)
{
- int i, irq_idx;
-
- for (i = 0; i < ab->hw_params->ce_count; i++) {
- if (ath12k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
- continue;
- irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + i;
- free_irq(ab->irq_num[irq_idx], &ab->ce.ce_pipe[i]);
- }
-
+ ath12k_pci_free_ce_irq(ab, ab->hw_params->ce_count);
ath12k_pci_free_ext_irq(ab);
}
@@ -711,6 +716,8 @@ static int ath12k_pci_config_irq(struct ath12k_base *ab)
if (ret) {
ath12k_err(ab, "failed to request irq %d: %d\n",
irq_idx, ret);
+
+ ath12k_pci_free_ce_irq(ab, i);
return ret;
}
@@ -721,8 +728,10 @@ static int ath12k_pci_config_irq(struct ath12k_base *ab)
}
ret = ath12k_pci_ext_irq_config(ab);
- if (ret)
+ if (ret) {
+ ath12k_pci_free_ce_irq(ab, ab->hw_params->ce_count);
return ret;
+ }
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0318/2151] wifi: ath12k: Free allocated external IRQs on request_irq() failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (316 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0317/2151] wifi: ath12k: Free allocated CE IRQs on request_irq() failure Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0319/2151] selftests: net: csum: filter packets by source address and port Greg Kroah-Hartman
` (564 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aaradhana Sahu, Rameshkumar Sundaram,
Baochen Qiang, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
[ Upstream commit 9a78703ec4a895bd2e99bf43bd18d76683126c19 ]
When external IRQ configuration fails, the driver does not release all
IRQs that were successfully requested before the failure. This can leak
IRQ resources during probe failure.
Free previously requested external IRQs when external IRQ configuration
fails.
Also remove the NAPI instance with netif_napi_del() before freeing the
associated netdev to properly clean up the NAPI resources.
Store the IRQ number only after request_irq() succeeds to avoid recording
an IRQ that was not successfully requested.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Aaradhana Sahu <aaradhana.sahu@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260819110215.2485514-3-aaradhana.sahu@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath12k/pci.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index e9053d160ad6c..f777784669d8e 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -376,11 +376,11 @@ static void ath12k_pci_free_ce_irq(struct ath12k_base *ab, int num_ce)
}
}
-static void ath12k_pci_free_ext_irq(struct ath12k_base *ab)
+static void ath12k_pci_free_ext_irq(struct ath12k_base *ab, int num_ext_irq_grp)
{
int i, j;
- for (i = 0; i < ATH12K_EXT_IRQ_GRP_NUM_MAX; i++) {
+ for (i = 0; i < num_ext_irq_grp; i++) {
struct ath12k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
for (j = 0; j < irq_grp->num_irq; j++)
@@ -394,7 +394,7 @@ static void ath12k_pci_free_ext_irq(struct ath12k_base *ab)
static void ath12k_pci_free_irq(struct ath12k_base *ab)
{
ath12k_pci_free_ce_irq(ab, ab->hw_params->ce_count);
- ath12k_pci_free_ext_irq(ab);
+ ath12k_pci_free_ext_irq(ab, ATH12K_EXT_IRQ_GRP_NUM_MAX);
}
static void ath12k_pci_ce_irq_enable(struct ath12k_base *ab, u16 ce_id)
@@ -640,8 +640,6 @@ static int ath12k_pci_ext_irq_config(struct ath12k_base *ab)
int vector = (i % num_vectors) + base_vector;
int irq = ath12k_pci_get_msi_irq(ab->dev, vector);
- ab->irq_num[irq_idx] = irq;
-
ath12k_dbg(ab, ATH12K_DBG_PCI,
"irq:%d group:%d\n", irq, i);
@@ -652,22 +650,24 @@ static int ath12k_pci_ext_irq_config(struct ath12k_base *ab)
if (ret) {
ath12k_err(ab, "failed request irq %d: %d\n",
vector, ret);
- goto fail_request;
+
+ for (n = 0; n < j; n++)
+ free_irq(ab->irq_num[irq_grp->irqs[n]], irq_grp);
+
+ netif_napi_del(&ab->ext_irq_grp[i].napi);
+ free_netdev(ab->ext_irq_grp[i].napi_ndev);
+ goto fail_allocate;
}
+
+ ab->irq_num[irq_idx] = irq;
}
ath12k_pci_ext_grp_disable(irq_grp);
}
return 0;
-fail_request:
- /* i ->napi_ndev was properly allocated. Free it also */
- i += 1;
fail_allocate:
- for (n = 0; n < i; n++) {
- irq_grp = &ab->ext_irq_grp[n];
- free_netdev(irq_grp->napi_ndev);
- }
+ ath12k_pci_free_ext_irq(ab, i);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0319/2151] selftests: net: csum: filter packets by source address and port
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (317 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0318/2151] wifi: ath12k: Free allocated external " Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0320/2151] cpufreq/amd-pstate-ut: Fix amd_pstate_ut_check_freq failure with Requested CPU Min frequency BIOS option Greg Kroah-Hartman
` (563 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Willem de Bruijn, Simon Horman,
Jakub Kicinski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willem de Bruijn <willemb@google.com>
[ Upstream commit 8342c68435dd34b1ecd65b02fff9745cadab2616 ]
Add source address and port verification in recv_verify_packet_* and
recv_udp: non-matching packets are skipped.
The receiver reads from PF_PACKET and UDP sockets to verify incoming
packets to test hardware checksum offload. It did not validate the
packet source address or source port.
During tests expecting an invalid checksum (-E) or zero checksum (-Z),
background packets can fail the test.
For -Z, build_packet_udp chooses a specific source port that causes
the checksum to sum to zero. When running in receive-only mode (-R),
call build_packet in do_rx to compute the expected source port so
that source port filtering can be applied to -Z as well.
Also
- add an inter-packet delay to avoid drops from bursts.
- remove a comment that is no longer correct.
Fixes: 91a7de85600d ("selftests/net: add csum offload test")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260908155537.813889-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/net/lib/csum.c | 55 +++++++++++++++++++++++---
1 file changed, 50 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/lib/csum.c b/tools/testing/selftests/net/lib/csum.c
index 27437590eeb53..26c642c1f7fd3 100644
--- a/tools/testing/selftests/net/lib/csum.c
+++ b/tools/testing/selftests/net/lib/csum.c
@@ -2,8 +2,7 @@
/* Test hardware checksum offload: Rx + Tx, IPv4 + IPv6, TCP + UDP.
*
- * The test runs on two machines to exercise the NIC. For this reason it
- * is not integrated in kselftests.
+ * The test runs on two machines to exercise the NIC.
*
* CMD=$((./csum -[46] -[tu] -S $SADDR -D $DADDR -[RT] -r 1 $EXTRA_ARGS))
*
@@ -236,7 +235,8 @@ static void *build_packet_udp(void *_uh)
uh->source = 0;
uh->source = checksum(uh, IPPROTO_UDP, sizeof(*uh) + cfg_payload_len);
- fprintf(stderr, "tx: changing sport: %hu -> %hu\n",
+ fprintf(stderr, "%s: changing sport: %hu -> %hu\n",
+ cfg_do_tx ? "tx" : "rx",
cfg_port_src, ntohs(uh->source));
cfg_port_src = ntohs(uh->source);
}
@@ -249,7 +249,8 @@ static void *build_packet_udp(void *_uh)
if (cfg_bad_csum)
uh->check = ~uh->check;
- fprintf(stderr, "tx: sending checksum: 0x%x\n", uh->check);
+ if (cfg_do_tx)
+ fprintf(stderr, "tx: sending checksum: 0x%x\n", uh->check);
return uh + 1;
}
@@ -571,15 +572,36 @@ static int recv_prepare_packet(void)
static int recv_udp(int fd)
{
static char buf[MAX_PAYLOAD_LEN];
+ struct sockaddr_storage addr;
+ socklen_t addrlen;
int ret, count = 0;
while (1) {
- ret = recv(fd, buf, sizeof(buf), MSG_DONTWAIT);
+ addrlen = sizeof(addr);
+ ret = recvfrom(fd, buf, sizeof(buf), MSG_DONTWAIT,
+ (struct sockaddr *)&addr, &addrlen);
if (ret == -1 && errno == EAGAIN)
break;
if (ret == -1)
error(1, errno, "recv r");
+ if (cfg_family == PF_INET) {
+ struct sockaddr_in *sin = (void *)&addr;
+
+ if (sin->sin_addr.s_addr != cfg_saddr4.sin_addr.s_addr)
+ continue;
+ if (sin->sin_port != htons(cfg_port_src))
+ continue;
+ } else {
+ struct sockaddr_in6 *sin6 = (void *)&addr;
+
+ if (memcmp(&sin6->sin6_addr, &cfg_saddr6.sin6_addr,
+ sizeof(sin6->sin6_addr)))
+ continue;
+ if (sin6->sin6_port != htons(cfg_port_src))
+ continue;
+ }
+
fprintf(stderr, "rx: udp: len=%u\n", ret);
count++;
}
@@ -620,6 +642,9 @@ static int recv_verify_packet_tcp(void *th, int len)
if (len < sizeof(*tcph) || tcph->dest != htons(cfg_port_dst))
return -1;
+ if (tcph->source != htons(cfg_port_src))
+ return -1;
+
return recv_verify_csum(th, len, ntohs(tcph->source), tcph->check);
}
@@ -647,6 +672,9 @@ static int recv_verify_packet_udp(void *th, int len)
return recv_verify_packet_udp_encap(udph + 1,
len - sizeof(*udph));
+ if (udph->source != htons(cfg_port_src))
+ return -1;
+
return recv_verify_csum(th, len, ntohs(udph->source), udph->check);
}
@@ -659,6 +687,9 @@ static int recv_verify_packet_ipv4(void *nh, int len)
if (len < sizeof(*iph) || iph->protocol != proto)
return -1;
+ if (iph->saddr != cfg_saddr4.sin_addr.s_addr)
+ return -1;
+
ip_len = ntohs(iph->tot_len);
if (ip_len > len || ip_len < sizeof(*iph))
return -1;
@@ -680,6 +711,9 @@ static int recv_verify_packet_ipv6(void *nh, int len)
if (len < sizeof(*ip6h) || ip6h->nexthdr != proto)
return -1;
+ if (memcmp(&ip6h->saddr, &cfg_saddr6.sin6_addr, sizeof(ip6h->saddr)))
+ return -1;
+
payload_len = ntohs(ip6h->payload_len);
if (payload_len > len - sizeof(*ip6h))
return -1;
@@ -940,6 +974,9 @@ static void do_tx(void)
cfg_payload_len = rand() % MAX_PAYLOAD_LEN;
buf = build_packet(_buf, sizeof(_buf), &len);
}
+
+ /* avoid bursting */
+ usleep(20);
}
if (close(fd))
@@ -952,6 +989,14 @@ static void do_rx(int fdp, int fdr)
long tleft, tstop;
struct pollfd pfd;
+ if (!cfg_do_tx && cfg_zero_sum) {
+ static char _buf[MAX_HEADER_LEN + MAX_PAYLOAD_LEN];
+ int len;
+
+ /* calculate source port that causes csum to add up to zero */
+ build_packet(_buf, sizeof(_buf), &len);
+ }
+
tstop = gettimeofday_ms() + cfg_timeout_ms;
tleft = cfg_timeout_ms;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0320/2151] cpufreq/amd-pstate-ut: Fix amd_pstate_ut_check_freq failure with Requested CPU Min frequency BIOS option
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (318 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0319/2151] selftests: net: csum: filter packets by source address and port Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0321/2151] power: supply: mp2629: Use the full batt_impedance_compensation name in the ABI document Greg Kroah-Hartman
` (562 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mario Limonciello, K Prateek Nayak,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <kprateek.nayak@amd.com>
[ Upstream commit a23fca4ae137ec8e7620cc4f00b468b89cf5a7bd ]
Since commit 608a76b65288 ("cpufreq/amd-pstate: Add support for the
"Requested CPU Min frequency" BIOS option"), amd-pstate driver sets
policy->min to frequency corresponding to bios_min_perf if a valid BIOS
programmed min frequency value is detected.
amd_pstate_ut_check_freq expects policy->min to always match
lowest_nonlinear_freq which does not hold true on platforms with user
configured BIOS min freq.
Update the test case to compare policy->min to bios_min_freq on
platforms that set it. Final comparison is adjusted to account for
insane values by clamping the result within the supported frequency
range.
While at it, move freq_to_perf() and perf_to_freq() helpers to internal
header to allow their use from amd-pstate-ut.
Reviewed-by: Mario Limonciello <superm1@kernel.org>
Fixes: 608a76b65288 ("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option")
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20260909102650.4582-1-kprateek.nayak@amd.com
Signed-off-by: Mario Limonciello <superm1@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cpufreq/amd-pstate-ut.c | 23 ++++++++++++++++++++++-
drivers/cpufreq/amd-pstate.c | 13 -------------
drivers/cpufreq/amd-pstate.h | 14 ++++++++++++++
3 files changed, 36 insertions(+), 14 deletions(-)
diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
index 93b80bf992a6a..b0482f4655c9b 100644
--- a/drivers/cpufreq/amd-pstate-ut.c
+++ b/drivers/cpufreq/amd-pstate-ut.c
@@ -193,11 +193,14 @@ static int amd_pstate_ut_check_freq(u32 index)
for_each_online_cpu(cpu) {
struct cpufreq_policy *policy __free(put_cpufreq_policy) = NULL;
struct amd_cpudata *cpudata;
+ union perf_cached perf;
policy = cpufreq_cpu_get(cpu);
if (!policy)
continue;
+
cpudata = policy->driver_data;
+ perf = READ_ONCE(cpudata->perf);
if (!((policy->cpuinfo.max_freq >= cpudata->nominal_freq) &&
(cpudata->nominal_freq > cpudata->lowest_nonlinear_freq) &&
@@ -209,7 +212,25 @@ static int amd_pstate_ut_check_freq(u32 index)
return -EINVAL;
}
- if (cpudata->lowest_nonlinear_freq != policy->min) {
+ if (perf.bios_min_perf) {
+ u32 bios_min_freq = perf_to_freq(perf, cpudata->nominal_freq,
+ perf.bios_min_perf);
+
+ /*
+ * User set bios_min_freq cannot be trusted to
+ * be within the driver limits. Clamp it similar
+ * to cpufreq_verify_within_cpu_limits().
+ */
+ bios_min_freq = clamp_t(u32, bios_min_freq,
+ policy->cpuinfo.min_freq,
+ policy->cpuinfo.max_freq);
+
+ if (bios_min_freq != policy->min) {
+ pr_err("%s cpu%d bios_min_freq=%d policy_min=%d, they should be equal!\n",
+ __func__, cpu, bios_min_freq, policy->min);
+ return -EINVAL;
+ }
+ } else if (cpudata->lowest_nonlinear_freq != policy->min) {
pr_err("%s cpu%d cpudata_lowest_nonlinear_freq=%d policy_min=%d, they should be equal!\n",
__func__, cpu, cpudata->lowest_nonlinear_freq, policy->min);
return -EINVAL;
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index c5047b56be50f..130b037be8f95 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -147,19 +147,6 @@ static struct quirk_entry quirk_amd_7k62 = {
.lowest_freq = 550,
};
-static inline u8 freq_to_perf(union perf_cached perf, u32 nominal_freq, unsigned int freq_val)
-{
- u32 perf_val = DIV_ROUND_UP_ULL((u64)freq_val * perf.nominal_perf, nominal_freq);
-
- return (u8)clamp(perf_val, perf.lowest_perf, perf.highest_perf);
-}
-
-static inline u32 perf_to_freq(union perf_cached perf, u32 nominal_freq, u8 perf_val)
-{
- return DIV_ROUND_UP_ULL((u64)nominal_freq * perf_val,
- perf.nominal_perf);
-}
-
static int __init dmi_matched_7k62_bios_bug(const struct dmi_system_id *dmi)
{
/**
diff --git a/drivers/cpufreq/amd-pstate.h b/drivers/cpufreq/amd-pstate.h
index 325d935718f65..d7305261f575f 100644
--- a/drivers/cpufreq/amd-pstate.h
+++ b/drivers/cpufreq/amd-pstate.h
@@ -134,6 +134,20 @@ enum amd_pstate_mode {
AMD_PSTATE_GUIDED,
AMD_PSTATE_MAX,
};
+
+static inline u8 freq_to_perf(union perf_cached perf, u32 nominal_freq, unsigned int freq_val)
+{
+ u32 perf_val = DIV_ROUND_UP_ULL((u64)freq_val * perf.nominal_perf, nominal_freq);
+
+ return (u8)clamp(perf_val, perf.lowest_perf, perf.highest_perf);
+}
+
+static inline u32 perf_to_freq(union perf_cached perf, u32 nominal_freq, u8 perf_val)
+{
+ return DIV_ROUND_UP_ULL((u64)nominal_freq * perf_val,
+ perf.nominal_perf);
+}
+
const char *amd_pstate_get_mode_string(enum amd_pstate_mode mode);
int amd_pstate_get_status(void);
int amd_pstate_update_status(const char *buf, size_t size);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0321/2151] power: supply: mp2629: Use the full batt_impedance_compensation name in the ABI document
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (319 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0320/2151] cpufreq/amd-pstate-ut: Fix amd_pstate_ut_check_freq failure with Requested CPU Min frequency BIOS option Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0322/2151] power: supply: mm8013: Publish the OF module alias Greg Kroah-Hartman
` (561 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Sebastian Reichel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 1101833121a447999309a01f03d5b35bc1652e09 ]
drivers/power/supply/mp2629_charger.c creates the attribute with
DEVICE_ATTR_RW(batt_impedance_compensation). The ABI file documents it
under the truncated name batt_impedance_compen, which does not exist in
sysfs.
Use the full name.
Fixes: fe27f04e0cdc ("power: supply: mp2629: Add impedance compensation config")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260905101849.42830-1-kmehltretter@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/ABI/testing/sysfs-class-power-mp2629 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-class-power-mp2629 b/Documentation/ABI/testing/sysfs-class-power-mp2629
index 914d67caac0d7..a85f926ce9c26 100644
--- a/Documentation/ABI/testing/sysfs-class-power-mp2629
+++ b/Documentation/ABI/testing/sysfs-class-power-mp2629
@@ -1,4 +1,4 @@
-What: /sys/class/power_supply/mp2629_battery/batt_impedance_compen
+What: /sys/class/power_supply/mp2629_battery/batt_impedance_compensation
Date: April 2020
KernelVersion: 5.7
Description:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0322/2151] power: supply: mm8013: Publish the OF module alias
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (320 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0321/2151] power: supply: mp2629: Use the full batt_impedance_compensation name in the ABI document Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0323/2151] power: supply: bq24190_charger: use the wake irq API Greg Kroah-Hartman
` (560 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, hpp.iscas, Sebastian Reichel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: hpp.iscas <hppiscas@163.com>
[ Upstream commit f265940e54d749c77507da083a3c16a481f5f5c5 ]
The MM8013 driver matches mitsumi,mm8013 Device Tree clients, but
exports only its legacy I2C ID table. The I2C core emits an OF modalias
for these clients rather than i2c:mm8013.
Publish the existing OF match table without changing gauge operations.
Fixes: c75f4bf6800b ("power: supply: Introduce MM8013 fuel gauge driver")
Signed-off-by: hpp.iscas <hppiscas@163.com>
Link: https://patch.msgid.link/20260905134500.67832-1-hppiscas@163.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/power/supply/mm8013.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/supply/mm8013.c b/drivers/power/supply/mm8013.c
index 93c50cff31bca..6e6ea1d313732 100644
--- a/drivers/power/supply/mm8013.c
+++ b/drivers/power/supply/mm8013.c
@@ -293,6 +293,7 @@ static const struct of_device_id mm8013_match_table[] = {
{ .compatible = "mitsumi,mm8013" },
{}
};
+MODULE_DEVICE_TABLE(of, mm8013_match_table);
static struct i2c_driver mm8013_i2c_driver = {
.probe = mm8013_probe,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0323/2151] power: supply: bq24190_charger: use the wake irq API
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (321 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0322/2151] power: supply: mm8013: Publish the OF module alias Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0324/2151] dt-bindings: power: bq27xxx: bq27z561: allow interrupts property Greg Kroah-Hartman
` (559 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ryan Brue, Sebastian Reichel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryan Brue <ryanbrue.dev@gmail.com>
[ Upstream commit ece9baab2a6e79224d3f591893be23b540b1625f ]
bq24190_probe() calls enable_irq_wake() on the charger interrupt and
never calls disable_irq_wake(). That is wrong in three ways.
It is unbalanced. free_irq() does not touch desc->wake_depth -- only
irq_set_irq_wake() does -- so after the driver is unbound the descriptor
is still one wake reference deep and the irqchip is still configured for
wake, forever, for an interrupt nobody owns any more.
It ignores the device's wakeup policy. The chip is made a system wake
source whether or not anyone asked for it, and because
device_init_wakeup() is never called there is no power/wakeup attribute
for userspace to say otherwise. A board that would rather not be woken
by its charger has no way to express that.
And it arms the interrupt for wake permanently, from probe onwards,
rather than for the sleep it is meant to cover.
Use the wake irq API instead: devm_device_init_wakeup() to make the
device wakeup-capable and enabled -- preserving today's behaviour -- and
devm_pm_set_wake_irq() to hand the interrupt to the PM core, which arms
it in dpm_suspend_noirq() (only if device_may_wakeup(), immediately
before suspend_device_irqs()) and disarms it on resume. Both are unwound
by devm, so the reference is balanced on unbind, and userspace gets the
power/wakeup control it should have had.
No intended change in behaviour: charger events still wake the system by
default.
The same conversion was made to another charger driver for the same
reason, in commit 6c5393771c50 ("power: supply: qcom_pmi8998_charger: fix
wakeirq").
Fixes: f385e6e2a153 ("power: bq24190_charger: Use PM runtime autosuspend")
Assisted-by: LLM
Signed-off-by: Ryan Brue <ryanbrue.dev@gmail.com>
Link: https://patch.msgid.link/20260908-rbrue-suez-upstreaming-bq24190_charger-use-wake-irq-api-v1-1-c3f10ae2a34a@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/power/supply/bq24190_charger.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index ed0ceae8d90b1..459367a342ed9 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -10,6 +10,7 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/pm_runtime.h>
+#include <linux/pm_wakeirq.h>
#include <linux/power_supply.h>
#include <linux/power/bq24190_charger.h>
#include <linux/regulator/driver.h>
@@ -2175,7 +2176,13 @@ static int bq24190_probe(struct i2c_client *client)
if (ret < 0)
goto out_charger;
- enable_irq_wake(client->irq);
+ ret = devm_device_init_wakeup(dev);
+ if (ret < 0)
+ goto out_charger;
+
+ ret = devm_pm_set_wake_irq(dev, client->irq);
+ if (ret < 0)
+ goto out_charger;
pm_runtime_put_autosuspend(dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0324/2151] dt-bindings: power: bq27xxx: bq27z561: allow interrupts property
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (322 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0323/2151] power: supply: bq24190_charger: use the wake irq API Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0325/2151] power: supply: bq2515x: Propagate charge-enable read errors Greg Kroah-Hartman
` (558 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Henrik Grimler, Krzysztof Kozlowski,
Sebastian Reichel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Henrik Grimler <henrik.grimler@axis.com>
[ Upstream commit c3a6ff174c98f2c7ea213765ff6969140c381e90 ]
According to the technical reference manual for bq27z561 it has
support for an interrupt on an INT pin. Remove it from the list of
devices without interrupt support to better describe the hardware.
Fixes: b4f7a727c29c ("dt-bindings: power: supply: bq27xxx: document optional interrupt")
Signed-off-by: Henrik Grimler <henrik.grimler@axis.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260818-bq27z746-v2-1-0371e206665f@axis.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/power/supply/bq27xxx.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
index bc05400186cf1..d985ae6325994 100644
--- a/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
+++ b/Documentation/devicetree/bindings/power/supply/bq27xxx.yaml
@@ -91,7 +91,6 @@ allOf:
- ti,bq27742
- ti,bq27545
- ti,bq27411
- - ti,bq27z561
- ti,bq28z610
- ti,bq34z100
- ti,bq78z100
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0325/2151] power: supply: bq2515x: Propagate charge-enable read errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (323 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0324/2151] dt-bindings: power: bq27xxx: bq27z561: allow interrupts property Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0326/2151] scsi: mpi3mr: Fix buffer overflow in BSG passthrough request copy Greg Kroah-Hartman
` (557 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Linmao Li, Sebastian Reichel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linmao Li <lilinmao@kylinos.cn>
[ Upstream commit 4a35810a847411c466a15d1737d11e8e818dc197 ]
bq2515x_get_charge_disable() returns bool even though reading the
charger-disable state can fail. A negative error is therefore converted to
true, so POWER_SUPPLY_PROP_STATUS reports NOT_CHARGING with success instead
of propagating the failure. The GPIO read is not checked for errors either.
Return an int from the helper, check both reads, and only convert a valid
charger-disable state to the charging-status boolean.
Fixes: 44908459275e ("power: supply: bq25150 introduce the bq25150")
Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Link: https://patch.msgid.link/20260824084217.670213-1-lilinmao@kylinos.cn
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/power/supply/bq2515x_charger.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/power/supply/bq2515x_charger.c b/drivers/power/supply/bq2515x_charger.c
index 437bff5bc4206..9d2bd2bb9fa81 100644
--- a/drivers/power/supply/bq2515x_charger.c
+++ b/drivers/power/supply/bq2515x_charger.c
@@ -420,7 +420,7 @@ static int bq2515x_get_battery_current_now(struct bq2515x_device *bq2515x)
BQ2515X_ICHG_DIVISOR);
}
-static bool bq2515x_get_charge_disable(struct bq2515x_device *bq2515x)
+static int bq2515x_get_charge_disable(struct bq2515x_device *bq2515x)
{
int ret;
int ce_pin;
@@ -428,6 +428,8 @@ static bool bq2515x_get_charge_disable(struct bq2515x_device *bq2515x)
int charger_disable;
ce_pin = gpiod_get_value_cansleep(bq2515x->ce_gpio);
+ if (ce_pin < 0)
+ return ce_pin;
ret = regmap_read(bq2515x->regmap, BQ2515X_ICCTRL2, &icctrl2);
if (ret)
@@ -435,10 +437,7 @@ static bool bq2515x_get_charge_disable(struct bq2515x_device *bq2515x)
charger_disable = icctrl2 & BQ2515X_CHARGER_DISABLE;
- if (charger_disable || ce_pin)
- return true;
-
- return false;
+ return charger_disable || ce_pin;
}
static int bq2515x_set_charge_disable(struct bq2515x_device *bq2515x, int val)
@@ -615,7 +614,11 @@ static int bq2515x_charging_status(struct bq2515x_device *bq2515x,
else
status1_no_fault = false;
- ce_status = (!bq2515x_get_charge_disable(bq2515x));
+ ret = bq2515x_get_charge_disable(bq2515x);
+ if (ret < 0)
+ return ret;
+
+ ce_status = !ret;
/*
* If there are no faults and charging is enabled, then status is
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0326/2151] scsi: mpi3mr: Fix buffer overflow in BSG passthrough request copy
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (324 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0325/2151] power: supply: bq2515x: Propagate charge-enable read errors Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0327/2151] scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests Greg Kroah-Hartman
` (556 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 896abdd4d81f40575b05d593f7fe004935a6cf97 ]
The size of an incoming BSG request is checked using a variable that is
narrower than the field it is read from, so large values wrap and pass the
check. The copy that follows then uses the full value and writes past the
request buffer.
Widen the variable and copy only the amount that was checked.
Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-2-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index f4174d549fe6d..ce02d88f5e160 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2384,7 +2384,7 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
long rval = -EINVAL;
struct mpi3mr_ioc *mrioc = NULL;
u8 *mpi_req = NULL, *sense_buff_k = NULL;
- u8 mpi_msg_size = 0;
+ u32 mpi_msg_size = 0;
struct mpi3mr_bsg_packet *bsg_req = NULL;
struct mpi3mr_bsg_mptcmd *karg;
struct mpi3mr_buf_entry *buf_entries = NULL;
@@ -2538,7 +2538,7 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
rval = -EINVAL;
goto out;
}
- memcpy(mpi_req, sgl_iter, buf_entries->buf_len);
+ memcpy(mpi_req, sgl_iter, mpi_msg_size);
break;
default:
invalid_be = 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0327/2151] scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (325 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0326/2151] scsi: mpi3mr: Fix buffer overflow in BSG passthrough request copy Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0328/2151] scsi: mpi3mr: Fix I/O block counter leak on admin request post failure Greg Kroah-Hartman
` (555 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 9fac4cbd66d852958e8a8d0952eb57f8554ce83b ]
The MPI request is copied out of the caller supplied payload without first
checking that the requested amount is actually present, so the copy can
read past the end of the payload buffer.
Check the range before copying.
Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-3-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index ce02d88f5e160..adc70d0e7ec67 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2538,6 +2538,14 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
rval = -EINVAL;
goto out;
}
+ if (sgl_iter + mpi_msg_size >
+ dout_buf + job->request_payload.payload_len) {
+ dprint_bsg_err(mrioc, "%s: MPI request buf exceeds dout_buf\n",
+ __func__);
+ mutex_unlock(&mrioc->bsg_cmds.mutex);
+ rval = -EINVAL;
+ goto out;
+ }
memcpy(mpi_req, sgl_iter, mpi_msg_size);
break;
default:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0328/2151] scsi: mpi3mr: Fix I/O block counter leak on admin request post failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (326 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0327/2151] scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0329/2151] scsi: mpi3mr: Fix target device reference leak in BSG task management Greg Kroah-Hartman
` (554 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 37e7d274272bc5e545e2d5f9261afa7f33f1cf49 ]
The per device I/O block counter is raised before a task management request
is posted and only lowered once the request completes. If the post itself
fails the counter stays raised and I/O to that device remains blocked.
Lower it on the failure path as well.
Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-4-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index adc70d0e7ec67..b0b12b5b423a7 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2782,6 +2782,8 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
dprint_bsg_err(mrioc,
"%s: posting bsg request is failed\n", __func__);
rval = -EAGAIN;
+ if (block_io && stgt_priv)
+ atomic_dec(&stgt_priv->block_io);
goto out_unlock;
}
wait_for_completion_timeout(&mrioc->bsg_cmds.done,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0329/2151] scsi: mpi3mr: Fix target device reference leak in BSG task management
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (327 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0328/2151] scsi: mpi3mr: Fix I/O block counter leak on admin request post failure Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0330/2151] scsi: mpi3mr: Fix buffer overflow when caching log data Greg Kroah-Hartman
` (553 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit f0ec04bdf6156ed2ae7d86a8819dafdd9383b705 ]
The target device lookup takes a reference, but it is only dropped inside a
branch that also requires the SCSI target data to be set up. When it is
not, the reference is leaked.
Drop the reference whenever the lookup succeeded.
Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-5-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index b0b12b5b423a7..653844ab2aac4 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2745,10 +2745,12 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
}
if (block_io) {
tgtdev = mpi3mr_get_tgtdev_by_handle(mrioc, dev_handle);
- if (tgtdev && tgtdev->starget && tgtdev->starget->hostdata) {
- stgt_priv = (struct mpi3mr_stgt_priv_data *)
- tgtdev->starget->hostdata;
- atomic_inc(&stgt_priv->block_io);
+ if (tgtdev) {
+ if (tgtdev->starget && tgtdev->starget->hostdata) {
+ stgt_priv = (struct mpi3mr_stgt_priv_data *)
+ tgtdev->starget->hostdata;
+ atomic_inc(&stgt_priv->block_io);
+ }
mpi3mr_tgtdev_put(tgtdev);
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0330/2151] scsi: mpi3mr: Fix buffer overflow when caching log data
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (328 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0329/2151] scsi: mpi3mr: Fix target device reference leak in BSG task management Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0331/2151] scsi: mpi3mr: Fix out-of-bounds reply frame access Greg Kroah-Hartman
` (552 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 9ff1af19c488efad66f2b803eefa0abd5fdac8f4 ]
Each log data slot holds a header followed by the payload, but the copy was
sized against the whole slot and so wrote one header length past the end of
it. Subtracting the header on its own is not enough either, because the
entry size is derived from the controller reply size and can be smaller
than the header.
Work out the payload room first and clamp the copy to it.
Fixes: 43ca11005098 ("scsi: mpi3mr: Add support for PEL commands")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-6-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index 653844ab2aac4..552db18da1219 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2947,7 +2947,8 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
u16 event_data_size)
{
- u32 index = mrioc->logdata_buf_idx, sz;
+ u32 index = mrioc->logdata_buf_idx;
+ size_t entry_payload_len, sz;
struct mpi3mr_logdata_entry *entry;
if (!(mrioc->logdata_buf))
@@ -2956,7 +2957,12 @@ void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
entry = (struct mpi3mr_logdata_entry *)
(mrioc->logdata_buf + (index * mrioc->logdata_entry_sz));
entry->valid_entry = 1;
- sz = min(mrioc->logdata_entry_sz, event_data_size);
+ if (mrioc->logdata_entry_sz > MPI3MR_BSG_LOGDATA_ENTRY_HEADER_SZ)
+ entry_payload_len = (size_t)mrioc->logdata_entry_sz -
+ MPI3MR_BSG_LOGDATA_ENTRY_HEADER_SZ;
+ else
+ entry_payload_len = 0;
+ sz = min_t(size_t, entry_payload_len, event_data_size);
memcpy(entry->data, event_data, sz);
mrioc->logdata_buf_idx =
((++index) % MPI3MR_BSG_LOGDATA_MAX_ENTRIES);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0331/2151] scsi: mpi3mr: Fix out-of-bounds reply frame access
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (329 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0330/2151] scsi: mpi3mr: Fix buffer overflow when caching log data Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0332/2151] scsi: mpi3mr: Fix out-of-bounds sense buffer access Greg Kroah-Hartman
` (551 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit bcf0a5bed59acd5ae19d80e1f617c1a5b355af0b ]
The reply frame address reported on completion is only checked against the
start and the end of the pool. An address near the top can pass the check
while leaving less than a full frame, and an unaligned one resolves into
the middle of a frame instead of the start of one.
Require a whole frame to fit and the address to be frame aligned.
Fixes: 824a156633df ("scsi: mpi3mr: Base driver code")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-7-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_fw.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 4c8d78b840fc9..b83bb6027d578 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -119,11 +119,16 @@ void mpi3mr_build_zero_len_sge(void *paddr)
void *mpi3mr_get_reply_virt_addr(struct mpi3mr_ioc *mrioc,
dma_addr_t phys_addr)
{
+ u64 offset;
+
if (!phys_addr)
return NULL;
+ offset = phys_addr - mrioc->reply_buf_dma;
+
if ((phys_addr < mrioc->reply_buf_dma) ||
- (phys_addr > mrioc->reply_buf_dma_max_address))
+ (phys_addr > mrioc->reply_buf_dma_max_address - mrioc->reply_sz) ||
+ do_div(offset, mrioc->reply_sz))
return NULL;
return mrioc->reply_buf + (phys_addr - mrioc->reply_buf_dma);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0332/2151] scsi: mpi3mr: Fix out-of-bounds sense buffer access
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (330 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0331/2151] scsi: mpi3mr: Fix out-of-bounds reply frame access Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0333/2151] scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal Greg Kroah-Hartman
` (550 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 7fea128f6b829ad834f21834d2605d28a45b903d ]
The sense buffer address reported on completion is turned into a virtual
address with no range check, so an address outside the pool resolves to
memory that does not belong to it.
Check that it lies within the pool and is correctly aligned.
Fixes: 824a156633df ("scsi: mpi3mr: Base driver code")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-8-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_fw.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index b83bb6027d578..d4db5a747198b 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -137,9 +137,19 @@ void *mpi3mr_get_reply_virt_addr(struct mpi3mr_ioc *mrioc,
void *mpi3mr_get_sensebuf_virt_addr(struct mpi3mr_ioc *mrioc,
dma_addr_t phys_addr)
{
+ u64 offset;
+
if (!phys_addr)
return NULL;
+ offset = phys_addr - mrioc->sense_buf_dma;
+
+ if (phys_addr < mrioc->sense_buf_dma ||
+ (phys_addr > mrioc->sense_buf_dma +
+ (mrioc->num_sense_bufs * MPI3MR_SENSE_BUF_SZ) - MPI3MR_SENSE_BUF_SZ) ||
+ do_div(offset, MPI3MR_SENSE_BUF_SZ))
+ return NULL;
+
return mrioc->sense_buf + (phys_addr - mrioc->sense_buf_dma);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0333/2151] scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (331 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0332/2151] scsi: mpi3mr: Fix out-of-bounds sense buffer access Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0334/2151] scsi: mpi3mr: Fix target device reference leak in device removal handshake Greg Kroah-Hartman
` (549 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 5dade59551d344d0308256edfef6bc3fb4202eb3 ]
Device handles reported by the controller are used to index the remove
pending bitmap and to build a task management request without being
compared against the maximum handle the controller reported.
Check the handle before using it.
Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-9-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index d4ca878d08869..848afd656cf2e 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -2313,7 +2313,8 @@ static void mpi3mr_dev_rmhs_complete_iou(struct mpi3mr_ioc *mrioc,
ioc_info(mrioc,
"%s :dev removal handshake completed successfully: handle(0x%04x)\n",
__func__, drv_cmd->dev_handle);
- clear_bit(drv_cmd->dev_handle, mrioc->removepend_bitmap);
+ if (drv_cmd->dev_handle < mrioc->facts.max_devhandle)
+ clear_bit(drv_cmd->dev_handle, mrioc->removepend_bitmap);
}
if (!list_empty(&mrioc->delayed_rmhs_list)) {
@@ -2427,6 +2428,20 @@ static void mpi3mr_dev_rmhs_send_tm(struct mpi3mr_ioc *mrioc, u16 handle,
struct mpi3mr_tgt_dev *tgtdev = NULL;
unsigned long flags;
+ if (handle >= mrioc->facts.max_devhandle) {
+ ioc_err(mrioc, "dev_remove_hs: handle(0x%04x) >= max_devhandle(0x%04x)\n",
+ handle, mrioc->facts.max_devhandle);
+ if (drv_cmd) {
+ cmd_idx = drv_cmd->host_tag - MPI3MR_HOSTTAG_DEVRMCMD_MIN;
+ drv_cmd->state = MPI3MR_CMD_NOTUSED;
+ drv_cmd->callback = NULL;
+ drv_cmd->dev_handle = MPI3MR_INVALID_DEV_HANDLE;
+ drv_cmd->retry_count = 0;
+ clear_bit(cmd_idx, mrioc->devrem_bitmap);
+ }
+ return;
+ }
+
spin_lock_irqsave(&mrioc->tgtdev_lock, flags);
tgtdev = __mpi3mr_get_tgtdev_by_handle(mrioc, handle);
if (tgtdev && (iou_rc == MPI3_CTRL_OP_REMOVE_DEVICE))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0334/2151] scsi: mpi3mr: Fix target device reference leak in device removal handshake
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (332 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0333/2151] scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0335/2151] scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events Greg Kroah-Hartman
` (548 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit a04b0f3a17e32aa449fd896163a7b40efc29c4f5 ]
The device removal handshake looks up the target device to update its state
but never drops the reference that the lookup takes.
Drop it once the state has been updated.
Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-10-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 848afd656cf2e..ba7bd376536d4 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -2448,6 +2448,9 @@ static void mpi3mr_dev_rmhs_send_tm(struct mpi3mr_ioc *mrioc, u16 handle,
tgtdev->state = MPI3MR_DEV_REMOVE_HS_STARTED;
spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags);
+ if (tgtdev)
+ mpi3mr_tgtdev_put(tgtdev);
+
if (drv_cmd)
goto issue_cmd;
do {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0335/2151] scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (333 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0334/2151] scsi: mpi3mr: Fix target device reference leak in device removal handshake Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0336/2151] scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context Greg Kroah-Hartman
` (547 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 9e220ce4bd0468e47cc9eea07e40799ebae6eda8 ]
The number of entries in a SAS topology change event is used to walk the
entry array without being compared against the amount of event data that
was received, so the walk can run past the end of the buffer.
Work out how many entries the payload can hold and skip the event if it
claims more.
Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-11-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index ba7bd376536d4..7c94897e458cf 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -2741,12 +2741,28 @@ static void mpi3mr_sastopochg_evt_th(struct mpi3mr_ioc *mrioc,
struct mpi3_event_data_sas_topology_change_list *topo_evt =
(struct mpi3_event_data_sas_topology_change_list *)event_reply->event_data;
int i;
- u16 handle;
- u8 reason_code;
+ u16 handle, avail_len;
+ u8 reason_code, max_entries, num_entries;
struct mpi3mr_tgt_dev *tgtdev = NULL;
struct mpi3mr_stgt_priv_data *scsi_tgt_priv_data = NULL;
- for (i = 0; i < topo_evt->num_entries; i++) {
+ avail_len = event_reply->event_data_length * 4;
+ if (avail_len < offsetof(struct mpi3_event_data_sas_topology_change_list, phy_entry)) {
+ ioc_err(mrioc, "SAS topology event: event data too small (%u bytes)\n",
+ avail_len);
+ return;
+ }
+ max_entries = (avail_len -
+ offsetof(struct mpi3_event_data_sas_topology_change_list, phy_entry)) /
+ sizeof(struct mpi3_event_sas_topo_phy_entry);
+ num_entries = topo_evt->num_entries;
+ if (num_entries > max_entries) {
+ ioc_err(mrioc, "SAS topology event: num_entries(%d) exceeds max(%d)\n",
+ num_entries, max_entries);
+ return;
+ }
+
+ for (i = 0; i < num_entries; i++) {
handle = le16_to_cpu(topo_evt->phy_entry[i].attached_dev_handle);
if (!handle)
continue;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0336/2151] scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (334 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0335/2151] scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0337/2151] scsi: mpi3mr: Fix out-of-bounds read of event data Greg Kroah-Hartman
` (546 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ranjan Kumar, Martin K. Petersen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ranjan Kumar <ranjan.kumar@broadcom.com>
[ Upstream commit d0d19250ed81907eac707be8221eb31e5b96b647 ]
Log data events can be processed from BH and threaded contexts. Rename
the save helper to document its intended usage and improve readability
of the event handling flow.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://patch.msgid.link/20260116060719.32937-3-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 77554f01187d ("scsi: mpi3mr: Fix out-of-bounds read of event data")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr.h | 2 +-
drivers/scsi/mpi3mr/mpi3mr_app.c | 4 ++--
drivers/scsi/mpi3mr/mpi3mr_os.c | 7 ++++++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
index 31d68c151b207..611a51a353c97 100644
--- a/drivers/scsi/mpi3mr/mpi3mr.h
+++ b/drivers/scsi/mpi3mr/mpi3mr.h
@@ -1508,7 +1508,7 @@ void mpi3mr_pel_get_seqnum_complete(struct mpi3mr_ioc *mrioc,
struct mpi3mr_drv_cmd *drv_cmd);
int mpi3mr_pel_get_seqnum_post(struct mpi3mr_ioc *mrioc,
struct mpi3mr_drv_cmd *drv_cmd);
-void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
+void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
u16 event_data_size);
struct mpi3mr_enclosure_node *mpi3mr_enclosure_find_by_handle(
struct mpi3mr_ioc *mrioc, u16 handle);
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index 552db18da1219..85315ee17c70b 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -2932,7 +2932,7 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
}
/**
- * mpi3mr_app_save_logdata - Save Log Data events
+ * mpi3mr_app_save_logdata_th - Save Log Data events
* @mrioc: Adapter instance reference
* @event_data: event data associated with log data event
* @event_data_size: event data size to copy
@@ -2944,7 +2944,7 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job)
*
* Return:Nothing
*/
-void mpi3mr_app_save_logdata(struct mpi3mr_ioc *mrioc, char *event_data,
+void mpi3mr_app_save_logdata_th(struct mpi3mr_ioc *mrioc, char *event_data,
u16 event_data_size)
{
u32 index = mrioc->logdata_buf_idx;
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 7c94897e458cf..a2496f11ab991 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -1962,7 +1962,7 @@ static void mpi3mr_pcietopochg_evt_bh(struct mpi3mr_ioc *mrioc,
static void mpi3mr_logdata_evt_bh(struct mpi3mr_ioc *mrioc,
struct mpi3mr_fwevt *fwevt)
{
- mpi3mr_app_save_logdata(mrioc, fwevt->event_data,
+ mpi3mr_app_save_logdata_th(mrioc, fwevt->event_data,
fwevt->event_data_size);
}
@@ -3092,6 +3092,11 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
}
case MPI3_EVENT_DEVICE_INFO_CHANGED:
case MPI3_EVENT_LOG_DATA:
+
+ sz = event_reply->event_data_length * 4;
+ mpi3mr_app_save_logdata_th(mrioc,
+ (char *)event_reply->event_data, sz);
+ break;
case MPI3_EVENT_ENCL_DEVICE_STATUS_CHANGE:
case MPI3_EVENT_ENCL_DEVICE_ADDED:
{
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0337/2151] scsi: mpi3mr: Fix out-of-bounds read of event data
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (335 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0336/2151] scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0338/2151] scsi: mpi3mr: Fix out-of-bounds phy array access on link change Greg Kroah-Hartman
` (545 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 77554f01187d91c20f04d2a8e28270943ed64cca ]
The event data length from the reply is used as is, both when caching log
data and when sizing the buffer handed to the bottom half. A length larger
than the frame makes both of them read past the end of it.
Clamp the length to what the frame can hold.
Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling")
Fixes: d0d19250ed81 ("scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-12-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index a2496f11ab991..8551aa47549e3 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -3032,7 +3032,7 @@ void mpi3mr_add_event_wait_for_device_refresh(struct mpi3mr_ioc *mrioc)
void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
struct mpi3_event_notification_reply *event_reply)
{
- u16 evt_type, sz;
+ u16 evt_type, sz, avail_reply_room;
struct mpi3mr_fwevt *fwevt = NULL;
bool ack_req = 0, process_evt_bh = 0;
@@ -3093,7 +3093,12 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
case MPI3_EVENT_DEVICE_INFO_CHANGED:
case MPI3_EVENT_LOG_DATA:
- sz = event_reply->event_data_length * 4;
+ if (mrioc->reply_sz > offsetof(struct mpi3_event_notification_reply, event_data))
+ avail_reply_room = mrioc->reply_sz -
+ offsetof(struct mpi3_event_notification_reply, event_data);
+ else
+ avail_reply_room = 0;
+ sz = min_t(u16, event_reply->event_data_length * 4, avail_reply_room);
mpi3mr_app_save_logdata_th(mrioc,
(char *)event_reply->event_data, sz);
break;
@@ -3127,7 +3132,12 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc,
dprint_event_th(mrioc,
"scheduling bottom half handler for event(0x%02x) - (0x%08x), ack_required=%d\n",
evt_type, le32_to_cpu(event_reply->event_context), ack_req);
- sz = event_reply->event_data_length * 4;
+ if (mrioc->reply_sz > offsetof(struct mpi3_event_notification_reply, event_data))
+ avail_reply_room = mrioc->reply_sz -
+ offsetof(struct mpi3_event_notification_reply, event_data);
+ else
+ avail_reply_room = 0;
+ sz = min_t(u16, event_reply->event_data_length * 4, avail_reply_room);
fwevt = mpi3mr_alloc_fwevt(sz);
if (!fwevt) {
dprint_event_th(mrioc,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0338/2151] scsi: mpi3mr: Fix out-of-bounds phy array access on link change
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (336 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0337/2151] scsi: mpi3mr: Fix out-of-bounds read of event data Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0339/2151] scsi: mpi3mr: Fix buffer overflow in the BSG target device map Greg Kroah-Hartman
` (544 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit f67caaa2521a3c8f931d1e679d831ba5ca654794 ]
The phy number that comes with a link change is used to index the node's
phy array without being compared against the number of phys allocated for
that node.
Check it first.
Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-13-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_transport.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index a34b0f2e1f5b2..1de996ac5b5c9 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -1091,6 +1091,13 @@ void mpi3mr_update_links(struct mpi3mr_ioc *mrioc,
return;
}
+ if (phy_number >= mr_sas_node->num_phys) {
+ spin_unlock_irqrestore(&mrioc->sas_node_lock, flags);
+ ioc_err(mrioc, "%s: phy_number(%d) >= num_phys(%d)\n",
+ __func__, phy_number, mr_sas_node->num_phys);
+ return;
+ }
+
mr_sas_phy = &mr_sas_node->phy[phy_number];
mr_sas_phy->attached_handle = handle;
spin_unlock_irqrestore(&mrioc->sas_node_lock, flags);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0339/2151] scsi: mpi3mr: Fix buffer overflow in the BSG target device map
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (337 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0338/2151] scsi: mpi3mr: Fix out-of-bounds phy array access on link change Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0340/2151] scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events Greg Kroah-Hartman
` (543 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 203b3072e7aa10d98b3f2b766693ea925cfc571d ]
The size of the target device map buffer is held in a u16 while the number
of devices it is derived from is not bounded to fit. With enough devices
the size wraps, a short buffer is allocated, and the loop that fills it
writes past the end.
Do the calculation in size_t.
Fixes: fb428a2005fc ("scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info()")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-14-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index 85315ee17c70b..83503c44cc2ac 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -1466,7 +1466,8 @@ static long mpi3mr_bsg_pel_enable(struct mpi3mr_ioc *mrioc,
static long mpi3mr_get_all_tgt_info(struct mpi3mr_ioc *mrioc,
struct bsg_job *job)
{
- u16 num_devices = 0, i = 0, size;
+ u16 num_devices = 0, i = 0;
+ size_t size;
unsigned long flags;
struct mpi3mr_tgt_dev *tgtdev;
struct mpi3mr_device_map_info *devmap_info = NULL;
@@ -1492,8 +1493,8 @@ static long mpi3mr_get_all_tgt_info(struct mpi3mr_ioc *mrioc,
return 0;
}
- kern_entrylen = num_devices * sizeof(*devmap_info);
- size = sizeof(u64) + kern_entrylen;
+ kern_entrylen = (uint32_t)num_devices * sizeof(*devmap_info);
+ size = sizeof(u64) + (size_t)kern_entrylen;
alltgt_info = kzalloc(size, GFP_KERNEL);
if (!alltgt_info)
return -ENOMEM;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0340/2151] scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (338 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0339/2151] scsi: mpi3mr: Fix buffer overflow in the BSG target device map Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0341/2151] scsi: mpi3mr: zero out diagnostic buffer status memory Greg Kroah-Hartman
` (542 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 7d572b4dc4ed0494e67097d4b7368666655f5c99 ]
The number of entries in a PCIe topology change event is used to walk the
entry array without being compared against the amount of event data that
was received.
Bound the entry count to the received event data before use.
Fixes: 8e653455547a ("scsi: mpi3mr: Add support for PCIe device event handling")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-15-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 8551aa47549e3..cb105c8fdbb18 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -2675,12 +2675,28 @@ static void mpi3mr_pcietopochg_evt_th(struct mpi3mr_ioc *mrioc,
struct mpi3_event_data_pcie_topology_change_list *topo_evt =
(struct mpi3_event_data_pcie_topology_change_list *)event_reply->event_data;
int i;
- u16 handle;
- u8 reason_code;
+ u16 handle, avail_len;
+ u8 reason_code, max_entries, num_entries;
struct mpi3mr_tgt_dev *tgtdev = NULL;
struct mpi3mr_stgt_priv_data *scsi_tgt_priv_data = NULL;
- for (i = 0; i < topo_evt->num_entries; i++) {
+ avail_len = event_reply->event_data_length * 4;
+ if (avail_len < offsetof(struct mpi3_event_data_pcie_topology_change_list, port_entry)) {
+ ioc_err(mrioc, "PCIe topology event: event data too small (%u bytes)\n",
+ avail_len);
+ return;
+ }
+ max_entries = (avail_len -
+ offsetof(struct mpi3_event_data_pcie_topology_change_list, port_entry)) /
+ sizeof(struct mpi3_event_pcie_topo_port_entry);
+ num_entries = topo_evt->num_entries;
+ if (num_entries > max_entries) {
+ ioc_err(mrioc, "PCIe topology event: num_entries(%d) exceeds max(%d)\n",
+ num_entries, max_entries);
+ return;
+ }
+
+ for (i = 0; i < num_entries; i++) {
handle = le16_to_cpu(topo_evt->port_entry[i].attached_dev_handle);
if (!handle)
continue;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0341/2151] scsi: mpi3mr: zero out diagnostic buffer status memory
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (339 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0340/2151] scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0342/2151] scsi: mpi3mr: Fix use-after-free of the firmware event workqueue Greg Kroah-Hartman
` (541 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 052aea807cfbcefaf5b6ed8202f65da1fc65f4a0 ]
Memory allocated for the BSG diagnostic buffer status is not zeroed before
it is copied back to user space. Several fields in this structure are
reserved and never written by the driver. Use kzalloc() instead of
kmalloc() to zero out the allocated memory.
Fixes: 78b506984ebe ("scsi: mpi3mr: Add ioctl support for HDB")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-16-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_app.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index 83503c44cc2ac..acdc7c5ba527c 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -1244,7 +1244,7 @@ static long mpi3mr_bsg_query_hdb(struct mpi3mr_ioc *mrioc,
length = (sizeof(*hbd_status) + ((MPI3MR_MAX_NUM_HDB - 1) *
sizeof(*hbd_status_entry)));
- hbd_status = kmalloc(length, GFP_KERNEL);
+ hbd_status = kzalloc(length, GFP_KERNEL);
if (!hbd_status)
return -ENOMEM;
hbd_status_entry = &hbd_status->entry[0];
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0342/2151] scsi: mpi3mr: Fix use-after-free of the firmware event workqueue
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (340 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0341/2151] scsi: mpi3mr: zero out diagnostic buffer status memory Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0343/2151] scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery Greg Kroah-Hartman
` (540 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit c94c746e6c80439a4a9a0e1e20f2dae62a4d57ef ]
The enqueue path reads the workqueue pointer before taking the event lock,
while the remove path clears that pointer and destroys the workqueue while
holding it. The enqueue can therefore reach queue_work() after the
workqueue is gone.
Move the check inside the lock.
Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-17-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index cb105c8fdbb18..d0f9eb45750df 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -233,10 +233,11 @@ static void mpi3mr_fwevt_add_to_list(struct mpi3mr_ioc *mrioc,
{
unsigned long flags;
- if (!mrioc->fwevt_worker_thread)
- return;
-
spin_lock_irqsave(&mrioc->fwevt_lock, flags);
+ if (!mrioc->fwevt_worker_thread) {
+ spin_unlock_irqrestore(&mrioc->fwevt_lock, flags);
+ return;
+ }
/* get fwevt reference count while adding it to fwevt_list */
mpi3mr_fwevt_get(fwevt);
INIT_LIST_HEAD(&fwevt->list);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0343/2151] scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (341 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0342/2151] scsi: mpi3mr: Fix use-after-free of the firmware event workqueue Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0344/2151] iio: accel: kionix-kx022a: Fix IPOL macro name Greg Kroah-Hartman
` (539 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chandrakanth Patil,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
[ Upstream commit 2ba1d12b2629827fdb1116eb3c9f8566911f2034 ]
On a frozen PCI channel the driver unmaps the register window and frees the
interrupts, but leaves the firmware event workqueue running. An event
handler that is already in flight can still reach the register window after
it has been unmapped.
Stop event processing and drain the queue first, and start it again when
the channel resumes.
Fixes: 30bafe1774f0 ("scsi: mpi3mr: Support PCI Error Recovery callback handlers")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-18-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index d0f9eb45750df..315664e4ddff3 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -2042,9 +2042,11 @@ static void mpi3mr_fwevt_bh(struct mpi3mr_ioc *mrioc,
mpi3mr_fwevt_del_from_list(mrioc, fwevt);
mrioc->current_event = fwevt;
- if (mrioc->stop_drv_processing) {
- dprint_event_bh(mrioc, "ignoring event(0x%02x) in the bottom half handler\n"
- "due to stop_drv_processing\n", fwevt->event_id);
+ if (mrioc->stop_drv_processing || mrioc->pci_err_recovery) {
+ dprint_event_bh(mrioc,
+ "ignoring event(0x%02x) in the bottom half handler\n"
+ "due to stop_drv_processing or pci_err_recovery\n",
+ fwevt->event_id);
goto out;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0344/2151] iio: accel: kionix-kx022a: Fix IPOL macro name
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (342 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0343/2151] scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0345/2151] iio: imu: adis16400: Check return value of spi_setup() Greg Kroah-Hartman
` (538 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matti Vaittinen, Mehdi Djait,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matti Vaittinen <mazziesaccount@gmail.com>
[ Upstream commit 4a4b0d75622f7d911c96045b328fe2e88be05072 ]
The "interrupt polarity high"-macro for KX022A variant is defined as:
"#define KX022A_MASK_IPOL KX022A_MASK_IPOL1"
However, the KX022A_MASK_IPOL1 is not defined anywhere, so actually
using the KX022A_IPOL_HIGH would produce a compile error.
Fix the define by using correct mask.
Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/accel/kionix-kx022a.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/kionix-kx022a.h b/drivers/iio/accel/kionix-kx022a.h
index 0ed54f5842235..a2d122c1e2347 100644
--- a/drivers/iio/accel/kionix-kx022a.h
+++ b/drivers/iio/accel/kionix-kx022a.h
@@ -65,7 +65,7 @@
#define KX022A_MASK_IEN BIT(5)
#define KX022A_MASK_IPOL BIT(4)
#define KX022A_IPOL_LOW 0
-#define KX022A_IPOL_HIGH KX022A_MASK_IPOL1
+#define KX022A_IPOL_HIGH KX022A_MASK_IPOL
#define KX022A_MASK_ITYP BIT(3)
#define KX022A_ITYP_PULSE KX022A_MASK_ITYP
#define KX022A_ITYP_LEVEL 0
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0345/2151] iio: imu: adis16400: Check return value of spi_setup()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (343 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0344/2151] iio: accel: kionix-kx022a: Fix IPOL macro name Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0346/2151] efi/libstub: Fix efi_set_event_at() parameter documentation Greg Kroah-Hartman
` (537 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Salah Triki, Andy Shevchenko,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Salah Triki <salah.triki@gmail.com>
[ Upstream commit a7c07602e00596a45de8a4a700af96392953ed38 ]
In adis16400_initial_setup(), the return value of spi_setup() was ignored.
If SPI configuration fails, the driver would proceed with the
initialization anyway, leading to undefined behavior or silent failures
during device setup.
Check the return value of spi_setup() and return the error code immediately
if it fails.
Fixes: cd888a17f95f ("staging:iio:adis16400: Use adis library")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/imu/adis16400.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c
index 9f8721c196a95..4b83f199c8e1b 100644
--- a/drivers/iio/imu/adis16400.c
+++ b/drivers/iio/imu/adis16400.c
@@ -420,7 +420,10 @@ static int adis16400_initial_setup(struct iio_dev *indio_dev)
else
st->adis.spi->max_speed_hz = ADIS16400_SPI_FAST;
st->adis.spi->mode = SPI_MODE_3;
- spi_setup(st->adis.spi);
+
+ ret = spi_setup(st->adis.spi);
+ if (ret)
+ return ret;
ret = __adis_initial_startup(&st->adis);
if (ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0346/2151] efi/libstub: Fix efi_set_event_at() parameter documentation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (344 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0345/2151] iio: imu: adis16400: Check return value of spi_setup() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0347/2151] kernfs: fix up the unlocked attribute reads on the creation paths Greg Kroah-Hartman
` (536 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Ard Biesheuvel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit c12a3a4b35e47fd511fbd550d3637318be41c4eb ]
efi_set_event_at() documents ids although its array index argument is
named idx. This produces missing and excess parameter warnings.
Match the argument name and fix the adjacent spelling of array.
Fixes: 8c0a839c2bcc ("efi/libstub: Descriptions for stub helper functions")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/efi/libstub/efistub.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
index f5ba032863a9c..3e21ff6acb9a2 100644
--- a/drivers/firmware/efi/libstub/efistub.h
+++ b/drivers/firmware/efi/libstub/efistub.h
@@ -220,8 +220,8 @@ typedef void (__efiapi *efi_event_notify_t)(efi_event_t, void *);
* efi_set_event_at() - add event to events array
*
* @events: array of UEFI events
- * @ids: index where to put the event in the array
- * @event: event to add to the aray
+ * @idx: index where to put the event in the array
+ * @event: event to add to the array
*
* boottime->wait_for_event() takes an array of events as input.
* Provide a helper to set it up correctly for mixed mode.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0347/2151] kernfs: fix up the unlocked attribute reads on the creation paths
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (345 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0346/2151] efi/libstub: Fix efi_set_event_at() parameter documentation Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0348/2151] arm64: dts: mediatek: mt8188-geralt: Enlarge SCP core0 memory region Greg Kroah-Hartman
` (535 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tejun Heo, Shakeel Butt,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shakeel Butt <shakeel.butt@linux.dev>
[ Upstream commit 81bdc85b4c086502f4446a58eb5d25f29bb5e9f7 ]
Two creation paths read a live node's attributes without holding
kernfs_iattr_rwsem, which kernfs_iop_setattr() takes for writing. They
need different fixes.
kernfs_create_link() copies the target's ia_uid and then its ia_gid into
the new link. A chown of the target between the two reads leaves the
link with the old uid and the new gid, an owner the target never had.
Read both under the rwsem.
kernfs_new_node() reads the parent's mode and ia_gid for S_ISGID
inheritance. Either value is fine there: the node does not exist yet,
so nothing orders a racing chmod or chown against the creation. Taking
the rwsem would only pick between two answers that are both right. Mark
the reads with READ_ONCE() instead.
The pointer that leads to them is already fine: __kernfs_iattrs()
publishes kernfs_node::iattr with try_cmpxchg(), and both sides read it
with READ_ONCE(), like the rest of fs/kernfs.
The Fixes tag is for the symlink half. kernfs_create_link() has read
the pair unlocked since it started copying the target's owner; only the
name of the lock its writer takes has changed. The READ_ONCE() markings
are not a fix.
Fixes: 488dee96bb62 ("kernfs: allow creating kernfs objects with arbitrary uid/gid")
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20260905191613.3143937-5-shakeel.butt@linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/kernfs/dir.c | 12 +++++++++---
fs/kernfs/symlink.c | 17 ++++++++++++++---
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 360cfbd8dd36e..8cdb44ac68db0 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -701,13 +701,19 @@ struct kernfs_node *kernfs_new_node(struct kernfs_node *parent,
{
struct kernfs_node *kn;
- if (parent->mode & S_ISGID) {
+ /*
+ * The mode and the gid below are read unlocked on purpose: they feed
+ * a node that does not exist yet, so nothing orders a racing chmod or
+ * chown against this creation.
+ */
+ if (READ_ONCE(parent->mode) & S_ISGID) {
/* this code block imitates inode_init_owner() for
* kernfs
*/
+ struct kernfs_iattrs *attrs = READ_ONCE(parent->iattr);
- if (parent->iattr)
- gid = parent->iattr->ia_gid;
+ if (attrs)
+ gid = READ_ONCE(attrs->ia_gid);
if (flags & KERNFS_DIR)
mode |= S_ISGID;
diff --git a/fs/kernfs/symlink.c b/fs/kernfs/symlink.c
index 0bd8a2143723d..727d77ff742f0 100644
--- a/fs/kernfs/symlink.c
+++ b/fs/kernfs/symlink.c
@@ -31,9 +31,20 @@ struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
kuid_t uid = GLOBAL_ROOT_UID;
kgid_t gid = GLOBAL_ROOT_GID;
- if (target->iattr) {
- uid = target->iattr->ia_uid;
- gid = target->iattr->ia_gid;
+ /*
+ * A symlink takes its owner from its target, so both fields have to
+ * come from the same moment: read them under kernfs_iattr_rwsem, or
+ * a chown of the target racing this could leave the link with the
+ * old uid and the new gid. The section ends before kernfs_add_one()
+ * takes kernfs_rwsem.
+ */
+ scoped_guard(rwsem_read, &kernfs_root(target)->kernfs_iattr_rwsem) {
+ struct kernfs_iattrs *attrs = READ_ONCE(target->iattr);
+
+ if (attrs) {
+ uid = attrs->ia_uid;
+ gid = attrs->ia_gid;
+ }
}
kn = kernfs_new_node(parent, name, S_IFLNK|0777, uid, gid, KERNFS_LINK);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0348/2151] arm64: dts: mediatek: mt8188-geralt: Enlarge SCP core0 memory region
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (346 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0347/2151] kernfs: fix up the unlocked attribute reads on the creation paths Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0349/2151] PCI: xgene: Use managed clock for PCIe controller Greg Kroah-Hartman
` (534 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Justin Yeh, Chen-Yu Tsai,
AngeloGioacchino Del Regno, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Justin Yeh <justin.yeh@mediatek.com>
[ Upstream commit 868297e3ebcc5c9b0e7cada19c82b11068faf4bf ]
The SCP firmware in linux-firmware for this platform
(mediatek/mt8188/scp_c0.img) supports MDP, which the mdp3-rdma node
drives through scp_c0. On top of the segments it loads, the firmware
allocates a 1 MiB DMA region at 0x50800000 at run time. That lies
outside the 8 MiB reserved for SCP core0, so Linux is free to allocate
over memory the firmware uses.
Enlarge the region to 9 MiB. apu_mem starts at 0x55000000, so no other
reserved region has to move.
Fixes: e36be19823f0 ("arm64: dts: mediatek: mt8188-geralt: Enable first SCP core")
Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
index 118d6b2ebd2c6..038ade1acdfdc 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi
@@ -171,7 +171,7 @@ reserved_memory: reserved-memory {
scp_mem_reserved: memory@50000000 {
compatible = "shared-dma-pool";
- reg = <0 0x50000000 0 0x800000>;
+ reg = <0 0x50000000 0 0x900000>;
no-map;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0349/2151] PCI: xgene: Use managed clock for PCIe controller
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (347 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0348/2151] arm64: dts: mediatek: mt8188-geralt: Enlarge SCP core0 memory region Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0350/2151] RDMA/hns: Limit gmv_entry_num to avoid memory waste Greg Kroah-Hartman
` (533 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yuho Choi, Manivannan Sadhasivam,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuho Choi <dbgh9129@gmail.com>
[ Upstream commit b9022584ebbae81f7bbe4a61bd1df0d0a95e1a99 ]
xgene_pcie_init_port() obtains and enables the controller clock manually.
When xgene_pcie_setup() or pci_host_probe() fails, probe returns without
disabling, unpreparing, or releasing the clock. A failed enable also leaves
the clk_get() reference unreleased.
Use devm_clk_get_enabled() so the clock is unwound automatically on probe
failure and device removal.
Fixes: 5f6b6ccdbe1c ("PCI: xgene: Add APM X-Gene PCIe driver")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260802221146.573233-1-dbgh9129@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/controller/pci-xgene.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c
index 83c9a2930eeca..a5b8bbc04a221 100644
--- a/drivers/pci/controller/pci-xgene.c
+++ b/drivers/pci/controller/pci-xgene.c
@@ -320,18 +320,11 @@ static void xgene_pcie_linkup(struct xgene_pcie *port,
static int xgene_pcie_init_port(struct xgene_pcie *port)
{
struct device *dev = port->dev;
- int rc;
- port->clk = clk_get(dev, NULL);
+ port->clk = devm_clk_get_enabled(dev, NULL);
if (IS_ERR(port->clk)) {
dev_err(dev, "clock not available\n");
- return -ENODEV;
- }
-
- rc = clk_prepare_enable(port->clk);
- if (rc) {
- dev_err(dev, "clock enable failed\n");
- return rc;
+ return PTR_ERR(port->clk);
}
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0350/2151] RDMA/hns: Limit gmv_entry_num to avoid memory waste
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (348 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0349/2151] PCI: xgene: Use managed clock for PCIe controller Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0351/2151] RDMA/hns: Fix GID capacity loss in 64K system Greg Kroah-Hartman
` (532 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Junxian Huang, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junxian Huang <huangjunxian6@hisilicon.com>
[ Upstream commit bb464eeadd301c3a53e9f92a2a472b73c42b74c4 ]
The GMV entry is a HW object corresponding to a GID. Since gid_table_len
is already limited to a maximum of 256, there is no need to allocate
memory for those extra GMV entries as they will never be touched.
Fixes: 7243396aaf12 ("RDMA/hns: Add a max length of gid table")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20260907084901.2420703-3-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 2336079daa1e0..92a15be234068 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -2180,8 +2180,7 @@ static void apply_func_caps(struct hns_roce_dev *hr_dev)
caps->gmv_bt_num *
(HNS_HW_PAGE_SIZE / caps->gmv_entry_sz));
- caps->gmv_entry_num = caps->gmv_bt_num * (HNS_HW_PAGE_SIZE /
- caps->gmv_entry_sz);
+ caps->gmv_entry_num = caps->gid_table_len[0];
} else {
u32 func_num = max_t(u32, 1, hr_dev->func_num);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0351/2151] RDMA/hns: Fix GID capacity loss in 64K system
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (349 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0350/2151] RDMA/hns: Limit gmv_entry_num to avoid memory waste Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0352/2151] usb: image: microtek: stop SG processing after transfer errors Greg Kroah-Hartman
` (531 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Junxian Huang, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junxian Huang <huangjunxian6@hisilicon.com>
[ Upstream commit 95761b8736c938759032e8d4eb42074d39d13007 ]
Our HW always handles GMV BT pages with a fixed 4K size, but the driver
calculates the needed GMV BT pages number with PAGE_SIZE, which is 64K
in 64K system. Only the first 4K (GMV index 0-127) can be reached by HW,
causing GID capacity loss and memory waste.
Split a single 64K BT page into multiple 4K pages and register them to
HW per 4K block so that HW can correctly reach all GMV entries.
Fixes: 32053e584e4a ("RDMA/hns: Add support for filling GMV table")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20260907084901.2420703-4-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 37 +++++++++++++++++-----
1 file changed, 29 insertions(+), 8 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 92a15be234068..fd7bebf79e5e8 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4113,18 +4113,39 @@ static int get_op_for_set_hem(struct hns_roce_dev *hr_dev, u32 type,
static int config_gmv_ba_to_hw(struct hns_roce_dev *hr_dev, unsigned long obj,
dma_addr_t base_addr)
{
+ u32 obj_num_per_bt = HNS_HW_PAGE_SIZE / hr_dev->caps.gmv_entry_sz;
+ u32 chunk_size = 1 << (hr_dev->caps.gmv_buf_pg_sz + PAGE_SHIFT);
+ u32 bt_num_per_chunk = chunk_size / HNS_HW_PAGE_SIZE;
+ u32 first = obj / obj_num_per_bt;
+ u32 last = min(first + bt_num_per_chunk, hr_dev->caps.gmv_bt_num);
struct hns_roce_cmq_desc desc;
- struct hns_roce_cmq_req *req = (struct hns_roce_cmq_req *)desc.data;
- u32 idx = obj / (HNS_HW_PAGE_SIZE / hr_dev->caps.gmv_entry_sz);
- u64 addr = to_hr_hw_page_addr(base_addr);
+ struct hns_roce_cmq_req *req;
+ u64 addr;
+ int ret;
+ u32 i;
- hns_roce_cmq_setup_basic_desc(&desc, HNS_ROCE_OPC_CFG_GMV_BT, false);
+ /* The GMV BT entry of hardware covers a fixed 4K region, so a buffer
+ * chunk larger than 4K must be registered to hardware with one BT
+ * entry per 4K block, otherwise the GMV entries beyond the first
+ * 4K of the chunk are unreachable.
+ */
+ for (i = first; i < last; i++) {
+ hns_roce_cmq_setup_basic_desc(&desc, HNS_ROCE_OPC_CFG_GMV_BT,
+ false);
+ req = (struct hns_roce_cmq_req *)desc.data;
- hr_reg_write(req, CFG_GMV_BT_BA_L, lower_32_bits(addr));
- hr_reg_write(req, CFG_GMV_BT_BA_H, upper_32_bits(addr));
- hr_reg_write(req, CFG_GMV_BT_IDX, idx);
+ addr = to_hr_hw_page_addr(base_addr +
+ (u64)(i - first) * HNS_HW_PAGE_SIZE);
+ hr_reg_write(req, CFG_GMV_BT_BA_L, lower_32_bits(addr));
+ hr_reg_write(req, CFG_GMV_BT_BA_H, upper_32_bits(addr));
+ hr_reg_write(req, CFG_GMV_BT_IDX, i);
- return hns_roce_cmq_send(hr_dev, &desc, 1);
+ ret = hns_roce_cmq_send(hr_dev, &desc, 1);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
}
static int set_hem_to_hw(struct hns_roce_dev *hr_dev, int obj,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0352/2151] usb: image: microtek: stop SG processing after transfer errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (350 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0351/2151] RDMA/hns: Fix GID capacity loss in 64K system Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0353/2151] USB: usbmon: fix null-ptr-deref in mon_bus_remove() when mon_bus_init() fails Greg Kroah-Hartman
` (530 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Diego Fernando Mancera Gomez,
Oliver Neukum, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diego Fernando Mancera Gomez <diegomancera.dev@gmail.com>
[ Upstream commit d937ca39cc44a01ce64865dd25b1e205a05ae3a0 ]
When an SG URB completes with an error, mts_do_sg() calls
mts_transfer_cleanup(), which completes the SCSI command through
scsi_done(). However, the callback continues advancing the scatterlist
and may submit another URB for a command that has already been
completed.
Return immediately after the cleanup so that no further processing is
performed on the completed command.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Diego Fernando Mancera Gomez <diegomancera.dev@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Link: https://patch.msgid.link/20260723195654.152104-1-diegomancera.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/image/microtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
index 934ec5310fb97..69058cb87368a 100644
--- a/drivers/usb/image/microtek.c
+++ b/drivers/usb/image/microtek.c
@@ -495,6 +495,7 @@ static void mts_do_sg (struct urb* transfer)
if (unlikely(status)) {
set_host_byte(context->srb, (status == -ENOENT ? DID_ABORT : DID_ERROR));
mts_transfer_cleanup(transfer);
+ return;
}
context->curr_sg = sg_next(context->curr_sg);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0353/2151] USB: usbmon: fix null-ptr-deref in mon_bus_remove() when mon_bus_init() fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (351 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0352/2151] usb: image: microtek: stop SG processing after transfer errors Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0354/2151] USB: pci-quirks: Release EHCI device reference Greg Kroah-Hartman
` (529 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+5f4b29d9fe710a964482,
Jiangong.Han, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiangong.Han <jiangong.han@windriver.com>
[ Upstream commit 0c6cae0f56239e3274b30dbe5b362cd297ccacc7 ]
When mon_bus_init() fails to allocate the mon_bus struct, it returns
without setting ubus->mon_bus, so mbus->mon_bus remains NULL.
mon_bus_add() intentionally ignores this failure because the USB core
does not require monitoring to be established for normal operation.
However, when the HCD is later removed, usb_remove_hcd() fires the
USB_BUS_REMOVE notifier which calls mon_bus_remove(), it dereferences
ubus->mon_bus without checking for NULL, causing a null-ptr deference.
Fix this by adding a NULL check for mbus at the top of mon_bus_remove().
If mon_bus_init() failed, ubus->mon_bus is NULL, meaning the bus was
never tracked by the monitor, so there is nothing to clean up and
returning early is correct.
Reported-by: syzbot+5f4b29d9fe710a964482@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5f4b29d9fe710a964482
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jiangong.Han <jiangong.han@windriver.com>
Link: https://patch.msgid.link/20260801095128.46322-1-jiangong.han@windriver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/mon/mon_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c
index af852d53aac69..4aaaa9d0748fc 100644
--- a/drivers/usb/mon/mon_main.c
+++ b/drivers/usb/mon/mon_main.c
@@ -199,6 +199,9 @@ static void mon_bus_remove(struct usb_bus *ubus)
{
struct mon_bus *mbus = ubus->mon_bus;
+ if (mbus == NULL)
+ return;
+
mutex_lock(&mon_lock);
list_del(&mbus->bus_link);
if (mbus->text_inited)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0354/2151] USB: pci-quirks: Release EHCI device reference
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (352 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0353/2151] USB: usbmon: fix null-ptr-deref in mon_bus_remove() when mon_bus_init() fails Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0355/2151] usb-storage: alauda: do not do DMA from the stack Greg Kroah-Hartman
` (528 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yuho Choi, Alan Stern, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuho Choi <dbgh9129@gmail.com>
[ Upstream commit e93731c29f749d5b2495a67109d1f0804ab3b89d ]
for_each_pci_dev() holds a reference to the current device. The Intel
EHCI lookup breaks as soon as it finds a match, so the iterator does not
get a chance to drop that reference on its next iteration.
Release the reference before leaving the loop.
Fixes: 26b76798e050 ("Intel xhci: refactor EHCI/xHCI port switching")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20260807024304.928708-1-dbgh9129@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/host/pci-quirks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 0404489c2f6a9..ba158d63bb8bd 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -1073,6 +1073,7 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev)
if (companion->class == PCI_CLASS_SERIAL_USB_EHCI &&
companion->vendor == PCI_VENDOR_ID_INTEL) {
ehci_found = true;
+ pci_dev_put(companion);
break;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0355/2151] usb-storage: alauda: do not do DMA from the stack
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (353 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0354/2151] USB: pci-quirks: Release EHCI device reference Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0356/2151] usb-storage: alauda: check the return value of alauda_read_map() Greg Kroah-Hartman
` (527 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Arka Mondal, Alan Stern, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arka Mondal <arka@arkamondal.net>
[ Upstream commit ec67dacb75ebd11fbe6d727e6f37c0ef5e3d3431 ]
alauda_check_status2(), alauda_get_redu_data(), alauda_erase_block(),
alauda_read_block_raw() and alauda_write_block() build their commands in
stack arrays and pass them to usb_stor_bulk_transfer_buf().
alauda_check_status2() and alauda_erase_block() also read the reply back
into a stack array.
usb_stor_msg_common() sets URB_NO_TRANSFER_DMA_MAP only when the buffer
is us->iobuf. Every other buffer reaches usb_hcd_map_urb_for_dma(),
which has warned and returned -EAGAIN for a buffer on the stack since
commit 4568136620c6 ("usb: core: Check URB setup_packet and
transfer_buffer sanity"). On a host controller that uses DMA, all of
these commands fail.
Use us->iobuf, as alauda_reset_media() in this driver and the other
usb-storage subdrivers already do. The command is sent before the reply
is read, so both can use it; sddr09_read_status() does the same.
Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217862
Signed-off-by: Arka Mondal <arka@arkamondal.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20260901065831.43567-2-arka@arkamondal.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/storage/alauda.c | 70 ++++++++++++++++++++++++------------
1 file changed, 48 insertions(+), 22 deletions(-)
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index e01f3a42bde42..fac8336c0db2b 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -500,11 +500,14 @@ static int alauda_check_media(struct us_data *us)
static int alauda_check_status2(struct us_data *us)
{
int rc;
- unsigned char command[] = {
- ALAUDA_BULK_CMD, ALAUDA_BULK_GET_STATUS2,
- 0, 0, 0, 0, 3, 0, MEDIA_PORT(us)
- };
- unsigned char data[3];
+ unsigned char *command = us->iobuf;
+ unsigned char *data = us->iobuf;
+
+ memset(command, 0, 9);
+ command[0] = ALAUDA_BULK_CMD;
+ command[1] = ALAUDA_BULK_GET_STATUS2;
+ command[6] = 3;
+ command[8] = MEDIA_PORT(us);
rc = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
command, 9, NULL);
@@ -530,10 +533,15 @@ static int alauda_check_status2(struct us_data *us)
static int alauda_get_redu_data(struct us_data *us, u16 pba, unsigned char *data)
{
int rc;
- unsigned char command[] = {
- ALAUDA_BULK_CMD, ALAUDA_BULK_GET_REDU_DATA,
- PBA_HI(pba), PBA_ZONE(pba), 0, PBA_LO(pba), 0, 0, MEDIA_PORT(us)
- };
+ unsigned char *command = us->iobuf;
+
+ memset(command, 0, 9);
+ command[0] = ALAUDA_BULK_CMD;
+ command[1] = ALAUDA_BULK_GET_REDU_DATA;
+ command[2] = PBA_HI(pba);
+ command[3] = PBA_ZONE(pba);
+ command[5] = PBA_LO(pba);
+ command[8] = MEDIA_PORT(us);
rc = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
command, 9, NULL);
@@ -702,14 +710,20 @@ static void alauda_ensure_map_for_zone(struct us_data *us, unsigned int zone)
static int alauda_erase_block(struct us_data *us, u16 pba)
{
int rc;
- unsigned char command[] = {
- ALAUDA_BULK_CMD, ALAUDA_BULK_ERASE_BLOCK, PBA_HI(pba),
- PBA_ZONE(pba), 0, PBA_LO(pba), 0x02, 0, MEDIA_PORT(us)
- };
- unsigned char buf[2];
+ unsigned char *command = us->iobuf;
+ unsigned char *buf = us->iobuf;
usb_stor_dbg(us, "Erasing PBA %d\n", pba);
+ memset(command, 0, 9);
+ command[0] = ALAUDA_BULK_CMD;
+ command[1] = ALAUDA_BULK_ERASE_BLOCK;
+ command[2] = PBA_HI(pba);
+ command[3] = PBA_ZONE(pba);
+ command[5] = PBA_LO(pba);
+ command[6] = 0x02;
+ command[8] = MEDIA_PORT(us);
+
rc = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
command, 9, NULL);
if (rc != USB_STOR_XFER_GOOD)
@@ -732,13 +746,19 @@ static int alauda_read_block_raw(struct us_data *us, u16 pba,
unsigned int page, unsigned int pages, unsigned char *data)
{
int rc;
- unsigned char command[] = {
- ALAUDA_BULK_CMD, ALAUDA_BULK_READ_BLOCK, PBA_HI(pba),
- PBA_ZONE(pba), 0, PBA_LO(pba) + page, pages, 0, MEDIA_PORT(us)
- };
+ unsigned char *command = us->iobuf;
usb_stor_dbg(us, "pba %d page %d count %d\n", pba, page, pages);
+ memset(command, 0, 9);
+ command[0] = ALAUDA_BULK_CMD;
+ command[1] = ALAUDA_BULK_READ_BLOCK;
+ command[2] = PBA_HI(pba);
+ command[3] = PBA_ZONE(pba);
+ command[5] = PBA_LO(pba) + page;
+ command[6] = pages;
+ command[8] = MEDIA_PORT(us);
+
rc = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
command, 9, NULL);
if (rc != USB_STOR_XFER_GOOD)
@@ -783,13 +803,19 @@ static int alauda_write_block(struct us_data *us, u16 pba, unsigned char *data)
{
int rc;
struct alauda_info *info = (struct alauda_info *) us->extra;
- unsigned char command[] = {
- ALAUDA_BULK_CMD, ALAUDA_BULK_WRITE_BLOCK, PBA_HI(pba),
- PBA_ZONE(pba), 0, PBA_LO(pba), 32, 0, MEDIA_PORT(us)
- };
+ unsigned char *command = us->iobuf;
usb_stor_dbg(us, "pba %d\n", pba);
+ memset(command, 0, 9);
+ command[0] = ALAUDA_BULK_CMD;
+ command[1] = ALAUDA_BULK_WRITE_BLOCK;
+ command[2] = PBA_HI(pba);
+ command[3] = PBA_ZONE(pba);
+ command[5] = PBA_LO(pba);
+ command[6] = 32;
+ command[8] = MEDIA_PORT(us);
+
rc = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
command, 9, NULL);
if (rc != USB_STOR_XFER_GOOD)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0356/2151] usb-storage: alauda: check the return value of alauda_read_map()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (354 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0355/2151] usb-storage: alauda: do not do DMA from the stack Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0357/2151] usb-storage: alauda: fix out-of-bounds zone index Greg Kroah-Hartman
` (526 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Arka Mondal, Alan Stern, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arka Mondal <arka@arkamondal.net>
[ Upstream commit eb882419790c6710646904c6b25132189152cf33 ]
alauda_ensure_map_for_zone() ignores the value alauda_read_map()
returns. On failure lba_to_pba[zone] and pba_to_lba[zone] are left NULL,
and both callers dereference them immediately:
pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
alauda_read_map() returns USB_STOR_TRANSPORT_ERROR when either kcalloc()
fails or an alauda_get_redu_data() transfer fails, so one failed bulk
transfer is enough to reach the NULL dereference.
Return that value from alauda_ensure_map_for_zone() and check it in
alauda_read_data() and alauda_write_lba().
Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217862
Signed-off-by: Arka Mondal <arka@arkamondal.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20260901065831.43567-3-arka@arkamondal.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/storage/alauda.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index fac8336c0db2b..1de09c9f115ab 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -697,11 +697,13 @@ static int alauda_read_map(struct us_data *us, unsigned int zone)
* Checks to see whether we have already mapped a certain zone
* If we haven't, the map is generated
*/
-static void alauda_ensure_map_for_zone(struct us_data *us, unsigned int zone)
+static int alauda_ensure_map_for_zone(struct us_data *us, unsigned int zone)
{
if (MEDIA_INFO(us).lba_to_pba[zone] == NULL
|| MEDIA_INFO(us).pba_to_lba[zone] == NULL)
- alauda_read_map(us, zone);
+ return alauda_read_map(us, zone);
+
+ return 0;
}
/*
@@ -849,7 +851,9 @@ static int alauda_write_lba(struct us_data *us, u16 lba,
unsigned int new_pba_offset;
unsigned int zone = lba / uzonesize;
- alauda_ensure_map_for_zone(us, zone);
+ result = alauda_ensure_map_for_zone(us, zone);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ return result;
pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
if (pba == 1) {
@@ -980,7 +984,10 @@ static int alauda_read_data(struct us_data *us, unsigned long address,
unsigned int lba_offset = lba - (zone * uzonesize);
unsigned int pages;
u16 pba;
- alauda_ensure_map_for_zone(us, zone);
+
+ result = alauda_ensure_map_for_zone(us, zone);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ break;
/* Not overflowing capacity? */
if (lba >= max_lba) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0357/2151] usb-storage: alauda: fix out-of-bounds zone index
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (355 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0356/2151] usb-storage: alauda: check the return value of alauda_read_map() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0358/2151] usb: musb: da8xx: depopulate OF children on remove Greg Kroah-Hartman
` (525 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Alan Stern, Arka Mondal, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arka Mondal <arka@arkamondal.net>
[ Upstream commit c4542993c071fcafe7335698bf52650dee7e3555 ]
MEDIA_INFO(us).lba_to_pba and .pba_to_lba are arrays of num_zones
pointers, allocated by kcalloc() in alauda_init_media().
alauda_ensure_map_for_zone() reads lba_to_pba[zone] and
pba_to_lba[zone], and when either is NULL alauda_read_map() writes a
pointer back to both. Two separate errors let zone reach num_zones, one
element past the end.
max_lba is capacity >> (blockshift + pageshift), which counts physical
blocks, but zone is lba / uzonesize and uzonesize is 125/128 of
zonesize. On a 16 MB card (alauda_card_ids id 0x73) num_zones is 1 and
uzonesize is 1000, so lba 1000 to 1023 pass the bounds check and index
element 1 of a one-element array.
alauda_read_data() also calls alauda_ensure_map_for_zone() before it
compares lba against max_lba, so any larger lba is used as an index
before the check rejects it. alauda_write_data() already checks first.
Bound lba by num_zones * uzonesize on both paths and move the read
side's call below the check. alauda_transport() reports
num_zones * uzonesize * blocksize for READ_CAPACITY, so the new bound is
exactly the range the device advertises and no block becomes
unreachable.
sd never issues an lba past the reported capacity; an SG_IO READ_10 can.
Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support")
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Arka Mondal <arka@arkamondal.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20260901065831.43567-4-arka@arkamondal.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/storage/alauda.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index 1de09c9f115ab..d182ac88cbf4c 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -949,6 +949,7 @@ static int alauda_read_data(struct us_data *us, unsigned long address,
unsigned char *buffer;
u16 lba, max_lba;
unsigned int page, len, offset;
+ unsigned int num_zones;
unsigned int blockshift = MEDIA_INFO(us).blockshift;
unsigned int pageshift = MEDIA_INFO(us).pageshift;
unsigned int blocksize = MEDIA_INFO(us).blocksize;
@@ -973,7 +974,9 @@ static int alauda_read_data(struct us_data *us, unsigned long address,
/* Figure out the initial LBA and page */
lba = address >> blockshift;
page = (address & MEDIA_INFO(us).blockmask);
- max_lba = MEDIA_INFO(us).capacity >> (blockshift + pageshift);
+ num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift
+ + blockshift + pageshift);
+ max_lba = num_zones * uzonesize;
result = USB_STOR_TRANSPORT_GOOD;
offset = 0;
@@ -985,10 +988,6 @@ static int alauda_read_data(struct us_data *us, unsigned long address,
unsigned int pages;
u16 pba;
- result = alauda_ensure_map_for_zone(us, zone);
- if (result != USB_STOR_TRANSPORT_GOOD)
- break;
-
/* Not overflowing capacity? */
if (lba >= max_lba) {
usb_stor_dbg(us, "Error: Requested lba %u exceeds maximum %u\n",
@@ -997,6 +996,10 @@ static int alauda_read_data(struct us_data *us, unsigned long address,
break;
}
+ result = alauda_ensure_map_for_zone(us, zone);
+ if (result != USB_STOR_TRANSPORT_GOOD)
+ break;
+
/* Find number of pages we can read in this block */
pages = min(sectors, blocksize - page);
len = pages << pageshift;
@@ -1052,6 +1055,7 @@ static int alauda_write_data(struct us_data *us, unsigned long address,
unsigned int pagesize = MEDIA_INFO(us).pagesize;
struct scatterlist *sg;
u16 lba, max_lba;
+ unsigned int num_zones;
int result;
/*
@@ -1078,7 +1082,9 @@ static int alauda_write_data(struct us_data *us, unsigned long address,
/* Figure out the initial LBA and page */
lba = address >> blockshift;
page = (address & MEDIA_INFO(us).blockmask);
- max_lba = MEDIA_INFO(us).capacity >> (pageshift + blockshift);
+ num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift
+ + blockshift + pageshift);
+ max_lba = num_zones * MEDIA_INFO(us).uzonesize;
result = USB_STOR_TRANSPORT_GOOD;
offset = 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0358/2151] usb: musb: da8xx: depopulate OF children on remove
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (356 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0357/2151] usb-storage: alauda: fix out-of-bounds zone index Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0359/2151] usb: musb: da8xx: depopulate OF children on probe failure Greg Kroah-Hartman
` (524 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 4b30c89fb36924983be652bb24fc49e20390bf27 ]
da8xx_probe() creates CPPI platform devices with of_platform_populate(),
but da8xx_remove() unregisters only the separately created MUSB device and
the generic PHY. The OF children therefore remain registered after the
glue driver is unbound.
Pair the successful population with of_platform_depopulate() during remove.
Unregister the MUSB device first because it reuses the parent DT node but
was not created by of_platform_populate().
Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx")
Assisted-by: Codex:gpt-5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260813153353.42817-1-pengpeng@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/musb/da8xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 4209f438ba184..7cefac2e5ef8a 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -592,6 +592,7 @@ static void da8xx_remove(struct platform_device *pdev)
struct da8xx_glue *glue = platform_get_drvdata(pdev);
platform_device_unregister(glue->musb);
+ of_platform_depopulate(&pdev->dev);
usb_phy_generic_unregister(glue->usb_phy);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0359/2151] usb: musb: da8xx: depopulate OF children on probe failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (357 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0358/2151] usb: musb: da8xx: depopulate OF children on remove Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0360/2151] dmaengine: sprd: use clk_bulk API to fix clock imbalance Greg Kroah-Hartman
` (523 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 8d70a378e702141424e27e0b8341e421f058635d ]
da8xx_probe() creates the CPPI child devices before registering the MUSB
platform device. If population partially succeeds or the later MUSB
registration fails, the probe path unregisters the generic PHY but leaves
the OF children registered under a parent whose probe failed.
Depopulate the OF children before unregistering the PHY on both failure
paths. Use one cleanup label so each resource is unwound in reverse
publication order without introducing an unused label.
Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx")
Assisted-by: Codex:gpt-5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260813153230.40421-1-pengpeng@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/musb/da8xx.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 7cefac2e5ef8a..6c859a1a11d04 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -562,7 +562,7 @@ static int da8xx_probe(struct platform_device *pdev)
ret = of_platform_populate(pdev->dev.of_node, NULL,
da8xx_auxdata_lookup, &pdev->dev);
if (ret)
- goto err_unregister_phy;
+ goto err_depopulate;
pinfo = da8xx_dev_info;
pinfo.parent = &pdev->dev;
@@ -577,12 +577,13 @@ static int da8xx_probe(struct platform_device *pdev)
ret = PTR_ERR_OR_ZERO(glue->musb);
if (ret) {
dev_err(&pdev->dev, "failed to register musb device: %d\n", ret);
- goto err_unregister_phy;
+ goto err_depopulate;
}
return 0;
-err_unregister_phy:
+err_depopulate:
+ of_platform_depopulate(&pdev->dev);
usb_phy_generic_unregister(glue->usb_phy);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0360/2151] dmaengine: sprd: use clk_bulk API to fix clock imbalance
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (358 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0359/2151] usb: musb: da8xx: depopulate OF children on probe failure Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0361/2151] firmware: arm_scmi: Protect xfer->async_done with xfer->lock Greg Kroah-Hartman
` (522 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chaithanya Lagisetty, Frank Li,
Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
[ Upstream commit d09cd5e8bbc98969b5333015b45c525078ac0f6f ]
sprd_dma_enable() enabled sdev->clk and then the optional ashb_clk. If
enabling ashb_clk failed, sdev->clk was left enabled: both callers
(probe and resume) treat a non-zero return as "nothing was enabled" and
bail out, leaking sdev->clk.
Convert the driver to the clk_bulk API. clk_bulk_prepare_enable()
enables all clocks and unwinds them on failure, and
clk_bulk_disable_unprepare() disables them, which fixes the imbalance
and simplifies the enable/disable paths. Both clocks are fetched with
devm_clk_bulk_get_optional(); the optional ashb_eb clock simply becomes
a NULL entry that the bulk helpers treat as a no-op, while the mandatory
enable clock is still checked explicitly.
Fixes: 9b3b8171f7f4 ("dmaengine: sprd: Add Spreadtrum DMA driver")
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260819053518.2825514-1-nagachaithanya9911@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/sprd-dma.c | 45 ++++++++++++------------------------------
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index a740182530200..3adc88c912065 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -208,8 +208,7 @@ struct sprd_dma_chn {
struct sprd_dma_dev {
struct dma_device dma_dev;
void __iomem *glb_base;
- struct clk *clk;
- struct clk *ashb_clk;
+ struct clk_bulk_data clks[2];
int irq;
u32 total_chns;
struct sprd_dma_chn channels[] __counted_by(total_chns);
@@ -260,31 +259,12 @@ static void sprd_dma_chn_update(struct sprd_dma_chn *schan, u32 reg,
static int sprd_dma_enable(struct sprd_dma_dev *sdev)
{
- int ret;
-
- ret = clk_prepare_enable(sdev->clk);
- if (ret)
- return ret;
-
- /*
- * The ashb_clk is optional and only for AGCP DMA controller, so we
- * need add one condition to check if the ashb_clk need enable.
- */
- if (!IS_ERR(sdev->ashb_clk))
- ret = clk_prepare_enable(sdev->ashb_clk);
-
- return ret;
+ return clk_bulk_prepare_enable(ARRAY_SIZE(sdev->clks), sdev->clks);
}
static void sprd_dma_disable(struct sprd_dma_dev *sdev)
{
- clk_disable_unprepare(sdev->clk);
-
- /*
- * Need to check if we need disable the optional ashb_clk for AGCP DMA.
- */
- if (!IS_ERR(sdev->ashb_clk))
- clk_disable_unprepare(sdev->ashb_clk);
+ clk_bulk_disable_unprepare(ARRAY_SIZE(sdev->clks), sdev->clks);
}
static void sprd_dma_set_uid(struct sprd_dma_chn *schan)
@@ -1140,16 +1120,17 @@ static int sprd_dma_probe(struct platform_device *pdev)
if (!sdev)
return -ENOMEM;
- sdev->clk = devm_clk_get(&pdev->dev, "enable");
- if (IS_ERR(sdev->clk)) {
- dev_err(&pdev->dev, "get enable clock failed\n");
- return PTR_ERR(sdev->clk);
- }
+ /* The ashb_eb clock is optional and only present for AGCP DMA */
+ sdev->clks[0].id = "enable";
+ sdev->clks[1].id = "ashb_eb";
+ ret = devm_clk_bulk_get_optional(&pdev->dev, ARRAY_SIZE(sdev->clks),
+ sdev->clks);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret, "get clocks failed\n");
- /* ashb clock is optional for AGCP DMA */
- sdev->ashb_clk = devm_clk_get(&pdev->dev, "ashb_eb");
- if (IS_ERR(sdev->ashb_clk))
- dev_warn(&pdev->dev, "no optional ashb eb clock\n");
+ if (!sdev->clks[0].clk)
+ return dev_err_probe(&pdev->dev, -ENOENT,
+ "get enable clock failed\n");
/*
* We have three DMA controllers: AP DMA, AON DMA and AGCP DMA. For AGCP
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0361/2151] firmware: arm_scmi: Protect xfer->async_done with xfer->lock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (359 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0360/2151] dmaengine: sprd: use clk_bulk API to fix clock imbalance Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0362/2151] firmware: arm_scmi: Dont reuse raw xfers with async_done still armed Greg Kroah-Hartman
` (521 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Roland Dreier, Cristian Marussi,
Sudeep Holla, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roland Dreier <rolanddreier@rivian.com>
[ Upstream commit 49fc5bc04eec2b7687d49ccceb7adf6ace640a3b ]
Asynchronous SCMI commands are completed by a delayed response. The RX
path signals the response with complete(xfer->async_done). Unlike
xfer->done, xfer->async_done is a pointer to a completion owned by
whoever is waiting for the delayed response, and it stays valid only for
as long as that waiter is still waiting. In do_xfer_with_response() it
is a DECLARE_COMPLETION_ONSTACK() in the caller's stack frame.
Nothing serialises the RX path against a waiter that gives up on a
timeout. scmi_msg_response_validate() does read xfer->async_done
under xfer->lock, and documents that as a requirement, but the lock is
dropped again before scmi_handle_response() dereferences the pointer,
and neither the arming nor the disarming side takes it at all. So a
delayed response arriving just as the wait times out can be signalled
on a completion that is already gone:
waiter RX path (IRQ context)
------ ---------------------
do_xfer_with_response():
xfer->async_done = &async_response
do_xfer(xfer)
wait_for_completion_timeout(xfer->async_done, tmo)
/* returns 0, gives up */
/* response receive interrupt */
scmi_handle_response():
scmi_xfer_command_acquire()
lock xfer->lock
validate: async_done != NULL
unlock xfer->lock
xfer->async_done = NULL
return -ETIMEDOUT
/* async_response goes out of scope */
complete(xfer->async_done)
That last complete() has two possible bad outcomes: it either dereferences
the NULL just stored by the waiter or - if that store is not yet visible
on the RX CPU - it takes a lock and writes to a stack frame that the
waiter may already have returned from.
Fix this by making xfer->lock cover xfer->async_done end-to-end. Add
helpers to arm and disarm it under the lock, use them on both the regular
and the raw paths, and have the RX path read and signal the completion
under that same lock. A waiter that is timing out then either completes
its disarm before the RX path looks, in which case the delayed response is
dropped, or blocks in the disarm until the RX path is done with the
completion, in which case the completion is still alive.
Log the dropped case, so every path where a delayed response that was
matched to a pending xfer and then discarded produces an error. (This is
the same treatment scmi_msg_response_validate() already gives a
delayed response that arrives after the waiter has disarmed the xfer)
Fixes: 58ecdf03dbb9 ("firmware: arm_scmi: Add support for asynchronous commands and delayed response")
Signed-off-by: Roland Dreier <rolanddreier@rivian.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://patch.msgid.link/20260909-scmi-async-done-race-v2-1-cc5dec25c6be@rivian.com
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/common.h | 22 ++++++++++++++++
drivers/firmware/arm_scmi/driver.c | 37 +++++++++++++++++++++++----
drivers/firmware/arm_scmi/protocols.h | 9 ++++---
drivers/firmware/arm_scmi/raw_mode.c | 4 +--
4 files changed, 62 insertions(+), 10 deletions(-)
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
index ef803e1d25e15..026e7772eea73 100644
--- a/drivers/firmware/arm_scmi/common.h
+++ b/drivers/firmware/arm_scmi/common.h
@@ -279,6 +279,28 @@ static inline bool is_polling_enabled(struct scmi_chan_info *cinfo,
is_transport_polling_capable(desc);
}
+/**
+ * scmi_xfer_async_response_arm - Arm the delayed response completion
+ *
+ * @xfer: A reference to the xfer to arm
+ * @async_done: The completion to signal upon reception of a delayed response,
+ * or NULL to disarm @xfer.
+ */
+static inline void scmi_xfer_async_response_arm(struct scmi_xfer *xfer,
+ struct completion *async_done)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&xfer->lock, flags);
+ xfer->async_done = async_done;
+ spin_unlock_irqrestore(&xfer->lock, flags);
+}
+
+static inline void scmi_xfer_async_response_disarm(struct scmi_xfer *xfer)
+{
+ scmi_xfer_async_response_arm(xfer, NULL);
+}
+
void scmi_xfer_raw_put(const struct scmi_handle *handle,
struct scmi_xfer *xfer);
struct scmi_xfer *scmi_xfer_raw_get(const struct scmi_handle *handle);
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 9e81d7c9a4494..fb352ff3665b4 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -1063,6 +1063,29 @@ static inline void scmi_xfer_command_release(struct scmi_info *info,
__scmi_xfer_put(&info->tx_minfo, xfer);
}
+/**
+ * scmi_xfer_async_response_complete - Signal a received delayed response
+ *
+ * @xfer: A reference to the xfer whose delayed response was received
+ *
+ * Return: True if a completion was still armed on @xfer and has been
+ * signalled, false if a waiter has already disarmed it due to
+ * timeout or other error.
+ */
+static bool scmi_xfer_async_response_complete(struct scmi_xfer *xfer)
+{
+ unsigned long flags;
+ struct completion *async_done;
+
+ spin_lock_irqsave(&xfer->lock, flags);
+ async_done = xfer->async_done;
+ if (async_done)
+ complete(async_done);
+ spin_unlock_irqrestore(&xfer->lock, flags);
+
+ return !!async_done;
+}
+
static inline void scmi_clear_channel(struct scmi_info *info,
struct scmi_chan_info *cinfo)
{
@@ -1166,8 +1189,12 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
if (xfer->hdr.type == MSG_TYPE_DELAYED_RESP) {
scmi_clear_channel(info, cinfo);
- complete(xfer->async_done);
- scmi_inc_count(info->dbg, DELAYED_RESPONSE_OK);
+ if (scmi_xfer_async_response_complete(xfer))
+ scmi_inc_count(info->dbg, DELAYED_RESPONSE_OK);
+ else
+ dev_err(cinfo->dev,
+ "Delayed Response for %d (protocol 0x%X msg 0x%X) received after waiter was disarmed, dropping\n",
+ xfer->hdr.seq, xfer->hdr.protocol_id, xfer->hdr.id);
} else {
complete(&xfer->done);
scmi_inc_count(info->dbg, RESPONSE_OK);
@@ -1509,7 +1536,7 @@ static int do_xfer_with_response(const struct scmi_protocol_handle *ph,
int ret, timeout = msecs_to_jiffies(SCMI_MAX_RESPONSE_TIMEOUT);
DECLARE_COMPLETION_ONSTACK(async_response);
- xfer->async_done = &async_response;
+ scmi_xfer_async_response_arm(xfer, &async_response);
/*
* Delayed responses should not be polled, so an async command should
@@ -1521,7 +1548,7 @@ static int do_xfer_with_response(const struct scmi_protocol_handle *ph,
ret = do_xfer(ph, xfer);
if (!ret) {
- if (!wait_for_completion_timeout(xfer->async_done, timeout)) {
+ if (!wait_for_completion_timeout(&async_response, timeout)) {
dev_err(ph->dev,
"timed out in delayed resp(caller: %pS)\n",
(void *)_RET_IP_);
@@ -1531,7 +1558,7 @@ static int do_xfer_with_response(const struct scmi_protocol_handle *ph,
}
}
- xfer->async_done = NULL;
+ scmi_xfer_async_response_disarm(xfer);
return ret;
}
diff --git a/drivers/firmware/arm_scmi/protocols.h b/drivers/firmware/arm_scmi/protocols.h
index d62c4469d1fd9..bef6e634eb2f4 100644
--- a/drivers/firmware/arm_scmi/protocols.h
+++ b/drivers/firmware/arm_scmi/protocols.h
@@ -100,7 +100,10 @@ struct scmi_msg_hdr {
* message. If request-ACK protocol is used, we can reuse the same
* buffer for the rx path as we use for the tx path.
* @done: command message transmit completion event
- * @async_done: pointer to delayed response message received event completion
+ * @async_done: pointer to delayed response message received event completion,
+ * or NULL when no delayed response is expected. Protected by
+ * @lock, since the completion is owned by the waiter and can
+ * vanish once the wait times out.
* @pending: True for xfers added to @pending_xfers hashtable
* @node: An hlist_node reference used to store this xfer, alternatively, on
* the free list @free_xfers or in the @pending_xfers hashtable
@@ -121,7 +124,7 @@ struct scmi_msg_hdr {
* - SCMI_XFER_SENT_OK -> SCMI_XFER_DRESP_OK
* (Missing synchronous response is assumed OK and ignored)
* @flags: Optional flags associated to this xfer.
- * @lock: A spinlock to protect state and busy fields.
+ * @lock: A spinlock to protect state, busy and async_done fields.
* @priv: A pointer for transport private usage.
*/
struct scmi_xfer {
@@ -147,7 +150,7 @@ struct scmi_xfer {
#define SCMI_XFER_IS_CHAN_SET(x) \
((x)->flags & SCMI_XFER_FLAG_CHAN_SET)
int flags;
- /* A lock to protect state and busy fields */
+ /* A lock to protect state, busy and async_done fields */
spinlock_t lock;
void *priv;
};
diff --git a/drivers/firmware/arm_scmi/raw_mode.c b/drivers/firmware/arm_scmi/raw_mode.c
index 73db5492ab44b..f292d8c1096aa 100644
--- a/drivers/firmware/arm_scmi/raw_mode.c
+++ b/drivers/firmware/arm_scmi/raw_mode.c
@@ -346,7 +346,7 @@ scmi_xfer_raw_waiter_get(struct scmi_raw_mode_info *raw, struct scmi_xfer *xfer,
if (async) {
reinit_completion(&rw->async_response);
- xfer->async_done = &rw->async_response;
+ scmi_xfer_async_response_arm(xfer, &rw->async_response);
}
rw->cinfo = cinfo;
@@ -361,7 +361,7 @@ static void scmi_xfer_raw_waiter_put(struct scmi_raw_mode_info *raw,
struct scmi_xfer_raw_waiter *rw)
{
if (rw->xfer) {
- rw->xfer->async_done = NULL;
+ scmi_xfer_async_response_disarm(rw->xfer);
rw->xfer = NULL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0362/2151] firmware: arm_scmi: Dont reuse raw xfers with async_done still armed
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (360 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0361/2151] firmware: arm_scmi: Protect xfer->async_done with xfer->lock Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0363/2151] firmware: arm_scmi: Fix error path leak in scmi_raw_message_send() Greg Kroah-Hartman
` (520 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Roland Dreier, Cristian Marussi,
Sudeep Holla, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roland Dreier <rolanddreier@rivian.com>
[ Upstream commit 0543fc1443de1a0b04ec64684fb920d79e15de2f ]
In SCMI raw mode, scmi_xfer_raw_worker() releases the xfer before
releasing the waiter that disarms xfer->async_done, and scmi_xfer_get()
does not clear async_done when it hands out a recycled xfer. A concurrent
transaction can therefore pick up the xfer while it still points at the
old waiter's completion, so:
- a delayed response arriving for the new transaction can be signalled
on the old waiter's completion, which may already be re-armed for yet
another unrelated transaction, making that transaction's wait return
early; and
- the old waiter's disarm, which still runs after the xfer has been
released, clobbers the arming just installed by the new transaction,
so the new waiter times out even if its delayed response arrives.
Release the waiter first, while the worker still holds a reference on
the xfer, so that an xfer can never reach the free list still
armed. Track whether a delayed response is expected in the waiter
itself instead of peeking at xfer->async_done outside xfer->lock, and
wait on the waiter's own embedded completion. (The new async flag is
not strictly needed but it makes the logic easier to reason about)
Finally, harden scmi_xfer_get() to clear async_done when handing out
an xfer, so that no future release-ordering change can leak a stale
arming into a new transaction.
Fixes: 3c3d818a9317 ("firmware: arm_scmi: Add core raw transmission support")
Signed-off-by: Roland Dreier <rolanddreier@rivian.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://patch.msgid.link/20260909-scmi-async-done-race-v2-2-cc5dec25c6be@rivian.com
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/driver.c | 1 +
drivers/firmware/arm_scmi/raw_mode.c | 25 +++++++++++++++++++++----
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index fb352ff3665b4..59f120783658c 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -717,6 +717,7 @@ static struct scmi_xfer *scmi_xfer_get(const struct scmi_handle *handle,
refcount_set(&xfer->users, 1);
atomic_set(&xfer->busy, SCMI_XFER_FREE);
+ xfer->async_done = NULL;
spin_unlock_irqrestore(&minfo->xfer_lock, flags);
return xfer;
diff --git a/drivers/firmware/arm_scmi/raw_mode.c b/drivers/firmware/arm_scmi/raw_mode.c
index f292d8c1096aa..415506f61e6a9 100644
--- a/drivers/firmware/arm_scmi/raw_mode.c
+++ b/drivers/firmware/arm_scmi/raw_mode.c
@@ -198,6 +198,8 @@ struct scmi_raw_mode_info {
* @async_response: A completion to be, optionally, used for async waits: it
* will be setup by @scmi_do_xfer_raw_start, if needed, to be
* pointed at by xfer->async_done.
+ * @async: True if @async_response was armed on @xfer, i.e. if a delayed
+ * response has to be waited for.
* @node: A list node.
*/
struct scmi_xfer_raw_waiter {
@@ -205,6 +207,7 @@ struct scmi_xfer_raw_waiter {
struct scmi_chan_info *cinfo;
struct scmi_xfer *xfer;
struct completion async_response;
+ bool async;
struct list_head node;
};
@@ -349,6 +352,7 @@ scmi_xfer_raw_waiter_get(struct scmi_raw_mode_info *raw, struct scmi_xfer *xfer,
scmi_xfer_async_response_arm(xfer, &rw->async_response);
}
+ rw->async = async;
rw->cinfo = cinfo;
rw->xfer = xfer;
}
@@ -361,8 +365,16 @@ static void scmi_xfer_raw_waiter_put(struct scmi_raw_mode_info *raw,
struct scmi_xfer_raw_waiter *rw)
{
if (rw->xfer) {
+ /*
+ * Disarm the delayed response before this waiter, and its
+ * embedded completion, can be picked up again for a new
+ * transaction: a delayed response received late, after the
+ * related wait timed out, must not signal a completion which
+ * has been in the meantime re-armed on a different xfer.
+ */
scmi_xfer_async_response_disarm(rw->xfer);
rw->xfer = NULL;
+ rw->async = false;
}
mutex_lock(&raw->free_mtx);
@@ -479,18 +491,23 @@ static void scmi_xfer_raw_worker(struct work_struct *work)
ret, scmi_inflight_count(raw->handle));
/* Wait also for an async delayed response if needed */
- if (!ret && xfer->async_done) {
+ if (!ret && rw->async) {
unsigned long tmo = msecs_to_jiffies(SCMI_MAX_RESPONSE_TIMEOUT);
- if (!wait_for_completion_timeout(xfer->async_done, tmo))
+ if (!wait_for_completion_timeout(&rw->async_response, tmo))
dev_err(dev,
"timed out in RAW delayed resp - HDR:%08X\n",
pack_scmi_header(&xfer->hdr));
}
- /* Release waiter and xfer */
- scmi_xfer_raw_put(raw->handle, xfer);
+ /*
+ * Release the waiter first: this disarms the delayed response
+ * while we still hold a reference on the xfer, so that the xfer
+ * cannot be recycled by a new transaction while it still points
+ * at this waiter's completion.
+ */
scmi_xfer_raw_waiter_put(raw, rw);
+ scmi_xfer_raw_put(raw->handle, xfer);
} while (1);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0363/2151] firmware: arm_scmi: Fix error path leak in scmi_raw_message_send()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (361 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0362/2151] firmware: arm_scmi: Dont reuse raw xfers with async_done still armed Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0364/2151] usb: gadget: composite: avoid warning on aborted delayed status Greg Kroah-Hartman
` (519 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Roland Dreier, Sudeep Holla,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roland Dreier <rolanddreier@rivian.com>
[ Upstream commit 1adabdce41b93ee6f72f29daa1d3e1750e7b7bd1 ]
When the is_transport_polling_capable() check fails in scmi_raw_message_send(),
it returns -EINVAL without doing scmi_xfer_raw_put(), which will leak a
struct scmi_xfer.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20260909-scmi-async-done-race-v2-0-cc5dec25c6be%40rivian.com
Fixes: 07cb8c324b63 ("firmware: arm_scmi: Add polling support to raw mode")
Signed-off-by: Roland Dreier <rolanddreier@rivian.com>
Link: https://patch.msgid.link/20260909-scmi-raw-v1-1-de3fa75d2c6f@rivian.com
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/raw_mode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/arm_scmi/raw_mode.c b/drivers/firmware/arm_scmi/raw_mode.c
index 415506f61e6a9..c04d2d2e0c9ec 100644
--- a/drivers/firmware/arm_scmi/raw_mode.c
+++ b/drivers/firmware/arm_scmi/raw_mode.c
@@ -711,6 +711,7 @@ static int scmi_raw_message_send(struct scmi_raw_mode_info *raw,
} else {
dev_err(raw->handle->dev,
"Failed to send RAW message - Polling NOT supported\n");
+ scmi_xfer_raw_put(raw->handle, xfer);
return -EINVAL;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0364/2151] usb: gadget: composite: avoid warning on aborted delayed status
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (362 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0363/2151] firmware: arm_scmi: Fix error path leak in scmi_raw_message_send() Greg Kroah-Hartman
@ 2026-11-18 14:34 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0365/2151] usb: gadget: f_mass_storage: ignore class requests while inactive Greg Kroah-Hartman
` (518 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:34 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+a83a5a1ba9ff57935171,
Keisuke Tsukuda, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keisuke Tsukuda <catnyaaan@outlook.com>
[ Upstream commit 048884b782b137229399b9f727b6437d9b4f1071 ]
A SET_CONFIGURATION request that disables the current configuration, or a
disconnect, can abort a control transfer whose status stage was delayed by
a function driver. The asynchronous function work can nevertheless finish
later and call usb_composite_setup_continue() after reset_config() has
cleared delayed_status.
This is an expected consequence of aborting the old control transfer, and
does not require a kernel warning. Keep the diagnostic available under
dynamic debug and ignore the obsolete completion as before.
Fixes: 2bac51a1827a ("usb: gadget: composite: reset delayed_status on reset_config")
Reported-by: syzbot+a83a5a1ba9ff57935171@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=a83a5a1ba9ff57935171
Signed-off-by: Keisuke Tsukuda <tkdkei@outlook.jp>
Link: https://patch.msgid.link/20260908203348.95825-2-tkdkei@outlook.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/gadget/composite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index e09256304dc0a..6945cc63d8825 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -2740,7 +2740,7 @@ void usb_composite_setup_continue(struct usb_composite_dev *cdev)
spin_lock_irqsave(&cdev->lock, flags);
if (cdev->delayed_status == 0) {
- WARN(cdev, "%s: Unexpected call\n", __func__);
+ DBG(cdev, "%s: Ignoring obsolete call\n", __func__);
} else if (--cdev->delayed_status == 0) {
DBG(cdev, "%s: Completing delayed status\n", __func__);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0365/2151] usb: gadget: f_mass_storage: ignore class requests while inactive
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (363 preceding siblings ...)
2026-11-18 14:34 ` [PATCH 6.18 0364/2151] usb: gadget: composite: avoid warning on aborted delayed status Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0366/2151] dmaengine: fsl_raid: zero CF descriptor pool allocations Greg Kroah-Hartman
` (517 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+d31109047baed8f3b590,
Keisuke Tsukuda, Alan Stern, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keisuke Tsukuda <catnyaaan@outlook.com>
[ Upstream commit e84caed6e7f58d96ea2e4aaa0b947ab05faa451b ]
SET_CONFIGURATION is handled asynchronously by the mass-storage thread.
A class request can arrive after the composite core selects the function
but before the thread installs common->fsg, or while the function is being
disabled.
fsg_setup() already rejects this state with -EOPNOTSUPP, but checking it
through fsg_is_set() also emits a warning. Check the active function
directly so normal requests during a configuration transition are rejected
without hiding fsg_is_set() warnings from other internal paths.
Fixes: 8876f5e7d3b2 ("USB: gadget: f_mass_storage: added eject callback")
Reported-by: syzbot+d31109047baed8f3b590@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d31109047baed8f3b590
Signed-off-by: Keisuke Tsukuda <tkdkei@outlook.jp>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20260908203348.95825-3-tkdkei@outlook.jp
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/usb/gadget/function/f_mass_storage.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 6970d0fa806b0..584e7ba31603b 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -464,7 +464,12 @@ static int fsg_setup(struct usb_function *f,
u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
- if (!fsg_is_set(fsg->common))
+ /*
+ * fsg_is_set() warns when common->fsg is NULL, but that can happen
+ * normally while a configuration change installs or removes the active
+ * function.
+ */
+ if (!fsg->common->fsg)
return -EOPNOTSUPP;
++fsg->common->ep0_req_tag; /* Record arrival of a new request */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0366/2151] dmaengine: fsl_raid: zero CF descriptor pool allocations
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (364 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0365/2151] usb: gadget: f_mass_storage: ignore class requests while inactive Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0367/2151] dmaengine: dw-axi-dmac: Fix AXI burst length encoding Greg Kroah-Hartman
` (516 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit 26d48e9fb6997f4026dd86daecf8d2c12258f698 ]
The compound frame descriptors and embedded CDBs are allocated from the
cf_desc_pool with dma_pool_alloc(), which does not zero the memory. Only
cdb32, the gfm coefficients and the frame address/length fields are
programmed; the dpi_dest_spec/dpi_src_spec fields in the CDBs and the
rbro32 field of each frame are left uninitialized. The hardware reads
the whole block (frame 0 length is sizeof(struct fsl_re_xor_cdb) or
sizeof(struct fsl_re_pq_cdb)), so uninitialized heap contents are
exposed to the device on each new descriptor.
Use dma_pool_zalloc() in both fsl_re_chan_alloc_desc() and
fsl_re_alloc_chan_resources() so the descriptor and CDB memory is
zeroed before it is handed to the RAID engine.
Fixes: ad80da658bbc ("dmaengine: Driver support for FSL RaidEngine device.")
Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260820031654.28450-1-rosenp@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/fsl_raid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index fa8e40fdb005c..c8b1a537207fa 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -305,8 +305,8 @@ static struct fsl_re_desc *fsl_re_chan_alloc_desc(struct fsl_re_chan *re_chan,
if (!desc)
return NULL;
- cf = dma_pool_alloc(re_chan->re_dev->cf_desc_pool, GFP_NOWAIT,
- &paddr);
+ cf = dma_pool_zalloc(re_chan->re_dev->cf_desc_pool, GFP_NOWAIT,
+ &paddr);
if (!cf) {
kfree(desc);
return NULL;
@@ -594,8 +594,8 @@ static int fsl_re_alloc_chan_resources(struct dma_chan *chan)
if (!desc)
break;
- cf = dma_pool_alloc(re_chan->re_dev->cf_desc_pool, GFP_KERNEL,
- &paddr);
+ cf = dma_pool_zalloc(re_chan->re_dev->cf_desc_pool, GFP_KERNEL,
+ &paddr);
if (!cf) {
kfree(desc);
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0367/2151] dmaengine: dw-axi-dmac: Fix AXI burst length encoding
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (365 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0366/2151] dmaengine: fsl_raid: zero CF descriptor pool allocations Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0368/2151] dmaengine: dw-axi-dmac: Fix LLI dump out-of-bounds access Greg Kroah-Hartman
` (515 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jia Wang, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jia Wang <wangjia@ultrarisc.com>
[ Upstream commit 0d59891c42e11c3840276d8a632dbc355d6ddc4f ]
The snps,axi-max-burst-len property describes the number of beats in an
AXI burst, while the ARLEN and AWLEN fields encode that value minus one.
The driver keeps axi_rw_burst_len as the actual burst length so that
dma_device.max_burst reports the correct value. However, it also programs
that unencoded value directly into the hardware fields. A value of 256
therefore overflows the 8-bit fields and can cause AXI decode errors.
Subtract one only when constructing hardware descriptors, while keeping
the actual value for dma_device.max_burst.
Fixes: c454d16a7d5a ("dmaengine: dw-axi-dmac: Burst length settings")
Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260902-dma-fix-v3-1-414c6449fbcc@ultrarisc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 9772a4fdd85e8..d4313d0a2a048 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -706,7 +706,7 @@ static int dw_axi_dma_set_hw_desc(struct axi_dma_chan *chan,
ctlhi = CH_CTL_H_LLI_VALID;
if (chan->chip->dw->hdata->restrict_axi_burst_len) {
- burst_len = chan->chip->dw->hdata->axi_rw_burst_len;
+ burst_len = chan->chip->dw->hdata->axi_rw_burst_len - 1;
ctlhi |= CH_CTL_H_ARLEN_EN | CH_CTL_H_AWLEN_EN |
burst_len << CH_CTL_H_ARLEN_POS |
burst_len << CH_CTL_H_AWLEN_POS;
@@ -977,7 +977,7 @@ dma_chan_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dst_adr,
reg = CH_CTL_H_LLI_VALID;
if (chan->chip->dw->hdata->restrict_axi_burst_len) {
- u32 burst_len = chan->chip->dw->hdata->axi_rw_burst_len;
+ u32 burst_len = chan->chip->dw->hdata->axi_rw_burst_len - 1;
reg |= (CH_CTL_H_ARLEN_EN |
burst_len << CH_CTL_H_ARLEN_POS |
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0368/2151] dmaengine: dw-axi-dmac: Fix LLI dump out-of-bounds access
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (366 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0367/2151] dmaengine: dw-axi-dmac: Fix AXI burst length encoding Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0369/2151] dmaengine: dw-axi-dmac: Fix CH_CFG2 channel priority position Greg Kroah-Hartman
` (514 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jia Wang, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jia Wang <wangjia@ultrarisc.com>
[ Upstream commit e6b49f8016ee8b642e8e495d1704342ee0b35d72 ]
axi_chan_list_dump_lli() uses the channel-wide descs_allocated count to
walk the hw_desc[] array of a single transaction. If multiple
transactions have allocated LLIs, the channel count can exceed the
transaction-local nr_hw_descs and make the DMA error path read past the
end of hw_desc[].
Use the descriptor-local nr_hw_descs count when dumping LLIs.
Fixes: ef6fb2d6f1ab ("dmaengine: dw-axi-dmac: simplify descriptor management")
Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260902-dma-fix-v3-2-414c6449fbcc@ultrarisc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index d4313d0a2a048..c6c54d0b21e69 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1054,10 +1054,7 @@ static void axi_chan_dump_lli(struct axi_dma_chan *chan,
static void axi_chan_list_dump_lli(struct axi_dma_chan *chan,
struct axi_dma_desc *desc_head)
{
- int count = atomic_read(&chan->descs_allocated);
- int i;
-
- for (i = 0; i < count; i++)
+ for (unsigned int i = 0; i < desc_head->nr_hw_descs; i++)
axi_chan_dump_lli(chan, &desc_head->hw_desc[i]);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0369/2151] dmaengine: dw-axi-dmac: Fix CH_CFG2 channel priority position
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (367 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0368/2151] dmaengine: dw-axi-dmac: Fix LLI dump out-of-bounds access Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0370/2151] PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan Greg Kroah-Hartman
` (513 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jia Wang, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jia Wang <wangjia@ultrarisc.com>
[ Upstream commit 2a9013c20c46216b92ff09e2283b5244a91c59da ]
The CH_CFG2 channel priority field occupies bits 51:47 of the 64-bit
channel configuration register, corresponding to bits 19:15 of CH_CFG2_H.
The driver currently shifts the priority value by 20, programming the
wrong bits. Use bit 15 as the field position.
Fixes: 824351668a41 ("dmaengine: dw-axi-dmac: support DMAX_NUM_CHANNELS > 8")
Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260902-dma-fix-v3-3-414c6449fbcc@ultrarisc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
index d6e53f400af25..21adc030a7109 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
@@ -325,7 +325,7 @@ enum {
#define CH_CFG2_H_TT_FC_POS 0
#define CH_CFG2_H_HS_SEL_SRC_POS 3
#define CH_CFG2_H_HS_SEL_DST_POS 4
-#define CH_CFG2_H_PRIORITY_POS 20
+#define CH_CFG2_H_PRIORITY_POS 15
/**
* DW AXI DMA channel interrupts
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0370/2151] PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (368 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0369/2151] dmaengine: dw-axi-dmac: Fix CH_CFG2 channel priority position Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0371/2151] regulator: ab8500: Fix AB8505 VANA voltage selectors Greg Kroah-Hartman
` (512 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Manivannan Sadhasivam, Koichiro Den,
Manivannan Sadhasivam, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <den@valinux.co.jp>
[ Upstream commit 84c3520c9e8c14b09a5cf645cc4fa7c6d9d61127 ]
The virtual PCI bus is scanned without holding the PCI rescan/remove
lock. This can race with other PCI topology changes.
Hold the lock across the bus scan and device addition.
Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP")
Suggested-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/3tgrcel5fl55ulf3zjya4fkz4t2ms7iwwjif5rnzn2rafsydd6@i4e5etm7uqvz/
Link: https://patch.msgid.link/20260901063238.631166-2-den@valinux.co.jp
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/endpoint/functions/pci-epf-vntb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
index eef9d0e724381..53bf54edd5353 100644
--- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
@@ -1099,15 +1099,20 @@ static int vpci_scan_bus(void *sysdata)
struct pci_bus *vpci_bus;
struct epf_ntb *ndev = sysdata;
+ pci_lock_rescan_remove();
+
vpci_bus = pci_scan_bus(ndev->vbus_number, &vpci_ops, sysdata);
if (!vpci_bus) {
pr_err("create pci bus failed\n");
+ pci_unlock_rescan_remove();
return -EINVAL;
}
ndev->vpci_bus = vpci_bus;
pci_bus_add_devices(vpci_bus);
+ pci_unlock_rescan_remove();
+
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0371/2151] regulator: ab8500: Fix AB8505 VANA voltage selectors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (369 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0370/2151] PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0372/2151] regulator: ab8500: Remove stale expand_register kernel-doc entry Greg Kroah-Hartman
` (511 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit dfdfda2a95843706428a9d95ab546cb10983e684 ]
The AB8505 VANA voltage table assumes selector 0 represents 1.05 V
and all eight selectors increase linearly. Selector 0 actually
represents 1.2 V. Selectors 1 through 6 cover 1.05 V through
1.175 V, and selector 7 represents 1.225 V.
Correct the table so each selector reports and programs the documented
voltage.
Reference: AB8505 User Manual, DM00046744 Rev 3, p. 257
Fixes: 8a3b1b8703fe ("regulator: ab8500: Add voltage selection for AUDIO and ANA on AB8505")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-1-fe88b01829bf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 6b4a3a3d83851..26accd604c395 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -265,13 +265,13 @@ static const unsigned int fixed_2050000_voltage[] = {
};
static const unsigned int ldo_vana_voltages[] = {
+ 1200000,
1050000,
1075000,
1100000,
1125000,
1150000,
1175000,
- 1200000,
1225000,
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0372/2151] regulator: ab8500: Remove stale expand_register kernel-doc entry
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (370 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0371/2151] regulator: ab8500: Fix AB8505 VANA voltage selectors Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0373/2151] regulator: ab8500: Add AB8505 VAUX3 3.05 V setting Greg Kroah-Hartman
` (510 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, kernel test robot, Babanpreet Singh,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Babanpreet Singh <bbnpreetsingh@gmail.com>
[ Upstream commit 0991f3b4624ed713d1d5eb56520c1c9b2deaab7a ]
Commit aeee55b76bfd ("regulator: ab8500: Remove unused embedded struct
expand_register") deleted the expand_register member from struct
ab8500_regulator_info and, in the same hunk, added an empty
"@expand_register:" line to the kernel-doc block. That traded one W=1
warning for another:
drivers/regulator/ab8500.c:196 Excess struct member 'expand_register'
description in 'ab8500_regulator_info'
Drop the leftover line; the remaining @member entries all match the
struct.
No functional changes.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202605160857.ZIE3nO9J-lkp@intel.com/
Assisted-by: Claude:claude-opus-5 [kernel-doc]
Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
Link: https://patch.msgid.link/20260802013304.7-1-bbnpreetsingh@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: ac72c091a981 ("regulator: ab8500: Add AB8505 VAUX3 3.05 V setting")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 26accd604c395..ca59406d42a85 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -173,7 +173,6 @@ struct ab8500_shared_mode {
* @voltage_bank: bank to control regulator voltage
* @voltage_reg: register to control regulator voltage
* @voltage_mask: mask to control regulator voltage
- * @expand_register:
*/
struct ab8500_regulator_info {
struct device *dev;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0373/2151] regulator: ab8500: Add AB8505 VAUX3 3.05 V setting
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (371 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0372/2151] regulator: ab8500: Remove stale expand_register kernel-doc entry Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0374/2151] regulator: ab8500: Handle AB8505 VINTCORE selector 7 Greg Kroah-Hartman
` (509 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit ac72c091a9810493ccd9209414d4f859276727ab ]
AB8505 has an additional VAUX3 voltage setting which is not encoded
in the normal three-bit selector. ArmRegu2.Vaux3Sel3 overrides that
selector and selects 3.05 V.
Add the missing voltage and use the override bit as an extended
selector. Program the ordinary selector before clearing the override
so VAUX3 does not briefly switch to a stale voltage.
Reference: AB8505 User Manual, DM00046744 Rev 3, pp. 229 and 254
Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-2-fe88b01829bf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 101 +++++++++++++++++++++++++++++++++++--
1 file changed, 98 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index ca59406d42a85..07d96f8ff944f 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -173,6 +173,7 @@ struct ab8500_shared_mode {
* @voltage_bank: bank to control regulator voltage
* @voltage_reg: register to control regulator voltage
* @voltage_mask: mask to control regulator voltage
+ * @expand_register: additional register used to select an extra voltage
*/
struct ab8500_regulator_info {
struct device *dev;
@@ -193,6 +194,12 @@ struct ab8500_regulator_info {
u8 voltage_bank;
u8 voltage_reg;
u8 voltage_mask;
+ struct {
+ u8 voltage_limit;
+ u8 voltage_bank;
+ u8 voltage_reg;
+ u8 voltage_mask;
+ } expand_register;
};
/* voltage tables for the vauxn/vintcore supplies */
@@ -226,6 +233,18 @@ static const unsigned int ldo_vaux3_voltages[] = {
2910000,
};
+static const unsigned int ldo_vaux3_ab8505_voltages[] = {
+ 1200000,
+ 1500000,
+ 1800000,
+ 2100000,
+ 2500000,
+ 2750000,
+ 2790000,
+ 2910000,
+ 3050000,
+};
+
static const unsigned int ldo_vaux56_voltages[] = {
1800000,
1050000,
@@ -593,6 +612,64 @@ static int ab8500_regulator_set_voltage_sel(struct regulator_dev *rdev,
return ret;
}
+static int ab8500_regulator_get_voltage_sel_expand(struct regulator_dev *rdev)
+{
+ struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
+ u8 regval;
+ int ret;
+
+ if (!info)
+ return -EINVAL;
+
+ ret = abx500_get_register_interruptible(info->dev,
+ info->expand_register.voltage_bank,
+ info->expand_register.voltage_reg, ®val);
+ if (ret < 0) {
+ dev_err(rdev_get_dev(rdev),
+ "couldn't read voltage expand reg for regulator\n");
+ return ret;
+ }
+
+ if (regval & info->expand_register.voltage_mask)
+ return info->expand_register.voltage_limit;
+
+ return ab8500_regulator_get_voltage_sel(rdev);
+}
+
+static int ab8500_regulator_set_voltage_sel_expand(struct regulator_dev *rdev,
+ unsigned int selector)
+{
+ struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
+ u8 regval;
+ int ret;
+
+ if (!info)
+ return -EINVAL;
+
+ if (selector > info->expand_register.voltage_limit)
+ return -EINVAL;
+
+ if (selector < info->expand_register.voltage_limit) {
+ ret = ab8500_regulator_set_voltage_sel(rdev, selector);
+ if (ret < 0)
+ return ret;
+
+ regval = 0;
+ } else {
+ regval = info->expand_register.voltage_mask;
+ }
+
+ ret = abx500_mask_and_set_register_interruptible(info->dev,
+ info->expand_register.voltage_bank,
+ info->expand_register.voltage_reg,
+ info->expand_register.voltage_mask, regval);
+ if (ret < 0)
+ dev_err(rdev_get_dev(rdev),
+ "couldn't set voltage expand reg for regulator\n");
+
+ return ret;
+}
+
static const struct regulator_ops ab8500_regulator_volt_mode_ops = {
.enable = ab8500_regulator_enable,
.disable = ab8500_regulator_disable,
@@ -605,6 +682,18 @@ static const struct regulator_ops ab8500_regulator_volt_mode_ops = {
.list_voltage = regulator_list_voltage_table,
};
+static const struct regulator_ops ab8500_regulator_volt_mode_expand_ops = {
+ .enable = ab8500_regulator_enable,
+ .disable = ab8500_regulator_disable,
+ .is_enabled = ab8500_regulator_is_enabled,
+ .get_optimum_mode = ab8500_regulator_get_optimum_mode,
+ .set_mode = ab8500_regulator_set_mode,
+ .get_mode = ab8500_regulator_get_mode,
+ .get_voltage_sel = ab8500_regulator_get_voltage_sel_expand,
+ .set_voltage_sel = ab8500_regulator_set_voltage_sel_expand,
+ .list_voltage = regulator_list_voltage_table,
+};
+
static const struct regulator_ops ab8500_regulator_volt_ops = {
.enable = ab8500_regulator_enable,
.disable = ab8500_regulator_disable,
@@ -908,12 +997,12 @@ static struct ab8500_regulator_info
[AB8505_LDO_AUX3] = {
.desc = {
.name = "LDO-AUX3",
- .ops = &ab8500_regulator_volt_mode_ops,
+ .ops = &ab8500_regulator_volt_mode_expand_ops,
.type = REGULATOR_VOLTAGE,
.id = AB8505_LDO_AUX3,
.owner = THIS_MODULE,
- .n_voltages = ARRAY_SIZE(ldo_vaux3_voltages),
- .volt_table = ldo_vaux3_voltages,
+ .n_voltages = ARRAY_SIZE(ldo_vaux3_ab8505_voltages),
+ .volt_table = ldo_vaux3_ab8505_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -925,6 +1014,12 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x21,
.voltage_mask = 0x07,
+ .expand_register = {
+ .voltage_limit = 8,
+ .voltage_bank = 0x04,
+ .voltage_reg = 0x01,
+ .voltage_mask = 0x10,
+ },
},
[AB8505_LDO_AUX4] = {
.desc = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0374/2151] regulator: ab8500: Handle AB8505 VINTCORE selector 7
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (372 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0373/2151] regulator: ab8500: Add AB8505 VAUX3 3.05 V setting Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0375/2151] regulator: ab8500: Treat cut 1.0 VAUX3 as fixed Greg Kroah-Hartman
` (508 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit 4ec4df7e54182edb6955caace37684e535e462dc ]
The AB8505 VINTCORE table exposes only selectors 0 through 6. The
hardware also accepts selector 7 and maps it to 1.35 V, just like
selector 6. Omitting it can make an OTP-programmed selector 7 appear
invalid to the regulator core.
Give AB8505 its own eight-entry selector table while leaving the
AB8500 table unchanged.
Reference: AB8505 User Manual, DM00046744 Rev 3, p. 223
Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-3-fe88b01829bf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 07d96f8ff944f..5e24e6cdc7732 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -266,6 +266,17 @@ static const unsigned int ldo_vintcore_voltages[] = {
1350000,
};
+static const unsigned int ldo_vintcore_ab8505_voltages[] = {
+ 1200000,
+ 1225000,
+ 1250000,
+ 1275000,
+ 1300000,
+ 1325000,
+ 1350000,
+ 1350000,
+};
+
static const unsigned int fixed_1200000_voltage[] = {
1200000,
};
@@ -1095,8 +1106,8 @@ static struct ab8500_regulator_info
.type = REGULATOR_VOLTAGE,
.id = AB8505_LDO_INTCORE,
.owner = THIS_MODULE,
- .n_voltages = ARRAY_SIZE(ldo_vintcore_voltages),
- .volt_table = ldo_vintcore_voltages,
+ .n_voltages = ARRAY_SIZE(ldo_vintcore_ab8505_voltages),
+ .volt_table = ldo_vintcore_ab8505_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x03,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0375/2151] regulator: ab8500: Treat cut 1.0 VAUX3 as fixed
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (373 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0374/2151] regulator: ab8500: Handle AB8505 VINTCORE selector 7 Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0376/2151] regulator: ab8500: Test dedicated enable bits only Greg Kroah-Hartman
` (507 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit b9fc8a8d31b914b09329240f532ff0e9c00cd727 ]
The early-cut workaround currently gives AB8500 cut 1.0 the 16
programmable VAUX3 settings introduced with cut 1.1. On cut 1.0 the
selector is not programmable and VAUX3 is fixed at 1.2 V.
Register VAUX3 as a fixed-voltage regulator on cut 1.0 and retain the
16-value workaround only for cut 1.1.
Reference: AB8500 User Manual, UM0836 Rev 3, p. 240
Fixes: 2b75151a1041 ("regulators: Added ab8500 v2 support")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-4-fe88b01829bf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 5e24e6cdc7732..42cb8dfdc7c90 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -1783,9 +1783,14 @@ static int ab8500_regulator_register(struct platform_device *pdev,
config.driver_data = info;
config.of_node = np;
- /* fix for hardware before ab8500v2.0 */
- if (is_ab8500_1p1_or_earlier(ab8500)) {
- if (info->desc.id == AB8500_LDO_AUX3) {
+ /* Handle the different VAUX3 implementations in early AB8500 cuts. */
+ if (info->desc.id == AB8500_LDO_AUX3) {
+ if (is_ab8500_1p0_or_earlier(ab8500)) {
+ info->desc.ops = &ab8500_regulator_mode_ops;
+ info->desc.n_voltages = 1;
+ info->desc.volt_table = fixed_1200000_voltage;
+ info->voltage_mask = 0;
+ } else if (is_ab8500_1p1_or_earlier(ab8500)) {
info->desc.n_voltages =
ARRAY_SIZE(ldo_vauxn_voltages);
info->desc.volt_table = ldo_vauxn_voltages;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0376/2151] regulator: ab8500: Test dedicated enable bits only
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (374 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0375/2151] regulator: ab8500: Treat cut 1.0 VAUX3 as fixed Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0377/2151] regulator: ab8500: Propagate mode enable read errors Greg Kroah-Hartman
` (506 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit a5ee78846015512b4d3d32f8aa463024a23234ce ]
Some regulator control registers have independent enable and low-power
bits. is_enabled() currently tests their combined update mask, so an
off regulator with its low-power bit set is incorrectly reported as
enabled.
Add an optional enable mask and use it for VINTCORE, AB8500 TVOUT,
AB8505 ADC, and AB8505 VAUX5/6. Regulators whose two-bit field encodes
the complete operating state continue to test the full update mask.
References: AB8500 User Manual, UM0836 Rev 3, p. 214;
AB8505 User Manual, DM00046744 Rev 3, pp. 171-172 and 223
Fixes: 65e03ed2d0cd ("regulators: Fixed errors in ab8500 register mapping")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-5-fe88b01829bf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 42cb8dfdc7c90..05c6b9c7af0c7 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -162,6 +162,7 @@ struct ab8500_shared_mode {
* @update_bank: bank to control on/off
* @update_reg: register to control on/off
* @update_mask: mask to enable/disable and set mode of regulator
+ * @enable_mask: optional mask for an enable bit separate from the mode bit
* @update_val: bits holding the regulator current mode
* @update_val_idle: bits to enable the regulator in idle (low power) mode
* @update_val_normal: bits to enable the regulator in normal (high power) mode
@@ -183,6 +184,7 @@ struct ab8500_regulator_info {
u8 update_bank;
u8 update_reg;
u8 update_mask;
+ u8 enable_mask;
u8 update_val;
u8 update_val_idle;
u8 update_val_normal;
@@ -377,6 +379,7 @@ static int ab8500_regulator_is_enabled(struct regulator_dev *rdev)
{
int ret;
struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
+ u8 enable_mask;
u8 regval;
if (info == NULL) {
@@ -392,13 +395,15 @@ static int ab8500_regulator_is_enabled(struct regulator_dev *rdev)
return ret;
}
+ enable_mask = info->enable_mask ? info->enable_mask : info->update_mask;
+
dev_vdbg(rdev_get_dev(rdev),
"%s-is_enabled (bank, reg, mask, value): 0x%x, 0x%x, 0x%x,"
" 0x%x\n",
info->desc.name, info->update_bank, info->update_reg,
- info->update_mask, regval);
+ enable_mask, regval);
- if (regval & info->update_mask)
+ if (regval & enable_mask)
return 1;
else
return 0;
@@ -833,6 +838,7 @@ static struct ab8500_regulator_info
.update_bank = 0x03,
.update_reg = 0x80,
.update_mask = 0x44,
+ .enable_mask = 0x04,
.update_val = 0x44,
.update_val_idle = 0x44,
.update_val_normal = 0x04,
@@ -861,6 +867,7 @@ static struct ab8500_regulator_info
.update_bank = 0x03,
.update_reg = 0x80,
.update_mask = 0x82,
+ .enable_mask = 0x02,
.update_val = 0x02,
.update_val_idle = 0x82,
.update_val_normal = 0x02,
@@ -1070,6 +1077,7 @@ static struct ab8500_regulator_info
.update_bank = 0x01,
.update_reg = 0x55,
.update_mask = 0x18,
+ .enable_mask = 0x10,
.update_val = 0x10,
.update_val_idle = 0x18,
.update_val_normal = 0x10,
@@ -1092,6 +1100,7 @@ static struct ab8500_regulator_info
.update_bank = 0x01,
.update_reg = 0x56,
.update_mask = 0x18,
+ .enable_mask = 0x10,
.update_val = 0x10,
.update_val_idle = 0x18,
.update_val_normal = 0x10,
@@ -1113,6 +1122,7 @@ static struct ab8500_regulator_info
.update_bank = 0x03,
.update_reg = 0x80,
.update_mask = 0x44,
+ .enable_mask = 0x04,
.update_val = 0x04,
.update_val_idle = 0x44,
.update_val_normal = 0x04,
@@ -1141,6 +1151,7 @@ static struct ab8500_regulator_info
.update_bank = 0x03,
.update_reg = 0x80,
.update_mask = 0x82,
+ .enable_mask = 0x02,
.update_val = 0x02,
.update_val_idle = 0x82,
.update_val_normal = 0x02,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0377/2151] regulator: ab8500: Propagate mode enable read errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (375 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0376/2151] regulator: ab8500: Test dedicated enable bits only Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0378/2151] arm64: dts: qcom: sm7225-fairphone-fp4: Disable PMK8350 PON Greg Kroah-Hartman
` (505 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit 71ac8878573058e2b85210760ccaeaac90796c35 ]
For regulators whose enable and mode share a state field, set_mode()
first reads that field so changing the requested mode does not enable a
disabled rail. A register read error is currently treated as true and
the driver proceeds to write the new mode, potentially enabling a rail
whose state is unknown.
Return the read error without changing the register or cached mode.
References: AB8500 User Manual, UM0836 Rev 3, p. 227;
AB8505 User Manual, DM00046744 Rev 3, p. 237
Fixes: 438e695b87e0 ("regulator: ab8500: Get rid of is_enabled from struct ab8500_regulator_info")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-6-fe88b01829bf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/ab8500.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 05c6b9c7af0c7..e4c3502c8dbcc 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -433,7 +433,7 @@ static unsigned int ab8500_regulator_get_optimum_mode(
static int ab8500_regulator_set_mode(struct regulator_dev *rdev,
unsigned int mode)
{
- int ret = 0;
+ int enabled, ret = 0;
u8 bank, reg, mask, val;
bool lp_mode_req = false;
struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
@@ -490,7 +490,17 @@ static int ab8500_regulator_set_mode(struct regulator_dev *rdev,
goto out_unlock;
}
- if (info->mode_mask || ab8500_regulator_is_enabled(rdev)) {
+ if (info->mode_mask) {
+ enabled = 1;
+ } else {
+ enabled = ab8500_regulator_is_enabled(rdev);
+ if (enabled < 0) {
+ ret = enabled;
+ goto out_unlock;
+ }
+ }
+
+ if (enabled) {
ret = abx500_mask_and_set_register_interruptible(info->dev,
bank, reg, mask, val);
if (ret < 0) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0378/2151] arm64: dts: qcom: sm7225-fairphone-fp4: Disable PMK8350 PON
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (376 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0377/2151] regulator: ab8500: Propagate mode enable read errors Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0379/2151] sit: fix UAF in ipip6_tunnel_del_prl() Greg Kroah-Hartman
` (504 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Luca Weiss, Abel Vesa, Konrad Dybcio,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <luca.weiss@fairphone.com>
[ Upstream commit 5c088a33e3a9bb236c475b7230df275fc1e51eda ]
Two PMICs on this phone have a PON block, the PM6350 and PMK8350. Only
one should be enabled at one time, so disable PMK8350 PON and keep the
PM6350 PON.
Fixes: 582e7c1026fa ("arm64: dts: qcom: sm7225-fairphone-fp4: Add pmk8350 PMIC")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260901-fp4-pmk8350-pon-v1-1-e05937e9c860@fairphone.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index b6d2a5d0c1c88..b3a0db3c83af8 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -925,6 +925,10 @@ xo-therm@0 {
};
};
+&pmk8350_pon {
+ status = "disabled";
+};
+
&pmk8350_rtc {
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0379/2151] sit: fix UAF in ipip6_tunnel_del_prl()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (377 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0378/2151] arm64: dts: qcom: sm7225-fairphone-fp4: Disable PMK8350 PON Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0380/2151] ip_tunnel: use WRITE_ONCE in ip_tunnel_encap_setup Greg Kroah-Hartman
` (503 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Jakub Kicinski,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 5145bb6a2c2683d541828f86d5321e0565f2e30c ]
When flushing all potential router list (PRL) entries,
ipip6_tunnel_del_prl() called call_rcu(&x->rcu_head, prl_list_destroy_rcu)
before clearing t->prl.
A concurrent reader in isatap_chksrc() could enter an RCU read-side
critical section after call_rcu() but before t->prl is set to NULL,
allowing prl_list_destroy_rcu() to free nodes while the reader traverses
them.
Clear t->prl using RCU_INIT_POINTER() before invoking call_rcu().
Also use rcu_assign_pointer() when unlinking individual entries.
Fixes: ef9a9d1183b3 ("ipv6 sit: RCU conversion phase I")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260907075846.2913645-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/ipv6/sit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index ae39e4c5d463a..590b54e9b947d 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -435,7 +435,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
(x = rtnl_dereference(*p)) != NULL;
p = &x->next) {
if (x->addr == a->addr) {
- *p = x->next;
+ rcu_assign_pointer(*p, rtnl_dereference(x->next));
kfree_rcu(x, rcu_head);
t->prl_count--;
goto out;
@@ -446,8 +446,8 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
x = rtnl_dereference(t->prl);
if (x) {
t->prl_count = 0;
+ RCU_INIT_POINTER(t->prl, NULL);
call_rcu(&x->rcu_head, prl_list_destroy_rcu);
- t->prl = NULL;
}
}
out:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0380/2151] ip_tunnel: use WRITE_ONCE in ip_tunnel_encap_setup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (378 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0379/2151] sit: fix UAF in ipip6_tunnel_del_prl() Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0381/2151] crypto: amlogic - Fix DMA memory leak in cipher error path Greg Kroah-Hartman
` (502 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Lorenzo Bianconi,
Jakub Kicinski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 88b84cae6b94087d3a9679845fe28ad19c7bef8b ]
Update ip_tunnel_encap_setup() to use WRITE_ONCE() when writing
to encap fields (type, sport, dport, flags) and hlen fields.
This ensures that concurrent lockless readers (like fill_info)
do not see torn writes.
Also remove the unsafe memset() on t->encap which could cause
concurrent readers to transiently see zeroed fields.
Removing it also fixes a bug where t->encap was left cleared
even if ip_encap_hlen() failed, resulting in partial configuration.
Fixes: 56328486539d ("net: Changes to ip_tunnel to support foo-over-udp encapsulation")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Link: https://patch.msgid.link/20260907075846.2913645-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/ipv4/ip_tunnel.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index e9da39010f8b3..41867ac981b69 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -491,19 +491,17 @@ int ip_tunnel_encap_setup(struct ip_tunnel *t,
{
int hlen;
- memset(&t->encap, 0, sizeof(t->encap));
-
hlen = ip_encap_hlen(ipencap);
if (hlen < 0)
return hlen;
- t->encap.type = ipencap->type;
- t->encap.sport = ipencap->sport;
- t->encap.dport = ipencap->dport;
- t->encap.flags = ipencap->flags;
+ WRITE_ONCE(t->encap.type, ipencap->type);
+ WRITE_ONCE(t->encap.sport, ipencap->sport);
+ WRITE_ONCE(t->encap.dport, ipencap->dport);
+ WRITE_ONCE(t->encap.flags, ipencap->flags);
- t->encap_hlen = hlen;
- t->hlen = t->encap_hlen + t->tun_hlen;
+ WRITE_ONCE(t->encap_hlen, hlen);
+ WRITE_ONCE(t->hlen, hlen + t->tun_hlen);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0381/2151] crypto: amlogic - Fix DMA memory leak in cipher error path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (379 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0380/2151] ip_tunnel: use WRITE_ONCE in ip_tunnel_encap_setup Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0382/2151] crypto: qat - avoid OOB read when stripping RSA leading zeros Greg Kroah-Hartman
` (501 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mohamad Raizudeen, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mohamad Raizudeen <raizudeen.kerneldev@gmail.com>
[ Upstream commit 6c2373dd818b777d0a81eb02acebc03940552dcd ]
A DMA memory leak occurs in meson_cipher() on the mapping error paths.
The driver jumps to the end of the function without unmapping the
previously mapped source scatterlist and key/IV buffer when the
destination apping fails.
Additionally, a memory leak occurs when a scatterlist mapping succeeds
but the returned count exceeds the driver's MAXDESC limit. In this case,
the driver rejects the mapping without unmapping it. The BIDIRECTIONAL
mapping branch also lacks the required 'MAXDESC -3' upper bound check.
Fix this by introducing proper error labels, error_src and error_keyiv
and unmap resources immediately inside the calidation checks to ensure
all successfully mapped resources are cleaned up before returning the
error.
Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL")
Signed-off-by: Mohamad Raizudeen <raizudeen.kerneldev@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/amlogic/amlogic-gxl-cipher.c | 25 ++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/amlogic/amlogic-gxl-cipher.c b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
index 29048da6f50a7..d78815b0547d8 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-cipher.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
@@ -177,10 +177,13 @@ static int meson_cipher(struct skcipher_request *areq)
if (areq->src == areq->dst) {
nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src),
DMA_BIDIRECTIONAL);
- if (!nr_sgs) {
- dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs);
+ if (!nr_sgs || nr_sgs > MAXDESC - 3) {
+ dev_err(mc->dev, "Invalid BIDIR SG count %d\n", nr_sgs);
err = -EINVAL;
- goto theend;
+
+ if (nr_sgs)
+ dma_unmap_sg(mc->dev, areq->src, sg_nents(areq->src), DMA_BIDIRECTIONAL);
+ goto error_keyiv;
}
nr_sgd = nr_sgs;
} else {
@@ -189,14 +192,20 @@ static int meson_cipher(struct skcipher_request *areq)
if (!nr_sgs || nr_sgs > MAXDESC - 3) {
dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs);
err = -EINVAL;
- goto theend;
+
+ if (nr_sgs)
+ dma_unmap_sg(mc->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE);
+ goto error_keyiv;
}
nr_sgd = dma_map_sg(mc->dev, areq->dst, sg_nents(areq->dst),
DMA_FROM_DEVICE);
if (!nr_sgd || nr_sgd > MAXDESC - 3) {
dev_err(mc->dev, "Invalid SG count %d\n", nr_sgd);
err = -EINVAL;
- goto theend;
+
+ if (nr_sgd)
+ dma_unmap_sg(mc->dev, areq->dst, sg_nents(areq->dst), DMA_FROM_DEVICE);
+ goto error_src;
}
}
@@ -251,6 +260,12 @@ static int meson_cipher(struct skcipher_request *areq)
ivsize, 0);
}
}
+ goto theend;
+
+error_src:
+ dma_unmap_sg(mc->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE);
+error_keyiv:
+ dma_unmap_single(mc->dev, phykeyiv, keyivlen, DMA_TO_DEVICE);
theend:
kfree_sensitive(bkeyiv);
kfree_sensitive(backup_iv);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0382/2151] crypto: qat - avoid OOB read when stripping RSA leading zeros
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (380 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0381/2151] crypto: amlogic - Fix DMA memory leak in cipher error path Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0383/2151] crypto: qat - release instance on DH fallback allocation failure Greg Kroah-Hartman
` (500 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ahsan Atta, Giovanni Cabiddu,
Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahsan Atta <ahsan.atta@intel.com>
[ Upstream commit ac508238898058f0b09b18a7891fb31279617781 ]
The logical AND operator uses short-circuit evaluation: the first
operand is always evaluated, while the second is evaluated only if
the first is true. Because the first operand dereferences a pointer,
it may cause an out-of-bounds access before the bounds check in the
second operand is evaluated.
Resolve this by checking the vlen prior to the pointer being dereferenced.
Fixes: a990532023b9 ("crypto: qat - Add support for RSA algorithm")
Signed-off-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c b/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
index afb7e3f44a5f8..173392fdf5bc4 100644
--- a/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
@@ -987,7 +987,7 @@ static int qat_rsa_set_n(struct qat_rsa_ctx *ctx, const char *value,
const char *ptr = value;
int ret;
- while (!*ptr && vlen) {
+ while (vlen && !*ptr) {
ptr++;
vlen--;
}
@@ -1018,7 +1018,7 @@ static int qat_rsa_set_e(struct qat_rsa_ctx *ctx, const char *value,
struct device *dev = &GET_DEV(inst->accel_dev);
const char *ptr = value;
- while (!*ptr && vlen) {
+ while (vlen && !*ptr) {
ptr++;
vlen--;
}
@@ -1044,7 +1044,7 @@ static int qat_rsa_set_d(struct qat_rsa_ctx *ctx, const char *value,
const char *ptr = value;
int ret;
- while (!*ptr && vlen) {
+ while (vlen && !*ptr) {
ptr++;
vlen--;
}
@@ -1067,7 +1067,7 @@ static int qat_rsa_set_d(struct qat_rsa_ctx *ctx, const char *value,
static void qat_rsa_drop_leading_zeros(const char **ptr, unsigned int *len)
{
- while (!**ptr && *len) {
+ while (*len && !**ptr) {
(*ptr)++;
(*len)--;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0383/2151] crypto: qat - release instance on DH fallback allocation failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (381 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0382/2151] crypto: qat - avoid OOB read when stripping RSA leading zeros Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0384/2151] crypto: rsassa-pkcs1 - reject undersized keys when signing Greg Kroah-Hartman
` (499 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ahsan Atta, Giovanni Cabiddu,
Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahsan Atta <ahsan.atta@intel.com>
[ Upstream commit 307e27d3e07f58b6d42a8c64d31304aa614ab7d2 ]
qat_dh_init_tfm() acquires a QAT crypto instance before allocating the
software fallback transform. If fallback allocation fails, the instance
reference is leaked and the device remains permanently in use.
Release the instance before returning the allocation error.
Fixes: 5d5bd24f4155 ("crypto: qat - implement dh fallback for primes > 4K")
Signed-off-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c b/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
index 173392fdf5bc4..aa809e6d67bfe 100644
--- a/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
@@ -535,8 +535,10 @@ static int qat_dh_init_tfm(struct crypto_kpp *tfm)
return -EINVAL;
ctx->ftfm = crypto_alloc_kpp(alg, 0, CRYPTO_ALG_NEED_FALLBACK);
- if (IS_ERR(ctx->ftfm))
+ if (IS_ERR(ctx->ftfm)) {
+ qat_crypto_put_instance(inst);
return PTR_ERR(ctx->ftfm);
+ }
crypto_kpp_set_flags(ctx->ftfm, crypto_kpp_get_flags(tfm));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0384/2151] crypto: rsassa-pkcs1 - reject undersized keys when signing
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (382 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0383/2151] crypto: qat - release instance on DH fallback allocation failure Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0385/2151] crypto: rsassa-pkcs1 - reject undersized keys when verifying Greg Kroah-Hartman
` (498 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jérémy Jean,
Sudhakar Kuppusamy, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
[ Upstream commit 4cf50332b5384ea13f6f896d5cf84e05b5b6484a ]
rsassa_pkcs1_sign() subtracts 11 from the unsigned key size before
checking that the key is large enough for PKCS#1 v1.5 padding:
if (slen + hash_prefix->size > ctx->key_size - 11)
return -EOVERFLOW;
If the RSA modulus is shorter than 11 bytes, the subtraction wraps.
With a one-byte key and hash=none, the padding memset() writes past
the output buffer.
KASAN reports:
BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_sign+0x1ad/0x3b0
Write of size 4294967294 at addr ...
The buggy address is located 0 bytes to the right of
allocated 1-byte region [...]
Reject keys shorter than the minimum encoded message size.
Fixes: 3d5b1ecdea6f ("crypto: rsa - RSA padding algorithm")
Assisted-by: Codex:gpt-5
Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
crypto/rsassa-pkcs1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/rsassa-pkcs1.c b/crypto/rsassa-pkcs1.c
index 94fa5e9600e79..d0e4a885397f4 100644
--- a/crypto/rsassa-pkcs1.c
+++ b/crypto/rsassa-pkcs1.c
@@ -169,7 +169,7 @@ static int rsassa_pkcs1_sign(struct crypto_sig *tfm,
u8 *in_buf;
int err;
- if (!ctx->key_size)
+ if (ctx->key_size < 11)
return -EINVAL;
if (dlen < ctx->key_size)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0385/2151] crypto: rsassa-pkcs1 - reject undersized keys when verifying
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (383 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0384/2151] crypto: rsassa-pkcs1 - reject undersized keys when signing Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0386/2151] crypto: mxs-dcp - handle zero-length skcipher requests Greg Kroah-Hartman
` (497 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jérémy Jean,
Sudhakar Kuppusamy, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
[ Upstream commit 364e520095b26fa551a8e92f52119d0f38a4177b ]
rsassa_pkcs1_verify() accepts any nonzero key size.
With a one-byte key and a zero RSA result, the leading-zero handling
decrements dst_len to zero and advances out_buf past the allocation.
The next out_buf[0] access reads out of bounds.
KASAN reports:
BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_verify+0x79d/0x900
Read of size 1 at addr ...
The buggy address is located 0 bytes to the right of
allocated 73-byte region [...]
Reject keys shorter than the minimum PKCS#1 v1.5 encoded message size.
Fixes: 3d5b1ecdea6f ("crypto: rsa - RSA padding algorithm")
Assisted-by: Codex:gpt-5
Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
crypto/rsassa-pkcs1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/rsassa-pkcs1.c b/crypto/rsassa-pkcs1.c
index d0e4a885397f4..39137476ce818 100644
--- a/crypto/rsassa-pkcs1.c
+++ b/crypto/rsassa-pkcs1.c
@@ -231,7 +231,7 @@ static int rsassa_pkcs1_verify(struct crypto_sig *tfm,
int err;
/* RFC 8017 sec 8.2.2 step 1 - length checking */
- if (!ctx->key_size ||
+ if (ctx->key_size < 11 ||
slen != ctx->key_size ||
rsassa_pkcs1_invalid_hash_len(dlen, hash_prefix))
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0386/2151] crypto: mxs-dcp - handle zero-length skcipher requests
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (384 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0385/2151] crypto: rsassa-pkcs1 - reject undersized keys when verifying Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0387/2151] crypto: lskcipher - preserve state across unaligned chunks Greg Kroah-Hartman
` (496 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linmao Li, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linmao Li <lilinmao@kylinos.cn>
[ Upstream commit ac1d6a65a1e1f069f119df42c6b57dbdff5f6be8 ]
Zero-length skcipher requests are valid no-ops, but MXS-DCP queues them.
When such a request reaches the worker, last_out_len remains zero. The
CBC completion path then subtracts AES_BLOCK_SIZE from this unsigned
value when updating the IV, causing the offset to underflow. On
decryption, the resulting source address precedes aes_in_buf.
Return success before enqueueing zero-length requests. This avoids the
invalid source access and leaves the IV unchanged for a no-op.
Fixes: fadd7a6e616b ("crypto: mxs-dcp - Fix AES issues")
Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/mxs-dcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 595b2fd84667e..cbbac70d15ca4 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -473,6 +473,9 @@ static int mxs_dcp_aes_enqueue(struct skcipher_request *req, int enc, int ecb)
struct dcp_aes_req_ctx *rctx = skcipher_request_ctx(req);
int ret;
+ if (!req->cryptlen)
+ return 0;
+
if (unlikely(actx->key_len != AES_KEYSIZE_128 && !actx->key_referenced))
return mxs_dcp_block_fallback(req, enc);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0387/2151] crypto: lskcipher - preserve state across unaligned chunks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (385 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0386/2151] crypto: mxs-dcp - handle zero-length skcipher requests Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0388/2151] memory: exynos5422-dmc: handle clock enable failures Greg Kroah-Hartman
` (495 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit ba871255f796d1f599ba710f03e1803d1b374a75 ]
crypto_lskcipher_crypt_unaligned() splits a request into page-sized
chunks but never sets CRYPTO_LSKCIPHER_FLAG_CONT, so a stateful algorithm
restarts from its keyed state at every page boundary. It also marks every
chunk CRYPTO_LSKCIPHER_FLAG_FINAL, which is wrong but harmless: chunks are
trimmed to a multiple of the chunk size, so the trailing partial block that
FINAL guards against is caught after the loop instead.
ARC4 is the only lskcipher with internal state, and cbc, the other
in-tree user of the direct API, never passes more than one block, so
this went unnoticed. bpf_crypto_crypt() however hands
__bpf_dynptr_data() to crypto_lskcipher_encrypt() unchecked, leaving
both alignment and length to the BPF program. An 8192-byte ARC4 request
offset by one byte comes back with its second page identical to its
first: the keystream is reused.
Set FINAL only on the last chunk and CONT after the first, mirroring the
progression used by crypto_lskcipher_crypt_sg().
Fixes: 0ae4dcc1ebf6 ("crypto: skcipher - Add internal state support")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
crypto/lskcipher.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/crypto/lskcipher.c b/crypto/lskcipher.c
index 091761d6ca0bf..b78522212ad53 100644
--- a/crypto/lskcipher.c
+++ b/crypto/lskcipher.c
@@ -75,6 +75,7 @@ static int crypto_lskcipher_crypt_unaligned(
unsigned ivsize = crypto_lskcipher_ivsize(tfm);
unsigned bs = crypto_lskcipher_blocksize(tfm);
unsigned cs = crypto_lskcipher_chunksize(tfm);
+ u32 flags = 0;
int err;
u8 *tiv;
u8 *p;
@@ -98,13 +99,16 @@ static int crypto_lskcipher_crypt_unaligned(
if (chunk > cs)
chunk &= ~(cs - 1);
+ if (chunk == len)
+ flags |= CRYPTO_LSKCIPHER_FLAG_FINAL;
memcpy(p, src, chunk);
- err = crypt(tfm, p, p, chunk, tiv, CRYPTO_LSKCIPHER_FLAG_FINAL);
+ err = crypt(tfm, p, p, chunk, tiv, flags);
if (err)
goto out;
memcpy(dst, p, chunk);
+ flags |= CRYPTO_LSKCIPHER_FLAG_CONT;
src += chunk;
dst += chunk;
len -= chunk;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0388/2151] memory: exynos5422-dmc: handle clock enable failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (386 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0387/2151] crypto: lskcipher - preserve state across unaligned chunks Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0389/2151] gfs2: Fix journaled truncate range end offset Greg Kroah-Hartman
` (494 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jiawen Liu, Lukasz Luba,
Krzysztof Kozlowski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiawen Liu <1298662399@qq.com>
[ Upstream commit cce46902ea9fcd585cd200fffa3166f63bc571f1 ]
Check the return values of clk_prepare_enable() for fout_bpll and
mout_bpll.
If enabling fout_bpll fails, propagate the error. If enabling mout_bpll
fails, disable fout_bpll before returning. This keeps the clock enable
count balanced on probe error paths.
Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422")
Signed-off-by: Jiawen Liu <1298662399@qq.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/tencent_B0189529F550458590E3BA614EAB800FBF08@qq.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/memory/samsung/exynos5422-dmc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/memory/samsung/exynos5422-dmc.c b/drivers/memory/samsung/exynos5422-dmc.c
index 788d49c688b1d..98c3195525831 100644
--- a/drivers/memory/samsung/exynos5422-dmc.c
+++ b/drivers/memory/samsung/exynos5422-dmc.c
@@ -1297,8 +1297,15 @@ static int exynos5_dmc_init_clks(struct exynos5_dmc *dmc)
if (ret)
return ret;
- clk_prepare_enable(dmc->fout_bpll);
- clk_prepare_enable(dmc->mout_bpll);
+ ret = clk_prepare_enable(dmc->fout_bpll);
+ if (ret)
+ return ret;
+
+ ret = clk_prepare_enable(dmc->mout_bpll);
+ if (ret) {
+ clk_disable_unprepare(dmc->fout_bpll);
+ return ret;
+ }
/*
* Some bootloaders do not set clock routes correctly.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0389/2151] gfs2: Fix journaled truncate range end offset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (387 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0388/2151] memory: exynos5422-dmc: handle clock enable failures Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0390/2151] ACPI: glue: Carry out companion lookup under bus_type_sem Greg Kroah-Hartman
` (493 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, VEGA, Jan Kara, Andreas Gruenbacher,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <jack@suse.cz>
[ Upstream commit a52652efd8f985397e87669f505af83f06e335cf ]
The third argument to truncate_pagecache_range() is the inclusive end
offset, but gfs2_journaled_truncate_range() passes the length of each
chunk. A hole punch at an offset larger than its length therefore
creates an inverted range.
Commit 86066914edff ("gfs2: Don't support fallocate on jdata files")
disables fallocate for jdata files. Otherwise, the following bug
could occur:
The MM truncation path then underflows the unsigned partial-folio
length and passes an oversized range to folio_zero_range(), triggering
a BUG. Pass the last byte of the chunk so page-cache invalidation
covers the intended range.
Fixes: 4e56a6411fbc ("gfs2: Implement fallocate(FALLOC_FL_PUNCH_HOLE)")
Reported-by: VEGA <vega@nebusec.ai>
Assisted-by: LLM
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/gfs2/bmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 836e260099c39..119e01c56d6a9 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -2413,7 +2413,7 @@ static int gfs2_journaled_truncate_range(struct inode *inode, loff_t offset,
if (offs && chunk > PAGE_SIZE)
chunk = offs + ((chunk - offs) & PAGE_MASK);
- truncate_pagecache_range(inode, offset, chunk);
+ truncate_pagecache_range(inode, offset, offset + chunk - 1);
offset += chunk;
length -= chunk;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0390/2151] ACPI: glue: Carry out companion lookup under bus_type_sem
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (388 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0389/2151] gfs2: Fix journaled truncate range end offset Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0391/2151] ACPI: glue: Fix up and adjust acpi_unbind_one() Greg Kroah-Hartman
` (492 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit c94619c8a5b5d3b980433d247ac87a2d1c827cb6 ]
When acpi_device_notify() looks up an ACPI companion for the given
device, it invokes callbacks from struct acpi_bus_type() without
synchronization which may lead to a use-after-free if the driver
module containing those callbacks is unloaded at the same time.
Address this by holding bus_type_sem throughout the entire ACPI
companion lookup and the execution of the .setup() callback in
struct acpi_bus_type (if present) instead of dropping the semaphore
(prematurely) after finding a matching struct acpi_bus_type.
For this purpose, rename acpi_get_bus_type() to acpi_companion_lookup(),
make it return a struct acpi_device pointer, and move the relevant code
from acpi_device_notify() to it.
Also notice that the only case in which the .bind() callback from an
ACPI scan handler may need to be invoked is when the given device is
a platform one, so adjust acpi_device_notify() accordingly and drop
the "done" label that is not used any more from it.
Fixes: 2ef5236660b6 ("ACPI: glue: Look for ACPI bus type only if ACPI companion is not known")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3089807.e9J7NaK4W3@rafael.j.wysocki
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/glue.c | 61 +++++++++++++++++++++------------------------
1 file changed, 29 insertions(+), 32 deletions(-)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 6c81ac1ff28e5..271eac337506a 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -59,19 +59,34 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
}
EXPORT_SYMBOL_GPL(unregister_acpi_bus_type);
-static struct acpi_bus_type *acpi_get_bus_type(struct device *dev)
+static struct acpi_device *acpi_companion_lookup(struct device *dev)
{
- struct acpi_bus_type *tmp, *ret = NULL;
+ struct acpi_bus_type *type;
- down_read(&bus_type_sem);
- list_for_each_entry(tmp, &bus_type_list, list) {
- if (tmp->match(dev)) {
- ret = tmp;
- break;
+ guard(rwsem_read)(&bus_type_sem);
+
+ list_for_each_entry(type, &bus_type_list, list) {
+ struct acpi_device *adev;
+
+ if (!type->match(dev))
+ continue;
+
+ adev = type->find_companion(dev);
+ if (!adev) {
+ dev_dbg(dev, "ACPI companion not found\n");
+ return NULL;
}
+ if (acpi_bind_one(dev, adev)) {
+ dev_dbg(dev, "Binding to ACPI companion failed\n");
+ return NULL;
+ }
+ if (type->setup)
+ type->setup(dev);
+
+ return adev;
}
- up_read(&bus_type_sem);
- return ret;
+
+ return NULL;
}
#define FIND_CHILD_MIN_SCORE 1
@@ -360,40 +375,22 @@ void acpi_device_notify(struct device *dev)
ret = acpi_bind_one(dev, NULL);
if (ret) {
- struct acpi_bus_type *type = acpi_get_bus_type(dev);
-
- if (!type)
+ adev = acpi_companion_lookup(dev);
+ if (!adev)
return;
-
- adev = type->find_companion(dev);
- if (!adev) {
- dev_dbg(dev, "ACPI companion not found\n");
- return;
- }
- ret = acpi_bind_one(dev, adev);
- if (ret) {
- dev_dbg(dev, "Binding to ACPI companion failed\n");
- return;
- }
- if (type->setup) {
- type->setup(dev);
- goto done;
- }
} else {
adev = ACPI_COMPANION(dev);
if (dev_is_pci(dev)) {
pci_acpi_setup(dev, adev);
- goto done;
} else if (dev_is_platform(dev)) {
acpi_configure_pmsi_domain(dev);
+
+ if (adev->handler && adev->handler->bind)
+ adev->handler->bind(dev);
}
}
- if (adev->handler && adev->handler->bind)
- adev->handler->bind(dev);
-
-done:
dev_dbg(dev, "Bound to ACPI device %s\n", acpi_dev_name(adev));
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0391/2151] ACPI: glue: Fix up and adjust acpi_unbind_one()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (389 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0390/2151] ACPI: glue: Carry out companion lookup under bus_type_sem Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0392/2151] thermal: gov_power_allocator: Fix NULL pointer dereference in update_tz() Greg Kroah-Hartman
` (491 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 693546852656075e0247ac637b05625ead134eff ]
Since none of the acpi_unbind_one() callers check its return value and
it always returns 0 anyway, make it void.
Also notice that unlocking physical_node_lock for the given ACPI device
should be carried out before dropping the reference to it in case that
reference is the last one (highly unlikely), so rearrange the code to
make that happen.
Fixes: 3e3327837c18 ("ACPI: Use list_for_each_entry() in acpi_unbind_one()")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/10940500.nUPlyArG6x@rafael.j.wysocki
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/glue.c | 10 ++++++----
include/acpi/acpi_bus.h | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 271eac337506a..e2a40847d24b6 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -331,13 +331,13 @@ int acpi_bind_one(struct device *dev, struct acpi_device *acpi_dev)
}
EXPORT_SYMBOL_GPL(acpi_bind_one);
-int acpi_unbind_one(struct device *dev)
+void acpi_unbind_one(struct device *dev)
{
struct acpi_device *acpi_dev = ACPI_COMPANION(dev);
struct acpi_device_physical_node *entry;
if (!acpi_dev)
- return 0;
+ return;
mutex_lock(&acpi_dev->physical_node_lock);
@@ -352,15 +352,17 @@ int acpi_unbind_one(struct device *dev)
sysfs_remove_link(&acpi_dev->dev.kobj, physnode_name);
sysfs_remove_link(&dev->kobj, "firmware_node");
ACPI_COMPANION_SET(dev, NULL);
+
+ mutex_unlock(&acpi_dev->physical_node_lock);
+
/* Drop references taken by acpi_bind_one(). */
put_device(dev);
acpi_dev_put(acpi_dev);
kfree(entry);
- break;
+ return;
}
mutex_unlock(&acpi_dev->physical_node_lock);
- return 0;
}
EXPORT_SYMBOL_GPL(acpi_unbind_one);
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 53aad501458f8..d6b449c6ecd3a 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -720,7 +720,7 @@ struct acpi_bus_type {
int register_acpi_bus_type(struct acpi_bus_type *);
int unregister_acpi_bus_type(struct acpi_bus_type *);
int acpi_bind_one(struct device *dev, struct acpi_device *adev);
-int acpi_unbind_one(struct device *dev);
+void acpi_unbind_one(struct device *dev);
enum acpi_bridge_type {
ACPI_BRIDGE_TYPE_PCIE = 1,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0392/2151] thermal: gov_power_allocator: Fix NULL pointer dereference in update_tz()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (390 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0391/2151] ACPI: glue: Fix up and adjust acpi_unbind_one() Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0393/2151] firewire: cdev: Fix FW_CDEV_IOC_CREATE_ISO_CONTEXT references in kernel-doc Greg Kroah-Hartman
` (490 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sumeet Pawnikar, Lukasz Luba,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sumeet Pawnikar <sumeet4linux@gmail.com>
[ Upstream commit d3515092f1bff9cfb4d99ea82dcd4ac66f32f50d ]
power_allocator_update_tz() unconditionally derives the trip descriptor of
params->trip_max as below,
const struct thermal_trip_desc *td = trip_to_trip_desc(params->trip_max);
and then walks td->thermal_instances. However, params->trip_max is allowed
to be NULL and in that case the list walk dereferences a bogus pointer
derived from NULL which oops the kernel.
get_governor_trips() picks trip_switch_on and trip_max out of the trip
table of the zone. When the zone has neither a passive nor an active trip
point, last_active is NULL and params->trip_max is left NULL. This is an
explicitly supported configuration, as documented in the function
get_governor_trips() as below,
If there are no passive or active trip points, then the governor won't
do anything. In fact, its throttle function won't be called at all.
Return early from power_allocator_update_tz() when params->trip_max is NULL
and only compute the trip descriptor after that check. There is nothing to
update in that case anyway, with no trip_max and there are no thermal
instances for the governor to account for, num_actors stays zero and
total_weight is irrelevant.
Fixes: 912e97c67cc3 ("thermal: gov_power_allocator: Move memory allocation out of throttle()")
Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20260822114236.15998-1-sumeet4linux@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/gov_power_allocator.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index 0d9f636c80f4d..215c0cbd011b5 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -661,10 +661,15 @@ static void power_allocator_update_tz(struct thermal_zone_device *tz,
enum thermal_notify_event reason)
{
struct power_allocator_params *params = tz->governor_data;
- const struct thermal_trip_desc *td = trip_to_trip_desc(params->trip_max);
+ const struct thermal_trip_desc *td;
struct thermal_instance *instance;
int num_actors = 0;
+ if (!params->trip_max)
+ return;
+
+ td = trip_to_trip_desc(params->trip_max);
+
switch (reason) {
case THERMAL_TZ_BIND_CDEV:
case THERMAL_TZ_UNBIND_CDEV:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0393/2151] firewire: cdev: Fix FW_CDEV_IOC_CREATE_ISO_CONTEXT references in kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (391 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0392/2151] thermal: gov_power_allocator: Fix NULL pointer dereference in update_tz() Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0394/2151] firewire: core: remove unused link field in fw_packet structure Greg Kroah-Hartman
` (489 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Takashi Sakamoto,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 0a6cf2b7adcbd362039e9d282f73aff3f24022ca ]
The fw_cdev_event_iso_interrupt and fw_cdev_event_iso_interrupt_mc
comments refer to FW_CDEV_CREATE_ISO_CONTEXT, but the ioctl is named
FW_CDEV_IOC_CREATE_ISO_CONTEXT.
Correct both references. The misspellings were introduced separately
with the userspace interface documentation and multichannel reception
support.
Fixes: 7ada60e36764 ("firewire: Document userspace ioctl interface.")
Fixes: 872e330e3880 ("firewire: add isochronous multichannel reception")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://lore.kernel.org/r/20260911222807.7673-1-kmehltretter@gmail.com
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/uapi/linux/firewire-cdev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/firewire-cdev.h b/include/uapi/linux/firewire-cdev.h
index 05e3aa8fa8bcb..4f83d6babc921 100644
--- a/include/uapi/linux/firewire-cdev.h
+++ b/include/uapi/linux/firewire-cdev.h
@@ -293,7 +293,7 @@ struct fw_cdev_event_request3 {
/**
* struct fw_cdev_event_iso_interrupt - Sent when an iso packet was completed
* @closure: See &fw_cdev_event_common;
- * set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl
+ * set by %FW_CDEV_IOC_CREATE_ISO_CONTEXT ioctl
* @type: See &fw_cdev_event_common; always %FW_CDEV_EVENT_ISO_INTERRUPT
* @cycle: Cycle counter of the last completed packet
* @header_length: Total length of following headers, in bytes
@@ -353,7 +353,7 @@ struct fw_cdev_event_iso_interrupt {
/**
* struct fw_cdev_event_iso_interrupt_mc - An iso buffer chunk was completed
* @closure: See &fw_cdev_event_common;
- * set by %FW_CDEV_CREATE_ISO_CONTEXT ioctl
+ * set by %FW_CDEV_IOC_CREATE_ISO_CONTEXT ioctl
* @type: %FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL
* @completed: Offset into the receive buffer; data before this offset is valid
*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0394/2151] firewire: core: remove unused link field in fw_packet structure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (392 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0393/2151] firewire: cdev: Fix FW_CDEV_IOC_CREATE_ISO_CONTEXT references in kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0395/2151] cpuidle: menu: Remove incorrect unlikely() annotation Greg Kroah-Hartman
` (488 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Takashi Sakamoto, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
[ Upstream commit 00d4d31e4fdfe51312f0184f8d162b8d4de172dc ]
The link field in fw_packet structure has never been used since it was
added.
Fixes: 3038e353cfaf ("firewire: Add core firewire stack.")
Link: https://lore.kernel.org/r/20260911141602.3288806-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/firewire.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index 6d208769d4562..4743023b1f9ff 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -321,7 +321,6 @@ struct fw_packet {
*/
fw_packet_callback_t callback;
int ack;
- struct list_head link;
void *driver_data;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0395/2151] cpuidle: menu: Remove incorrect unlikely() annotation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (393 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0394/2151] firewire: core: remove unused link field in fw_packet structure Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0396/2151] cpuidle: menu: Remove single state handling Greg Kroah-Hartman
` (487 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Breno Leitao, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <leitao@debian.org>
[ Upstream commit fcbd7897b871e157ee5c595e950c8466d86c0cd5 ]
The unlikely() annotation on the early-return condition in menu_select()
is incorrect on systems with only one idle state (e.g., ARM64 servers
with a single ACPI LPI state). Branch profiling shows 100% misprediction
on such systems since drv->state_count <= 1 is always true.
On platforms where only state0 is available, this path is the common
case, not an unlikely edge case. Remove the misleading annotation to
let the branch predictor learn the actual behavior.
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260105-annotated_idle-v1-1-10ddf0771b58@debian.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: d594187cafd5 ("cpuidle: menu: Do not return a disabled idle state")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index ca863ba03d454..c6052055ba0f9 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -281,7 +281,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
data->bucket = BUCKETS - 1;
}
- if (unlikely(drv->state_count <= 1 || latency_req == 0) ||
+ if (drv->state_count <= 1 || latency_req == 0 ||
((data->next_timer_ns < drv->states[1].target_residency_ns ||
latency_req < drv->states[1].exit_latency_ns) &&
!dev->states_usage[0].disable)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0396/2151] cpuidle: menu: Remove single state handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (394 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0395/2151] cpuidle: menu: Remove incorrect unlikely() annotation Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0397/2151] cpuidle: menu: Do not return a disabled idle state Greg Kroah-Hartman
` (486 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christian Loehle, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Loehle <christian.loehle@arm.com>
[ Upstream commit 93983a9f3beea791c21d77c2425488ad327d4fda ]
cpuidle systems where the governor has no choice because there's only
a single idle state are now handled by cpuidle core and bypass the
governor, so remove the related handling.
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
[ rjw: Rebase on top of the cpuidle changes merged recently ]
Link: https://patch.msgid.link/20260216185005.1131593-5-aboorvad@linux.ibm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: d594187cafd5 ("cpuidle: menu: Do not return a disabled idle state")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index c6052055ba0f9..899ff16ff1fe2 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -281,7 +281,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
data->bucket = BUCKETS - 1;
}
- if (drv->state_count <= 1 || latency_req == 0 ||
+ if (latency_req == 0 ||
((data->next_timer_ns < drv->states[1].target_residency_ns ||
latency_req < drv->states[1].exit_latency_ns) &&
!dev->states_usage[0].disable)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0397/2151] cpuidle: menu: Do not return a disabled idle state
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (395 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0396/2151] cpuidle: menu: Remove single state handling Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0398/2151] ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200 Greg Kroah-Hartman
` (485 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xueqin Luo, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xueqin Luo <luoxueqin@kylinos.cn>
[ Upstream commit d594187cafd5ad65afc5f00242f8fa20e1d8c0f1 ]
When idle state 0 is disabled and the PM QoS latency constraint is
zero (latency_req == 0), the first branch of the || in the early-return
condition of menu_select() is taken immediately, so state 0 is returned
regardless of its disable flag.
Address this by making the !disable check a prerequisite for the entire
early-return condition, so that when state 0 is disabled the normal
state selection loop is used instead, which already skips disabled
states.
Fixes: 53812cdc9100 ("cpuidle: menu: Move the latency_req == 0 special case check")
Signed-off-by: Xueqin Luo <luoxueqin@kylinos.cn>
Link: https://patch.msgid.link/20260827094820.3900062-1-luoxueqin@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
| 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index 899ff16ff1fe2..d50fb883f75ca 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -281,10 +281,10 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
data->bucket = BUCKETS - 1;
}
- if (latency_req == 0 ||
- ((data->next_timer_ns < drv->states[1].target_residency_ns ||
- latency_req < drv->states[1].exit_latency_ns) &&
- !dev->states_usage[0].disable)) {
+ if (!dev->states_usage[0].disable &&
+ (latency_req == 0 ||
+ data->next_timer_ns < drv->states[1].target_residency_ns ||
+ latency_req < drv->states[1].exit_latency_ns)) {
/*
* In this case state[0] will be used no matter what, so return
* it right away and keep the tick running if state[0] is a
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0398/2151] ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (396 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0397/2151] cpuidle: menu: Do not return a disabled idle state Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0399/2151] ARM: dts: stm32: lxa-tac: " Greg Kroah-Hartman
` (484 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ahmad Fatoum, Alexandre Torgue,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
[ Upstream commit fc3c0ffefc169719316eddb8c36e2427e11ce713 ]
The default baud rate when none is specified is up to the DT consumer.
In the case of the Linux STM32 serial driver, it defaults to 9600 baud,
which differs from the 115200 baud that this board's barebox bootloader
configured.
This went unnoticed, because barebox automatically fixes up a console=
command-line option that looks like this on the LXA boards:
console=ttySTM0,115200n8
This had precedence over the 9600 fallback baud rate.
But when EFI booting a kernel via GRUB, we run into this issue, because
the barebox-provided command-line is disregarded by GRUB.
Fix this by explicitly setting the baud rate to the correct 115200.
Fixes: 666b5ca85cd3 ("ARM: dts: stm32: add STM32MP1-based Linux Automation MC-1 board")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.kernel.org/r/20260611-lxa-stdout-path-baudrate-v1-1-59b60a5069ff@pengutronix.de
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts
index eada9cf257be9..b3d8eb57aa24e 100644
--- a/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts
+++ b/arch/arm/boot/dts/st/stm32mp157c-lxa-mc1.dts
@@ -33,7 +33,7 @@ backlight: backlight {
};
chosen {
- stdout-path = &uart4;
+ stdout-path = "serial0:115200n8";
};
led-controller-0 {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0399/2151] ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (397 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0398/2151] ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200 Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0400/2151] ARM: dts: stm32: fairytux2: " Greg Kroah-Hartman
` (483 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ahmad Fatoum, Alexandre Torgue,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
[ Upstream commit 85bb59fc12ef439b248d5f4faf846d5566b701fe ]
The default baud rate when none is specified is up to the DT consumer.
In the case of the Linux STM32 serial driver, it defaults to 9600 baud,
which differs from the 115200 baud that this board's barebox bootloader
configured.
This went unnoticed, because barebox automatically fixes up a console=
command-line option that looks like this on the LXA boards:
console=ttySTM0,115200n8
This had precedence over the 9600 fallback baud rate.
But when EFI booting a kernel via GRUB, we run into this issue, because
the barebox-provided command-line is disregarded by GRUB.
Fix this by explicitly setting the baud rate to the correct 115200.
Fixes: 518272af37b2 ("ARM: dts: stm32: lxa-tac: add Linux Automation GmbH TAC")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.kernel.org/r/20260611-lxa-stdout-path-baudrate-v1-2-59b60a5069ff@pengutronix.de
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi b/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi
index 154698f87b0e5..eb76f11c9d576 100644
--- a/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xc-lxa-tac.dtsi
@@ -33,7 +33,7 @@ aliases {
};
chosen {
- stdout-path = &uart4;
+ stdout-path = "serial0:115200n8";
};
led-controller-0 {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0400/2151] ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (398 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0399/2151] ARM: dts: stm32: lxa-tac: " Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0401/2151] ARM: dts: stm32: add LTDC / DCMIPP access controller for STM32MP135 Greg Kroah-Hartman
` (482 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ahmad Fatoum, Alexandre Torgue,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
[ Upstream commit 5404275bc121a7b06676777c3362d85fb75356fc ]
The default baud rate when none is specified is up to the DT consumer.
In the case of the Linux STM32 serial driver, it defaults to 9600 baud,
which differs from the 115200 baud that this board's barebox bootloader
configured.
This went unnoticed, because barebox automatically fixes up a console=
command-line option that looks like this on the LXA boards:
console=ttySTM0,115200n8
This had precedence over the 9600 fallback baud rate.
But when EFI booting a kernel via GRUB, we run into this issue, because
the barebox-provided command-line is disregarded by GRUB.
Fix this by explicitly setting the baud rate to the correct 115200.
Fixes: 8c6d469f5249 ("ARM: dts: stm32: lxa-fairytux2: add Linux Automation GmbH FairyTux 2")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.kernel.org/r/20260611-lxa-stdout-path-baudrate-v1-3-59b60a5069ff@pengutronix.de
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi b/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi
index 9eeb9d6b5eb0e..e9de6b8161d6e 100644
--- a/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp153c-lxa-fairytux2.dtsi
@@ -28,7 +28,7 @@ aliases {
};
chosen {
- stdout-path = &uart4;
+ stdout-path = "serial0:115200n8";
};
backlight: backlight {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0401/2151] ARM: dts: stm32: add LTDC / DCMIPP access controller for STM32MP135
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (399 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0400/2151] ARM: dts: stm32: fairytux2: " Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0402/2151] cpuidle: teo: Do not return a disabled idle state Greg Kroah-Hartman
` (481 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alain Volmat, Alexandre Torgue,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alain Volmat <alain.volmat@foss.st.com>
[ Upstream commit 0c354b85cc95b5d563a581c8dbca57b4942bfae7 ]
Add ETZPC as an access controller for the LTDC and DCMIPP found
on the stm32mp135.
Fixes: a06b9560eb6c ("ARM: dts: stm32: add ETZPC as a system bus for STM32MP13x boards")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/20260721-etzpc-mp13-ltdc-dcmipp-fix-v1-1-a969f2ab8da1@foss.st.com
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp135.dtsi | 42 ++++++++++++++--------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/arch/arm/boot/dts/st/stm32mp135.dtsi b/arch/arm/boot/dts/st/stm32mp135.dtsi
index 834a4d545fe44..f573335edf6b4 100644
--- a/arch/arm/boot/dts/st/stm32mp135.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp135.dtsi
@@ -6,29 +6,29 @@
#include "stm32mp133.dtsi"
-/ {
- soc {
- dcmipp: dcmipp@5a000000 {
- compatible = "st,stm32mp13-dcmipp";
- reg = <0x5a000000 0x400>;
- interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
- resets = <&rcc DCMIPP_R>;
- clocks = <&rcc DCMIPP_K>;
- status = "disabled";
+&etzpc {
+ dcmipp: dcmipp@5a000000 {
+ compatible = "st,stm32mp13-dcmipp";
+ reg = <0x5a000000 0x400>;
+ interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rcc DCMIPP_R>;
+ clocks = <&rcc DCMIPP_K>;
+ access-controllers = <&etzpc 4>;
+ status = "disabled";
- port {
- };
+ port {
};
+ };
- ltdc: display-controller@5a001000 {
- compatible = "st,stm32-ltdc";
- reg = <0x5a001000 0x400>;
- interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&rcc LTDC_PX>;
- clock-names = "lcd";
- resets = <&scmi_reset RST_SCMI_LTDC>;
- status = "disabled";
- };
+ ltdc: display-controller@5a001000 {
+ compatible = "st,stm32-ltdc";
+ reg = <0x5a001000 0x400>;
+ interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&rcc LTDC_PX>;
+ clock-names = "lcd";
+ resets = <&scmi_reset RST_SCMI_LTDC>;
+ access-controllers = <&etzpc 3>;
+ status = "disabled";
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0402/2151] cpuidle: teo: Do not return a disabled idle state
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (400 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0401/2151] ARM: dts: stm32: add LTDC / DCMIPP access controller for STM32MP135 Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0403/2151] PM: runtime: Only queue an idle check for RPM-linked suppliers Greg Kroah-Hartman
` (480 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xueqin Luo, Christian Loehle,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xueqin Luo <luoxueqin@kylinos.cn>
[ Upstream commit 60d5fca628f94f8f23398ad62d80aa284dae6571 ]
If idle state 0 is disabled and none of the enabled idle states satisfies
the PM QoS latency constraint, constraint_idx in teo_select() stays at its
initial value of 0, because the loop that updates it starts at state 1,
and so the candidate state index is capped at state 0, which is disabled,
and that state is returned to the caller.
The cpuidle core does not validate the returned state index against the
per-state disable flags, so the CPU ends up entering the disabled state 0.
To address this, ensure that constraint_idx is at least equal to the index
of the first enabled idle state (idx0), so that the candidate state is
never capped to a disabled one.
Fixes: c410a9a142f1 ("cpuidle: teo: Change the main idle state selection logic")
Signed-off-by: Xueqin Luo <luoxueqin@kylinos.cn>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/20260828032457.2317326-1-luoxueqin@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cpuidle/governors/teo.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
index 8078eca72ca53..f5b987022470a 100644
--- a/drivers/cpuidle/governors/teo.c
+++ b/drivers/cpuidle/governors/teo.c
@@ -413,6 +413,17 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
}
}
+ /*
+ * If the latency constraint does not allow any of the enabled idle
+ * states to be used, the candidate state index will be capped to 0
+ * by the check below, but state 0 may be disabled. To prevent the
+ * selection of a disabled state in that case, ensure that
+ * constraint_idx is at least equal to the index of the first
+ * enabled idle state.
+ */
+ if (constraint_idx < idx0)
+ constraint_idx = idx0;
+
/*
* If there is a latency constraint, it may be necessary to select an
* idle state shallower than the current candidate one.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0403/2151] PM: runtime: Only queue an idle check for RPM-linked suppliers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (401 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0402/2151] cpuidle: teo: Do not return a disabled idle state Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0404/2151] ARM: dts: stm32: Drop bias-disable from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a Greg Kroah-Hartman
` (479 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Brian Norris, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian Norris <briannorris@chromium.org>
[ Upstream commit be5755f023e7e02ec90bbd1d4ca63a0abe594733 ]
When a device RPM-suspends, it queues up an idle check for all of its
suppliers, in case that device was the last consumer, and those
suppliers are now able to suspend. Today, we do this for all suppliers,
and not only for those suppliers that are marked for use by runtime PM.
This isn't directly harmful, but it is a bit wasteful, and also may
induce unexpected suspend attempts (e.g., if a device was purposely last
touched with pm_runtime_put_noidle()).
To avoid excess idle checks, only call pm_request_idle() on linked
suppliers that opted into runtime PM.
Noticed by inspection of trace logs.
This is not expected to have a functional impact on systems that are
using device links properly, and should only be considered an
optimization.
Fixes: 5244f5e2d801 ("PM: runtime: Defer suspending suppliers")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://patch.msgid.link/20260901013341.1417232-1-briannorris@chromium.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/base/power/runtime.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 6980a8dfced2c..e487f8892d3ea 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -361,7 +361,8 @@ static void rpm_suspend_suppliers(struct device *dev)
list_for_each_entry_rcu(link, &dev->links.suppliers, c_node,
device_links_read_lock_held())
- pm_request_idle(link->supplier);
+ if (device_link_test(link, DL_FLAG_PM_RUNTIME))
+ pm_request_idle(link->supplier);
device_links_read_unlock(idx);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0404/2151] ARM: dts: stm32: Drop bias-disable from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (402 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0403/2151] PM: runtime: Only queue an idle check for RPM-linked suppliers Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0405/2151] HID: i2c-hid: Unfollow the panel on shutdown Greg Kroah-Hartman
` (478 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Marek Vasut, Alexandre Torgue,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <marex@nabladev.com>
[ Upstream commit 3572825773791f4258b553391f4e2187df321731 ]
Drop bias-disable property from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a
to fix the following DT checker warning. The bias-pull-up property is
the only bias-related property that has to be present in those pinctrl
node subnodes.
"
arch/arm/boot/dts/st/stm32mp153c-dhcom-drc02.dtb: pinctrl@50002000 (st,stm32mp157-pinctrl): sdmmc1-b4-0:pins1: {'pinmux': [10253, 10509, 10765, 11021, 12813], 'slew-rate': 1, 'drive-push-pull': True, 'bias-disable': True, 'bias-pull-up': True} is valid under each of {'required': ['bias-pull-up']}, {'required': ['bias-disable']}
"
Fixes: 7cd8567d988a ("ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM")
Signed-off-by: Marek Vasut <marex@nabladev.com>
Link: https://lore.kernel.org/r/20260828150111.173089-1-marex@nabladev.com
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi
index 4cc633683c6b7..0a4263e6209d8 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi
@@ -505,9 +505,11 @@ &sdmmc1_b4_pins_a {
* - mandatory on SoMs without SD voltage translator
*/
pins1 {
+ /delete-property/ bias-disable;
bias-pull-up;
};
pins2 {
+ /delete-property/ bias-disable;
bias-pull-up;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0405/2151] HID: i2c-hid: Unfollow the panel on shutdown
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (403 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0404/2151] ARM: dts: stm32: Drop bias-disable from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0406/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp15 DK boards Greg Kroah-Hartman
` (477 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Douglas Anderson, Justin Yeh,
Jiri Kosina, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Justin Yeh <justin.yeh@mediatek.com>
[ Upstream commit 59fc35a1edbfa5405122d749cf8843da131fd796 ]
i2c_hid_core_shutdown() sends SET_POWER(SLEEP) even for panel followers,
but nothing in device_shutdown() guarantees whether the panel, and hence
our own power, is still on by the time we get there.
Do what i2c_hid_core_remove() does and just unfollow the panel.
drm_panel_remove_follower() calls panel_unpreparing() only while the
panel is still prepared, which powers us down properly; if it is already
unprepared no transfer is attempted at all. On MT8196 the panel is
unprepared long before us, so this also drops the ~2s i2c bus timeout
from every reboot.
Fixes: 96a37bfd232a ("HID: i2c-hid: Support being a panel follower")
Suggested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Justin Yeh <justin.yeh@mediatek.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/i2c-hid/i2c-hid-core.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 62b3dd0390a7c..4f0b461566958 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -1355,7 +1355,16 @@ void i2c_hid_core_shutdown(struct i2c_client *client)
{
struct i2c_hid *ihid = i2c_get_clientdata(client);
- i2c_hid_set_power(ihid, I2C_HID_PWR_SLEEP);
+ /*
+ * Like in i2c_hid_core_remove(): if we're a follower, the act of
+ * unfollowing will cause us to be powered down. Otherwise we need to
+ * manually do it.
+ */
+ if (ihid->is_panel_follower)
+ drm_panel_remove_follower(&ihid->panel_follower);
+ else
+ i2c_hid_set_power(ihid, I2C_HID_PWR_SLEEP);
+
free_irq(client->irq, ihid);
i2c_hid_core_shutdown_tail(ihid);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0406/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp15 DK boards
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (404 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0405/2151] HID: i2c-hid: Unfollow the panel on shutdown Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0407/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp157c-ev1 Greg Kroah-Hartman
` (476 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gabriel Fernandez, Fabrice Gasnier,
Alexandre Torgue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
[ Upstream commit 8d8f88e0f3e602cd967bdd8d7bc218ac7613650a ]
stm32mp15 DK boards use Microchip USB2514 HUB. Since vdda supply has been
added, the regulator framework wrongly associates the 'vdda' supply
dedicated to ADC, so the wrong regulator is referenced.
Only the 3v3 regulator is used to supply both the digital and the analog
part of the HUB.
Fixes: 673655f7944f ("usb: misc: onboard_dev: add vdda support for Microchip USB2514")
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20260821-usb_fixes_vdda-v1-v2-1-23cc919b59fb@foss.st.com
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi | 1 +
arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi b/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi
index 89de85a2eff32..172347769e025 100644
--- a/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi
@@ -180,6 +180,7 @@ &sdmmc3 {
&usbh_ehci {
hub@1 {
vdd-supply = <&scmi_v3v3>;
+ vdda-supply = <&scmi_v3v3>;
};
};
diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
index 8cea6facd27ba..30b1e6222b02e 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
@@ -709,6 +709,7 @@ hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&v3v3>;
+ vdda-supply = <&v3v3>;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0407/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp157c-ev1
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (405 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0406/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp15 DK boards Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0408/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk Greg Kroah-Hartman
` (475 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gabriel Fernandez, Fabrice Gasnier,
Alexandre Torgue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
[ Upstream commit dae62eda0c987f3b80d622d00a45fb0cec854054 ]
stm32mp157c-ev1 uses Microchip USB2514 HUB. Since vdda supply has been
added, the regulator framework wrongly associates the 'vdda' supply
dedicated to ADC, so the wrong regulator is referenced.
Only the 3v3 regulator is used to supply both the digital and the analog
part of the HUB.
Fixes: 673655f7944f ("usb: misc: onboard_dev: add vdda support for Microchip USB2514")
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20260821-usb_fixes_vdda-v1-v2-2-23cc919b59fb@foss.st.com
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp157c-ev1.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/st/stm32mp157c-ev1.dts b/arch/arm/boot/dts/st/stm32mp157c-ev1.dts
index 8f99c30f1af1e..bba43ad80222f 100644
--- a/arch/arm/boot/dts/st/stm32mp157c-ev1.dts
+++ b/arch/arm/boot/dts/st/stm32mp157c-ev1.dts
@@ -379,6 +379,7 @@ hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&v3v3>;
+ vdda-supply = <&v3v3>;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0408/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (406 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0407/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp157c-ev1 Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0409/2151] bpf: Fix program BTF use-after-free in sleepable programs Greg Kroah-Hartman
` (474 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gabriel Fernandez, Fabrice Gasnier,
Alexandre Torgue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
[ Upstream commit 2f92d900f262a16c8ae02daf53ae2910d07185f5 ]
stm32mp135f-dk uses Microchip USB2514 HUB. Since vdda supply has been
added, the regulator framework wrongly associates the 'vdda' supply
dedicated to ADC, so the wrong regulator is referenced.
Only the 3v3 regulator is used to supply both the digital and the analog
part of the HUB.
Fixes: 673655f7944f ("usb: misc: onboard_dev: add vdda support for Microchip USB2514")
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20260821-usb_fixes_vdda-v1-v2-3-23cc919b59fb@foss.st.com
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/stm32mp135f-dk.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/st/stm32mp135f-dk.dts b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
index 9764a6bfa5b42..8ca1ab8ae02f3 100644
--- a/arch/arm/boot/dts/st/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
@@ -567,6 +567,7 @@ hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&scmi_v3v3_sw>;
+ vdda-supply = <&scmi_v3v3_sw>;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0409/2151] bpf: Fix program BTF use-after-free in sleepable programs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (407 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0408/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0410/2151] ARM: dts: imx7-tqma7: correctly specify PMIC voltage constraints Greg Kroah-Hartman
` (473 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sanghyun Park, Andrii Nakryiko,
Sun Jian, Emil Tsalapatis, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sanghyun Park <sanghyun.park.cnu@gmail.com>
[ Upstream commit 88c9c6d0a766dd146545990053e8a04422ccb367 ]
Object kfunc calls embed metadata owned by the program BTF. A sleepable
program can remain active under Tasks Trace RCU after its last reference is
dropped, while program teardown releases the BTF through ordinary RCU. The
invocation can then dereference freed metadata in bpf_obj_new().
Move btf_put() into __bpf_prog_put_rcu(), the callback that frees the
program. When teardown is deferred, that callback runs after the program's
own grace period (Tasks Trace RCU for sleepable programs and ordinary RCU
otherwise), so the BTF outlives every active invocation. The non-deferred
path invokes the callback synchronously, so load-error cleanup stays direct.
Fixes: 958cf2e273f0 ("bpf: Introduce bpf_obj_new")
Signed-off-by: Sanghyun Park <sanghyun.park.cnu@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Sun Jian <sun.jian.kdev@gmail.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://lore.kernel.org/bpf/20260901014829.3504342-2-sanghyun.park.cnu@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 144d8b1183a98..f5eeaa0090875 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -2384,6 +2384,7 @@ static void __bpf_prog_put_rcu(struct rcu_head *rcu)
{
struct bpf_prog_aux *aux = container_of(rcu, struct bpf_prog_aux, rcu);
+ btf_put(aux->btf);
kvfree(aux->func_info);
kfree(aux->func_info_aux);
free_uid(aux->user);
@@ -2394,7 +2395,6 @@ static void __bpf_prog_put_rcu(struct rcu_head *rcu)
static void __bpf_prog_put_noref(struct bpf_prog *prog, bool deferred)
{
bpf_prog_kallsyms_del_all(prog);
- btf_put(prog->aux->btf);
module_put(prog->aux->mod);
kvfree(prog->aux->jited_linfo);
kvfree(prog->aux->linfo);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0410/2151] ARM: dts: imx7-tqma7: correctly specify PMIC voltage constraints
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (408 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0409/2151] bpf: Fix program BTF use-after-free in sleepable programs Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0411/2151] arm64: dts: ti: k3-j784s4-j742s2-evm-common: Set ACSPCIe refclk to MAIN_PLL2_HSDIV4 for pcie1 Greg Kroah-Hartman
` (472 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Nora Schiffer, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nora Schiffer <nora.schiffer@ew.tq-group.com>
[ Upstream commit f322f8f68c2c3291633ead663effa3b25c18f7b1 ]
regulator-(min|max)-microvolt refer to the supported voltages according
to board design, not the possible range of the regulators themselves.
Update the configuration for the TQMa7x's PMIC and also add a comment
regarding the PMIC's VCC_SD switching feature.
Fixes: a80a1af6ec8a ("ARM: dts: tq imx7 common board support")
Signed-off-by: Nora Schiffer <nora.schiffer@ew.tq-group.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi | 40 +++++++++++++----------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi
index 2966a33bc528a..acd85ca02e3c5 100644
--- a/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx7-tqma7.dtsi
@@ -46,8 +46,8 @@ pfuze3000: pmic@8 {
regulators {
sw1a_reg: sw1a {
- regulator-min-microvolt = <700000>;
- regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1225000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <6250>;
@@ -55,34 +55,33 @@ sw1a_reg: sw1a {
/* use sw1c_reg to align with pfuze100/pfuze200 */
sw1c_reg: sw1b {
- regulator-min-microvolt = <700000>;
- regulator-max-microvolt = <1475000>;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1000000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <6250>;
};
sw2_reg: sw2 {
- regulator-min-microvolt = <1500000>;
- regulator-max-microvolt = <1850000>;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-always-on;
};
sw3a_reg: sw3 {
- regulator-min-microvolt = <900000>;
- regulator-max-microvolt = <1650000>;
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
regulator-boot-on;
regulator-always-on;
};
swbst_reg: swbst {
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5150000>;
+ /* Not connected and left unconfigured */
};
snvs_reg: vsnvs {
- regulator-min-microvolt = <1000000>;
+ regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-boot-on;
regulator-always-on;
@@ -95,18 +94,25 @@ vref_reg: vrefddr {
vgen1_reg: vldo1 {
regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3300000>;
+ regulator-max-microvolt = <1800000>;
regulator-always-on;
};
vgen2_reg: vldo2 {
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1550000>;
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
regulator-always-on;
};
vgen3_reg: vccsd {
- regulator-min-microvolt = <2850000>;
+ /*
+ * Specified values refer to 3.3V operation; voltage for 1.8V
+ * operation is derived from this.
+ *
+ * The base board should usually mux GPIO1_IO08 to SD1_VSELECT for
+ * automatic switching of SD card IO voltage.
+ */
+ regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
@@ -118,13 +124,13 @@ vgen4_reg: v33 {
};
vgen5_reg: vldo3 {
- regulator-min-microvolt = <1800000>;
+ regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
vgen6_reg: vldo4 {
- regulator-min-microvolt = <1800000>;
+ regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0411/2151] arm64: dts: ti: k3-j784s4-j742s2-evm-common: Set ACSPCIe refclk to MAIN_PLL2_HSDIV4 for pcie1
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (409 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0410/2151] ARM: dts: imx7-tqma7: correctly specify PMIC voltage constraints Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0412/2151] x86/svm: Avoid sign extension of SVM_EVTINJ_VALID in 64-bit expressions Greg Kroah-Hartman
` (471 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Siddharth Vadapalli, Jared McArthur,
Nishanth Menon, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jared McArthur <j-mcarthur@ti.com>
[ Upstream commit 7e4b4f799bd043cb5b30176ddbe690a0fb5788bc ]
Commit e3dfcf482d07 ("arm64: dts: ti: k3-j784s4-j742s2-evm-common:
Enable ACSPCIE0 output for PCIe1") enabled the ACSPCIE0 buffers
to provide the PCIe refclk for PCIe1, but introduced a bug
where the clock is remporarily disabled during initialization.
The ACSPCIe reference clock is muxable between multiple
sources: SERDESx_REF_DER_OUT_CLK, MAIN_PLL2_HSDIV4_CLKOUT, and
SERDESx_REF_OUT_CLK [0]. On reset, the refclk is set to the
SERDESx_REF_DER_OUT_CLK. In the J742S2 and J784S4, "the SerDes PCIe
Reference Clock Output will be temporarily disabled when changing Data
Rates to or from 8.0 GT/s in Derived Refclk mode" [1]. Some external PCIe
devices cannot tolerate the reference clock being disabled and will
therefore fail to link.
This advisory is described in more detail as: i2242 of the J784S4
Silicon Revision 1.0 (Rev. B) document [1].
The refclk for devices connected to PCIe1 is provided by the ACSPCIe
buffers in the J742S2XH01EVM [2] and J784S4XEVM [3]. Work around
the advisory by setting the ACSPCIe reference clock source to
MAIN_PLL2_HSDIV4_CLKOUT. Use the TI SCI clock controller to assign the
clock's source [4].
[0] https://www.ti.com/lit/zip/spruj52
[1] https://www.ti.com/lit/pdf/SPRZ536
[2] https://www.ti.com/lit/zip/SPAC001
[3] https://www.ti.com/lit/zip/SPRR458
[4] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j784s4/clocks.html
Fixes: e3dfcf482d07 ("arm64: dts: ti: k3-j784s4-j742s2-evm-common: Enable ACSPCIE0 output for PCIe1")
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: Jared McArthur <j-mcarthur@ti.com>
Link: https://patch.msgid.link/20260908185903.404451-1-j-mcarthur@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi
index 2834f0a8bbee0..2d6f80636de2a 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi
@@ -1196,6 +1196,8 @@ &pcie1_rc {
status = "okay";
clocks = <&k3_clks 333 0>, <&serdes0 CDNS_TORRENT_REFCLK_DRIVER>;
clock-names = "fck", "pcie_refclk";
+ assigned-clocks = <&k3_clks 415 0>;
+ assigned-clock-parents = <&k3_clks 415 2>;
num-lanes = <2>;
reset-gpios = <&exp1 2 GPIO_ACTIVE_HIGH>;
phys = <&serdes0_pcie1_link>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0412/2151] x86/svm: Avoid sign extension of SVM_EVTINJ_VALID in 64-bit expressions
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (410 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0411/2151] arm64: dts: ti: k3-j784s4-j742s2-evm-common: Set ACSPCIe refclk to MAIN_PLL2_HSDIV4 for pcie1 Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0413/2151] clk: mediatek: reset: Fix device registration kernel-doc Greg Kroah-Hartman
` (470 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chaithanya Lagisetty,
Sean Christopherson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
[ Upstream commit c5991239b148d40d4981901968b3a6a838ff517b ]
SVM_EVTINJ_VALID is defined as (1 << 31), i.e. as an int with the sign
bit set. Whenever it is used in a 64-bit expression the int is sign
extended, so bits 63:32 end up set as well. Two 64-bit users are
affected.
verify_exception_info() uses the macro as a mask against a 64-bit value
when it sanity checks hypervisor supplied exception information:
u64 info = ghcb->save.sw_exit_info_2;
...
if ((info & SVM_EVTINJ_VALID) &&
The mask is 0xffffffff80000000, so the check also passes when any bit of
the error code in 63:32 is set while the valid bit itself is clear.
svm_vmgexit_inject_exception() builds the value that KVM hands to an
SEV-ES guest in GHCB SW_EXITINFO2:
u64 data = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_EXEPT | vector;
For vector == X86_TRAP_GP this yields 0xffffffff8000030d instead of
0x000000008000030d. The field uses the EVENTINJ format, which holds the
error code in bits 63:32, so KVM asks the guest to inject #GP with an
error code of 0xffffffff. Linux guests only consume the error code when
SVM_EVTINJ_VALID_ERR is set, which it is not here, so they are not
affected in practice, but the value KVM writes is not the one it intends.
Use BIT() instead, as is already done for most single bit definitions in
this header. Every other user applies the macro to a u32, where the
resulting bits are unchanged.
Opportunistically give SVM_EVTINJ_VALID_ERR the same treatment, there's
zero reason to open code BIT().
Fixes: 597cfe48212a ("x86/boot/compressed/64: Setup a GHCB-based VC Exception handler")
Fixes: c3392d0ab714 ("KVM: SVM: Provide helpers to set the error code")
Signed-off-by: Chaithanya Lagisetty <nagachaithanya9911@gmail.com>
Link: https://patch.msgid.link/20260908053722.3917934-1-nagachaithanya9911@gmail.com
[sean: use BIT() for SVM_EVTINJ_VALID_ERR as well]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/include/asm/svm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 17f6c3fedeee7..f8a4351557b75 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -627,8 +627,8 @@ static inline void __unused_size_checks(void)
#define SVM_EVTINJ_TYPE_EXEPT (3 << SVM_EVTINJ_TYPE_SHIFT)
#define SVM_EVTINJ_TYPE_SOFT (4 << SVM_EVTINJ_TYPE_SHIFT)
-#define SVM_EVTINJ_VALID (1 << 31)
-#define SVM_EVTINJ_VALID_ERR (1 << 11)
+#define SVM_EVTINJ_VALID BIT(31)
+#define SVM_EVTINJ_VALID_ERR BIT(11)
#define SVM_EXITINTINFO_VEC_MASK SVM_EVTINJ_VEC_MASK
#define SVM_EXITINTINFO_TYPE_MASK SVM_EVTINJ_TYPE_MASK
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0413/2151] clk: mediatek: reset: Fix device registration kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (411 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0412/2151] x86/svm: Avoid sign extension of SVM_EVTINJ_VALID in 64-bit expressions Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0414/2151] clk: rs9: Add clock index range check to rs9_of_clk_get() Greg Kroah-Hartman
` (469 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Chen-Yu Tsai,
AngeloGioacchino Del Regno, Brian Masney, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 8d5fa37307ac1f0612cf17ac0ccabcc258cc1526 ]
The comment for mtk_register_reset_controller_with_dev() names the
older helper and documents np rather than dev. The new helper takes
a struct device and obtains its device node internally.
Use the actual function and parameter names and clarify that failures
return negative error codes.
Fixes: 761bc64003e3 ("clk: mediatek: reset: Add new register reset function with device")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/mediatek/reset.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/mediatek/reset.h b/drivers/clk/mediatek/reset.h
index 562ffd290a224..b09cdcab0c4ba 100644
--- a/drivers/clk/mediatek/reset.h
+++ b/drivers/clk/mediatek/reset.h
@@ -60,11 +60,11 @@ struct mtk_clk_rst_data {
};
/**
- * mtk_register_reset_controller - Register mediatek clock reset controller with device
- * @np: Pointer to device.
+ * mtk_register_reset_controller_with_dev - Register a MediaTek reset controller
+ * @dev: Device used to manage the reset controller resources.
* @desc: Constant pointer to description of clock reset.
*
- * Return: 0 on success and errorno otherwise.
+ * Return: 0 on success, negative errno otherwise.
*/
int mtk_register_reset_controller_with_dev(struct device *dev,
const struct mtk_clk_rst_desc *desc);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0414/2151] clk: rs9: Add clock index range check to rs9_of_clk_get()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (412 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0413/2151] clk: mediatek: reset: Fix device registration kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0415/2151] clk: s2mps11: Propagate OF provider registration failures Greg Kroah-Hartman
` (468 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Marek Vasut,
Brian Masney, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert+renesas@glider.be>
[ Upstream commit a2ef401bdfd19aa41d0e3e1b630a12fbc01ac184 ]
rs9_of_clk_get() does not validate the clock index in the passed
DT clock specifier. If DT specifies an incorrect and out-of-range
index, this will access memory beyond the end of the clk_dif[] array.
Fix by this adding a range check to rs9_of_clk_get().
Fixes: 892e0ddea1aa6f70 ("clk: rs9: Add Renesas 9-series PCIe clock generator driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/clk-renesas-pcie.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c
index f94a9c4d0b670..6650e3440c749 100644
--- a/drivers/clk/clk-renesas-pcie.c
+++ b/drivers/clk/clk-renesas-pcie.c
@@ -277,6 +277,11 @@ rs9_of_clk_get(struct of_phandle_args *clkspec, void *data)
struct rs9_driver_data *rs9 = data;
unsigned int idx = clkspec->args[0];
+ if (idx >= rs9->chip_info->num_clks) {
+ pr_err("%s: Invalid clock index %u\n", __func__, idx);
+ return ERR_PTR(-EINVAL);
+ }
+
return rs9->clk_dif[idx];
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0415/2151] clk: s2mps11: Propagate OF provider registration failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (413 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0414/2151] clk: rs9: Add clock index range check to rs9_of_clk_get() Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0416/2151] spi: Fix the return value in spi_new_ancillary_device() kernel-doc Greg Kroah-Hartman
` (467 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Brian Masney,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit 276741aac3b56ba50bef59715ba18ba3f0b953a2 ]
s2mps11_clk_probe() ignores of_clk_add_hw_provider() failures, stores
driver data and returns success even though DT consumers cannot acquire the
registered clocks.
Return the provider error through the existing lookup cleanup path. Skip
empty lookup slots while unwinding because S2MPS14 omits its CP clock.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: b228fad50c00 ("clk: s2mps11: Migrate to clk_hw based OF and registration APIs")
Assisted-by: LLM
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/clk-s2mps11.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index ff7ce12a5da6b..1b0e4b5a2f323 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -192,8 +192,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
clk_data->hws[i] = &s2mps11_clks[i].hw;
}
- of_clk_add_hw_provider(s2mps11_clks->clk_np, of_clk_hw_onecell_get,
- clk_data);
+ ret = of_clk_add_hw_provider(s2mps11_clks->clk_np,
+ of_clk_hw_onecell_get, clk_data);
+ if (ret)
+ goto err_reg;
platform_set_drvdata(pdev, s2mps11_clks);
@@ -201,8 +203,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
err_reg:
of_node_put(s2mps11_clks[0].clk_np);
- while (--i >= 0)
- clkdev_drop(s2mps11_clks[i].lookup);
+ while (--i >= 0) {
+ if (s2mps11_clks[i].lookup)
+ clkdev_drop(s2mps11_clks[i].lookup);
+ }
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0416/2151] spi: Fix the return value in spi_new_ancillary_device() kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (414 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0415/2151] clk: s2mps11: Propagate OF provider registration failures Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0417/2151] ata: libata-scsi: Fix ata_scsi_hotplug() reference in kernel-doc Greg Kroah-Hartman
` (466 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 3742867ce96539100ed5f4c754f04273d8aa00d7 ]
spi_new_ancillary_device() returns the new struct spi_device, or an
ERR_PTR() on failure, but its kernel-doc says "0 on success; negative
errno on failure", which was never true. Describe the pointer.
Fixes: 0c79378c0199 ("spi: add ancillary device support")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260911230211.11755-1-kmehltretter@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index e103a003e6a65..b8db8f5fd285d 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2551,7 +2551,7 @@ static void of_register_spi_devices(struct spi_controller *ctlr) { }
*
* This may only be called from main SPI device's probe routine.
*
- * Return: 0 on success; negative errno on failure
+ * Return: the new device on success; an ERR_PTR() on failure
*/
struct spi_device *spi_new_ancillary_device(struct spi_device *spi,
u8 chip_select)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0417/2151] ata: libata-scsi: Fix ata_scsi_hotplug() reference in kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (415 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0416/2151] spi: Fix the return value in spi_new_ancillary_device() kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0418/2151] gfs2: Fix the return value in gfs2_get_link() kernel-doc Greg Kroah-Hartman
` (465 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Damien Le Moal,
Niklas Cassel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 5915ab523e33057224a0240e27b88c6c2798b919 ]
The ata_scsi_remove_dev() comment misspells its caller as
ata_eh_scsi_hotplug(). The caller is ata_scsi_hotplug(). Correct the
reference, which predates libata's move from drivers/scsi to
drivers/ata.
Fixes: 580b2102327a ("[PATCH] libata-hp: implement SCSI part of hotplug")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20260912101215.86413-1-kmehltretter@gmail.com
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/ata/libata-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 0988bf574b81e..ce206f90d8bc4 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -4919,7 +4919,7 @@ bool ata_scsi_offline_dev(struct ata_device *dev)
* ata_scsi_remove_dev - remove attached SCSI device
* @dev: ATA device to remove attached SCSI device for
*
- * This function is called from ata_eh_scsi_hotplug() and
+ * This function is called from ata_scsi_hotplug() and
* responsible for removing the SCSI device attached to @dev.
*
* LOCKING:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0418/2151] gfs2: Fix the return value in gfs2_get_link() kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (416 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0417/2151] ata: libata-scsi: Fix ata_scsi_hotplug() reference in kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0419/2151] virtio: synchronize callbacks after device reset Greg Kroah-Hartman
` (464 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter,
Andreas Gruenbacher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 700a0a6892f7c0c541d5d23837cfab98cc744d17 ]
gfs2_get_link() returns the link target or an error pointer, but its
kernel-doc still describes an integer status. The mismatch dates back to
when gfs2_readlink() was replaced by generic_readlink() and persisted
across the removal of nd_set_link().
Describe the returned pointer and error value.
Fixes: c177c2ac8c5a ("Switch gfs2 to nd_set_link()")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/gfs2/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 12e5792190650..3a91900545528 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1898,7 +1898,7 @@ static int gfs2_rename2(struct mnt_idmap *idmap, struct inode *odir,
*
* This can handle symlinks of any size.
*
- * Returns: 0 on success or error code
+ * Returns: the link target on success, an ERR_PTR() on failure
*/
static const char *gfs2_get_link(struct dentry *dentry,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0419/2151] virtio: synchronize callbacks after device reset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (417 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0418/2151] gfs2: Fix the return value in gfs2_get_link() kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0420/2151] virtio_pci_modern: move avq cleanup from reset to del_vqs Greg Kroah-Hartman
` (463 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Michael S. Tsirkin,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael S. Tsirkin <mst@redhat.com>
[ Upstream commit dd75508e6fe77116589c49658d0d18897688dc0b ]
virtio_reset_device says:
Note: this guarantees that vq callbacks are not in progress
but in practice, only virtio pci correctly synchronizes the cbs.
On other transports, a callback that is already executing, keeps running
while the driver tears down the state it uses.
Add virtio_synchronize_cbs to virtio_reset_device fixing this for all
transports that correctly implement synchronize_cbs().
Reported-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://lore.kernel.org/all/20260818040433.66986-1-kmehltretter@gmail.com/
Fixes: c46eccdaadab ("virtio: document virtio_reset_device")
Tested-by: Karl Mehltretter <kmehltretter@gmail.com>
Acked-by: Karl Mehltretter <kmehltretter@gmail.com>
Assisted-by: LLM
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <8ae2995ee649adcfe1398f7f1c4fc9f7028c3db1.1789204858.git.mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/virtio/virtio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 4ced08886d0b8..d85cb55247ba3 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -264,6 +264,8 @@ void virtio_reset_device(struct virtio_device *dev)
#endif
dev->config->reset(dev);
+ /* Flush pending VQ/configuration callbacks. */
+ virtio_synchronize_cbs(dev);
}
EXPORT_SYMBOL_GPL(virtio_reset_device);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0420/2151] virtio_pci_modern: move avq cleanup from reset to del_vqs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (418 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0419/2151] virtio: synchronize callbacks after device reset Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0421/2151] ALSA: control: Fix virtual master creation reference in kernel-doc Greg Kroah-Hartman
` (462 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Jiri Pirko,
Michael S. Tsirkin, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael S. Tsirkin <mst@redhat.com>
[ Upstream commit 2a12d96dd863cb23eadf07d8845e961580b5fcdf ]
vp_modern_avq_cleanup() detaches unused buffers from the admin
virtqueue. Calling it from vp_reset() is incorrect:
virtqueue_get_buf in the avq interrupt handler can race with
virtqueue_detach_unused_buf in cleanup, and get_buf after
detach is not documented as valid.
The root cause is that detaching buffers does not belong in
reset at all - reset quiesces the device, while cleanup belongs
where the virtqueue is about to be destroyed, from del_vqs.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://lore.kernel.org/virtualization/20260911125745.E0A2F1F00899@smtp.kernel.org/
Fixes: 4c3b54af907e ("virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result")
Cc: Jiri Pirko <jiri@resnulli.us>
Assisted-by: LLM
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <21fe35ad7b66e2c30dbdba6fe4df4824d1c0db66.1789204858.git.mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/virtio/virtio_pci_modern.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index dd0e65f71d413..ff714cf0128e3 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -364,6 +364,12 @@ static void vp_modern_avq_cleanup(struct virtio_device *vdev)
}
}
+static void vp_modern_del_vqs(struct virtio_device *vdev)
+{
+ vp_modern_avq_cleanup(vdev);
+ vp_del_vqs(vdev);
+}
+
static void vp_transport_features(struct virtio_device *vdev, u64 features)
{
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
@@ -558,8 +564,6 @@ static void vp_reset(struct virtio_device *vdev)
while (vp_modern_get_status(mdev))
msleep(1);
- vp_modern_avq_cleanup(vdev);
-
/* Flush pending VQ/configuration callbacks. */
vp_synchronize_vectors(vdev);
}
@@ -1232,7 +1236,7 @@ static const struct virtio_config_ops virtio_pci_config_nodev_ops = {
.set_status = vp_set_status,
.reset = vp_reset,
.find_vqs = vp_modern_find_vqs,
- .del_vqs = vp_del_vqs,
+ .del_vqs = vp_modern_del_vqs,
.synchronize_cbs = vp_synchronize_vectors,
.get_extended_features = vp_get_features,
.finalize_features = vp_finalize_features,
@@ -1252,7 +1256,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = {
.set_status = vp_set_status,
.reset = vp_reset,
.find_vqs = vp_modern_find_vqs,
- .del_vqs = vp_del_vqs,
+ .del_vqs = vp_modern_del_vqs,
.synchronize_cbs = vp_synchronize_vectors,
.get_extended_features = vp_get_features,
.finalize_features = vp_finalize_features,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0421/2151] ALSA: control: Fix virtual master creation reference in kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (419 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0420/2151] virtio_pci_modern: move avq cleanup from reset to del_vqs Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0422/2151] ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument Greg Kroah-Hartman
` (461 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Takashi Iwai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit a347cc458d97ecd8adb5462b91559682a70aced6 ]
The snd_ctl_add_follower() comment refers to
snd_ctl_create_virtual_master(), but virtual master controls are created
with snd_ctl_make_virtual_master(). Correct the helper name.
Fixes: 79c7cdd5441f ("ALSA: Add kernel-doc comments to vmaster stuff")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260912100548.86134-1-kmehltretter@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/sound/control.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sound/control.h b/include/sound/control.h
index e07f6b960641f..72d401983f53e 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -241,7 +241,7 @@ int _snd_ctl_add_follower(struct snd_kcontrol *master,
* @follower: follower element to add
*
* Add a virtual follower control to the given master element created via
- * snd_ctl_create_virtual_master() beforehand.
+ * snd_ctl_make_virtual_master() beforehand.
*
* All followers must be the same type (returning the same information
* via info callback). The function doesn't check it, so it's your
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0422/2151] ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (420 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0421/2151] ALSA: control: Fix virtual master creation reference in kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0423/2151] ACPI: video: Fix backlight unregistration ordering Greg Kroah-Hartman
` (460 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Armin Wolf,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 2cf65d00347005eccf9a24801783377d7f920021 ]
An ACPI device object's dev field in passed as the first argument to
devm_kcalloc() in acpi_fan_get_fps() which is incorrect and leads to
a memory leak on driver probe errors and removal because the driver
is not bound to that ACPI device.
Address this by replacing that pointer with a pointer to the device the
driver is actually bound to.
While at it, drop a redundant error message after a memory allocation
failure (that also gets printed relative to the ACPI device).
Fixes: d91a1d129b63 ("ACPI: fan: Use platform device for devres-related actions")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/14089663.uLZWGnKmhe@rafael.j.wysocki
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/fan_core.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/fan_core.c b/drivers/acpi/fan_core.c
index 46e7fe7a506d5..6cdbbd4253f6f 100644
--- a/drivers/acpi/fan_core.c
+++ b/drivers/acpi/fan_core.c
@@ -259,7 +259,7 @@ static int acpi_fan_speed_cmp(const void *a, const void *b)
return fps1->speed - fps2->speed;
}
-static int acpi_fan_get_fps(struct acpi_device *device)
+static int acpi_fan_get_fps(struct device *dev, struct acpi_device *device)
{
struct acpi_fan *fan = acpi_driver_data(device);
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -279,11 +279,8 @@ static int acpi_fan_get_fps(struct acpi_device *device)
}
fan->fps_count = obj->package.count - 1; /* minus revision field */
- fan->fps = devm_kcalloc(&device->dev,
- fan->fps_count, sizeof(struct acpi_fan_fps),
- GFP_KERNEL);
+ fan->fps = devm_kcalloc(dev, fan->fps_count, sizeof(*fan->fps), GFP_KERNEL);
if (!fan->fps) {
- dev_err(&device->dev, "Not enough memory\n");
status = -ENOMEM;
goto err;
}
@@ -341,7 +338,7 @@ static int acpi_fan_probe(struct platform_device *pdev)
if (result)
return result;
- result = acpi_fan_get_fps(device);
+ result = acpi_fan_get_fps(&pdev->dev, device);
if (result)
return result;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0423/2151] ACPI: video: Fix backlight unregistration ordering
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (421 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0422/2151] ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0424/2151] cgroup/dmem: Fix eviction helper reference in dmem_cgroup_try_charge() Greg Kroah-Hartman
` (459 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Armin Wolf,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 46577d36611953d1b99e86493289cfc824116ad2 ]
In acpi_video_dev_unregister_backlight(), the sysfs interface of the
cooling class device may access the brightness object under the
backlight device's ACPI companion, so that object cannot be freed
before unregistering the cooling class device.
Adjust the code to take that into account.
Fixes: 67b662e189f4 ("ACPI / video: seperate backlight control and event interface")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
[ rjw: Fixed the Fixes: tag ]
Link: https://patch.msgid.link/3429468.aeNJFYEL58@rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_video.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index be8e7e18abcab..1d56b42aef669 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -1841,6 +1841,12 @@ static int acpi_video_bus_register_backlight(struct acpi_video_bus *video)
static void acpi_video_dev_unregister_backlight(struct acpi_video_device *device)
{
+ if (device->cooling_dev) {
+ sysfs_remove_link(&device->dev->dev.kobj, "thermal_cooling");
+ sysfs_remove_link(&device->cooling_dev->device.kobj, "device");
+ thermal_cooling_device_unregister(device->cooling_dev);
+ device->cooling_dev = NULL;
+ }
if (device->backlight) {
backlight_device_unregister(device->backlight);
device->backlight = NULL;
@@ -1850,12 +1856,6 @@ static void acpi_video_dev_unregister_backlight(struct acpi_video_device *device
kfree(device->brightness);
device->brightness = NULL;
}
- if (device->cooling_dev) {
- sysfs_remove_link(&device->dev->dev.kobj, "thermal_cooling");
- sysfs_remove_link(&device->cooling_dev->device.kobj, "device");
- thermal_cooling_device_unregister(device->cooling_dev);
- device->cooling_dev = NULL;
- }
}
static int acpi_video_bus_unregister_backlight(struct acpi_video_bus *video)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0424/2151] cgroup/dmem: Fix eviction helper reference in dmem_cgroup_try_charge()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (422 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0423/2151] ACPI: video: Fix backlight unregistration ordering Greg Kroah-Hartman
@ 2026-11-18 14:35 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0425/2151] clk: sunxi-ng: div: Add feature support to M clock macro Greg Kroah-Hartman
` (458 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:35 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Tejun Heo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit e8f69fe59a104b4a97a3365dbb43c72996c2acde ]
The kernel-doc comment of dmem_cgroup_try_charge() refers to
dmem_cgroup_evict_valuable, which does not exist. The name is
dmem_cgroup_state_evict_valuable. Say dmem_cgroup_state_evict_valuable.
Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/cgroup/dmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup/dmem.c b/kernel/cgroup/dmem.c
index 250810f22525c..3d769ebd03fc8 100644
--- a/kernel/cgroup/dmem.c
+++ b/kernel/cgroup/dmem.c
@@ -644,8 +644,8 @@ EXPORT_SYMBOL_GPL(dmem_cgroup_uncharge);
*
* When this function fails with -EAGAIN and @ret_limit_pool is non-null, it
* will be set to the pool for which the limit is hit. This can be used for
- * eviction as argument to dmem_cgroup_evict_valuable(). This reference must be freed
- * with @dmem_cgroup_pool_state_put().
+ * eviction as argument to dmem_cgroup_state_evict_valuable(). This reference
+ * must be freed with @dmem_cgroup_pool_state_put().
*
* Return: 0 on success, -EAGAIN on hitting a limit, or a negative errno on failure.
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0425/2151] clk: sunxi-ng: div: Add feature support to M clock macro
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (423 preceding siblings ...)
2026-11-18 14:35 ` [PATCH 6.18 0424/2151] cgroup/dmem: Fix eviction helper reference in dmem_cgroup_try_charge() Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0426/2151] clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM Greg Kroah-Hartman
` (457 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Junhui Liu, Chen-Yu Tsai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junhui Liu <junhui.liu@pigmoral.tech>
[ Upstream commit f43bed1fb1ddf7b350ceb7c371c624795a7820e8 ]
Add a variant of SUNXI_CCU_M_DATA_WITH_MUX_GATE() that accepts CCU
feature flags, such as CCU_FEATURE_UPDATE_BIT.
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-1-cbde21c9fe69@pigmoral.tech
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Stable-dep-of: 59dced16a82d ("clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/sunxi-ng/ccu_div.h | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu_div.h b/drivers/clk/sunxi-ng/ccu_div.h
index be00b3277e976..46370c0b57f00 100644
--- a/drivers/clk/sunxi-ng/ccu_div.h
+++ b/drivers/clk/sunxi-ng/ccu_div.h
@@ -212,16 +212,17 @@ struct ccu_div {
SUNXI_CCU_M_WITH_GATE(_struct, _name, _parent, _reg, \
_mshift, _mwidth, 0, _flags)
-#define SUNXI_CCU_M_DATA_WITH_MUX_GATE(_struct, _name, _parents, _reg, \
- _mshift, _mwidth, \
- _muxshift, _muxwidth, \
- _gate, _flags) \
+#define SUNXI_CCU_M_DATA_WITH_MUX_GATE_FEAT(_struct, _name, _parents, _reg, \
+ _mshift, _mwidth, \
+ _muxshift, _muxwidth, \
+ _gate, _flags, _features) \
struct ccu_div _struct = { \
.enable = _gate, \
.div = _SUNXI_CCU_DIV(_mshift, _mwidth), \
.mux = _SUNXI_CCU_MUX(_muxshift, _muxwidth), \
.common = { \
.reg = _reg, \
+ .features = _features, \
.hw.init = CLK_HW_INIT_PARENTS_DATA(_name, \
_parents, \
&ccu_div_ops, \
@@ -229,6 +230,15 @@ struct ccu_div {
}, \
}
+#define SUNXI_CCU_M_DATA_WITH_MUX_GATE(_struct, _name, _parents, _reg, \
+ _mshift, _mwidth, \
+ _muxshift, _muxwidth, \
+ _gate, _flags) \
+ SUNXI_CCU_M_DATA_WITH_MUX_GATE_FEAT(_struct, _name, _parents, _reg, \
+ _mshift, _mwidth, \
+ _muxshift, _muxwidth, \
+ _gate, _flags, 0)
+
#define SUNXI_CCU_M_DATA_WITH_MUX(_struct, _name, _parents, _reg, \
_mshift, _mwidth, \
_muxshift, _muxwidth, \
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0426/2151] clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (424 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0425/2151] clk: sunxi-ng: div: Add feature support to M clock macro Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0427/2151] clk: sunxi-ng: sun55i-a523-ccu: Use P-only clocks for high-speed timers Greg Kroah-Hartman
` (456 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Junhui Liu, Chen-Yu Tsai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junhui Liu <junhui.liu@pigmoral.tech>
[ Upstream commit 59dced16a82d1ec685b88365c64dde27a0a0b46a ]
The MBUS, IOMMU, and DRAM clocks only have an M divider, but are
currently modeled as MP clocks with a zero-width P divider.
ccu_mp_set_rate() generates an invalid mask for the zero-width P
divider, clearing unrelated register fields. It also ignores
CCU_FEATURE_UPDATE_BIT, so the new divider value does not take effect.
Model these clocks as M-only clocks instead. This avoids accessing a
nonexistent P divider and uses ccu_div_set_rate(), which handles the
update bit.
Fixes: 74b0443a0d0a ("clk: sunxi-ng: a523: add system mod clocks")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-2-cbde21c9fe69@pigmoral.tech
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 45 ++++++++++++--------------
1 file changed, 21 insertions(+), 24 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523.c
index 20dad06b37ca3..9bc3ff0ab12d7 100644
--- a/drivers/clk/sunxi-ng/ccu-sun55i-a523.c
+++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523.c
@@ -380,14 +380,13 @@ static const struct clk_parent_data mbus_parents[] = {
{ .hw = &pll_periph1_150M_clk.hw },
{ .fw_name = "hosc" },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT(mbus_clk, "mbus", mbus_parents,
- 0x540,
- 0, 5, /* M */
- 0, 0, /* no P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- CLK_IS_CRITICAL,
- CCU_FEATURE_UPDATE_BIT);
+static SUNXI_CCU_M_DATA_WITH_MUX_GATE_FEAT(mbus_clk, "mbus", mbus_parents,
+ 0x540,
+ 0, 5, /* M */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ CLK_IS_CRITICAL,
+ CCU_FEATURE_UPDATE_BIT);
static const struct clk_hw *mbus_hws[] = { &mbus_clk.common.hw };
@@ -584,14 +583,13 @@ static const struct clk_parent_data iommu_parents[] = {
{ .fw_name = "hosc" },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT(iommu_clk, "iommu", iommu_parents,
- 0x7b0,
- 0, 5, /* M */
- 0, 0, /* no P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- CLK_SET_RATE_PARENT,
- CCU_FEATURE_UPDATE_BIT);
+static SUNXI_CCU_M_DATA_WITH_MUX_GATE_FEAT(iommu_clk, "iommu", iommu_parents,
+ 0x7b0,
+ 0, 5, /* M */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ CLK_SET_RATE_PARENT,
+ CCU_FEATURE_UPDATE_BIT);
static SUNXI_CCU_GATE_HWS(bus_iommu_clk, "bus-iommu", apb0_hws, 0x7bc,
BIT(0), 0);
@@ -603,14 +601,13 @@ static const struct clk_parent_data dram_parents[] = {
{ .hw = &pll_periph0_400M_clk.hw },
{ .hw = &pll_periph0_150M_clk.hw },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT(dram_clk, "dram", dram_parents,
- 0x800,
- 0, 5, /* M */
- 0, 0, /* no P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- CLK_IS_CRITICAL,
- CCU_FEATURE_UPDATE_BIT);
+static SUNXI_CCU_M_DATA_WITH_MUX_GATE_FEAT(dram_clk, "dram", dram_parents,
+ 0x800,
+ 0, 5, /* M */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ CLK_IS_CRITICAL,
+ CCU_FEATURE_UPDATE_BIT);
static SUNXI_CCU_GATE_HWS(mbus_dma_clk, "mbus-dma", mbus_hws,
0x804, BIT(0), 0);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0427/2151] clk: sunxi-ng: sun55i-a523-ccu: Use P-only clocks for high-speed timers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (425 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0426/2151] clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0428/2151] clk: sunxi-ng: sun55i-a523-r-ccu: Use P-only clocks for timers Greg Kroah-Hartman
` (455 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Junhui Liu, Chen-Yu Tsai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junhui Liu <junhui.liu@pigmoral.tech>
[ Upstream commit f2aee33d06d5e1363596ae166459aa4354a8b5ae ]
The high-speed timer clocks only have a P divider, but are currently
modeled as MP clocks with a zero-width M divider.
ccu_mp_set_rate() generates an invalid mask for the zero-width M
divider, clearing unrelated register fields. Model these clocks as
P-only clocks to avoid accessing a nonexistent M divider.
Fixes: 74b0443a0d0a ("clk: sunxi-ng: a523: add system mod clocks")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-3-cbde21c9fe69@pigmoral.tech
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 83 +++++++++++---------------
1 file changed, 36 insertions(+), 47 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523.c
index 9bc3ff0ab12d7..0714090cc3b08 100644
--- a/drivers/clk/sunxi-ng/ccu-sun55i-a523.c
+++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523.c
@@ -512,58 +512,47 @@ static const struct clk_parent_data hstimer_parents[] = {
{ .fw_name = "losc" },
{ .hw = &pll_periph0_200M_clk.hw },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(hstimer0_clk, "hstimer0",
- hstimer_parents, 0x730,
- 0, 0, /* M */
- 0, 3, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(hstimer0_clk, "hstimer0",
+ hstimer_parents, 0x730,
+ 0, 3, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(hstimer1_clk, "hstimer1",
- hstimer_parents,
- 0x734,
- 0, 0, /* M */
- 0, 3, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(hstimer1_clk, "hstimer1",
+ hstimer_parents, 0x734,
+ 0, 3, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(hstimer2_clk, "hstimer2",
- hstimer_parents,
- 0x738,
- 0, 0, /* M */
- 0, 3, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(hstimer2_clk, "hstimer2",
+ hstimer_parents, 0x738,
+ 0, 3, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(hstimer3_clk, "hstimer3",
- hstimer_parents,
- 0x73c,
- 0, 0, /* M */
- 0, 3, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(hstimer3_clk, "hstimer3",
+ hstimer_parents, 0x73c,
+ 0, 3, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(hstimer4_clk, "hstimer4",
- hstimer_parents,
- 0x740,
- 0, 0, /* M */
- 0, 3, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(hstimer4_clk, "hstimer4",
+ hstimer_parents, 0x740,
+ 0, 3, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(hstimer5_clk, "hstimer5",
- hstimer_parents,
- 0x744,
- 0, 0, /* M */
- 0, 3, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(hstimer5_clk, "hstimer5",
+ hstimer_parents, 0x744,
+ 0, 3, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 0);
static SUNXI_CCU_GATE_HWS(bus_hstimer_clk, "bus-hstimer", ahb_hws, 0x74c,
BIT(0), 0);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0428/2151] clk: sunxi-ng: sun55i-a523-r-ccu: Use P-only clocks for timers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (426 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0427/2151] clk: sunxi-ng: sun55i-a523-ccu: Use P-only clocks for high-speed timers Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0429/2151] perf header: Fix potential memory corruption in cpu_cache_level__read Greg Kroah-Hartman
` (454 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Junhui Liu, Chen-Yu Tsai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junhui Liu <junhui.liu@pigmoral.tech>
[ Upstream commit 1002cc9d60942f8f294d8de7f2805f82f4ebdda0 ]
The R timer clocks only have a P divider, but are currently modeled as
MP clocks with a zero-width M divider.
ccu_mp_set_rate() generates an invalid mask for the zero-width M
divider, clearing unrelated register fields. Model these clocks as
P-only clocks to avoid accessing a nonexistent M divider.
Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-4-cbde21c9fe69@pigmoral.tech
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c | 37 +++++++++++-------------
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
index db0e36d8838e7..349230e28c1c3 100644
--- a/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
+++ b/drivers/clk/sunxi-ng/ccu-sun55i-a523-r.c
@@ -43,27 +43,24 @@ static SUNXI_CCU_M_DATA_WITH_MUX(r_apb1_clk, "r-apb1",
24, 3, /* mux */
0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(r_cpu_timer0, "r-timer0",
- r_ahb_apb_parents, 0x100,
- 0, 0, /* no M */
- 1, 3, /* P */
- 4, 3, /* mux */
- BIT(0),
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(r_cpu_timer0, "r-timer0",
+ r_ahb_apb_parents, 0x100,
+ 1, 3, /* P */
+ 4, 3, /* mux */
+ BIT(0),
+ 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(r_cpu_timer1, "r-timer1",
+ r_ahb_apb_parents, 0x104,
+ 1, 3, /* P */
+ 4, 3, /* mux */
+ BIT(0),
+ 0);
+static SUNXI_CCU_P_DATA_WITH_MUX_GATE(r_cpu_timer2, "r-timer2",
+ r_ahb_apb_parents, 0x108,
+ 1, 3, /* P */
+ 4, 3, /* mux */
+ BIT(0),
0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(r_cpu_timer1, "r-timer1",
- r_ahb_apb_parents, 0x104,
- 0, 0, /* no M */
- 1, 3, /* P */
- 4, 3, /* mux */
- BIT(0),
- 0);
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(r_cpu_timer2, "r-timer2",
- r_ahb_apb_parents, 0x108,
- 0, 0, /* no M */
- 1, 3, /* P */
- 4, 3, /* mux */
- BIT(0),
- 0);
static SUNXI_CCU_GATE_HW(bus_r_timer_clk, "bus-r-timer", &r_ahb_clk.common.hw,
0x11c, BIT(0), 0);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0429/2151] perf header: Fix potential memory corruption in cpu_cache_level__read
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (427 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0428/2151] clk: sunxi-ng: sun55i-a523-r-ccu: Use P-only clocks for timers Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0430/2151] regulator: qcom-rpmh: Fix the return value in rpmh_regulator_vrm_get_optimum_mode() kernel-doc Greg Kroah-Hartman
` (453 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit d964ffba01f5d0935dd6bc850029958a62c74491 ]
strim() may advance the pointer assigned to cache->size which causes
later frees to crash.
Fix by performing the strim and then memmove-ing the potentially shifted
string back over the original string.
The bug was introduced by the transition from rtrim() to strim(), as
rtrim() wouldn't move on the left.
Fixes: 13c230ab6e56c6ae ("perf tools: Ditch rtrim(), use strim() from tools/lib")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
| 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 9cb1d54b2452d..5bf826911cf3a 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1155,7 +1155,11 @@ static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 lev
return -1;
cache->type[len] = 0;
- cache->type = strim(cache->type);
+ {
+ char *trimmed = strim(cache->type);
+
+ memmove(cache->type, trimmed, strlen(trimmed) + 1);
+ }
scnprintf(file, PATH_MAX, "%s/size", path);
if (sysfs__read_str(file, &cache->size, &len)) {
@@ -1164,7 +1168,11 @@ static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 lev
}
cache->size[len] = 0;
- cache->size = strim(cache->size);
+ {
+ char *trimmed = strim(cache->size);
+
+ memmove(cache->size, trimmed, strlen(trimmed) + 1);
+ }
scnprintf(file, PATH_MAX, "%s/shared_cpu_list", path);
if (sysfs__read_str(file, &cache->map, &len)) {
@@ -1174,7 +1182,11 @@ static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 lev
}
cache->map[len] = 0;
- cache->map = strim(cache->map);
+ {
+ char *trimmed = strim(cache->map);
+
+ memmove(cache->map, trimmed, strlen(trimmed) + 1);
+ }
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0430/2151] regulator: qcom-rpmh: Fix the return value in rpmh_regulator_vrm_get_optimum_mode() kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (428 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0429/2151] perf header: Fix potential memory corruption in cpu_cache_level__read Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0431/2151] libbpf: fix log level propagation for light skeleton loaders Greg Kroah-Hartman
` (452 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 51d6888b51e0c962250311b2cbfe5666da31dc0e ]
rpmh_regulator_vrm_get_optimum_mode() returns REGULATOR_MODE_NORMAL or
REGULATOR_MODE_IDLE and cannot fail, but its kernel-doc says "0 on
success, or a negative error number on failure", which was never true.
Describe the mode.
Fixes: efb0cb50c427 ("regulator: qcom-rpmh: Implement get_optimum_mode(), not set_load()")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260912000606.34614-1-kmehltretter@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c
index 933eb0c28fa65..1081a36d88b0d 100644
--- a/drivers/regulator/qcom-rpmh-regulator.c
+++ b/drivers/regulator/qcom-rpmh-regulator.c
@@ -319,7 +319,7 @@ static unsigned int rpmh_regulator_vrm_get_mode(struct regulator_dev *rdev)
* This function is used in the regulator_ops for VRM type RPMh regulator
* devices.
*
- * Return: 0 on success, or a negative error number on failure
+ * Return: the regulator mode to use for the load
*/
static unsigned int rpmh_regulator_vrm_get_optimum_mode(
struct regulator_dev *rdev, int input_uV, int output_uV, int load_uA)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0431/2151] libbpf: fix log level propagation for light skeleton loaders
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (429 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0430/2151] regulator: qcom-rpmh: Fix the return value in rpmh_regulator_vrm_get_optimum_mode() kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0432/2151] fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file Greg Kroah-Hartman
` (451 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Borkmann, Mahe Tardy,
Alexei Starovoitov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mahe Tardy <mahe.tardy@gmail.com>
[ Upstream commit e18e82ba9ed53f60acce5f9995ee357a9f7ab91d ]
bpftool's -d option is documented to enable bpf_trace_printk() messages
from the generated syscall loader when used with -L as specified in
commit d510296d331a ("bpftool: Use syscall/loader program in "prog load"
and "gen skeleton" command.")
However commit b59e4ce8bcaa ("bpftool: Switch bpf_object__load_xattr()
to bpf_object__load()") changed bpftool to use bpf_object__load() which
call the internal bpf_object_load with extra_log_level to 0 instead of
bpf_object__load_xattr with the user request log_level.
All the plumbing was still there to generate the bpf_trace_printk()
instructions from the generator but was now unreachable because
bpf_gen__init() was called with extra_log_level to 0, leaving
gen->log_level at 0.
This uses the obj->log_level field introduced in commit e0e3ea888c69
("libbpf: Allow passing user log setting through bpf_object_open_opts")
set from reading verifier_logs in do_skeleton(). This preserves both
object-level and explicit load-time logging settings.
Fixes: b59e4ce8bcaa ("bpftool: Switch bpf_object__load_xattr() to bpf_object__load()")
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Link: https://lore.kernel.org/r/20260907170536.9996-1-mahe.tardy@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/bpf/libbpf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 1aaf2bdf26857..711a30e70ec22 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -8699,7 +8699,8 @@ static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const ch
* permit cross-endian creation of "light skeleton".
*/
if (obj->gen_loader) {
- bpf_gen__init(obj->gen_loader, extra_log_level, obj->nr_programs, obj->nr_maps);
+ bpf_gen__init(obj->gen_loader, obj->log_level | extra_log_level,
+ obj->nr_programs, obj->nr_maps);
} else if (!is_native_endianness(obj)) {
pr_warn("object '%s': loading non-native endianness is unsupported\n", obj->name);
return libbpf_err(-LIBBPF_ERRNO__ENDIAN);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0432/2151] fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (430 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0431/2151] libbpf: fix log level propagation for light skeleton loaders Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0433/2151] fs/ntfs3: update ctime only on successful setxattr Greg Kroah-Hartman
` (450 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xiang Mei, Weiming Shi,
Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Weiming Shi <bestswngs@gmail.com>
[ Upstream commit ad39d8d90fa0fd99b2714d4c84c6f4e1c399f1f4 ]
attr_wof_frame_info() allocates, caches and dereferences
ni->file.offs_folio under down_write(&ni->file.run_lock).
ni_decompress_file() frees the same folio with folio_put() without
taking run_lock. When a WOF externally-compressed file is opened for
write, ni_decompress_file() can drop the last reference while a
concurrent O_RDONLY reader is dereferencing the folio in
attr_wof_frame_info(), leading to a use-after-free:
BUG: KASAN: use-after-free in attr_wof_frame_info (fs/ntfs3/attrib.c:1619)
Read of size 4 at addr ffff8880120c9000 by task exploit
Call Trace:
attr_wof_frame_info (fs/ntfs3/attrib.c:1619)
ni_read_frame (fs/ntfs3/frecord.c:2421)
ni_read_folio_cmpr (fs/ntfs3/frecord.c:1916)
ntfs_read_folio (fs/ntfs3/inode.c:648)
read_pages (mm/readahead.c:181)
page_cache_ra_unbounded (mm/readahead.c:292)
force_page_cache_ra (mm/readahead.c:364)
page_cache_sync_ra (mm/readahead.c:573)
filemap_get_pages (mm/filemap.c:2688)
filemap_read (mm/filemap.c:2806)
generic_file_read_iter (mm/filemap.c:2994)
ntfs_file_read_iter (fs/ntfs3/file.c:842)
vfs_read (fs/read_write.c:574)
__x64_sys_pread64 (fs/read_write.c:773)
Take run_lock around the folio_put(), as is done for every other
access to ni->file.offs_folio.
Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Reported-by: Xiang Mei <xmei5@asu.edu>
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/frecord.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 1cc905a265553..2d0ab6c77d13c 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -2338,10 +2338,13 @@ int ni_decompress_file(struct ntfs_inode *ni)
/* Clear cached flag. */
ni->ni_flags &= ~NI_FLAG_COMPRESSED_MASK;
+ /* offs_folio is accessed under run_lock in attr_wof_frame_info(). */
+ down_write(&ni->file.run_lock);
if (ni->file.offs_folio) {
folio_put(ni->file.offs_folio);
ni->file.offs_folio = NULL;
}
+ up_write(&ni->file.run_lock);
mapping->a_ops = &ntfs_aops;
out:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0433/2151] fs/ntfs3: update ctime only on successful setxattr
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (431 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0432/2151] fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0434/2151] ntfs: Do not kmap page cache pages for compression Greg Kroah-Hartman
` (449 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Baolin Liu, Konstantin Komarov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baolin Liu <liubaolin@kylinos.cn>
[ Upstream commit bfa6296bb6a0e2333796a9507beb4605b92a9fdf ]
ntfs_setxattr() updates ctime and marks the inode dirty even when the
xattr operation fails.
Do that only on success.
Fixes: 2d44667c306e ("fs/ntfs3: Update i_ctime when xattr is added")
Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/xattr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
index 03006ff6a296c..d25de94b878ea 100644
--- a/fs/ntfs3/xattr.c
+++ b/fs/ntfs3/xattr.c
@@ -974,8 +974,10 @@ static noinline int ntfs_setxattr(const struct xattr_handler *handler,
NULL);
out:
- inode_set_ctime_current(inode);
- mark_inode_dirty(inode);
+ if (!err) {
+ inode_set_ctime_current(inode);
+ mark_inode_dirty(inode);
+ }
return err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0434/2151] ntfs: Do not kmap page cache pages for compression
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (432 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0433/2151] fs/ntfs3: update ctime only on successful setxattr Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0435/2151] fs/ntfs3: zero frame pages on read error Greg Kroah-Hartman
` (448 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthew Wilcox (Oracle),
Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <willy@infradead.org>
[ Upstream commit 953b79a7a124c3dae86544cea581a5bc7655aa13 ]
These pages are accessed through vmap; they are not accessed
by calling page_address(), so they do not need to be kmapped.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Stable-dep-of: a32e893a077a ("fs/ntfs3: zero frame pages on read error")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/frecord.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 2d0ab6c77d13c..8269664ce2065 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -2447,9 +2447,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
* To simplify decompress algorithm do vmap for source
* and target pages.
*/
- for (i = 0; i < pages_per_frame; i++)
- kmap(pages[i]);
-
frame_size = pages_per_frame << PAGE_SHIFT;
frame_mem = vmap(pages, pages_per_frame, VM_MAP, PAGE_KERNEL);
if (!frame_mem) {
@@ -2706,7 +2703,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
out:
for (i = 0; i < pages_per_frame; i++) {
pg = pages[i];
- kunmap(pg);
SetPageUptodate(pg);
}
@@ -2794,9 +2790,6 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
goto out1;
}
- for (i = 0; i < pages_per_frame; i++)
- kmap(pages[i]);
-
/* Map in-memory frame for read-only. */
frame_mem = vmap(pages, pages_per_frame, VM_MAP, PAGE_KERNEL_RO);
if (!frame_mem) {
@@ -2862,11 +2855,7 @@ int ni_write_frame(struct ntfs_inode *ni, struct page **pages,
out3:
vunmap(frame_mem);
-
out2:
- for (i = 0; i < pages_per_frame; i++)
- kunmap(pages[i]);
-
vunmap(frame_ondisk);
out1:
for (i = 0; i < pages_per_frame; i++) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0435/2151] fs/ntfs3: zero frame pages on read error
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (433 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0434/2151] ntfs: Do not kmap page cache pages for compression Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0436/2151] pinctrl: amd: add timeout to irq-enable readback Greg Kroah-Hartman
` (447 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xiang Mei, Weiming Shi,
Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Weiming Shi <bestswngs@gmail.com>
[ Upstream commit a32e893a077a4b0d3b04c86cb7f69e354a187995 ]
ni_read_frame() marks every frame page uptodate at the 'out:' label
regardless of the return value. The pages come from ntfs_lock_new_page()
and are not zeroed, and several error paths reach 'out:' before anything
is written to them (e.g. a failed decompress_lznt()/decompress_lzx_xpress()
on a corrupted chunk, or an allocation failure).
A page marked uptodate is served directly from the page cache, so a later
read() of the file returns the uninitialized page contents to userspace.
On a crafted compressed image this leaks kernel memory, including pointers.
Zero each page on the error path before marking it uptodate. The success
path is unchanged.
Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Reported-by: Xiang Mei <xmei5@asu.edu>
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/frecord.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 8269664ce2065..81b536a268633 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -2703,6 +2703,8 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages,
out:
for (i = 0; i < pages_per_frame; i++) {
pg = pages[i];
+ if (err)
+ clear_highpage(pg);
SetPageUptodate(pg);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0436/2151] pinctrl: amd: add timeout to irq-enable readback
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (434 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0435/2151] fs/ntfs3: zero frame pages on read error Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0437/2151] microblaze: uaccess: Zero out destination on failed get_user() Greg Kroah-Hartman
` (446 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linkai Gong, Linus Walleij,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linkai Gong <gonglinkai@kylinos.cn>
[ Upstream commit 44c232e80adc26634e40b3dbeaa20711da9ecf0d ]
amd_gpio_irq_set_type() polls INTERRUPT_ENABLE with IRQs off
and no timeout. Use readl_poll_timeout_atomic() and return
-ETIMEDOUT.
Fixes: b85bfa246efd ("pinctrl/amd: poll InterruptEnable bits in amd_gpio_irq_set_type")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pinctrl/pinctrl-amd.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 33c43f2ea9916..39b83aff773de 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -18,6 +18,7 @@
#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/io.h>
+#include <linux/iopoll.h>
#include <linux/gpio/driver.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
@@ -496,7 +497,7 @@ static void amd_gpio_irq_eoi(struct irq_data *d)
static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{
int ret = 0;
- u32 pin_reg, pin_reg_irq_en, mask;
+ u32 pin_reg, pin_reg_irq_en, mask, reg;
unsigned long flags;
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
@@ -570,8 +571,9 @@ static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type)
pin_reg_irq_en |= mask;
pin_reg_irq_en &= ~BIT(INTERRUPT_MASK_OFF);
writel(pin_reg_irq_en, gpio_dev->base + hwirq * 4);
- while ((readl(gpio_dev->base + hwirq * 4) & mask) != mask)
- continue;
+ if (readl_poll_timeout_atomic(gpio_dev->base + hwirq * 4, reg,
+ (reg & mask) == mask, 1, 1000))
+ ret = -ETIMEDOUT;
writel(pin_reg, gpio_dev->base + hwirq * 4);
raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0437/2151] microblaze: uaccess: Zero out destination on failed get_user()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (435 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0436/2151] pinctrl: amd: add timeout to irq-enable readback Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0438/2151] microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS Greg Kroah-Hartman
` (445 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Weißschuh, David Gow,
Michal Simek, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <linux@weissschuh.net>
[ Upstream commit 54c35131e628e1a18f02365495a24a73a1fb515e ]
On failure get_user() is supposed to zero out the destination variable.
This is documented in the kdoc of the microblaze get_user()
implementation and validated in lib/tests/usercopy_kunit.c.
Currently that zeroing is missing.
Add it.
Fixes: 0d6de9532663 ("microblaze_mmu_v2: uaccess MMU update")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: David Gow <david@davidgow.net>
Link: https://patch.msgid.link/20260914-kunit-microblaze-v2-1-7d5756e858f8@weissschuh.net
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/microblaze/include/asm/uaccess.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 3aab2f17e0462..ea6653dc2e68a 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -95,7 +95,8 @@ extern long __user_bad(void);
#define get_user(x, ptr) ({ \
const typeof(*(ptr)) __user *__gu_ptr = (ptr); \
access_ok(__gu_ptr, sizeof(*__gu_ptr)) ? \
- __get_user(x, __gu_ptr) : -EFAULT; \
+ __get_user(x, __gu_ptr) : \
+ ((x) = 0, -EFAULT); \
})
#define __get_user(x, ptr) \
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0438/2151] microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (436 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0437/2151] microblaze: uaccess: Zero out destination on failed get_user() Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0439/2151] arm64: pi: Run the source checker on the libfdt objects under C=2 Greg Kroah-Hartman
` (444 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Weißschuh, Michal Simek,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <linux@weissschuh.net>
[ Upstream commit b9eababe8c0b9f71ce7f35f903879a7fcb6daebe ]
These parameters are also necessary for preprocessed files which do not
contain code. One example is arch/microblaze/kernel/vmlinux.lds.S which
inspects __MICROBLAZEEL__ for the definition of 'jiffies_64'.
As currently the endianness is not passed from the build system for this
file, the preprocessor will instead use the default endianness of the
toolchain. When a default big-endian toolchain is used to build a
little-endian kernel, that kernel will hang during delay calibration
as 'jiffies' never changes.
Make sure all preprocessor invocations know about the correct endianness
by passing it through KBUILD_CPPFLAGS. This will also be inherited by
CFLAGS and AFLAGS.
Fixes: 02b08045a030 ("microblaze: Add support for little-endian Microblaze")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20260914-kunit-microblaze-v2-2-7d5756e858f8@weissschuh.net
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/microblaze/Makefile | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index 02e6be9c5b0dc..9087a366ce789 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -34,12 +34,10 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift
CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
ifdef CONFIG_CPU_BIG_ENDIAN
-KBUILD_CFLAGS += -mbig-endian
-KBUILD_AFLAGS += -mbig-endian
+KBUILD_CPPFLAGS += -mbig-endian
KBUILD_LDFLAGS += -EB
else
-KBUILD_CFLAGS += -mlittle-endian
-KBUILD_AFLAGS += -mlittle-endian
+KBUILD_CPPFLAGS += -mlittle-endian
KBUILD_LDFLAGS += -EL
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0439/2151] arm64: pi: Run the source checker on the libfdt objects under C=2
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (437 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0438/2151] microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0440/2151] wifi: mac80211: Fix the return value in mesh_path_add() kernel-doc Greg Kroah-Hartman
` (443 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Marc Zyngier, Fuad Tabba,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fuad Tabba <fuad.tabba@linux.dev>
[ Upstream commit 44b14ff4aebeae98663d0fd424b4ef88237ee981 ]
The custom lib-%.o rule reuses rule_cc_o_c, which hooks the source
checker only for C=1, and that only when the object is rebuilt. The
C=2 hook, cmd_force_checksrc, hangs off the standard %.o rule, so
"make C=2" silently skips the two libfdt objects. Call
cmd_force_checksrc after the compile rule, as the standard rule does.
Fixes: aacd149b6238 ("arm64: head: avoid relocating the kernel twice for KASLR")
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://patch.msgid.link/20260901140326.3812068-7-fuad.tabba@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/kernel/pi/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/kernel/pi/Makefile b/arch/arm64/kernel/pi/Makefile
index be92d73c25b21..96243c291e39d 100644
--- a/arch/arm64/kernel/pi/Makefile
+++ b/arch/arm64/kernel/pi/Makefile
@@ -34,6 +34,7 @@ $(obj)/lib-%.pi.o: OBJCOPYFLAGS += --prefix-alloc-sections=.init
$(obj)/lib-%.o: $(srctree)/lib/%.c FORCE
$(call if_changed_rule,cc_o_c)
+ $(call cmd,force_checksrc)
obj-y := idreg-override.pi.o \
map_kernel.pi.o map_range.pi.o \
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0440/2151] wifi: mac80211: Fix the return value in mesh_path_add() kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (438 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0439/2151] arm64: pi: Run the source checker on the libfdt objects under C=2 Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0441/2151] wifi: mac80211: dont reset the TXQ scheduling round number Greg Kroah-Hartman
` (442 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Johannes Berg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 5c7b043cb1ef4bca9aa2e793dab862c0989d59c3 ]
mesh_path_add() has returned the new (or the already existing) struct
mesh_path, or an ERR_PTR(), since commit ae76eef027f7 ("mac80211: return
new mpath from mesh_path_add()"), but its kernel-doc still says
"Returns: 0 on success". Describe the pointer.
Fixes: ae76eef027f7 ("mac80211: return new mpath from mesh_path_add()")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260912072840.50710-1-kmehltretter@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/mesh_pathtbl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 8653f7fd52ce8..5b492ed5e5a35 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -679,7 +679,7 @@ void mesh_fast_tx_flush_addr(struct ieee80211_sub_if_data *sdata,
* @sdata: local subif
* @dst: destination address of the path (ETH_ALEN length)
*
- * Returns: 0 on success
+ * Returns: the new or the existing path on success, an ERR_PTR() on failure
*
* State: the initial state of the new path is set to 0
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0441/2151] wifi: mac80211: dont reset the TXQ scheduling round number
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (439 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0440/2151] wifi: mac80211: Fix the return value in mesh_path_add() kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0442/2151] mtd: spi-nor: spansion: Remove s25fs256s0 Greg Kroah-Hartman
` (441 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Julius Bairaktaris,
Toke Høiland-Jørgensen, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julius Bairaktaris <julius@bairaktaris.de>
[ Upstream commit 8ea81827d3537db7cfcc82c008f052bb1bbe7567 ]
A round is ended when ieee80211_next_txq() meets a txq whose remembered
round number is the current one, meaning it has gone full circle.
When the AC exceeds the airtime limit, ieee80211_txq_schedule_start()
sets the round number to 0 to close the round. The next open round is
1. A txq from an earlier round 1 still remembers the "1", so the next
round stops on it and serves nothing.
Fix: use a separate open/closed flag and let the round number keep
counting.
Testing: ~4200 skipped selections per 20s without the fix and 20
skipped selections per 20s with the fix on ath11k (with my AQL series
applied) at BE 500/1000.
Fixes: 8e4bac067105 ("wifi: mac80211: add a per-PHY AQL limit to improve fairness")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de>
Reviewed-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://patch.msgid.link/20260908144155.756569-1-julius@bairaktaris.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/tx.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index a0b0eb4b2f2ae..0f35094b3898f 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1419,6 +1419,7 @@ struct ieee80211_local {
spinlock_t active_txq_lock[IEEE80211_NUM_ACS];
struct list_head active_txqs[IEEE80211_NUM_ACS];
u16 schedule_round[IEEE80211_NUM_ACS];
+ bool schedule_open[IEEE80211_NUM_ACS];
/* serializes ieee80211_handle_wake_tx_queue */
spinlock_t handle_wake_tx_queue_lock;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3224288583e20..67909f58c64a5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4169,7 +4169,7 @@ struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
spin_lock_bh(&local->active_txq_lock[ac]);
- if (!local->schedule_round[ac])
+ if (!local->schedule_open[ac])
goto out;
begin:
@@ -4394,12 +4394,12 @@ void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac)
spin_lock_bh(&local->active_txq_lock[ac]);
- if (ieee80211_txq_schedule_airtime_check(local, ac)) {
+ local->schedule_open[ac] =
+ ieee80211_txq_schedule_airtime_check(local, ac);
+ if (local->schedule_open[ac]) {
local->schedule_round[ac]++;
if (!local->schedule_round[ac])
local->schedule_round[ac]++;
- } else {
- local->schedule_round[ac] = 0;
}
spin_unlock_bh(&local->active_txq_lock[ac]);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0442/2151] mtd: spi-nor: spansion: Remove s25fs256s0
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (440 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0441/2151] wifi: mac80211: dont reset the TXQ scheduling round number Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0443/2151] wifi: wfx: fix use-after-free of the cooling work on device removal Greg Kroah-Hartman
` (440 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Takahiro Kuwano, Michael Walle,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takahiro Kuwano <takahiro.kuwano@infineon.com>
[ Upstream commit f917d9edf54c3dd578efc231b8fbcd35744f99cd ]
The Spansion ID table lists s25fs256s0 and s25fs256s1 as variants
distinguished by id[4] (0x00 for 256 KB sectors and 0x01 for 64 KB
sectors), following an incorrect statement in the datasheet.
The sector size of s25fs256s is configurable between 256 KB and 64 KB.
The factory default is 64 KB, and id[4] is always 0x01 regardless of the
configured sector size. Remove the invalid s25fs256s0 entry from the ID
table.
Fixes: 075fd6dff24a ("mtd: spi-nor: spansion: Differentiate between s25fl256s and s25fs256s")
Signed-off-by: Takahiro Kuwano <takahiro.kuwano@infineon.com>
Signed-off-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/mtd/spi-nor/spansion.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c
index 3ba7dcc39032e..d807cbd63bfb8 100644
--- a/drivers/mtd/spi-nor/spansion.c
+++ b/drivers/mtd/spi-nor/spansion.c
@@ -829,13 +829,6 @@ static const struct flash_info spansion_nor_parts[] = {
.sector_size = SZ_256K,
.no_sfdp_flags = SPI_NOR_SKIP_SFDP | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
.mfr_flags = USE_CLSR,
- }, {
- .id = SNOR_ID(0x01, 0x02, 0x19, 0x4d, 0x00, 0x81),
- .name = "s25fs256s0",
- .size = SZ_32M,
- .sector_size = SZ_256K,
- .no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
- .mfr_flags = USE_CLSR,
}, {
.id = SNOR_ID(0x01, 0x02, 0x19, 0x4d, 0x01, 0x80),
.name = "s25fl256s1",
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0443/2151] wifi: wfx: fix use-after-free of the cooling work on device removal
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (441 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0442/2151] mtd: spi-nor: spansion: Remove s25fs256s0 Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0444/2151] f2fs: quota: fix stale lock holder on remount failure Greg Kroah-Hartman
` (439 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jérôme Pouiller,
Alexander Sverdlin, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérôme Pouiller <jerome.pouiller@silabs.com>
[ Upstream commit 17402a869778f6c17b88fd360d7a96378779f97c ]
When the device reports that it is too hot, wfx_suspend_hot_dev() blocks
the Tx queues and arms cooling_timeout_work with a 10s delay. If the
device recovers a normal temperature before the delay expires, the work
is canceled. Else, the work declares the chip frozen and unblocks the Tx
queues.
However, this work is never canceled when the device is removed.
cooling_timeout_work is queued on the system workqueue, while struct
wfx_dev is released by wfx_free_common() (through ieee80211_free_hw()).
So, if the device is unbound during this 10s window, the work fires
after struct wfx_dev has been freed and dereferences it.
Cancel the work during the teardown. It has to be done after
wfx_bh_unregister(): the "device too hot" indication is processed by the
bh, so canceling the work earlier would allow the bh to rearm it. On the
other hand, the work calls wfx_tx_unlock(), which may in turn call
wfx_bh_request_tx(). So it has to be canceled before bh_wq is destroyed.
Note that the Tx queues are intentionally left blocked: the device is
going away, so there is nothing to unblock.
The issue was reported by the Sashiko review bot and the fix has been
written by Copilot (including the commit log). The use-case is difficult
to reproduce, so this code has not been tested. However, I don't believe
this patch could cause any regression.
Fixes: 1d52d29983e5d ("staging: wfx: add support for 'device too hot' indication")
Assisted-by: Sashiko:gemini-3.1-pro-preview
Assisted-by: Copilot:claude-opus-5
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://patch.msgid.link/20260906204831.949692-2-jerome.pouiller@silabs.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/silabs/wfx/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/silabs/wfx/main.c b/drivers/net/wireless/silabs/wfx/main.c
index 4ca874ad26433..1f4695fe4fb94 100644
--- a/drivers/net/wireless/silabs/wfx/main.c
+++ b/drivers/net/wireless/silabs/wfx/main.c
@@ -487,6 +487,7 @@ int wfx_probe(struct wfx_dev *wdev)
wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv);
bh_unregister:
wfx_bh_unregister(wdev);
+ cancel_delayed_work_sync(&wdev->cooling_timeout_work);
destroy_workqueue(wdev->bh_wq);
return err;
}
@@ -497,6 +498,7 @@ void wfx_release(struct wfx_dev *wdev)
wfx_hif_shutdown(wdev);
wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv);
wfx_bh_unregister(wdev);
+ cancel_delayed_work_sync(&wdev->cooling_timeout_work);
destroy_workqueue(wdev->bh_wq);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0444/2151] f2fs: quota: fix stale lock holder on remount failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (442 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0443/2151] wifi: wfx: fix use-after-free of the cooling work on device removal Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0445/2151] firmware: imx: dsp: fix mailbox channel leak on kasprintf failure Greg Kroah-Hartman
` (438 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jianan Huang, Chao Yu, Jaegeuk Kim,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jianan Huang <jnhuang95@gmail.com>
[ Upstream commit 3f140a60c92a5e2e9885adac70cd3686ba4ee19a ]
F2FS remount can fail while duplicating a journalled quota file name.
f2fs_remount()
- sbi->umount_lock_holder = current
- kstrdup(F2FS_OPTION(sbi).s_qf_names[i])
: fails
- free previously duplicated names
- return -ENOMEM
The direct return leaves umount_lock_holder pointing at the failed
remount context. A later checkpoint may then wrongly treat another
context as the s_umount lock holder.
Add a restore_holder cleanup path and use it before returning -ENOMEM.
Fixes: eb85c2410d6f ("f2fs: quota: fix to avoid warning in dquot_writeback_dquots()")
Signed-off-by: Jianan Huang <jnhuang95@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/f2fs/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 93e6575706add..e0257f6eff868 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2733,7 +2733,8 @@ static int __f2fs_remount(struct fs_context *fc, struct super_block *sb)
if (!org_mount_opt.s_qf_names[i]) {
for (j = 0; j < i; j++)
kfree(org_mount_opt.s_qf_names[j]);
- return -ENOMEM;
+ err = -ENOMEM;
+ goto restore_holder;
}
} else {
org_mount_opt.s_qf_names[i] = NULL;
@@ -2991,6 +2992,7 @@ static int __f2fs_remount(struct fs_context *fc, struct super_block *sb)
sbi->mount_opt = org_mount_opt;
sb->s_flags = old_sb_flags;
+restore_holder:
sbi->umount_lock_holder = NULL;
return err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0445/2151] firmware: imx: dsp: fix mailbox channel leak on kasprintf failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (443 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0444/2151] f2fs: quota: fix stale lock holder on remount failure Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0446/2151] memblock: reject non-page-aligned reserve_mem regions Greg Kroah-Hartman
` (437 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linkai Gong, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linkai Gong <gonglinkai@kylinos.cn>
[ Upstream commit e3631d0242842940f9e902afaea98202e56277e8 ]
If kasprintf() fails while setting up mailbox channels, already
requested channels from earlier iterations were never freed. Route
the failure through the existing cleanup path.
Fixes: ffbf23d50353 ("firmware: imx: Add DSP IPC protocol interface")
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/imx/imx-dsp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/imx/imx-dsp.c b/drivers/firmware/imx/imx-dsp.c
index ed79e823157af..7e3f45ddf0c18 100644
--- a/drivers/firmware/imx/imx-dsp.c
+++ b/drivers/firmware/imx/imx-dsp.c
@@ -99,8 +99,10 @@ static int imx_dsp_setup_channels(struct imx_dsp_ipc *dsp_ipc)
else
chan_name = kasprintf(GFP_KERNEL, "rxdb%d", i - 2);
- if (!chan_name)
- return -ENOMEM;
+ if (!chan_name) {
+ ret = -ENOMEM;
+ goto out;
+ }
dsp_chan = &dsp_ipc->chans[i];
dsp_chan->name = chan_name;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0446/2151] memblock: reject non-page-aligned reserve_mem regions
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (444 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0445/2151] firmware: imx: dsp: fix mailbox channel leak on kasprintf failure Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0447/2151] phy: hisilicon: hi3670: Fix OF node and device reference leaks Greg Kroah-Hartman
` (436 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sang-Heon Jeon,
Mike Rapoport (Microsoft), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sang-Heon Jeon <ekffu200098@gmail.com>
[ Upstream commit 5728d3523f12826a2b180c1c5738f74e33197e14 ]
When map->start or map->size is not page aligned,
reserved_mem_preserve() does not preserve the last one or two pages of
the region from map->start to map->start + map->size.
After kexec the new kernel reserves only the preserved pages, so those
pages are released to the buddy allocator. But
reserve_mem_find_by_name() still returns the whole region including
them, so they can be allocated while the subsystem is still using them.
So reject a reserve_mem= size or alignment that is not a multiple of
PAGE_SIZE to keep both map->start and map->size page aligned.
Fixes: 8375b76517cb ("kho: replace kho_preserve_phys() with kho_preserve_pages()")
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Link: https://patch.msgid.link/20260905141526.1546478-1-ekffu200098@gmail.com
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/admin-guide/kernel-parameters.txt | 3 +++
mm/memblock.c | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index e9ffe9c877b1a..1746b47d45368 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6473,6 +6473,9 @@ Kernel parameters
reserve_mem=12M:4096:oops ramoops.mem_name=oops
+ Both the size and the alignment must be multiples of
+ the page size.
+
reservetop= [X86-32,EARLY]
Format: nn[KMG]
Reserves a hole at the top of the kernel virtual
diff --git a/mm/memblock.c b/mm/memblock.c
index e2f15bbc274b5..c0612f48b2e91 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -2655,12 +2655,17 @@ static int __init reserve_mem(char *p)
if (*p != ':')
return -EINVAL;
+ if (!IS_ALIGNED(size, PAGE_SIZE) || !IS_ALIGNED(align, PAGE_SIZE)) {
+ pr_err("reserve_mem: size and align must be multiples of the page size\n");
+ return -EINVAL;
+ }
+
/*
* memblock_phys_alloc() doesn't like a zero size align,
* but it is OK for this command to have it.
*/
- if (align < SMP_CACHE_BYTES)
- align = SMP_CACHE_BYTES;
+ if (!align)
+ align = PAGE_SIZE;
name = p + 1;
len = strlen(name);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0447/2151] phy: hisilicon: hi3670: Fix OF node and device reference leaks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (445 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0446/2151] memblock: reject non-page-aligned reserve_mem regions Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0448/2151] phy: cadence: Sierra: Do not modify register when getting parent clock Greg Kroah-Hartman
` (435 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vladimir Oltean, Haotian Zhang,
Manivannan Sadhasivam, Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <vulab@iscas.ac.cn>
[ Upstream commit 1499f3d3407f5310731bcdf324387c321258fd75 ]
hi3670_pcie_get_resources_from_pcie() leaks two references:
1) The OF node returned by of_get_child_by_name() is never released.
2) The device returned by bus_find_device_by_of_node() is never put.
Fix both leaks by calling of_node_put() right after
bus_find_device_by_of_node(), and put_device() after dev_get_regmap()
when the temporary pcie_dev reference is no longer needed.
Fixes: 73075011ffff ("phy: HiSilicon: Add driver for Kirin 970 PCIe PHY")
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260219163843.1571-1-vulab@iscas.ac.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/phy/hisilicon/phy-hi3670-pcie.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/hisilicon/phy-hi3670-pcie.c b/drivers/phy/hisilicon/phy-hi3670-pcie.c
index dbc7dcce682b7..35e6342797947 100644
--- a/drivers/phy/hisilicon/phy-hi3670-pcie.c
+++ b/drivers/phy/hisilicon/phy-hi3670-pcie.c
@@ -570,6 +570,7 @@ static int hi3670_pcie_get_resources_from_pcie(struct hi3670_pcie_phy *phy)
}
pcie_dev = bus_find_device_by_of_node(&platform_bus_type, pcie_port);
+ of_node_put(pcie_port);
if (!pcie_dev) {
dev_err(dev, "Didn't find pcie device\n");
return -ENODEV;
@@ -584,6 +585,7 @@ static int hi3670_pcie_get_resources_from_pcie(struct hi3670_pcie_phy *phy)
* right regmap. So, let's use the named version.
*/
phy->apb = dev_get_regmap(pcie_dev, "kirin_pcie_apb");
+ put_device(pcie_dev);
if (!phy->apb) {
dev_err(dev, "Failed to get APB regmap\n");
return -ENODEV;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0448/2151] phy: cadence: Sierra: Do not modify register when getting parent clock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (446 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0447/2151] phy: hisilicon: hi3670: Fix OF node and device reference leaks Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0449/2151] memory: emif: fix device_node reference leak on np_ddr Greg Kroah-Hartman
` (434 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregory CLEMENT,
Manivannan Sadhasivam, Neil Armstrong, Vinod Koul, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregory CLEMENT <gregory.clement@bootlin.com>
[ Upstream commit 955e68eb3067842067b7b5395a3f8c278428802a ]
The get_parent() callback for the PLL_CMNLC1 clock was incorrectly
writing to the register while determining the parent clock index. This
unintended register access forces the PHY back into training mode. If
the PHY is already configured, this unexpected change prevents it from
exiting training mode.
Remove the register write operation to ensure the PHY remains stable
during the get_parent() callback.
Fixes: da08aab940092 ("phy: cadence: Sierra: Fix to get correct parent for mux clocks")
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260306-fix_sierra_get_parent-v2-1-cafe89ee5382@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/phy/cadence/phy-cadence-sierra.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 92ab1a31646ae..dbeda7f01cbb2 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -698,23 +698,16 @@ static const struct phy_ops noop_ops = {
static u8 cdns_sierra_pll_mux_get_parent(struct clk_hw *hw)
{
struct cdns_sierra_pll_mux *mux = to_cdns_sierra_pll_mux(hw);
- struct regmap_field *plllc1en_field = mux->plllc1en_field;
- struct regmap_field *termen_field = mux->termen_field;
struct regmap_field *field = mux->pfdclk_sel_preg;
unsigned int val;
int index;
regmap_field_read(field, &val);
- if (strstr(clk_hw_get_name(hw), clk_names[CDNS_SIERRA_PLL_CMNLC1])) {
+ if (strstr(clk_hw_get_name(hw), clk_names[CDNS_SIERRA_PLL_CMNLC1]))
index = clk_mux_val_to_index(hw, cdns_sierra_pll_mux_table[CMN_PLLLC1], 0, val);
- if (index == 1) {
- regmap_field_write(plllc1en_field, 1);
- regmap_field_write(termen_field, 1);
- }
- } else {
+ else
index = clk_mux_val_to_index(hw, cdns_sierra_pll_mux_table[CMN_PLLLC], 0, val);
- }
return index;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0449/2151] memory: emif: fix device_node reference leak on np_ddr
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (447 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0448/2151] phy: cadence: Sierra: Do not modify register when getting parent clock Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0450/2151] RDMA/rxe: Use validated num_sge in local buffer Greg Kroah-Hartman
` (433 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Miles Krause, Krzysztof Kozlowski,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miles Krause <mileskrause5200@gmail.com>
[ Upstream commit 314ef67d673284d4c070455bd62d332f6d0f8634 ]
of_get_memory_device_details() takes a reference on the DDR device
node via of_parse_phandle() and stores it in emif->np_ddr for later
use, but drops that reference without calling of_node_put() on two
error paths: the devm_kzalloc() allocation-failure check and the
is_dev_data_valid() check. Both return NULL immediately, leaking the
node reference each time either failure triggers.
The same reference is also never released on the success path: it is
kept for the life of the bound device (compared against a later
instance's np_ddr in the duplicate-DDR-geometry check) but
emif_remove() never calls of_node_put() on it, leaking it every time
an EMIF device unbinds. of_node_put() on a NULL pointer is a no-op, so
this is also safe for the non-DT get_device_details() path, where
np_ddr is left NULL by devm_kzalloc().
Fixes: e6b42eb6a66c ("memory: emif: add device tree support to emif driver")
Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
Link: https://patch.msgid.link/20260909-master-v1-1-8800f5647ab2@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/memory/emif.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 2fadad0666b1f..44ccc25618354 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -922,6 +922,7 @@ static struct emif_data *of_get_memory_device_details(
if (!emif || !pd || !dev_info) {
dev_err(dev, "%s: Out of memory!!\n",
__func__);
+ of_node_put(np_ddr);
goto error;
}
@@ -946,6 +947,7 @@ static struct emif_data *of_get_memory_device_details(
pd->device_info->io_width, pd->phy_type, pd->ip_rev,
emif->dev)) {
dev_err(dev, "%s: invalid device data!!\n", __func__);
+ of_node_put(np_ddr);
goto error;
}
/*
@@ -1140,6 +1142,7 @@ static void emif_remove(struct platform_device *pdev)
struct emif_data *emif = platform_get_drvdata(pdev);
emif_debugfs_exit(emif);
+ of_node_put(emif->np_ddr);
}
static void emif_shutdown(struct platform_device *pdev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0450/2151] RDMA/rxe: Use validated num_sge in local buffer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (448 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0449/2151] memory: emif: fix device_node reference leak on np_ddr Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0451/2151] RDMA/uverbs: Make CQ handle mandatory for WQ creation Greg Kroah-Hartman
` (432 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zhu Yanjun, Nicolas Morey,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Morey <nmorey@suse.com>
[ Upstream commit a4368022a3ac5324356ae8d88e3a42d115956fd6 ]
For both SRQ and non-SRQ receive paths, the WQE is copied into a local
buffer to provide a kernel-owned, validated copy. While calculating the
memcpy size from the validated num_sge prevents overflow during the
copy, memcpy() itself still copies num_sge from shared memory.
A concurrent userspace modification before or during memcpy() leaves
an unvalidated num_sge in the local buffer, leading to potential
out-of-bounds reads in rxe_resp_check_length() and copy_data() causing:
BUG: KASAN: slab-out-of-bounds in rxe_receiver+0x8109/0x9ec0 [rdma_rxe]
Read of size 4 at addr ffff88812c4867f8 by task kworker/u9:6/361
Workqueue: rxe_wq do_work [rdma_rxe]
Call Trace:
rxe_receiver+0x8109/0x9ec0 [rdma_rxe]
do_work+0x149/0x610 [rdma_rxe]
process_one_work+0x726/0x10a0
The buggy address belongs to the object at ffff88812c486000
which belongs to the cache kmalloc-part-13-2k of size 2048
The buggy address is located 0 bytes to the right of
allocated 2040-byte region [ffff88812c486000, ffff88812c4867f8)
Explicitly assign the validated num_sge to the local buffer after the
copy to prevent this race.
Fixes: 22b8fbded65b ("RDMA/rxe: Fix TOCTOU heap overflow in get_srq_wqe")
Fixes: d6ab440240a0 ("RDMA/rxe: Copy WQE to local buffer in non-SRQ receive path")
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
Link: https://patch.msgid.link/20260909160132.1491248-1-nmorey@suse.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/sw/rxe/rxe_resp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 6aabf1d07ea34..761362de74c46 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -287,6 +287,7 @@ static enum resp_states get_srq_wqe(struct rxe_qp *qp)
}
size = sizeof(*wqe) + num_sge * sizeof(struct rxe_sge);
memcpy(&qp->resp.srq_wqe, wqe, size);
+ qp->resp.srq_wqe.wqe.dma.num_sge = num_sge;
qp->resp.wqe = &qp->resp.srq_wqe.wqe;
queue_advance_consumer(q, QUEUE_TYPE_FROM_CLIENT);
@@ -327,6 +328,7 @@ static enum resp_states rxe_get_recv_wqe(struct rxe_qp *qp)
}
size = sizeof(*wqe) + num_sge * sizeof(struct rxe_sge);
memcpy(&qp->resp.srq_wqe, wqe, size);
+ qp->resp.srq_wqe.wqe.dma.num_sge = num_sge;
qp->resp.wqe = &qp->resp.srq_wqe.wqe;
return RESPST_CHK_LENGTH;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0451/2151] RDMA/uverbs: Make CQ handle mandatory for WQ creation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (449 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0450/2151] RDMA/rxe: Use validated num_sge in local buffer Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0452/2151] media: i2c: ar0521: remove duplicate media entity cleanup Greg Kroah-Hartman
` (431 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Kalesh AP,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit f7d28791433d373ecdab7b00f60ddb504e858e0a ]
UVERBS_ATTR_CREATE_WQ_CQ_HANDLE is declared UA_OPTIONAL in the ioctl
method definition, so the mandatory attribute bitmap does not enforce
its presence. When userspace omits it, uverbs_attr_get_obj() returns
ERR_PTR(-ENOENT) and the handler stores that error pointer into
wq_init_attr.cq without validation.
The bogus cq pointer is then passed to the driver's create_wq callback.
In the mlx5 case, create_rq() calls to_mcq(init_attr->cq) which applies
container_of to the ERR_PTR value, producing a near-NULL pointer. The
subsequent access in get_rq_ts_format() triggers a kernel NULL pointer
dereference:
BUG: kernel NULL pointer dereference, address: 0000000000000296
RIP: 0010:create_rq+0x32/0x550 [mlx5_ib]
Call Trace:
mlx5_ib_create_wq+0x14a/0x210 [mlx5_ib]
ib_uverbs_handler_UVERBS_METHOD_WQ_CREATE+0x1f0/0x320 [ib_uverbs]
ib_uverbs_run_method+0x296/0x320 [ib_uverbs]
ib_uverbs_cmd_verbs+0x1a0/0x260 [ib_uverbs]
ib_uverbs_ioctl+0xa8/0x120 [ib_uverbs]
A WQ without a CQ was never valid; the legacy write path always required
one via uobj_get_obj_read() in ib_uverbs_ex_create_wq(). Declare the
attribute UA_MANDATORY so the uverbs framework rejects the ioctl early
when the CQ handle is missing, before the handler ever runs.
Fixes: ef3bc084a8ed ("IB/uverbs: Introduce create/destroy WQ commands over ioctl")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260911021557.2113-1-lirongqing@baidu.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/core/uverbs_std_types_wq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/uverbs_std_types_wq.c b/drivers/infiniband/core/uverbs_std_types_wq.c
index 7ded8339346f3..c23f455231bf0 100644
--- a/drivers/infiniband/core/uverbs_std_types_wq.c
+++ b/drivers/infiniband/core/uverbs_std_types_wq.c
@@ -140,7 +140,7 @@ DECLARE_UVERBS_NAMED_METHOD(
UVERBS_ATTR_IDR(UVERBS_ATTR_CREATE_WQ_CQ_HANDLE,
UVERBS_OBJECT_CQ,
UVERBS_ACCESS_READ,
- UA_OPTIONAL),
+ UA_MANDATORY),
UVERBS_ATTR_FD(UVERBS_ATTR_CREATE_WQ_EVENT_FD,
UVERBS_OBJECT_ASYNC_EVENT,
UVERBS_ACCESS_READ,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0452/2151] media: i2c: ar0521: remove duplicate media entity cleanup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (450 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0451/2151] RDMA/uverbs: Make CQ handle mandatory for WQ creation Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0453/2151] block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc Greg Kroah-Hartman
` (430 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Guangshuo Li, Sakari Ailus,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guangshuo Li <lgs201920130244@gmail.com>
[ Upstream commit 069a0343581bfcaee44bc598e2b95be2e2789807 ]
The error path taken when ar0521_power_on() fails calls
media_entity_cleanup() at the disable label and then falls through to
the entity_cleanup label, where media_entity_cleanup() is called again.
There is no need to clean up the media entity twice. Remove the first
call and let all error paths converge on the common entity_cleanup
label.
This issue was found by manual code inspection.
Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/i2c/ar0521.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/i2c/ar0521.c b/drivers/media/i2c/ar0521.c
index 939bf590d4b21..a9a33b4c8e63a 100644
--- a/drivers/media/i2c/ar0521.c
+++ b/drivers/media/i2c/ar0521.c
@@ -1139,7 +1139,6 @@ static int ar0521_probe(struct i2c_client *client)
disable:
v4l2_async_unregister_subdev(&sensor->sd);
- media_entity_cleanup(&sensor->sd.entity);
free_ctrls:
v4l2_ctrl_handler_free(&sensor->ctrls.handler);
entity_cleanup:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0453/2151] block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (451 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0452/2151] media: i2c: ar0521: remove duplicate media entity cleanup Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0454/2151] remoteproc: core: Set trace buffer name for diagnostics Greg Kroah-Hartman
` (429 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Darrick J. Wong,
Christian Brauner (Amutable), Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit e14c3379be86854c203de1e0fdfdeaa0b45509df ]
The kernel-doc comment of bdev_freeze() refers to thaw_bdev, which was
renamed to bdev_thaw by commit 982c3b305843 ("bdev: rename freeze and
thaw helpers"). Say bdev_thaw.
Fixes: 982c3b305843 ("bdev: rename freeze and thaw helpers")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christian Brauner (Amutable) <brauner@kernel.org>
Link: https://patch.msgid.link/20260911233415.31271-1-kmehltretter@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
block/bdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bdev.c b/block/bdev.c
index 00345746e34f8..3acf3e9d33739 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -277,7 +277,7 @@ EXPORT_SYMBOL(sync_blockdev_range);
* The reference counter (bd_fsfreeze_count) guarantees that only the last
* unfreeze process can unfreeze the frozen filesystem actually when multiple
* freeze requests arrive simultaneously. It counts up in bdev_freeze() and
- * count down in bdev_thaw(). When it becomes 0, thaw_bdev() will unfreeze
+ * count down in bdev_thaw(). When it becomes 0, bdev_thaw() will unfreeze
* actually.
*
* Return: On success zero is returned, negative error code on failure.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0454/2151] remoteproc: core: Set trace buffer name for diagnostics
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (452 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0453/2151] block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0455/2151] dmaengine: mv_xor: kill tasklet on channel add error path Greg Kroah-Hartman
` (428 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yonghao Zhang, Mathieu Poirier,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yonghao Zhang <hyz3367@gmail.com>
[ Upstream commit e23eab619b0d2dd796618406ba25da62f4d539a2 ]
rproc_trace_read() (in remoteproc_debugfs.c) prints the name of a
trace buffer whose device address could not be resolved, but nothing
ever assigns trace_mem.name, so that the diagnostics always prints
an empty string:
Trace not available
Copy the generated "trace%d" name into the memory entry, so the
diagnostics identifies the buffer failed to translate.
Fixes: a987e6b91a5a ("remoteproc: fix trace buffer va initialization")
Assisted-by: Claude-Code:glm-5.3
Signed-off-by: Yonghao Zhang <hyz3367@gmail.com>
Link: https://lore.kernel.org/r/20260911081810.740028-1-hyz3367@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/remoteproc/remoteproc_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 1e277333de871..eae7b0b2b43a7 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -579,6 +579,9 @@ static int rproc_handle_trace(struct rproc *rproc, void *ptr,
/* create the debugfs entry */
trace->tfile = rproc_create_trace_file(name, rproc, trace);
+ /* keep the name for the diagnostic in rproc_trace_read() */
+ strscpy(trace->trace_mem.name, name, sizeof(trace->trace_mem.name));
+
list_add_tail(&trace->node, &rproc->traces);
rproc->num_traces++;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0455/2151] dmaengine: mv_xor: kill tasklet on channel add error path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (453 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0454/2151] remoteproc: core: Set trace buffer name for diagnostics Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0456/2151] loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation Greg Kroah-Hartman
` (427 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rosen Penev, Frank Li, Vinod Koul,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <rosenp@gmail.com>
[ Upstream commit bcb4d469b19d53dc21e4a1da12d4438e7489e150 ]
If request_irq() succeeds but a later step (self-test or device
registration) fails, the error path at err_free_irq frees the IRQ
but does not kill the tasklet. A previously scheduled tasklet can
still run after the channel is freed, accessing freed memory.
Add tasklet_kill() after free_irq() on the error path.
Fixes: ff7b04796d98 ("dmaengine: DMA engine driver for Marvell XOR engine")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260909234601.101883-1-rosenp@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/dma/mv_xor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 5e83862960461..8229c69089b94 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1162,6 +1162,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
err_free_irq:
free_irq(mv_chan->irq, mv_chan);
+ tasklet_kill(&mv_chan->irq_tasklet);
err_free_dma:
dma_free_wc(&pdev->dev, MV_XOR_POOL_SIZE,
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0456/2151] loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (454 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0455/2151] dmaengine: mv_xor: kill tasklet on channel add error path Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0457/2151] platform/x86/intel/vsec: reset state before re-enumerating Greg Kroah-Hartman
` (426 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Randy Dunlap,
Jonathan Corbet, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit eb0b0d222a832b6ec851e56d4922a775ac762955 ]
Commit 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG
and KEXEC_SIG_FORCE") removed CONFIG_KEXEC_VERIFY_SIG but left the
LoadPin documentation pointing at it. Refer to CONFIG_KEXEC_SIG instead.
While at it, clean up the grammar of the sentence.
Fixes: 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260905013655.58665-1-kmehltretter@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/admin-guide/LSM/LoadPin.rst | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Documentation/admin-guide/LSM/LoadPin.rst b/Documentation/admin-guide/LSM/LoadPin.rst
index dd3ca68b5df18..a90fd9dac9606 100644
--- a/Documentation/admin-guide/LSM/LoadPin.rst
+++ b/Documentation/admin-guide/LSM/LoadPin.rst
@@ -23,9 +23,9 @@ sysctl allows for easy testing on systems with a mutable filesystem.)
It's also possible to exclude specific file types from LoadPin using kernel
command line option "``loadpin.exclude``". By default, all files are
included, but they can be excluded using kernel command line option such
-as "``loadpin.exclude=kernel-module,kexec-image``". This allows to use
+as "``loadpin.exclude=kernel-module,kexec-image``". This allows using
different mechanisms such as ``CONFIG_MODULE_SIG`` and
-``CONFIG_KEXEC_VERIFY_SIG`` to verify kernel module and kernel image while
-still use LoadPin to protect the integrity of other files kernel loads. The
-full list of valid file types can be found in ``kernel_read_file_str``
-defined in ``include/linux/kernel_read_file.h``.
+``CONFIG_KEXEC_SIG`` to verify kernel modules and kernel images while
+still using LoadPin to protect the integrity of other files the kernel
+loads. The full list of valid file types can be found in
+``kernel_read_file_str`` defined in ``include/linux/kernel_read_file.h``.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0457/2151] platform/x86/intel/vsec: reset state before re-enumerating
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (455 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0456/2151] loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0458/2151] wifi: rtw88: sdio: zero the padding added to a TX transfer Greg Kroah-Hartman
` (425 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guangshuo Li, Ilpo Järvinen,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guangshuo Li <lgs201920130244@gmail.com>
[ Upstream commit ee26050614d02397eb743854d718689dcaf1889b ]
The change referenced by the Fixes tag split the VSEC enumeration logic
out of intel_vsec_pci_probe() and made PCIe error recovery call
intel_vsec_pci_init() directly. This avoids another pcim_enable_device()
devm action and another devm allocation during slot reset, but it also
means that error recovery reuses the priv structure allocated by probe.
On the initial probe, priv is zeroed by devm_kzalloc(), so state[],
suppliers[] and found_caps start from their initial values. During slot
reset, the existing aux devices are removed before re-enumerating, but
the reused priv still records the old devices as registered and the old
capabilities as found.
The next intel_vsec_pci_init() call can therefore short-circuit in
intel_vsec_register_device() with -EEXIST, or stop early because
found_caps already matches info->caps. The aux devices removed during
slot reset are then not recreated, leaving VSEC functionality missing
after PCIe error recovery.
Reset the VSEC registration state after removing the old aux devices and
before re-enumerating them.
Fixes: 348ccc754d89 ("platform/x86/intel/vsec: Fix enable_cnt imbalance on PCIe error recovery")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260708032647.712412-1-lgs201920130244@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/intel/vsec.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/platform/x86/intel/vsec.c b/drivers/platform/x86/intel/vsec.c
index 814e418bea82b..3c157ff9d54b6 100644
--- a/drivers/platform/x86/intel/vsec.c
+++ b/drivers/platform/x86/intel/vsec.c
@@ -49,6 +49,13 @@ struct vsec_priv {
unsigned long found_caps;
};
+static void intel_vsec_reset_state(struct vsec_priv *priv)
+{
+ memset(priv->suppliers, 0, sizeof(priv->suppliers));
+ memset(priv->state, 0, sizeof(priv->state));
+ priv->found_caps = 0;
+}
+
static const char *intel_vsec_name(enum intel_vsec_id id)
{
switch (id) {
@@ -829,6 +836,7 @@ static pci_ers_result_t intel_vsec_pci_slot_reset(struct pci_dev *pdev)
{
struct intel_vsec_device *intel_vsec_dev;
pci_ers_result_t status = PCI_ERS_RESULT_DISCONNECT;
+ struct vsec_priv *priv = pci_get_drvdata(pdev);
unsigned long index;
dev_info(&pdev->dev, "Resetting PCI slot\n");
@@ -849,6 +857,13 @@ static pci_ers_result_t intel_vsec_pci_slot_reset(struct pci_dev *pdev)
devm_release_action(&pdev->dev, intel_vsec_remove_aux,
&intel_vsec_dev->auxdev);
}
+
+ /*
+ * intel_vsec_pci_init() reuses priv. Reset the registration state
+ * after tearing down old aux devices or the rewalk will skip them as
+ * already registered.
+ */
+ intel_vsec_reset_state(priv);
pci_restore_state(pdev);
intel_vsec_pci_init(pdev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0458/2151] wifi: rtw88: sdio: zero the padding added to a TX transfer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (456 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0457/2151] platform/x86/intel/vsec: reset state before re-enumerating Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0459/2151] ntfs3: fix out-of-bounds read in ntfs_read_mft() Greg Kroah-Hartman
` (424 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Luka Gejak, Ping-Ke Shih,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luka Gejak <luka.gejak@linux.dev>
[ Upstream commit b81ead28aeb1fd9bc3b0de4e20342b6b538ac658 ]
rtw_sdio_write_port() rounds the transfer up with sdio_align_size() and
then hands that length to sdio_memcpy_toio() while the skb still only
holds skb->len bytes. The difference, between one and 511 bytes, is read
from beyond the end of the frame and transmitted. Whether it stays
inside the skb's allocation depends on how much tailroom the skb happens
to have, so this is at best sending uninitialised memory over the air.
Pad the skb up to the transfer size first. __skb_pad() zeroes the added
bytes, reallocates a cloned skb rather than writing into a buffer a
clone still shares, and leaves skb->len alone, so nothing else in the
transmit path has to change.
It must not free the skb on failure: rtw_sdio_write_data() frees the skb
itself and rtw_sdio_process_tx_queue() requeues it, so both callers
still own it and would double free.
Found while reworking this path for the RTL8723BS. Measured on RTL8723BS
hardware, padding the transfer costs about 2% observable over transfer:
uplink is 19.5 to 19.8 Mbit/s padded against 20.9 to 21.1 Mbit/s unpadded
in an interleaved A/B, with scans, reconnection and a UDP flood clean in
both. The other SDIO parts sharing this path are untested; I have only the
RTL8723BS.
Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets")
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260909074556.55709-5-luka.gejak@linux.dev
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/realtek/rtw88/sdio.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
index e35de52d8eb43..2fa8563940fa8 100644
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
@@ -636,6 +636,7 @@ static int rtw_sdio_write_port(struct rtw_dev *rtwdev, struct sk_buff *skb,
enum rtw_tx_queue_type queue)
{
struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;
+ size_t pad_size;
bool bus_claim;
size_t txsize;
u32 txaddr;
@@ -646,6 +647,17 @@ static int rtw_sdio_write_port(struct rtw_dev *rtwdev, struct sk_buff *skb,
return -EINVAL;
txsize = sdio_align_size(rtwsdio->sdio_func, skb->len);
+ pad_size = txsize - skb->len;
+
+ if (pad_size > 0) {
+ /*
+ * __skb_pad() must not free the skb on failure: both callers
+ * still own it, one requeues it and the other frees it.
+ */
+ ret = __skb_pad(skb, pad_size, false);
+ if (ret)
+ return ret;
+ }
ret = rtw_sdio_check_free_txpg(rtwdev, queue, txsize);
if (ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0459/2151] ntfs3: fix out-of-bounds read in ntfs_read_mft()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (457 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0458/2151] wifi: rtw88: sdio: zero the padding added to a TX transfer Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0460/2151] fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts Greg Kroah-Hartman
` (423 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xiang Mei, Weiming Shi,
Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Weiming Shi <bestswngs@gmail.com>
[ Upstream commit 7a374d9be8267834dc534e55f01e5e01765cab4c ]
ntfs_read_mft() walks the attributes of an MFT record and, for each
FILE_NAME attribute, compares the resident on-disk name with the name
being looked up. The only size check before the compare is
rsize >= SIZEOF_ATTRIBUTE_FILENAME, which covers the fixed header up to
and including name_len, but not the variable-length name that follows it.
name_len comes straight from disk and is not validated against the
resident data_size. A crafted image can set name_len large while keeping
data_size at the header size, so ntfs_cmp_names_cpu() reads name_len
le16 characters past the end of the MFT record buffer:
BUG: KASAN: slab-out-of-bounds in ntfs_cmp_names_cpu (fs/ntfs3/upcase.c:84)
Read of size 2 at addr ffff888031879c00 by task a.out
ntfs_cmp_names_cpu (fs/ntfs3/upcase.c:84)
ntfs_iget5 (fs/ntfs3/inode.c:209)
dir_search_u (fs/ntfs3/dir.c:265)
ntfs_lookup (fs/ntfs3/namei.c:85)
__lookup_slow (fs/namei.c:1915)
lookup_slow (fs/namei.c:1932)
path_lookupat (fs/namei.c:2278)
vfs_statx (fs/stat.c)
vfs_fstatat (fs/stat.c)
__do_sys_newfstatat (fs/stat.c)
Allocated by task:
mi_init (fs/ntfs3/record.c)
ntfs_iget5 (fs/ntfs3/inode.c)
dir_search_u (fs/ntfs3/dir.c)
ntfs_lookup (fs/ntfs3/namei.c)
Check that the name fits in the resident data before using it.
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Reported-by: Xiang Mei <xmei5@asu.edu>
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/inode.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 99fdba7b403cb..e9ac5c5c7239d 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -208,6 +208,11 @@ static struct inode *ntfs_read_mft(struct inode *inode,
names += 1;
fname = Add2Ptr(attr, roff);
+
+ /* Make sure the full name fits in the resident data. */
+ if (rsize < fname_full_size(fname))
+ goto out;
+
if (fname->type == FILE_NAME_DOS)
goto next_attr;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0460/2151] fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (458 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0459/2151] ntfs3: fix out-of-bounds read in ntfs_read_mft() Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0461/2151] mm/gup_test: reject wrapped user ranges Greg Kroah-Hartman
` (422 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Baolin Liu, Konstantin Komarov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baolin Liu <liubaolin@kylinos.cn>
[ Upstream commit 5d3e03b70d05162ca49830efcd8b1cd2746a86a3 ]
FS_IOC_SETFSLABEL does not check for readonly mounts and
can report success without persisting the label change.
Return -EROFS on readonly mounts.
Fixes: 21dc07ac9c25 ("ntfs3: add FS_IOC_SETFSLABEL ioctl")
Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index 13d623560120c..d5cd8fe6dd868 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -65,6 +65,9 @@ static int ntfs_ioctl_set_volume_label(struct ntfs_sb_info *sbi, u8 __user *buf)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
+ if (sb_rdonly(sbi->sb))
+ return -EROFS;
+
if (copy_from_user(user, buf, FSLABEL_MAX))
return -EFAULT;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0461/2151] mm/gup_test: reject wrapped user ranges
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (459 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0460/2151] fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0462/2151] mm/gup_test: safely calculate GUP batch size Greg Kroah-Hartman
` (421 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Samuel Moelius,
David Hildenbrand (Arm), Jason Gunthorpe, John Hubbard, Peter Xu,
Andrew Morton, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samuel Moelius <sam.moelius@trailofbits.com>
[ Upstream commit e8ae6fd67021fafa9205330b3b248c9fc7216e0b ]
gup_test accepts an address and size from the debugfs ioctl and repeatedly
compares against addr + size. If that addition wraps, the loop can be
skipped and the ioctl returns success with size rewritten to zero.
Compute the end address once with overflow checking and use that checked
end for the loop bounds.
Assisted-by: Codex:gpt-5.5-cyber-preview
Link: https://lore.kernel.org/20260609004814.1240586.6294d614ac80.gup-test-range-end-wrap@trailofbits.com
Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 44817a536aaa ("mm/gup_test: safely calculate GUP batch size")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/gup_test.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/mm/gup_test.c b/mm/gup_test.c
index eeb3f4d87c510..c9e7c1cf5b080 100644
--- a/mm/gup_test.c
+++ b/mm/gup_test.c
@@ -104,11 +104,15 @@ static int __gup_test_ioctl(unsigned int cmd,
unsigned long i, nr_pages, addr, next;
long nr;
struct page **pages;
+ unsigned long end;
int ret = 0;
bool needs_mmap_lock =
cmd != GUP_FAST_BENCHMARK && cmd != PIN_FAST_BENCHMARK;
- if (gup->size > ULONG_MAX)
+ if (gup->addr > ULONG_MAX || gup->size > ULONG_MAX)
+ return -EINVAL;
+ if (check_add_overflow((unsigned long)gup->addr,
+ (unsigned long)gup->size, &end))
return -EINVAL;
nr_pages = gup->size / PAGE_SIZE;
@@ -124,13 +128,13 @@ static int __gup_test_ioctl(unsigned int cmd,
i = 0;
nr = gup->nr_pages_per_call;
start_time = ktime_get();
- for (addr = gup->addr; addr < gup->addr + gup->size; addr = next) {
+ for (addr = gup->addr; addr < end; addr = next) {
if (nr != gup->nr_pages_per_call)
break;
next = addr + nr * PAGE_SIZE;
- if (next > gup->addr + gup->size) {
- next = gup->addr + gup->size;
+ if (next > end) {
+ next = end;
nr = (next - addr) / PAGE_SIZE;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0462/2151] mm/gup_test: safely calculate GUP batch size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (460 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0461/2151] mm/gup_test: reject wrapped user ranges Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0463/2151] mm/gup_test: report actual pinned bytes Greg Kroah-Hartman
` (420 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kiryl Shutsemau (Meta),
Sarthak Sharma, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarthak Sharma <sarthak.sharma@arm.com>
[ Upstream commit 44817a536aaa5bfac0d316242e93e489d0a69d5f ]
__gup_test_ioctl() calculates the end of a GUP batch using:
next = addr + nr * PAGE_SIZE;
If nr is too large, it can cause next to overflow and wrap around.
If it wraps, the next > end check is bypassed and a large value
of nr is passed to the GUP call, even though the pages array was
allocated according to gup->size. This can lead to out of bounds writes.
Also, when fewer than PAGE_SIZE bytes remain, the calculated batch
contains zero pages. The code still calls GUP functions with pages + i,
which can point past the allocated array.
Calculate nr by taking the minimum of the number of pages per call and
the pages remaining in the address range. Reject zero sized and non
page aligned gup->size values and zero nr_pages_per_call value.
Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking")
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
Link: https://patch.msgid.link/20260915102524.125758-1-sarthak.sharma@arm.com
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/gup_test.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/mm/gup_test.c b/mm/gup_test.c
index c9e7c1cf5b080..6de8064090ea1 100644
--- a/mm/gup_test.c
+++ b/mm/gup_test.c
@@ -109,7 +109,8 @@ static int __gup_test_ioctl(unsigned int cmd,
bool needs_mmap_lock =
cmd != GUP_FAST_BENCHMARK && cmd != PIN_FAST_BENCHMARK;
- if (gup->addr > ULONG_MAX || gup->size > ULONG_MAX)
+ if (gup->addr > ULONG_MAX || gup->size > ULONG_MAX || !gup->size ||
+ !gup->nr_pages_per_call || !PAGE_ALIGNED(gup->size))
return -EINVAL;
if (check_add_overflow((unsigned long)gup->addr,
(unsigned long)gup->size, &end))
@@ -132,11 +133,9 @@ static int __gup_test_ioctl(unsigned int cmd,
if (nr != gup->nr_pages_per_call)
break;
+ nr = min_t(unsigned long, nr, (end - addr) / PAGE_SIZE);
+
next = addr + nr * PAGE_SIZE;
- if (next > end) {
- next = end;
- nr = (next - addr) / PAGE_SIZE;
- }
switch (cmd) {
case GUP_FAST_BENCHMARK:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0463/2151] mm/gup_test: report actual pinned bytes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (461 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0462/2151] mm/gup_test: safely calculate GUP batch size Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0464/2151] crypto: eip93 - fix ssl mac bit field definition Greg Kroah-Hartman
` (419 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kiryl Shutsemau (Meta),
Sarthak Sharma, David Hildenbrand (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarthak Sharma <sarthak.sharma@arm.com>
[ Upstream commit 65a79b9b693d8c7bd7e5e4865c02cce922a7cc50 ]
__gup_test_ioctl() advances addr to the end of the current batch before
checking if GUP pinned the entire requested batch. If GUP pins more than
0 pages but less than the requested batch size, addr still advances by
the requested batch size.
The next iteration detects the partial pinning and breaks out of the loop.
Again gup->size is calculated using addr - gup->addr, so it also includes
the unpinned pages of the requested batch.
Calculate gup->size using the actual number of pages pinned multiplied
by PAGE_SIZE.
Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking")
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Signed-off-by: Sarthak Sharma <sarthak.sharma@arm.com>
Link: https://patch.msgid.link/20260901083452.115365-3-sarthak.sharma@arm.com
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/gup_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/gup_test.c b/mm/gup_test.c
index 6de8064090ea1..6014bbf2aadeb 100644
--- a/mm/gup_test.c
+++ b/mm/gup_test.c
@@ -180,7 +180,7 @@ static int __gup_test_ioctl(unsigned int cmd,
nr_pages = i;
gup->get_delta_usec = ktime_us_delta(end_time, start_time);
- gup->size = addr - gup->addr;
+ gup->size = nr_pages * PAGE_SIZE;
/*
* Take an un-benchmark-timed moment to verify DMA pinned
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0464/2151] crypto: eip93 - fix ssl mac bit field definition
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (462 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0463/2151] mm/gup_test: report actual pinned bytes Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0465/2151] arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock Greg Kroah-Hartman
` (418 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aleksander Jan Bajkowski, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksander Jan Bajkowski <olek2@wp.pl>
[ Upstream commit 8f808c8f32b67d42ba97457a7054bd5954d02856 ]
Checked the register definitions with the documentation[1]. Turns out
that the EIP93_SA_CMD_SSL_MAC bit field has a bad value. It's used in
SSL offload mode. This driver doesn't support SSL offload yet, so this
causes no problems.
1. MT7621 ProgrammingGuide DMA
Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/inside-secure/eip93/eip93-regs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/inside-secure/eip93/eip93-regs.h b/drivers/crypto/inside-secure/eip93/eip93-regs.h
index 194436837147c..3a806c277d3a3 100644
--- a/drivers/crypto/inside-secure/eip93/eip93-regs.h
+++ b/drivers/crypto/inside-secure/eip93/eip93-regs.h
@@ -281,7 +281,7 @@
#define EIP93_SA_CMD_HASH_CRYPT_OFFSET GENMASK(23, 16)
#define EIP93_SA_CMD_BYTE_OFFSET BIT(13) /* 0: CRYPT_OFFSET in 32bit word 1: CRYPT_OFFSET in 8bit bytes */
#define EIP93_SA_CMD_HMAC BIT(12)
-#define EIP93_SA_CMD_SSL_MAC BIT(12)
+#define EIP93_SA_CMD_SSL_MAC BIT(11)
/* This mask can be either used for ARC4 or AES */
#define EIP93_SA_CMD_CHIPER_MODE GENMASK(9, 8)
/* AES or DES operations */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0465/2151] arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (463 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0464/2151] crypto: eip93 - fix ssl mac bit field definition Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0466/2151] ACPI: tables: handle failed initrd override mappings Greg Kroah-Hartman
` (417 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, AngeloGioacchino Del Regno,
Icenowy Zheng, Chen-Yu Tsai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <wenst@chromium.org>
[ Upstream commit c9b3c82c9f1f86cdb2449d47e4ca66a19159ee12 ]
The MFG_ASYNC domain, which is likely associated to the whole MFG block,
currently specifies clk26m as its domain clock. This is bogus, since the
clock is an external crystal with no controls. Also, the MFG block has
a independent CLK_TOP_AXI_MFG_IN_SEL clock, which according to the block
diagram, gates access to the hardware registers. Having this one as the
domain clock makes much more sense. This also fixes access to the MFGTOP
registers.
Change the MFG_ASYNC domain clock to CLK_TOP_AXI_MFG_IN_SEL.
Fixes: 8b6562644df9 ("arm64: dts: mediatek: Add mt8173 power domain controller")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 122a57c3780b6..aa6b04ef4aff7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -505,7 +505,7 @@ power-domain@MT8173_POWER_DOMAIN_USB {
};
mfg_async: power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC {
reg = <MT8173_POWER_DOMAIN_MFG_ASYNC>;
- clocks = <&clk26m>;
+ clocks = <&topckgen CLK_TOP_AXI_MFG_IN_SEL>;
clock-names = "mfg";
#address-cells = <1>;
#size-cells = <0>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0466/2151] ACPI: tables: handle failed initrd override mappings
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (464 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0465/2151] arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0467/2151] cxl/hdm: Reject switch decoder interleave ways that overflow targets Greg Kroah-Hartman
` (416 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Slavin Liu, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Slavin Liu <bolin.liu@seu.edu.cn>
[ Upstream commit 047c834d939df75386cfc0603c7ddeaa23a349a4 ]
The runtime AML table-loading path can invoke initrd override after
permanent mappings are enabled. Mapping bookkeeping can then fail.
Return AE_NO_MEMORY in that case to prevent a NULL pointer dereference
when attempting to read the table length.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: b2a35003dfbc ("ACPI: Implement physical address table override")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
[ rjw: Added empty code line after conditional, changelog edits ]
Link: https://patch.msgid.link/20260913125123.109803-1-bolin.liu@seu.edu.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/tables.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 57fc8bc56166b..cd467dc1c665d 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -559,6 +559,9 @@ acpi_table_initrd_override(struct acpi_table_header *existing_table,
while (table_offset + ACPI_HEADER_SIZE <= all_tables_size) {
table = acpi_os_map_memory(acpi_tables_addr + table_offset,
ACPI_HEADER_SIZE);
+ if (!table)
+ return AE_NO_MEMORY;
+
if (table_offset + table->length > all_tables_size) {
acpi_os_unmap_memory(table, ACPI_HEADER_SIZE);
WARN_ON(1);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0467/2151] cxl/hdm: Reject switch decoder interleave ways that overflow targets
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (465 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0466/2151] ACPI: tables: handle failed initrd override mappings Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0468/2151] cxl/hdm: Make switch decoder target parsing endian-safe Greg Kroah-Hartman
` (415 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Davidlohr Bueso, Richard Cheng,
Alison Schofield, Li Ming, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alison Schofield <alison.schofield@intel.com>
[ Upstream commit 3696326ca14cf018788d64232a068fdf26b1ff31 ]
Switch decoder enumeration validates that the interleave ways encoding
is legal, but not that the resulting number of ways fits the available
targets. This can overrun the target array (target_list.target_id[])
during enumeration of 12 or 16 way interleaves.
Bound the target count where it is established rather than at each use.
Reject an HDM capability whose reported target count is zero or exceeds
the target list register capacity, and reject a zero target switch
decoder allocation in cxl_switch_decoder_init(). Enumeration is then
left with a single check: reject a decoder whose interleave ways exceed
the targets it has.
Add a clarifying comment that target_count is a direct count, not
0-based like decoder_count.
Link: https://sashiko.dev/#/patchset/20260711180755.1779002-1-alison.schofield@intel.com?part=1
Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core")
Tested-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Link: https://patch.msgid.link/af094094813d7f51d86cbf608936270b7d85526e.1786143520.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/hdm.c | 24 ++++++++++++++++++++++++
drivers/cxl/core/port.c | 2 +-
drivers/cxl/cxl.h | 2 ++
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index 4d5113b5e6316..f49e3139c8281 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -76,6 +76,8 @@ static void parse_hdm_decoder_caps(struct cxl_hdm *cxlhdm)
hdm_cap = readl(cxlhdm->regs.hdm_decoder + CXL_HDM_DECODER_CAP_OFFSET);
cxlhdm->decoder_count = cxl_hdm_decoder_count(hdm_cap);
+
+ /* target_count is a direct count (1h..8h), not 0-based like decoder_count */
cxlhdm->target_count =
FIELD_GET(CXL_HDM_DECODER_TARGET_COUNT_MASK, hdm_cap);
if (FIELD_GET(CXL_HDM_DECODER_INTERLEAVE_11_8, hdm_cap))
@@ -1081,6 +1083,16 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
cxld->interleave_ways, cxld->interleave_granularity);
if (!cxled) {
+ struct cxl_switch_decoder *cxlsd = to_cxl_switch_decoder(&cxld->dev);
+
+ if (cxld->interleave_ways > cxlsd->nr_targets) {
+ dev_err(&port->dev,
+ "decoder%d.%d: interleave ways: %d exceeds targets: %d\n",
+ port->id, cxld->id, cxld->interleave_ways,
+ cxlsd->nr_targets);
+ return -ENXIO;
+ }
+
lo = readl(hdm + CXL_HDM_DECODER0_TL_LOW(which));
hi = readl(hdm + CXL_HDM_DECODER0_TL_HIGH(which));
target_list.value = (hi << 32) + lo;
@@ -1158,6 +1170,18 @@ static int devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
int i;
u64 dpa_base = 0;
+ /*
+ * Per CXL 4.0 8.2.4.20.1 Target Count is the number of target ports
+ * per decoder, max 8. Endpoint decoders have no targets.
+ */
+ if (!is_cxl_endpoint(port) &&
+ (cxlhdm->target_count < 1 ||
+ cxlhdm->target_count > CXL_HDM_DECODER0_TL_TARGETS)) {
+ dev_err(&port->dev, "Invalid decoder target count: %u\n",
+ cxlhdm->target_count);
+ return -ENXIO;
+ }
+
cxl_settle_decoders(cxlhdm);
for (i = 0; i < cxlhdm->decoder_count; i++) {
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 01655eeb43a8f..67dfebe123ca4 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -1983,7 +1983,7 @@ static int cxl_switch_decoder_init(struct cxl_port *port,
struct cxl_switch_decoder *cxlsd,
int nr_targets)
{
- if (nr_targets > CXL_DECODER_MAX_INTERLEAVE)
+ if (nr_targets < 1 || nr_targets > CXL_DECODER_MAX_INTERLEAVE)
return -EINVAL;
cxlsd->nr_targets = nr_targets;
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
index b7933a892af72..561359c2d7dc0 100644
--- a/drivers/cxl/cxl.h
+++ b/drivers/cxl/cxl.h
@@ -66,6 +66,8 @@ extern const struct nvdimm_security_ops *cxl_security_ops;
#define CXL_HDM_DECODER0_CTRL_HOSTONLY BIT(12)
#define CXL_HDM_DECODER0_TL_LOW(i) (0x20 * (i) + 0x24)
#define CXL_HDM_DECODER0_TL_HIGH(i) (0x20 * (i) + 0x28)
+/* Target list capacity, i.e. max interleave ways for a non-endpoint decoder */
+#define CXL_HDM_DECODER0_TL_TARGETS 8
#define CXL_HDM_DECODER0_SKIP_LOW(i) CXL_HDM_DECODER0_TL_LOW(i)
#define CXL_HDM_DECODER0_SKIP_HIGH(i) CXL_HDM_DECODER0_TL_HIGH(i)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0468/2151] cxl/hdm: Make switch decoder target parsing endian-safe
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (466 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0467/2151] cxl/hdm: Reject switch decoder interleave ways that overflow targets Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0469/2151] cxl/hdm: Restore commit_end when decoder enumeration fails Greg Kroah-Hartman
` (414 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alison Schofield, Li Ming,
Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alison Schofield <alison.schofield@intel.com>
[ Upstream commit 3f846646b3d3b5699139e686e1107d231a725860 ]
Switch decoder target IDs are stored one per byte, starting with
target 0 in the least significant byte. The current code accesses
those bytes in memory order, which only matches register order on
little-endian hosts.
On big-endian hosts, the target IDs are reversed and the decoder is
associated with the wrong downstream ports.
Place the register values in a byte array in little-endian order and
index the target IDs from there, so the target mapping is independent
of host endianness.
Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core")
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Link: https://patch.msgid.link/b0526825b3c3ffdb78837563e178d9aa27b6bbb8.1786143520.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/hdm.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index f49e3139c8281..16cf4f116a97b 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
#include <linux/seq_file.h>
+#include <linux/unaligned.h>
#include <linux/device.h>
#include <linux/delay.h>
@@ -972,15 +973,12 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
u64 *dpa_base, struct cxl_endpoint_dvsec_info *info)
{
struct cxl_endpoint_decoder *cxled = NULL;
+ u8 target_id[CXL_HDM_DECODER0_TL_TARGETS];
u64 size, base, skip, dpa_size, lo, hi;
bool committed;
u32 remainder;
int i, rc;
u32 ctrl;
- union {
- u64 value;
- unsigned char target_id[8];
- } target_list;
if (should_emulate_decoders(info))
return cxl_setup_hdm_decoder_from_dvsec(port, cxld, dpa_base,
@@ -1093,11 +1091,12 @@ static int init_hdm_decoder(struct cxl_port *port, struct cxl_decoder *cxld,
return -ENXIO;
}
- lo = readl(hdm + CXL_HDM_DECODER0_TL_LOW(which));
- hi = readl(hdm + CXL_HDM_DECODER0_TL_HIGH(which));
- target_list.value = (hi << 32) + lo;
+ put_unaligned_le32(readl(hdm + CXL_HDM_DECODER0_TL_LOW(which)),
+ &target_id[0]);
+ put_unaligned_le32(readl(hdm + CXL_HDM_DECODER0_TL_HIGH(which)),
+ &target_id[4]);
for (i = 0; i < cxld->interleave_ways; i++)
- cxld->target_map[i] = target_list.target_id[i];
+ cxld->target_map[i] = target_id[i];
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0469/2151] cxl/hdm: Restore commit_end when decoder enumeration fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (467 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0468/2151] cxl/hdm: Make switch decoder target parsing endian-safe Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0470/2151] cxl/port: Bound switch decoder target array access by nr_targets Greg Kroah-Hartman
` (413 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jonathan Cameron, Dave Jiang,
Li Ming, Richard Cheng, Alison Schofield, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alison Schofield <alison.schofield@intel.com>
[ Upstream commit 7dae18c39e99813461db6ef3fc13f077452109ce ]
commit_end tracks the highest committed decoder on a port. It gets
advanced before decoder enumeration is complete, so a later failure
leaves it pointing at a decoder that was never added. The next probe
then rejects decoder0 as out of order and enumeration fails.
Reset commit_end to the uncommitted baseline once the decoders are
torn down, so a subsequent probe rebuilds it from scratch. Register
the reset before the decoders are added so that on unwind it runs
after every decoder has been unregistered. This prevents commit_end
from dropping below the highest committed decoder still registered and
exposing an inconsistent value to a concurrent reader.
Protect the commit_end advance in the DVSEC emulation path against
concurrent readers, matching the register-programmed path.
Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware")
Fixes: b777e9bec960 ("cxl/hdm: Emulate HDM decoder from DVSEC range registers")
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/4802c5abc906b858a4754bfc4fa3e4c2c455d0c3.1786143520.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/hdm.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index 16cf4f116a97b..c43b14533ffe0 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -953,7 +953,8 @@ static int cxl_setup_hdm_decoder_from_dvsec(
* change the range registers at run time.
*/
cxld->flags |= CXL_DECODER_F_ENABLE | CXL_DECODER_F_LOCK;
- port->commit_end = cxld->id;
+ scoped_guard(rwsem_write, &cxl_rwsem.region)
+ port->commit_end = cxld->id;
rc = devm_cxl_dpa_reserve(cxled, *dpa_base, len, 0);
if (rc) {
@@ -1156,6 +1157,14 @@ static void cxl_settle_decoders(struct cxl_hdm *cxlhdm)
msleep(20);
}
+static void cxl_reset_commit_end(void *data)
+{
+ struct cxl_port *port = data;
+
+ guard(rwsem_write)(&cxl_rwsem.region);
+ port->commit_end = -1;
+}
+
/**
* devm_cxl_enumerate_decoders - add decoder objects per HDM register set
* @cxlhdm: Structure to populate with HDM capabilities
@@ -1166,8 +1175,8 @@ static int devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
{
void __iomem *hdm = cxlhdm->regs.hdm_decoder;
struct cxl_port *port = cxlhdm->port;
- int i;
u64 dpa_base = 0;
+ int i, rc;
/*
* Per CXL 4.0 8.2.4.20.1 Target Count is the number of target ports
@@ -1183,8 +1192,16 @@ static int devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
cxl_settle_decoders(cxlhdm);
+ /*
+ * Reset commit_end after all decoders have been torn down so a
+ * subsequent probe rebuilds it from scratch.
+ */
+ rc = devm_add_action(&port->dev, cxl_reset_commit_end, port);
+ if (rc)
+ return rc;
+
for (i = 0; i < cxlhdm->decoder_count; i++) {
- int rc, target_count = cxlhdm->target_count;
+ int target_count = cxlhdm->target_count;
struct cxl_decoder *cxld;
if (is_cxl_endpoint(port)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0470/2151] cxl/port: Bound switch decoder target array access by nr_targets
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (468 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0469/2151] cxl/hdm: Restore commit_end when decoder enumeration fails Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0471/2151] pinctrl: stm32: Drop the nonexistent CONFIG_MACH_STM32MP25 from the STM32MP257 default Greg Kroah-Hartman
` (412 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alison Schofield, Li Ming,
Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alison Schofield <alison.schofield@intel.com>
[ Upstream commit 4e42c398af136d62fac8c19c9f410ec83a8dd34a ]
Switch decoder target lookups walk the target array using interleave
ways as the bound. The array is allocated with nr_targets entries, so a
decoder whose interleave ways exceeds nr_targets reads and writes past
the end of it. That happens during dport activation, during decoder
target population, and when userspace reads the target_list attribute.
Bounding by nr_targets alone is not correct either. Commit d6488fee6647
("cxl/port: Fix decoder initialization when nr_targets > interleave_ways")
moved target population to interleave ways precisely so that targets a
decoder does not use are left unpopulated. Neither field alone is a safe
bound, so add a helper that returns the minimum of the two and use it at
every walk of the target array.
Valid configurations keep interleave ways within nr_targets, so this is
not a behavior change for them.
Fixes: 40ba17afdfab ("cxl/acpi: Introduce cxl_decoder objects")
Fixes: d6488fee6647 ("cxl/port: Fix decoder initialization when nr_targets > interleave_ways")
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Link: https://patch.msgid.link/d7577652cc6d414e1de0ee4045d4d6b2808172ce.1786143520.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 67dfebe123ca4..2416a72e38ac0 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -147,20 +147,29 @@ static ssize_t target_type_show(struct device *dev,
}
static DEVICE_ATTR_RO(target_type);
+/*
+ * Interleave ways selects how many targets a decoder uses, but the target
+ * array is only nr_targets long. Bound array access by both.
+ */
+static int cxlsd_nr_used_targets(struct cxl_switch_decoder *cxlsd)
+{
+ return min(cxlsd->cxld.interleave_ways, cxlsd->nr_targets);
+}
+
static ssize_t emit_target_list(struct cxl_switch_decoder *cxlsd, char *buf)
{
- struct cxl_decoder *cxld = &cxlsd->cxld;
+ int nr_used = cxlsd_nr_used_targets(cxlsd);
ssize_t offset = 0;
int i, rc = 0;
- for (i = 0; i < cxld->interleave_ways; i++) {
+ for (i = 0; i < nr_used; i++) {
struct cxl_dport *dport = cxlsd->target[i];
struct cxl_dport *next = NULL;
if (!dport)
break;
- if (i + 1 < cxld->interleave_ways)
+ if (i + 1 < nr_used)
next = cxlsd->target[i + 1];
rc = sysfs_emit_at(buf, offset, "%d%s", dport->port_id,
next ? "," : "");
@@ -1602,7 +1611,7 @@ static int update_decoder_targets(struct device *dev, void *data)
struct cxl_dport *dport = data;
struct cxl_switch_decoder *cxlsd;
struct cxl_decoder *cxld;
- int i;
+ int i, nr_used;
if (!is_switch_decoder(dev))
return 0;
@@ -1610,8 +1619,9 @@ static int update_decoder_targets(struct device *dev, void *data)
cxlsd = to_cxl_switch_decoder(dev);
cxld = &cxlsd->cxld;
guard(rwsem_write)(&cxl_rwsem.region);
+ nr_used = cxlsd_nr_used_targets(cxlsd);
- for (i = 0; i < cxld->interleave_ways; i++) {
+ for (i = 0; i < nr_used; i++) {
if (cxld->target_map[i] == dport->port_id) {
cxlsd->target[i] = dport;
dev_dbg(dev, "dport%d found in target list, index %d\n",
@@ -1914,7 +1924,7 @@ static int decoder_populate_targets(struct cxl_switch_decoder *cxlsd,
struct cxl_port *port)
{
struct cxl_decoder *cxld = &cxlsd->cxld;
- int i;
+ int i, nr_used;
device_lock_assert(&port->dev);
@@ -1922,7 +1932,8 @@ static int decoder_populate_targets(struct cxl_switch_decoder *cxlsd,
return 0;
guard(rwsem_write)(&cxl_rwsem.region);
- for (i = 0; i < cxlsd->cxld.interleave_ways; i++) {
+ nr_used = cxlsd_nr_used_targets(cxlsd);
+ for (i = 0; i < nr_used; i++) {
struct cxl_dport *dport = find_dport(port, cxld->target_map[i]);
if (!dport) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0471/2151] pinctrl: stm32: Drop the nonexistent CONFIG_MACH_STM32MP25 from the STM32MP257 default
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (469 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0470/2151] cxl/port: Bound switch decoder target array access by nr_targets Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0472/2151] ASoC: codecs: rt1015: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
` (411 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Antonio Borneo,
Linus Walleij, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 01f20711d044f35a7a89ceec33df30e097147e8a ]
Commit 619f8ca4a73d ("pinctrl: stm32: add stm32mp257 pinctrl support")
made CONFIG_PINCTRL_STM32MP257 default to MACH_STM32MP25, following the
MACH_* pattern of the arm32 entries above it, but no Kconfig symbol of
that name exists and git log -S finds no Kconfig file that ever defined
one: the STM32MP25 family is arm64 only, where CONFIG_ARCH_STM32 covers
it. Commit dba0aff2b89b ("pinctrl: stm32: Allow compile as module for
stm32mp257") added "|| (ARCH_STM32 && ARM64)" next to it, so the first
half now evaluates to n and changes no configuration.
Drop the first half.
Fixes: 619f8ca4a73d ("pinctrl: stm32: add stm32mp257 pinctrl support")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Antonio Borneo <antonio.borneo@foss.st.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pinctrl/stm32/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/stm32/Kconfig b/drivers/pinctrl/stm32/Kconfig
index d6a1715230121..cc425bbfc996e 100644
--- a/drivers/pinctrl/stm32/Kconfig
+++ b/drivers/pinctrl/stm32/Kconfig
@@ -55,7 +55,7 @@ config PINCTRL_STM32MP157
config PINCTRL_STM32MP257
tristate "STMicroelectronics STM32MP257 pin control"
depends on OF && HAS_IOMEM
- default MACH_STM32MP25 || (ARCH_STM32 && ARM64)
+ default ARCH_STM32 && ARM64
select PINCTRL_STM32
config PINCTRL_STM32_HDP
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0472/2151] ASoC: codecs: rt1015: convert to snd_soc_dapm_xxx()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (470 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0471/2151] pinctrl: stm32: Drop the nonexistent CONFIG_MACH_STM32MP25 from the STM32MP257 default Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0473/2151] ASoC: rt1015: make control calibration failures observable Greg Kroah-Hartman
` (410 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kuninori Morimoto, Charles Keepax,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit 8b1c56ae39d3bf304ab0c8de456e8f02081be9ed ]
This patch converts below functions.
dapm->dev -> snd_soc_dapm_to_dev()
dapm->card -> snd_soc_dapm_to_card()
dapm->component -> snd_soc_dapm_to_component()
dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value()
snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()
snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87bjl94drz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 98fe8aab04ce ("ASoC: rt1015: make control calibration failures observable")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1015.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index 818b45226b728..bd0b1d3c829dd 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -494,9 +494,10 @@ static int rt1015_bypass_boost_get(struct snd_kcontrol *kcontrol,
static void rt1015_calibrate(struct rt1015_priv *rt1015)
{
struct snd_soc_component *component = rt1015->component;
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct regmap *regmap = rt1015->regmap;
- snd_soc_dapm_mutex_lock(&component->dapm);
+ snd_soc_dapm_mutex_lock(dapm);
regcache_cache_bypass(regmap, true);
regmap_write(regmap, RT1015_CLK_DET, 0x0000);
@@ -518,7 +519,7 @@ static void rt1015_calibrate(struct rt1015_priv *rt1015)
regcache_cache_bypass(regmap, false);
regcache_mark_dirty(regmap);
regcache_sync(regmap);
- snd_soc_dapm_mutex_unlock(&component->dapm);
+ snd_soc_dapm_mutex_unlock(dapm);
}
static int rt1015_bypass_boost_put(struct snd_kcontrol *kcontrol,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0473/2151] ASoC: rt1015: make control calibration failures observable
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (471 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0472/2151] ASoC: codecs: rt1015: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0474/2151] ASoC: SOF: imx: Prevent stack OOB read in DSP panic dump Greg Kroah-Hartman
` (409 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 98fe8aab04cec6fcadeb10a757235225d550be36 ]
The bypass-boost control runs a hardware calibration while bypassing the
register cache. It ignores every register access and cache restore
failure, then publishes both the requested mode and calibration
completion.
Return failures from the complete calibration sequence, always restore
normal cache operation and unlock DAPM, and only publish the control
state after the calibration and final mode write both succeed. The mixer
control callback is an effective error consumer, independent of deferred
component resume.
Fixes: da145172b236 ("ASoC: rt1015: Fix DC calibration on bypass boost mode")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260830142118.36668-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1015.c | 81 +++++++++++++++++++++++++++++++--------
1 file changed, 65 insertions(+), 16 deletions(-)
diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index bd0b1d3c829dd..5b120cfa87642 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -491,35 +491,72 @@ static int rt1015_bypass_boost_get(struct snd_kcontrol *kcontrol,
return 0;
}
-static void rt1015_calibrate(struct rt1015_priv *rt1015)
+static int rt1015_calibrate(struct rt1015_priv *rt1015)
{
struct snd_soc_component *component = rt1015->component;
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct regmap *regmap = rt1015->regmap;
+ int ret, sync_ret;
snd_soc_dapm_mutex_lock(dapm);
regcache_cache_bypass(regmap, true);
- regmap_write(regmap, RT1015_CLK_DET, 0x0000);
- regmap_write(regmap, RT1015_PWR4, 0x00B2);
- regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x0009);
+ ret = regmap_write(regmap, RT1015_CLK_DET, 0x0000);
+ if (ret)
+ goto restore_cache;
+
+ ret = regmap_write(regmap, RT1015_PWR4, 0x00B2);
+ if (ret)
+ goto restore_cache;
+
+ ret = regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x0009);
+ if (ret)
+ goto restore_cache;
+
msleep(100);
- regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x000A);
+ ret = regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x000A);
+ if (ret)
+ goto restore_cache;
+
msleep(100);
- regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x000C);
+ ret = regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x000C);
+ if (ret)
+ goto restore_cache;
+
msleep(100);
- regmap_write(regmap, RT1015_CLSD_INTERNAL8, 0x2028);
- regmap_write(regmap, RT1015_CLSD_INTERNAL9, 0x0140);
- regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x000D);
+ ret = regmap_write(regmap, RT1015_CLSD_INTERNAL8, 0x2028);
+ if (ret)
+ goto restore_cache;
+
+ ret = regmap_write(regmap, RT1015_CLSD_INTERNAL9, 0x0140);
+ if (ret)
+ goto restore_cache;
+
+ ret = regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x000D);
+ if (ret)
+ goto restore_cache;
+
msleep(300);
- regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x0008);
- regmap_write(regmap, RT1015_SYS_RST1, 0x05F5);
- regmap_write(regmap, RT1015_CLK_DET, 0x8000);
+ ret = regmap_write(regmap, RT1015_PWR_STATE_CTRL, 0x0008);
+ if (ret)
+ goto restore_cache;
+
+ ret = regmap_write(regmap, RT1015_SYS_RST1, 0x05F5);
+ if (ret)
+ goto restore_cache;
+
+ ret = regmap_write(regmap, RT1015_CLK_DET, 0x8000);
+
+restore_cache:
regcache_cache_bypass(regmap, false);
regcache_mark_dirty(regmap);
- regcache_sync(regmap);
+ sync_ret = regcache_sync(regmap);
+ if (!ret)
+ ret = sync_ret;
snd_soc_dapm_mutex_unlock(dapm);
+
+ return ret;
}
static int rt1015_bypass_boost_put(struct snd_kcontrol *kcontrol,
@@ -529,6 +566,8 @@ static int rt1015_bypass_boost_put(struct snd_kcontrol *kcontrol,
snd_soc_kcontrol_component(kcontrol);
struct rt1015_priv *rt1015 =
snd_soc_component_get_drvdata(component);
+ int bypass_boost = rt1015->bypass_boost;
+ int ret;
if (rt1015->dac_is_used) {
dev_err(component->dev, "DAC is being used!\n");
@@ -538,13 +577,23 @@ static int rt1015_bypass_boost_put(struct snd_kcontrol *kcontrol,
rt1015->bypass_boost = ucontrol->value.integer.value[0];
if (rt1015->bypass_boost == RT1015_Bypass_Boost &&
!rt1015->cali_done) {
- rt1015_calibrate(rt1015);
- rt1015->cali_done = 1;
+ ret = rt1015_calibrate(rt1015);
+ if (ret)
+ goto restore_boost;
+
+ ret = regmap_write(rt1015->regmap, RT1015_MONO_DYNA_CTRL,
+ 0x0010);
+ if (ret)
+ goto restore_boost;
- regmap_write(rt1015->regmap, RT1015_MONO_DYNA_CTRL, 0x0010);
+ rt1015->cali_done = 1;
}
return 0;
+
+restore_boost:
+ rt1015->bypass_boost = bypass_boost;
+ return ret;
}
static const char * const rt1015_dac_output_vol_select[] = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0474/2151] ASoC: SOF: imx: Prevent stack OOB read in DSP panic dump
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (472 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0473/2151] ASoC: rt1015: make control calibration failures observable Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0475/2151] scsi: pm8001: Fix SATA FIS offset in struct hw_event_resp Greg Kroah-Hartman
` (408 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ștefan Ghețu, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ștefan Ghețu <stefanghetu9@gmail.com>
[ Upstream commit 48ed992bfbe53537ad1cbc8ad68f7031e7ac0af3 ]
Commit 58bb5081cba1 ("ASoC: SOF: Xtensa: dump ar registers to restore
call stack") added a shared Xtensa helper that iterates over a flexible
array of AR registers (`ar[]`) controlled by `plat_hdr.numaregs`.
While Intel IPC4 allocates dynamic storage for the AR block, the i.MX
IPC3 path reads the oops message into a stack-allocated struct without
backing storage for `ar[]`, while leaving `numaregs` unvalidated. This
causes a stack out-of-bounds read when printing a DSP panic.
Clear `numaregs` to 0 on i.MX since the AR block is not fetched or
supported on this platform, preventing unsafe out-of-bounds memory
accesses in the shared Xtensa helper.
Fixes: 58bb5081cba1 ("ASoC: SOF: Xtensa: dump ar registers to restore call stack")
Signed-off-by: Ștefan Ghețu <stefanghetu9@gmail.com>
Link: https://patch.msgid.link/20260908170740.276800-1-stefanghetu9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/imx/imx-common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c
index e787d3932fbbf..1f506e606b012 100644
--- a/sound/soc/sof/imx/imx-common.c
+++ b/sound/soc/sof/imx/imx-common.c
@@ -34,6 +34,7 @@ void imx8_get_registers(struct snd_sof_dev *sdev,
/* first read registers */
sof_mailbox_read(sdev, offset, xoops, sizeof(*xoops));
+ xoops->plat_hdr.numaregs = 0;
/* then get panic info */
if (xoops->arch_hdr.totalsize > EXCEPT_MAX_HDR_SIZE) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0475/2151] scsi: pm8001: Fix SATA FIS offset in struct hw_event_resp
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (473 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0474/2151] ASoC: SOF: imx: Prevent stack OOB read in DSP panic dump Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0476/2151] staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers Greg Kroah-Hartman
` (407 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bart Van Assche,
Martin K. Petersen (Oracle), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <bvanassche@acm.org>
[ Upstream commit cdc97921de02a0c1a8324afa03e8b3e30a72bbe6 ]
In struct hw_event_resp, sas_identify was defined using struct
sas_identify_frame, which is 32 bytes long because it includes a 4-byte CRC
field. However, PM8001 and PM80xx hardware does not send the CRC in the
event response frame, providing only the 28-byte identify payload.
Because sas_identify had a size of 32 bytes, the following sata_fis member
was located at byte offset 44 instead of the actual hardware offset 40. In
hw_event_sata_phy_up(), this discrepancy was worked around with negative
pointer arithmetic: ((u8 *)&pPayload->sata_fis - 4). This triggers a
compiler error under Clang with -Wstringop-overread:
error: 'memcpy' reading 20 bytes from a region of size 0
[-Werror,-Wstringop-overread]
memcpy(phy->frame_rcvd, ((u8 *)&pPayload->sata_fis - 4),
Move struct sas_identify_frame_local (28 bytes) into pm8001_defs.h, and
update struct hw_event_resp in both pm8001_hwi.h and pm80xx_hwi.h to use
struct sas_identify_frame_local followed by sata_fis and a 4-byte padding
word. This correctly aligns sata_fis at byte offset 40 while maintaining
the 64-byte total payload size.
Update hw_event_sata_phy_up() in pm8001_hwi.c and pm80xx_hwi.c to copy
directly from &pPayload->sata_fis.
Compile-tested only. Both the patch and its description have been generated
by Gemini.
Fixes: dbf9bfe61571 ("[SCSI] pm8001: add SAS/SATA HBA driver")
Fixes: f5860992db55 ("[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/31963d53810f42970447e78ef46030ab13d2e91f.1788198434.git.bvanassche@acm.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/pm8001/pm8001_defs.h | 98 +++++++++++++++++++++++++++++
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
drivers/scsi/pm8001/pm8001_hwi.h | 4 +-
drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
drivers/scsi/pm8001/pm80xx_hwi.h | 100 +-----------------------------
5 files changed, 106 insertions(+), 100 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_defs.h b/drivers/scsi/pm8001/pm8001_defs.h
index 4e19d61dffbbb..a9605ca317f34 100644
--- a/drivers/scsi/pm8001/pm8001_defs.h
+++ b/drivers/scsi/pm8001/pm8001_defs.h
@@ -41,6 +41,104 @@
#ifndef _PM8001_DEFS_H_
#define _PM8001_DEFS_H_
+#include <scsi/sas.h>
+
+#ifdef __LITTLE_ENDIAN_BITFIELD
+struct sas_identify_frame_local {
+ /* Byte 0 */
+ u8 frame_type:4;
+ u8 dev_type:3;
+ u8 _un0:1;
+
+ /* Byte 1 */
+ u8 _un1;
+
+ /* Byte 2 */
+ union {
+ struct {
+ u8 _un20:1;
+ u8 smp_iport:1;
+ u8 stp_iport:1;
+ u8 ssp_iport:1;
+ u8 _un247:4;
+ };
+ u8 initiator_bits;
+ };
+
+ /* Byte 3 */
+ union {
+ struct {
+ u8 _un30:1;
+ u8 smp_tport:1;
+ u8 stp_tport:1;
+ u8 ssp_tport:1;
+ u8 _un347:4;
+ };
+ u8 target_bits;
+ };
+
+ /* Byte 4 - 11 */
+ u8 _un4_11[8];
+
+ /* Byte 12 - 19 */
+ u8 sas_addr[SAS_ADDR_SIZE];
+
+ /* Byte 20 */
+ u8 phy_id;
+
+ u8 _un21_27[7];
+
+} __packed;
+
+#elif defined(__BIG_ENDIAN_BITFIELD)
+struct sas_identify_frame_local {
+ /* Byte 0 */
+ u8 _un0:1;
+ u8 dev_type:3;
+ u8 frame_type:4;
+
+ /* Byte 1 */
+ u8 _un1;
+
+ /* Byte 2 */
+ union {
+ struct {
+ u8 _un247:4;
+ u8 ssp_iport:1;
+ u8 stp_iport:1;
+ u8 smp_iport:1;
+ u8 _un20:1;
+ };
+ u8 initiator_bits;
+ };
+
+ /* Byte 3 */
+ union {
+ struct {
+ u8 _un347:4;
+ u8 ssp_tport:1;
+ u8 stp_tport:1;
+ u8 smp_tport:1;
+ u8 _un30:1;
+ };
+ u8 target_bits;
+ };
+
+ /* Byte 4 - 11 */
+ u8 _un4_11[8];
+
+ /* Byte 12 - 19 */
+ u8 sas_addr[SAS_ADDR_SIZE];
+
+ /* Byte 20 */
+ u8 phy_id;
+
+ u8 _un21_27[7];
+} __packed;
+#else
+#error "Bitfield order not defined!"
+#endif
+
enum chip_flavors {
chip_8001,
chip_8008,
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 8005995a317c1..506c60a04954a 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -3208,7 +3208,7 @@ hw_event_sata_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb)
phy->sas_phy.oob_mode = SATA_OOB_MODE;
sas_notify_phy_event(&phy->sas_phy, PHYE_OOB_DONE, GFP_ATOMIC);
spin_lock_irqsave(&phy->sas_phy.frame_rcvd_lock, flags);
- memcpy(phy->frame_rcvd, ((u8 *)&pPayload->sata_fis - 4),
+ memcpy(phy->frame_rcvd, &pPayload->sata_fis,
sizeof(struct dev_to_host_fis));
phy->frame_rcvd_size = sizeof(struct dev_to_host_fis);
phy->identify.target_port_protocols = SAS_PROTOCOL_SATA;
diff --git a/drivers/scsi/pm8001/pm8001_hwi.h b/drivers/scsi/pm8001/pm8001_hwi.h
index f1ce8df082b0c..a21b1b37a8ea5 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.h
+++ b/drivers/scsi/pm8001/pm8001_hwi.h
@@ -42,6 +42,7 @@
#include <linux/types.h>
#include <scsi/libsas.h>
+#include "pm8001_defs.h"
/* for Request Opcode of IOMB */
@@ -229,8 +230,9 @@ struct hw_event_resp {
__le32 lr_evt_status_phyid_portid;
__le32 evt_param;
__le32 npip_portstate;
- struct sas_identify_frame sas_identify;
+ struct sas_identify_frame_local sas_identify;
struct dev_to_host_fis sata_fis;
+ u32 _r_a;
} __attribute__((packed, aligned(4)));
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 1ce8226fcd292..ecbf3c32e948d 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -3296,7 +3296,7 @@ hw_event_sata_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb)
phy->sas_phy.oob_mode = SATA_OOB_MODE;
sas_notify_phy_event(&phy->sas_phy, PHYE_OOB_DONE, GFP_ATOMIC);
spin_lock_irqsave(&phy->sas_phy.frame_rcvd_lock, flags);
- memcpy(phy->frame_rcvd, ((u8 *)&pPayload->sata_fis - 4),
+ memcpy(phy->frame_rcvd, &pPayload->sata_fis,
sizeof(struct dev_to_host_fis));
phy->frame_rcvd_size = sizeof(struct dev_to_host_fis);
phy->identify.target_port_protocols = SAS_PROTOCOL_SATA;
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h
index d8a63b7fed6a0..d6796ba40df96 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.h
+++ b/drivers/scsi/pm8001/pm80xx_hwi.h
@@ -43,6 +43,7 @@
#include <linux/types.h>
#include <scsi/libsas.h>
+#include "pm8001_defs.h"
/* for Request Opcode of IOMB */
#define OPC_INB_ECHO 1 /* 0x000 */
@@ -236,102 +237,6 @@
/* Port recovery timeout, 10000 ms for PM8006 controller */
#define CHIP_8006_PORT_RECOVERY_TIMEOUT 0x640000
-#ifdef __LITTLE_ENDIAN_BITFIELD
-struct sas_identify_frame_local {
- /* Byte 0 */
- u8 frame_type:4;
- u8 dev_type:3;
- u8 _un0:1;
-
- /* Byte 1 */
- u8 _un1;
-
- /* Byte 2 */
- union {
- struct {
- u8 _un20:1;
- u8 smp_iport:1;
- u8 stp_iport:1;
- u8 ssp_iport:1;
- u8 _un247:4;
- };
- u8 initiator_bits;
- };
-
- /* Byte 3 */
- union {
- struct {
- u8 _un30:1;
- u8 smp_tport:1;
- u8 stp_tport:1;
- u8 ssp_tport:1;
- u8 _un347:4;
- };
- u8 target_bits;
- };
-
- /* Byte 4 - 11 */
- u8 _un4_11[8];
-
- /* Byte 12 - 19 */
- u8 sas_addr[SAS_ADDR_SIZE];
-
- /* Byte 20 */
- u8 phy_id;
-
- u8 _un21_27[7];
-
-} __packed;
-
-#elif defined(__BIG_ENDIAN_BITFIELD)
-struct sas_identify_frame_local {
- /* Byte 0 */
- u8 _un0:1;
- u8 dev_type:3;
- u8 frame_type:4;
-
- /* Byte 1 */
- u8 _un1;
-
- /* Byte 2 */
- union {
- struct {
- u8 _un247:4;
- u8 ssp_iport:1;
- u8 stp_iport:1;
- u8 smp_iport:1;
- u8 _un20:1;
- };
- u8 initiator_bits;
- };
-
- /* Byte 3 */
- union {
- struct {
- u8 _un347:4;
- u8 ssp_tport:1;
- u8 stp_tport:1;
- u8 smp_tport:1;
- u8 _un30:1;
- };
- u8 target_bits;
- };
-
- /* Byte 4 - 11 */
- u8 _un4_11[8];
-
- /* Byte 12 - 19 */
- u8 sas_addr[SAS_ADDR_SIZE];
-
- /* Byte 20 */
- u8 phy_id;
-
- u8 _un21_27[7];
-} __packed;
-#else
-#error "Bitfield order not defined!"
-#endif
-
struct mpi_msg_hdr {
__le32 header; /* Bits [11:0] - Message operation code */
/* Bits [15:12] - Message Category */
@@ -427,8 +332,9 @@ struct hw_event_resp {
__le32 lr_status_evt_portid;
__le32 evt_param;
__le32 phyid_npip_portstate;
- struct sas_identify_frame sas_identify;
+ struct sas_identify_frame_local sas_identify;
struct dev_to_host_fis sata_fis;
+ u32 _r_a;
} __attribute__((packed, aligned(4)));
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0476/2151] staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (474 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0475/2151] scsi: pm8001: Fix SATA FIS offset in struct hw_event_resp Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0477/2151] selftests/bpf: Wait for links to come up in lwt_ip_encap Greg Kroah-Hartman
` (406 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abdelnasser Hussein, Joshua Crofts,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
[ Upstream commit 69fa76f0af3414cc189c3b0b807cb59e327ecc00 ]
The SPI operations in this driver are not DMA safe:
1. spi_read() uses a stack-allocated buffer.
2. spi_write() in ad7816_spi_read() uses a struct member that shares a
cacheline with other variables.
3. spi_write() in ad7816_spi_write() passes a stack parameter by
reference.
Fix these violations by replacing all spi_read() and spi_write() calls
with spi_write_then_read(). This safely handles DMA by internally
allocating a bounce buffer for the transfers, avoiding cacheline
sharing issues without needing dedicated aligned buffers.
This implicitly corrects the size argument in read to sizeof(buf).
Fixes: 7924425db04a ("staging: iio: adc: new driver for AD7816 devices")
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/iio/adc/ad7816.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index 172acf135f3bd..070621cb4fde5 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -69,7 +69,7 @@ static int ad7816_spi_read(struct ad7816_chip_info *chip, u16 *data)
gpiod_set_value(chip->rdwr_pin, 1);
gpiod_set_value(chip->rdwr_pin, 0);
- ret = spi_write(spi_dev, &chip->channel_id, sizeof(chip->channel_id));
+ ret = spi_write_then_read(spi_dev, &chip->channel_id, sizeof(chip->channel_id), NULL, 0);
if (ret < 0) {
dev_err(&spi_dev->dev, "SPI channel setting error\n");
return ret;
@@ -91,7 +91,7 @@ static int ad7816_spi_read(struct ad7816_chip_info *chip, u16 *data)
gpiod_set_value(chip->rdwr_pin, 0);
gpiod_set_value(chip->rdwr_pin, 1);
- ret = spi_read(spi_dev, &buf, sizeof(*data));
+ ret = spi_write_then_read(spi_dev, NULL, 0, &buf, sizeof(buf));
if (ret < 0) {
dev_err(&spi_dev->dev, "SPI data read error\n");
return ret;
@@ -109,7 +109,7 @@ static int ad7816_spi_write(struct ad7816_chip_info *chip, u8 data)
gpiod_set_value(chip->rdwr_pin, 1);
gpiod_set_value(chip->rdwr_pin, 0);
- ret = spi_write(spi_dev, &data, sizeof(data));
+ ret = spi_write_then_read(spi_dev, &data, sizeof(data), NULL, 0);
if (ret < 0)
dev_err(&spi_dev->dev, "SPI oti data write error\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0477/2151] selftests/bpf: Wait for links to come up in lwt_ip_encap
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (475 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0476/2151] staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0478/2151] md/raid10: fix missing wakeup in wait_barrier_nolock Greg Kroah-Hartman
` (405 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexei Starovoitov, Emil Tsalapatis,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexei Starovoitov <ast@kernel.org>
[ Upstream commit 71b75648d1a21c0a6379741d00f41086ec95f14a ]
lwt_ip_encap creates three fresh netns with veth pairs across them and
then immediately pings over IPv6. The peer ends of the first veth pair
end up with the same ifindex in their respective netns, so linkwatch
does not treat the carrier-on as urgent and may deliver NETDEV_CHANGE up
to one second later. Until that happens addrconf considers the link not
ready: no ff00::/8 multicast route and no link-local address are
installed, and the neighbour solicitation for the next hop is dropped
as a no-route packet. The NS retransmit a second later succeeds, but
ping -W1 has already given up:
check_ping_ok:FAIL:ip netns exec ns-lwt-ip-encap-1-... ping -6 -c 1 -W1 -I veth1 fb04::1 > /dev/null unexpected error: 256 (errno 2)
lwt_ip_encap:FAIL:ping OK unexpected error: -1 (errno 2)
#226/1 lwt_ip_encap_ipv4/egress:FAIL
This reproduces reliably when the test is run standalone on an idle
system where setup completes well within a second. The original shell
script had a "sleep 1 # reduce flakiness" after setup which was lost in
the conversion to test_progs.
Instead of sleeping, poll SIOCGIFFLAGS for IFF_RUNNING on all veths at
the end of setup_network() so traffic is only sent once every link is
operationally up.
Fixes: f5e288943e2c ("selftests/bpf: Move test_lwt_ip_encap to test_progs")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Link: https://patch.msgid.link/20260916232407.764886-1-alexei.starovoitov@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../selftests/bpf/prog_tests/lwt_ip_encap.c | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c b/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c
index 39e8a3b8b6afb..5c5560d45c5b4 100644
--- a/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c
+++ b/tools/testing/selftests/bpf/prog_tests/lwt_ip_encap.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
+#include <net/if.h>
#include <netinet/in.h>
+#include <sys/ioctl.h>
#include "network_helpers.h"
#include "test_progs.h"
@@ -141,6 +143,54 @@ static int set_bottom_addr(const char *ns1, const char *ns2, const char *ns3)
return 1;
}
+/*
+ * A veth whose peer sits in another netns with the same ifindex gets its
+ * carrier-on handled as a non-urgent linkwatch event, i.e. up to 1s late.
+ * Until then IPv6 considers the link not ready (no ff00::/8 route, no
+ * link-local address) and silently drops neighbour solicitations, so wait
+ * for all links to be operationally up (IFF_RUNNING) before sending traffic.
+ */
+static int wait_for_oper_up(const char *ns, const char *dev)
+{
+ struct nstoken *nstoken;
+ struct ifreq ifr = {};
+ int i, fd, ret = -1;
+
+ nstoken = open_netns(ns);
+ if (!ASSERT_OK_PTR(nstoken, "open ns"))
+ return -1;
+
+ fd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (!ASSERT_OK_FD(fd, "socket"))
+ goto out;
+
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ - 1);
+ for (i = 0; i < 50; i++) {
+ if (!ASSERT_OK(ioctl(fd, SIOCGIFFLAGS, &ifr), "SIOCGIFFLAGS"))
+ break;
+ if (ifr.ifr_flags & IFF_RUNNING) {
+ ret = 0;
+ break;
+ }
+ usleep(100000);
+ }
+ close(fd);
+out:
+ ASSERT_OK(ret, dev);
+ close_netns(nstoken);
+ return ret;
+}
+
+static int wait_for_links(const char *ns1, const char *ns2, const char *ns3)
+{
+ if (wait_for_oper_up(ns1, "veth1") || wait_for_oper_up(ns1, "veth5") ||
+ wait_for_oper_up(ns2, "veth2") || wait_for_oper_up(ns2, "veth3") ||
+ wait_for_oper_up(ns2, "veth6") || wait_for_oper_up(ns2, "veth7") ||
+ wait_for_oper_up(ns3, "veth4") || wait_for_oper_up(ns3, "veth8"))
+ return -1;
+ return 0;
+}
+
static int configure_vrf(const char *ns1, const char *ns2)
{
if (!ns1 || !ns2)
@@ -304,6 +354,9 @@ static int setup_network(char *ns1, char *ns2, char *ns3, const char *vrf)
if (!ASSERT_OK(configure_ns3(ns3), "configure ns3 routes"))
goto fail;
+ if (!ASSERT_OK(wait_for_links(ns1, ns2, ns3), "wait for links"))
+ goto fail;
+
/* Link bottom route to the GRE tunnels */
SYS(fail, "ip -n %s route add %s/32 dev veth5 via %s %s",
ns1, IP4_ADDR_GRE, IP4_ADDR_6, vrf);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0478/2151] md/raid10: fix missing wakeup in wait_barrier_nolock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (476 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0477/2151] selftests/bpf: Wait for links to come up in lwt_ip_encap Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0479/2151] md: reject v0.90 arrays with too many devices Greg Kroah-Hartman
` (404 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zizhi Wo, Abd-Alrhman Masalkhi,
Yu Kuai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zizhi Wo <wozizhi@huawei.com>
[ Upstream commit f00eb0ff45793383d5a62db2d2aea63ada0ccdbd ]
Fuzz testing triggered a hung raid10d thread:
INFO: task md0_raid10 blocked for more than 120 seconds.
Call Trace:
raid10d
md_thread
kthread
wait_barrier_nolock() speculatively increments nr_pending. If a
concurrent writer changes resync_lock's sequence, it rolls the count back
with atomic_dec_and_test(). The rollback currently wakes wait_barrier only
when nr_pending reaches zero.
freeze_array() can be waiting for nr_pending == nr_queued + extra while
array_freeze_pending is set. If the rollback changes nr_pending from 2 to
1, the condition becomes true but no wakeup is sent, leaving raid10d
blocked indefinitely.
Also wake wait_barrier when array_freeze_pending is set, matching
allow_barrier().
Fixes: b9b083f9044a ("md/raid10: convert resync_lock to use seqlock")
Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Reviewed-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Link: https://patch.msgid.link/20260817033340.418119-3-wozizhi@huawei.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid10.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 60c8b3414790d..18b5695345999 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -996,7 +996,8 @@ static bool wait_barrier_nolock(struct r10conf *conf)
if (!read_seqretry(&conf->resync_lock, seq))
return true;
- if (atomic_dec_and_test(&conf->nr_pending))
+ if (atomic_dec_and_test(&conf->nr_pending) ||
+ READ_ONCE(conf->array_freeze_pending))
wake_up_barrier(conf);
return false;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0479/2151] md: reject v0.90 arrays with too many devices
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (477 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0478/2151] md/raid10: fix missing wakeup in wait_barrier_nolock Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0480/2151] md/raid5: dont BUG() on an inconsistent reshape state from the superblock Greg Kroah-Hartman
` (403 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jérémy Jean, Yu Kuai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
[ Upstream commit 1a33a379e67853d6d778e6e80b214bdf1208f6f8 ]
The v0.90 superblock has room for MD_SB_DISKS device descriptors, but
super_90_load() only rejects nonpositive raid_disks values. A crafted
superblock can therefore copy a larger value into mddev->raid_disks. When
metadata is next updated, super_90_sync() walks sb->disks[] up to that
count and reads and writes beyond the 4 KiB superblock buffer.
A checksum-valid RAID1 member advertising 64 devices can be assembled by
mdadm --incremental --run. The first write to the array then produces
out-of-bounds writes from super_90_sync() under KASAN.
Reject device counts that cannot be represented by the v0.90 format while
loading the superblock.
Assisted-by: Codex:gpt-5
Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Link: https://patch.msgid.link/20260820210703.3035608-2-Jeremy.Jean@oss.cyber.gouv.fr
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/md.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 937a2f4da84ba..8b750af486b69 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1393,7 +1393,7 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor
goto abort;
}
- if (sb->raid_disks <= 0)
+ if (sb->raid_disks <= 0 || sb->raid_disks > MD_SB_DISKS)
goto abort;
if (md_csum_fold(calc_sb_csum(sb)) != md_csum_fold(sb->sb_csum)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0480/2151] md/raid5: dont BUG() on an inconsistent reshape state from the superblock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (478 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0479/2151] md: reject v0.90 arrays with too many devices Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0481/2151] md/raid5: reject raid4/5 arrays with too few disks Greg Kroah-Hartman
` (402 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+1f5a7de91d547763f4c8,
Yogesh Gaur, Yu Kuai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yogesh Gaur <yogeshgaur.83@gmail.com>
[ Upstream commit 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 ]
raid5_run() branches on mddev->reshape_position. When it is MaxSector --
no reshape in progress -- the else branch asserts that nothing else
describes one:
BUG_ON(mddev->level != mddev->new_level);
BUG_ON(mddev->layout != mddev->new_layout);
BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);
BUG_ON(mddev->delta_disks != 0);
Nothing enforces that invariant. Both superblock validators copy the
reshape fields straight off disk without cross-checking them against
each other: super_1_validate() takes reshape_position, delta_disks,
new_level, new_layout and new_chunk from the superblock whenever
MD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same
for minor version 91. A superblock that sets the reshape feature while
leaving reshape_position at the MaxSector sentinel therefore reaches the
else branch with a non-zero delta_disks, and assembling the array takes
the machine down:
kernel BUG at drivers/md/raid5.c:8117!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117
Call Trace:
md_run+0xc2f/0x2510 drivers/md/md.c:6779
do_md_run+0x36/0x660 drivers/md/md.c:6880
array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765
md_attr_store+0x1c5/0x330 drivers/md/md.c:6158
sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145
kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345
This is reachable by anyone who can present an md superblock, so BUG()
is the wrong response. Refuse to start the array instead, the way the
reshape_position != MaxSector branch a few lines above already refuses a
reshape it cannot resume. Nothing has been allocated at this point --
the journal-and-bitmap check just above returns -EINVAL the same way --
so there is nothing to unwind.
Reported-by: syzbot+1f5a7de91d547763f4c8@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1f5a7de91d547763f4c8
Fixes: 91adb56473fe ("md/raid5: refactor raid5 "run"")
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260910131103.988-1-yogeshgaur.83@gmail.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid5.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 6dfefbacfe3c0..8e4b5532c22f7 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -7955,11 +7955,17 @@ static int raid5_run(struct mddev *mddev)
}
pr_debug("md/raid:%s: reshape will continue\n", mdname(mddev));
/* OK, we should be able to continue; */
- } else {
- BUG_ON(mddev->level != mddev->new_level);
- BUG_ON(mddev->layout != mddev->new_layout);
- BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors);
- BUG_ON(mddev->delta_disks != 0);
+ } else if (mddev->level != mddev->new_level ||
+ mddev->layout != mddev->new_layout ||
+ mddev->chunk_sectors != mddev->new_chunk_sectors ||
+ mddev->delta_disks != 0) {
+ /* No reshape is in progress, but the array describes one.
+ * The superblock validators do not cross-check these against
+ * reshape_position, so this is reachable from disk.
+ */
+ pr_warn("md/raid:%s: inconsistent reshape state - aborting.\n",
+ mdname(mddev));
+ return -EINVAL;
}
if (test_bit(MD_HAS_JOURNAL, &mddev->flags) &&
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0481/2151] md/raid5: reject raid4/5 arrays with too few disks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (479 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0480/2151] md/raid5: dont BUG() on an inconsistent reshape state from the superblock Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0482/2151] md/raid5: setup_conf: Fix null-ptr-def in error handling path Greg Kroah-Hartman
` (401 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+de94ddbfff0c9e6fe030,
Chen Cheng, Yu Kuai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Cheng <chencheng@fnnas.com>
[ Upstream commit 0d9bbbb6fafa22659ccd4d7ab94329a43c2632d0 ]
raid4 and raid5 require at least two disks, while raid6 requires at least
four disks. setup_conf() only rejects raid6 arrays with fewer than four
disks. As a result, an invalid raid4 or raid5 array can be assembled with
no data disks and later reach raid5_set_limits().
Reject such arrays before the r5conf is created. This prevents the invalid
geometry from reaching queue limit setup, where roundup_pow_of_two() can be
called with a zero stripe size.
Reported-by: syzbot+de94ddbfff0c9e6fe030@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/6a778c82.01d0871a.3a0d52.006a.GAE@google.com/
Fixes: f63f17350e53 ("md/raid5: use the atomic queue limit update APIs")
Signed-off-by: Chen Cheng <chencheng@fnnas.com>
Link: https://patch.msgid.link/20260911041521.2433222-1-chencheng@fnnas.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid5.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 8e4b5532c22f7..6f71c0c3dfd74 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -7509,9 +7509,11 @@ static struct r5conf *setup_conf(struct mddev *mddev)
mdname(mddev), mddev->new_layout);
return ERR_PTR(-EIO);
}
- if (mddev->new_level == 6 && mddev->raid_disks < 4) {
- pr_warn("md/raid:%s: not enough configured devices (%d, minimum 4)\n",
- mdname(mddev), mddev->raid_disks);
+ if ((mddev->new_level != 6 && mddev->raid_disks < 2) ||
+ (mddev->new_level == 6 && mddev->raid_disks < 4)) {
+ pr_warn("md/raid:%s: not enough configured devices (%d, minimum %d)\n",
+ mdname(mddev), mddev->raid_disks,
+ mddev->new_level == 6 ? 4 : 2);
return ERR_PTR(-EINVAL);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0482/2151] md/raid5: setup_conf: Fix null-ptr-def in error handling path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (480 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0481/2151] md/raid5: reject raid4/5 arrays with too few disks Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0483/2151] md/raid5: reject a per-device size smaller than one chunk Greg Kroah-Hartman
` (400 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Zhihao Cheng, Yu Kuai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhihao Cheng <chengzhihao1@huawei.com>
[ Upstream commit eba5f518701b1c7f2d883504f89c41611bd2de46 ]
For raid5 setup_conf, if an error(eg. bioset_init fails) happens before
'conf->mddev = mddev', following error handling path could trigger a
null-ptr-def problem:
free_conf
log_exit
raid5_has_ppl
test_bit(MD_HAS_PPL, &conf->mddev->flags) // conf->mddev is NULL !
Fix it by initializing conf->mddev in advance.
Fixes: 3418d036c81d ("raid5-ppl: Partial Parity Log write logging implementation")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Link: https://patch.msgid.link/20260915081731.122933-1-chengzhihao1@huawei.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 6f71c0c3dfd74..42602ac28d903 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -7529,6 +7529,7 @@ static struct r5conf *setup_conf(struct mddev *mddev)
if (conf == NULL)
goto abort;
+ conf->mddev = mddev;
#if PAGE_SIZE != DEFAULT_STRIPE_SIZE
conf->stripe_size = DEFAULT_STRIPE_SIZE;
conf->stripe_shift = ilog2(DEFAULT_STRIPE_SIZE) - 9;
@@ -7602,7 +7603,6 @@ static struct r5conf *setup_conf(struct mddev *mddev)
ret = bioset_init(&conf->bio_split, BIO_POOL_SIZE, 0, 0);
if (ret)
goto abort;
- conf->mddev = mddev;
ret = -ENOMEM;
conf->stripe_hashtbl = kzalloc(PAGE_SIZE, GFP_KERNEL);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0483/2151] md/raid5: reject a per-device size smaller than one chunk
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (481 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0482/2151] md/raid5: setup_conf: Fix null-ptr-def in error handling path Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0484/2151] kernfs: dont hold kernfs_rwsem across notification delivery Greg Kroah-Hartman
` (399 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+50f9bc7ab8eb224b7629,
Zizhi Wo, Yu Kuai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zizhi Wo <wozizhi@huawei.com>
[ Upstream commit 370ca0760b18c64592a258bcb057ff0a2531aabf ]
Both raid5_run() and raid5_resize() align the per-device size down to a
whole multiple of the chunk size:
mddev->dev_sectors &= ~(chunk_sectors - 1);
Neither checks the result, so a size smaller than one chunk silently
becomes zero.
In raid5_run() that is harmless: the array size is derived from the same
zero, so the disk just ends up with no capacity.
In raid5_resize() it leaves the array inconsistent -- mddev->dev_sectors
becomes zero, while mddev->array_sectors and the gendisk capacity keep the
previous. A later raid4/raid5 -> raid0 takeover copies the zero into every
rdev->sectors (raid0_takeover_raid45()), so create_strip_zones() builds a
strip zone table whose zone_end is zero. Any read then passes
bio_check_eod() against the stale capacity and hits the BUG() in
find_zone():
kernel BUG at drivers/md/raid0.c:318!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
Call Trace:
raid0_make_request
md_handle_request
submit_bio_noacct_nocheck
block_read_full_folio
read_part_sector
bdev_disk_changed
bdev_open
Reject a size smaller than one chunk in both functions, so that a running
raid4/raid5 array always has mddev->dev_sectors >= one chunk.
The check is done where the value takes effect, not where it is assigned.
mddev->dev_sectors is written from several places, and none of them can
tell whether the value is usable: the chunk size may still change later.
raid5_run() and raid5_resize() are where every input is final, so one check
in each covers them all.
Fixes: eea136d69f9f ("md: fix buglet in RAID5 -> RAID0 conversion.")
Reported-by: syzbot+50f9bc7ab8eb224b7629@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=50f9bc7ab8eb224b7629
Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Link: https://patch.msgid.link/20260916095137.1157801-1-wozizhi@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid5.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 42602ac28d903..d427b24314c91 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -8056,6 +8056,12 @@ static int raid5_run(struct mddev *mddev)
/* device size must be a multiple of chunk size */
mddev->dev_sectors &= ~((sector_t)mddev->chunk_sectors - 1);
+ if (!mddev->dev_sectors) {
+ pr_warn("md/raid:%s: device size is smaller than one chunk\n",
+ mdname(mddev));
+ ret = -EINVAL;
+ goto abort;
+ }
mddev->resync_max_sectors = mddev->dev_sectors;
if (mddev->degraded > dirty_parity_disks &&
@@ -8388,6 +8394,8 @@ static int raid5_resize(struct mddev *mddev, sector_t sectors)
if (raid5_has_log(conf) || raid5_has_ppl(conf))
return -EINVAL;
sectors &= ~((sector_t)conf->chunk_sectors - 1);
+ if (!sectors)
+ return -EINVAL;
newsize = raid5_size(mddev, sectors, mddev->raid_disks);
if (mddev->external_size &&
mddev->array_sectors > newsize)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0484/2151] kernfs: dont hold kernfs_rwsem across notification delivery
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (482 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0483/2151] md/raid5: reject a per-device size smaller than one chunk Greg Kroah-Hartman
@ 2026-11-18 14:36 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0485/2151] kernfs: pass struct ns_common instead of const void * for namespace tags Greg Kroah-Hartman
` (398 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:36 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shakeel Butt, Tejun Heo,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shakeel Butt <shakeel.butt@linux.dev>
[ Upstream commit 23985e2b1f31623468244a2149b2388cda4925eb ]
Recently at Meta we noticed that on multi-tenant systems, a workload
under extreme memory pressure negatively impacts unrelated workloads and
system daemons like below [1] and fb-oomd [2]. Mainly we observed that
system daemons were stuck on kernfs_rwsem in cgroup-related interfaces
for long periods of time.
On further inspection, we found that the workload under pressure had
registered inotify watches on its memory.events and was continuously
receiving limit-hitting notifications. The cgroup notification is done in
kernfs_notify_workfn(), which holds kernfs_supers_rwsem and kernfs_rwsem
and calls fsnotify(), which allocates the event with
kmalloc(GFP_KERNEL_ACCOUNT|__GFP_RETRY_MAYFAIL) charged to the watching
cgroup, which is already under memory pressure. So the notify worker
ended up in memory reclaim of a cgroup already under pressure, and itself
kept triggering the limit notifications.
This notification path takes the locks in read mode, but a waiting writer
blocks all future readers. That is exactly what is happening in the Meta
fleet, and it leaves daemons that are critical to the reliability of the
system stuck for long periods of time.
Commit 400188ae361a ("kernfs: Acquire kernfs_rwsem in
kernfs_notify_workfn().") added kernfs_rwsem just to safely read
kernfs_node::name. Let's sample the name once before the loop and drop
the lock. kernfs_supers_rwsem still covers the list, and the removal
paths take that one for reading too, so a stalled worker can still hold
a removal up once a mount or unmount is queued behind it.
Two things change for a watcher. A name longer than NAME_MAX now gives
an event with no name, where before it gave one with the full name;
fsnotify() takes the name as optional, so the event still arrives. And
the name and the parent are no longer sampled under one lock, so a rename
between the two would name a file against the directory it moved to.
That cannot happen today: kernfs_notify() rejects anything that is not a
file, and no caller of kernfs_rename_ns() renames one.
[1] https://github.com/facebookincubator/below
[2] https://github.com/facebookincubator/oomd
Fixes: 400188ae361a ("kernfs: Acquire kernfs_rwsem in kernfs_notify_workfn().")
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20260910045406.485295-1-shakeel.butt@linux.dev
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/kernfs/file.c | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 9adf36e6364b7..63c4beeed93fe 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -911,9 +911,12 @@ static loff_t kernfs_fop_llseek(struct file *file, loff_t offset, int whence)
static void kernfs_notify_workfn(struct work_struct *work)
{
- struct kernfs_node *kn;
+ char name_buf[NAME_MAX + 1];
struct kernfs_super_info *info;
+ struct kernfs_node *kn;
struct kernfs_root *root;
+ struct qstr name;
+ bool have_name;
repeat:
/* pop one off the notify_list */
spin_lock_irq(&kernfs_notify_lock);
@@ -929,14 +932,20 @@ static void kernfs_notify_workfn(struct work_struct *work)
root = kernfs_root(kn);
/* kick fsnotify */
+ /*
+ * Sample the name once so kernfs_rwsem need not be held across the
+ * loop. A name that does not fit is reported without one; fsnotify()
+ * takes the name as optional, so a watcher loses the name and not the
+ * event.
+ */
+ have_name = kernfs_name(kn, name_buf, sizeof(name_buf)) >= 0;
+ name = QSTR(name_buf);
+
down_read(&root->kernfs_supers_rwsem);
- down_read(&root->kernfs_rwsem);
- list_for_each_entry(info, &kernfs_root(kn)->supers, node) {
+ list_for_each_entry(info, &root->supers, node) {
struct kernfs_node *parent;
struct inode *p_inode = NULL;
- const char *kn_name;
struct inode *inode;
- struct qstr name;
/*
* We want fsnotify_modify() on @kn but as the
@@ -948,15 +957,14 @@ static void kernfs_notify_workfn(struct work_struct *work)
if (!inode)
continue;
- kn_name = kernfs_rcu_name(kn);
- name = QSTR(kn_name);
parent = kernfs_get_parent(kn);
if (parent) {
p_inode = ilookup(info->sb, kernfs_ino(parent));
if (p_inode) {
fsnotify(FS_MODIFY | FS_EVENT_ON_CHILD,
inode, FSNOTIFY_EVENT_INODE,
- p_inode, &name, inode, 0);
+ p_inode, have_name ? &name : NULL,
+ inode, 0);
iput(p_inode);
}
@@ -969,7 +977,6 @@ static void kernfs_notify_workfn(struct work_struct *work)
iput(inode);
}
- up_read(&root->kernfs_rwsem);
up_read(&root->kernfs_supers_rwsem);
kernfs_put(kn);
goto repeat;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0485/2151] kernfs: pass struct ns_common instead of const void * for namespace tags
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (483 preceding siblings ...)
2026-11-18 14:36 ` [PATCH 6.18 0484/2151] kernfs: dont hold kernfs_rwsem across notification delivery Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0486/2151] kernfs: make directory seek namespace-aware Greg Kroah-Hartman
` (397 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Christian Brauner, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <brauner@kernel.org>
[ Upstream commit e3b2cf6e5dba416a03152f299d99982dfe1e861d ]
kernfs has historically used const void * to pass around namespace tags
used for directory-level namespace filtering. The only current user of
this is sysfs network namespace tagging where struct net pointers are
cast to void *.
Replace all const void * namespace parameters with const struct
ns_common * throughout the kernfs, sysfs, and kobject namespace layers.
This includes the kobj_ns_type_operations callbacks, kobject_namespace(),
and all sysfs/kernfs APIs that accept or return namespace tags.
Passing struct ns_common is needed because various codepaths require
access to the underlying namespace. A struct ns_common can always be
converted back to the concrete namespace type (e.g., struct net) via
container_of() or to_ns_common() in the reverse direction.
This is a preparatory change for switching to ns_id-based directory
iteration to prevent a KASLR pointer leak through the current use of
raw namespace pointers as hash seeds and comparison keys.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Stable-dep-of: 5ebcb578adee ("kernfs: don't repeat or skip an entry when readdir resumes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/base/class.c | 4 +--
drivers/base/core.c | 7 ++--
drivers/infiniband/core/device.c | 5 +--
drivers/infiniband/ulp/srp/ib_srp.c | 7 ++--
drivers/net/bonding/bond_sysfs.c | 4 +--
drivers/net/ipvlan/ipvtap.c | 5 +--
drivers/net/macvtap.c | 5 +--
fs/kernfs/dir.c | 30 +++++++++--------
fs/kernfs/file.c | 2 +-
fs/kernfs/kernfs-internal.h | 2 +-
fs/kernfs/mount.c | 2 +-
fs/nfs/sysfs.c | 16 +++++----
fs/sysfs/dir.c | 6 ++--
fs/sysfs/file.c | 8 ++---
fs/sysfs/mount.c | 10 +++---
fs/sysfs/symlink.c | 7 ++--
fs/sysfs/sysfs.h | 4 +--
include/linux/device/class.h | 6 ++--
include/linux/kernfs.h | 40 ++++++++++++++---------
include/linux/kobject.h | 4 +--
include/linux/kobject_ns.h | 13 ++++----
include/linux/netdevice.h | 4 +--
include/linux/sysfs.h | 24 +++++++-------
include/net/net_namespace.h | 8 ++---
lib/kobject.c | 8 ++---
lib/kobject_uevent.c | 13 +++++---
net/core/net-sysfs.c | 50 ++++++++++++++---------------
net/core/net_namespace.c | 8 ++---
net/sunrpc/sysfs.c | 17 ++++++----
net/wireless/sysfs.c | 4 +--
30 files changed, 175 insertions(+), 148 deletions(-)
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 2526c57d924e5..e0e5a9ee91311 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -127,7 +127,7 @@ static const struct kobj_type class_ktype = {
};
int class_create_file_ns(const struct class *cls, const struct class_attribute *attr,
- const void *ns)
+ const struct ns_common *ns)
{
struct subsys_private *sp = class_to_subsys(cls);
int error;
@@ -143,7 +143,7 @@ int class_create_file_ns(const struct class *cls, const struct class_attribute *
EXPORT_SYMBOL_GPL(class_create_file_ns);
void class_remove_file_ns(const struct class *cls, const struct class_attribute *attr,
- const void *ns)
+ const struct ns_common *ns)
{
struct subsys_private *sp = class_to_subsys(cls);
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 829eaef49db89..338da3cce4775 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2636,15 +2636,14 @@ static void device_release(struct kobject *kobj)
kfree(p);
}
-static const void *device_namespace(const struct kobject *kobj)
+static const struct ns_common *device_namespace(const struct kobject *kobj)
{
const struct device *dev = kobj_to_dev(kobj);
- const void *ns = NULL;
if (dev->class && dev->class->namespace)
- ns = dev->class->namespace(dev);
+ return dev->class->namespace(dev);
- return ns;
+ return NULL;
}
static void device_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t *gid)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index c8b7942739a0a..004952357e055 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -537,12 +537,13 @@ static int ib_device_uevent(const struct device *device,
return 0;
}
-static const void *net_namespace(const struct device *d)
+static const struct ns_common *net_namespace(const struct device *d)
{
const struct ib_core_device *coredev =
container_of(d, struct ib_core_device, dev);
+ struct net *net = read_pnet(&coredev->rdma_net);
- return read_pnet(&coredev->rdma_net);
+ return net ? to_ns_common(net) : NULL;
}
static struct class ib_class = {
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 99131492abf70..0397934b1bcbb 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -42,6 +42,7 @@
#include <linux/jiffies.h>
#include <linux/lockdep.h>
#include <linux/inet.h>
+#include <net/net_namespace.h>
#include <rdma/ib_cache.h>
#include <linux/atomic.h>
@@ -1047,7 +1048,7 @@ static void srp_remove_target(struct srp_target_port *target)
scsi_remove_host(target->scsi_host);
srp_stop_rport_timers(target->rport);
srp_disconnect_target(target);
- kobj_ns_drop(KOBJ_NS_TYPE_NET, target->net);
+ kobj_ns_drop(KOBJ_NS_TYPE_NET, to_ns_common(target->net));
for (i = 0; i < target->ch_count; i++) {
ch = &target->ch[i];
srp_free_ch_ib(target, ch);
@@ -3746,7 +3747,7 @@ static ssize_t add_target_store(struct device *dev,
target = host_to_target(target_host);
- target->net = kobj_ns_grab_current(KOBJ_NS_TYPE_NET);
+ target->net = to_net_ns(kobj_ns_grab_current(KOBJ_NS_TYPE_NET));
target->io_class = SRP_REV16A_IB_IO_CLASS;
target->scsi_host = target_host;
target->srp_host = host;
@@ -3939,7 +3940,7 @@ static ssize_t add_target_store(struct device *dev,
* earlier in this function.
*/
if (target->state != SRP_TARGET_REMOVED)
- kobj_ns_drop(KOBJ_NS_TYPE_NET, target->net);
+ kobj_ns_drop(KOBJ_NS_TYPE_NET, to_ns_common(target->net));
scsi_host_put(target->scsi_host);
}
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 9a75ad3181ab5..eaba44c76a5ec 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -808,7 +808,7 @@ int __net_init bond_create_sysfs(struct bond_net *bn)
sysfs_attr_init(&bn->class_attr_bonding_masters.attr);
ret = netdev_class_create_file_ns(&bn->class_attr_bonding_masters,
- bn->net);
+ to_ns_common(bn->net));
/* Permit multiple loads of the module by ignoring failures to
* create the bonding_masters sysfs file. Bonding devices
* created by second or subsequent loads of the module will
@@ -835,7 +835,7 @@ int __net_init bond_create_sysfs(struct bond_net *bn)
/* Remove /sys/class/net/bonding_masters. */
void __net_exit bond_destroy_sysfs(struct bond_net *bn)
{
- netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, bn->net);
+ netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, to_ns_common(bn->net));
}
/* Initialize sysfs for each bond. This sets up and registers
diff --git a/drivers/net/ipvlan/ipvtap.c b/drivers/net/ipvlan/ipvtap.c
index edd13916831a7..2d6bbddd1edd5 100644
--- a/drivers/net/ipvlan/ipvtap.c
+++ b/drivers/net/ipvlan/ipvtap.c
@@ -30,10 +30,11 @@
static dev_t ipvtap_major;
static struct cdev ipvtap_cdev;
-static const void *ipvtap_net_namespace(const struct device *d)
+static const struct ns_common *ipvtap_net_namespace(const struct device *d)
{
const struct net_device *dev = to_net_dev(d->parent);
- return dev_net(dev);
+
+ return to_ns_common(dev_net(dev));
}
static struct class ipvtap_class = {
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index b391a0f740a3f..cc975dfb73805 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -35,10 +35,11 @@ struct macvtap_dev {
*/
static dev_t macvtap_major;
-static const void *macvtap_net_namespace(const struct device *d)
+static const struct ns_common *macvtap_net_namespace(const struct device *d)
{
const struct net_device *dev = to_net_dev(d->parent);
- return dev_net(dev);
+
+ return to_ns_common(dev_net(dev));
}
static struct class macvtap_class = {
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 8cdb44ac68db0..1265ff74d9070 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -313,7 +313,8 @@ struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn)
*
* Return: 31-bit hash of ns + name (so it fits in an off_t)
*/
-static unsigned int kernfs_name_hash(const char *name, const void *ns)
+static unsigned int kernfs_name_hash(const char *name,
+ const struct ns_common *ns)
{
unsigned long hash = init_name_hash(ns);
unsigned int len = strlen(name);
@@ -330,7 +331,7 @@ static unsigned int kernfs_name_hash(const char *name, const void *ns)
}
static int kernfs_name_compare(unsigned int hash, const char *name,
- const void *ns, const struct kernfs_node *kn)
+ const struct ns_common *ns, const struct kernfs_node *kn)
{
if (hash < kn->hash)
return -1;
@@ -860,7 +861,7 @@ int kernfs_add_one(struct kernfs_node *kn)
*/
static struct kernfs_node *kernfs_find_ns(struct kernfs_node *parent,
const unsigned char *name,
- const void *ns)
+ const struct ns_common *ns)
{
struct rb_node *node = parent->dir.children.rb_node;
bool has_ns = kernfs_ns_enabled(parent);
@@ -893,7 +894,7 @@ static struct kernfs_node *kernfs_find_ns(struct kernfs_node *parent,
static struct kernfs_node *kernfs_walk_ns(struct kernfs_node *parent,
const unsigned char *path,
- const void *ns)
+ const struct ns_common *ns)
{
ssize_t len;
char *p, *name;
@@ -934,7 +935,8 @@ static struct kernfs_node *kernfs_walk_ns(struct kernfs_node *parent,
* Return: pointer to the found kernfs_node on success, %NULL on failure.
*/
struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent,
- const char *name, const void *ns)
+ const char *name,
+ const struct ns_common *ns)
{
struct kernfs_node *kn;
struct kernfs_root *root = kernfs_root(parent);
@@ -960,7 +962,8 @@ EXPORT_SYMBOL_GPL(kernfs_find_and_get_ns);
* Return: pointer to the found kernfs_node on success, %NULL on failure.
*/
struct kernfs_node *kernfs_walk_and_get_ns(struct kernfs_node *parent,
- const char *path, const void *ns)
+ const char *path,
+ const struct ns_common *ns)
{
struct kernfs_node *kn;
struct kernfs_root *root = kernfs_root(parent);
@@ -1083,7 +1086,8 @@ struct kernfs_node *kernfs_root_to_node(struct kernfs_root *root)
struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent,
const char *name, umode_t mode,
kuid_t uid, kgid_t gid,
- void *priv, const void *ns)
+ void *priv,
+ const struct ns_common *ns)
{
struct kernfs_node *kn;
int rc;
@@ -1225,7 +1229,7 @@ static struct dentry *kernfs_iop_lookup(struct inode *dir,
struct kernfs_node *kn;
struct kernfs_root *root;
struct inode *inode = NULL;
- const void *ns = NULL;
+ const struct ns_common *ns = NULL;
root = kernfs_root(parent);
down_read(&root->kernfs_rwsem);
@@ -1706,7 +1710,7 @@ bool kernfs_remove_self(struct kernfs_node *kn)
* Return: %0 on success, -ENOENT if such entry doesn't exist.
*/
int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,
- const void *ns)
+ const struct ns_common *ns)
{
struct kernfs_node *kn;
struct kernfs_root *root;
@@ -1745,7 +1749,7 @@ int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,
* Return: %0 on success, -errno on failure.
*/
int kernfs_rename_ns(struct kernfs_node *kn, struct kernfs_node *new_parent,
- const char *new_name, const void *new_ns)
+ const char *new_name, const struct ns_common *new_ns)
{
struct kernfs_node *old_parent;
struct kernfs_root *root;
@@ -1836,7 +1840,7 @@ static int kernfs_dir_fop_release(struct inode *inode, struct file *filp)
return 0;
}
-static struct kernfs_node *kernfs_dir_pos(const void *ns,
+static struct kernfs_node *kernfs_dir_pos(const struct ns_common *ns,
struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos)
{
if (pos) {
@@ -1871,7 +1875,7 @@ static struct kernfs_node *kernfs_dir_pos(const void *ns,
return pos;
}
-static struct kernfs_node *kernfs_dir_next_pos(const void *ns,
+static struct kernfs_node *kernfs_dir_next_pos(const struct ns_common *ns,
struct kernfs_node *parent, ino_t ino, struct kernfs_node *pos)
{
pos = kernfs_dir_pos(ns, parent, ino, pos);
@@ -1893,7 +1897,7 @@ static int kernfs_fop_readdir(struct file *file, struct dir_context *ctx)
struct kernfs_node *parent = kernfs_dentry_node(dentry);
struct kernfs_node *pos = file->private_data;
struct kernfs_root *root;
- const void *ns = NULL;
+ const struct ns_common *ns = NULL;
if (!dir_emit_dots(file, ctx))
return 0;
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 63c4beeed93fe..5d8c348ecbe98 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -1052,7 +1052,7 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
umode_t mode, kuid_t uid, kgid_t gid,
loff_t size,
const struct kernfs_ops *ops,
- void *priv, const void *ns,
+ void *priv, const struct ns_common *ns,
struct lock_class_key *key)
{
struct kernfs_node *kn;
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index 6061b6f70d2a3..b1fd9622a5e34 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -97,7 +97,7 @@ struct kernfs_super_info {
* instance. If multiple tags become necessary, make the following
* an array and compare kernfs_node tag against every entry.
*/
- const void *ns;
+ const struct ns_common *ns;
/* anchored at kernfs_root->supers, protected by kernfs_rwsem */
struct list_head node;
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 5d265e63956eb..f1c9d9fbcaf3a 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -344,7 +344,7 @@ static int kernfs_set_super(struct super_block *sb, struct fs_context *fc)
*
* Return: the namespace tag associated with kernfs super_block @sb.
*/
-const void *kernfs_super_ns(struct super_block *sb)
+const struct ns_common *kernfs_super_ns(struct super_block *sb)
{
struct kernfs_super_info *info = kernfs_info(sb);
diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index ea6e6168092b2..2938678a52f78 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -11,6 +11,7 @@
#include <linux/netdevice.h>
#include <linux/string.h>
#include <linux/nfs_fs.h>
+#include <net/net_namespace.h>
#include <linux/rcupdate.h>
#include <linux/lockd/lockd.h>
@@ -127,9 +128,10 @@ static void nfs_netns_client_release(struct kobject *kobj)
kfree(rcu_dereference_raw(c->identifier));
}
-static const void *nfs_netns_client_namespace(const struct kobject *kobj)
+static const struct ns_common *nfs_netns_client_namespace(const struct kobject *kobj)
{
- return container_of(kobj, struct nfs_netns_client, kobject)->net;
+ return to_ns_common(container_of(kobj, struct nfs_netns_client,
+ kobject)->net);
}
static struct kobj_attribute nfs_netns_client_id = __ATTR(identifier,
@@ -156,9 +158,10 @@ static void nfs_netns_object_release(struct kobject *kobj)
kfree(c);
}
-static const void *nfs_netns_namespace(const struct kobject *kobj)
+static const struct ns_common *nfs_netns_namespace(const struct kobject *kobj)
{
- return container_of(kobj, struct nfs_netns_client, nfs_net_kobj)->net;
+ return to_ns_common(container_of(kobj, struct nfs_netns_client,
+ nfs_net_kobj)->net);
}
static struct kobj_type nfs_netns_object_type = {
@@ -350,9 +353,10 @@ static void nfs_sysfs_sb_release(struct kobject *kobj)
/* no-op: why? see lib/kobject.c kobject_cleanup() */
}
-static const void *nfs_netns_server_namespace(const struct kobject *kobj)
+static const struct ns_common *nfs_netns_server_namespace(const struct kobject *kobj)
{
- return container_of(kobj, struct nfs_server, kobj)->nfs_client->cl_net;
+ return to_ns_common(container_of(kobj, struct nfs_server,
+ kobj)->nfs_client->cl_net);
}
static struct kobj_type nfs_sb_ktype = {
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 94e12efd92f21..ffdcd4153c584 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -37,7 +37,7 @@ void sysfs_warn_dup(struct kernfs_node *parent, const char *name)
* @kobj: object we're creating directory for
* @ns: the namespace tag to use
*/
-int sysfs_create_dir_ns(struct kobject *kobj, const void *ns)
+int sysfs_create_dir_ns(struct kobject *kobj, const struct ns_common *ns)
{
struct kernfs_node *parent, *kn;
kuid_t uid;
@@ -103,7 +103,7 @@ void sysfs_remove_dir(struct kobject *kobj)
}
int sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name,
- const void *new_ns)
+ const struct ns_common *new_ns)
{
struct kernfs_node *parent;
int ret;
@@ -115,7 +115,7 @@ int sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name,
}
int sysfs_move_dir_ns(struct kobject *kobj, struct kobject *new_parent_kobj,
- const void *new_ns)
+ const struct ns_common *new_ns)
{
struct kernfs_node *kn = kobj->sd;
struct kernfs_node *new_parent;
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index b25f6a951c703..b20614fe9d6dc 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -276,7 +276,7 @@ static const struct kernfs_ops sysfs_bin_kfops_mmap = {
int sysfs_add_file_mode_ns(struct kernfs_node *parent,
const struct attribute *attr, umode_t mode, kuid_t uid,
- kgid_t gid, const void *ns)
+ kgid_t gid, const struct ns_common *ns)
{
struct kobject *kobj = parent->priv;
const struct sysfs_ops *sysfs_ops = kobj->ktype->sysfs_ops;
@@ -326,7 +326,7 @@ int sysfs_add_file_mode_ns(struct kernfs_node *parent,
int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent,
const struct bin_attribute *battr, umode_t mode, size_t size,
- kuid_t uid, kgid_t gid, const void *ns)
+ kuid_t uid, kgid_t gid, const struct ns_common *ns)
{
const struct attribute *attr = &battr->attr;
struct lock_class_key *key = NULL;
@@ -366,7 +366,7 @@ int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent,
* @ns: namespace the new file should belong to
*/
int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr,
- const void *ns)
+ const struct ns_common *ns)
{
kuid_t uid;
kgid_t gid;
@@ -509,7 +509,7 @@ EXPORT_SYMBOL_GPL(sysfs_unbreak_active_protection);
* Hash the attribute name and namespace tag and kill the victim.
*/
void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
- const void *ns)
+ const struct ns_common *ns)
{
struct kernfs_node *parent = kobj->sd;
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 98467bb767378..4aa18ae296305 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -55,7 +55,7 @@ static const struct fs_context_operations sysfs_fs_context_ops = {
static int sysfs_init_fs_context(struct fs_context *fc)
{
struct kernfs_fs_context *kfc;
- struct net *netns;
+ struct ns_common *ns;
if (!(fc->sb_flags & SB_KERNMOUNT)) {
if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET))
@@ -66,12 +66,14 @@ static int sysfs_init_fs_context(struct fs_context *fc)
if (!kfc)
return -ENOMEM;
- kfc->ns_tag = netns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET);
+ kfc->ns_tag = ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET);
kfc->root = sysfs_root;
kfc->magic = SYSFS_MAGIC;
fc->fs_private = kfc;
fc->ops = &sysfs_fs_context_ops;
- if (netns) {
+ if (ns) {
+ struct net *netns = to_net_ns(ns);
+
put_user_ns(fc->user_ns);
fc->user_ns = get_user_ns(netns->user_ns);
}
@@ -81,7 +83,7 @@ static int sysfs_init_fs_context(struct fs_context *fc)
static void sysfs_kill_sb(struct super_block *sb)
{
- void *ns = (void *)kernfs_super_ns(sb);
+ struct ns_common *ns = (struct ns_common *)kernfs_super_ns(sb);
kernfs_kill_sb(sb);
kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index 5603530a1a520..5f9c05fb13940 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -121,7 +121,7 @@ EXPORT_SYMBOL_GPL(sysfs_create_link_nowarn);
void sysfs_delete_link(struct kobject *kobj, struct kobject *targ,
const char *name)
{
- const void *ns = NULL;
+ const struct ns_common *ns = NULL;
/*
* We don't own @target and it may be removed at any time.
@@ -164,10 +164,11 @@ EXPORT_SYMBOL_GPL(sysfs_remove_link);
* A helper function for the common rename symlink idiom.
*/
int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *targ,
- const char *old, const char *new, const void *new_ns)
+ const char *old, const char *new,
+ const struct ns_common *new_ns)
{
struct kernfs_node *parent, *kn = NULL;
- const void *old_ns = NULL;
+ const struct ns_common *old_ns = NULL;
int result;
if (!kobj)
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 8e012f25e1c06..f4583dcafcd1e 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -29,10 +29,10 @@ void sysfs_warn_dup(struct kernfs_node *parent, const char *name);
*/
int sysfs_add_file_mode_ns(struct kernfs_node *parent,
const struct attribute *attr, umode_t amode, kuid_t uid,
- kgid_t gid, const void *ns);
+ kgid_t gid, const struct ns_common *ns);
int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent,
const struct bin_attribute *battr, umode_t mode, size_t size,
- kuid_t uid, kgid_t gid, const void *ns);
+ kuid_t uid, kgid_t gid, const struct ns_common *ns);
/*
* symlink.c
diff --git a/include/linux/device/class.h b/include/linux/device/class.h
index 65880e60c7208..021da0d61796a 100644
--- a/include/linux/device/class.h
+++ b/include/linux/device/class.h
@@ -62,7 +62,7 @@ struct class {
int (*shutdown_pre)(struct device *dev);
const struct kobj_ns_type_operations *ns_type;
- const void *(*namespace)(const struct device *dev);
+ const struct ns_common *(*namespace)(const struct device *dev);
void (*get_ownership)(const struct device *dev, kuid_t *uid, kgid_t *gid);
@@ -180,9 +180,9 @@ struct class_attribute {
struct class_attribute class_attr_##_name = __ATTR_WO(_name)
int __must_check class_create_file_ns(const struct class *class, const struct class_attribute *attr,
- const void *ns);
+ const struct ns_common *ns);
void class_remove_file_ns(const struct class *class, const struct class_attribute *attr,
- const void *ns);
+ const struct ns_common *ns);
static inline int __must_check class_create_file(const struct class *class,
const struct class_attribute *attr)
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index b5a5f32fdfd1a..4f0ab88a1b316 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -23,6 +23,7 @@
struct file;
struct dentry;
struct iattr;
+struct ns_common;
struct seq_file;
struct vm_area_struct;
struct vm_operations_struct;
@@ -209,7 +210,7 @@ struct kernfs_node {
struct rb_node rb;
- const void *ns; /* namespace tag */
+ const struct ns_common *ns; /* namespace tag */
unsigned int hash; /* ns + name hash */
unsigned short flags;
umode_t mode;
@@ -331,7 +332,7 @@ struct kernfs_ops {
*/
struct kernfs_fs_context {
struct kernfs_root *root; /* Root of the hierarchy being mounted */
- void *ns_tag; /* Namespace tag of the mount (or NULL) */
+ struct ns_common *ns_tag; /* Namespace tag of the mount (or NULL) */
unsigned long magic; /* File system specific magic number */
/* The following are set/used by kernfs_mount() */
@@ -406,9 +407,11 @@ void pr_cont_kernfs_name(struct kernfs_node *kn);
void pr_cont_kernfs_path(struct kernfs_node *kn);
struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn);
struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent,
- const char *name, const void *ns);
+ const char *name,
+ const struct ns_common *ns);
struct kernfs_node *kernfs_walk_and_get_ns(struct kernfs_node *parent,
- const char *path, const void *ns);
+ const char *path,
+ const struct ns_common *ns);
void kernfs_get(struct kernfs_node *kn);
void kernfs_put(struct kernfs_node *kn);
@@ -426,7 +429,8 @@ unsigned int kernfs_root_flags(struct kernfs_node *kn);
struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent,
const char *name, umode_t mode,
kuid_t uid, kgid_t gid,
- void *priv, const void *ns);
+ void *priv,
+ const struct ns_common *ns);
struct kernfs_node *kernfs_create_empty_dir(struct kernfs_node *parent,
const char *name);
struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
@@ -434,7 +438,8 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
kuid_t uid, kgid_t gid,
loff_t size,
const struct kernfs_ops *ops,
- void *priv, const void *ns,
+ void *priv,
+ const struct ns_common *ns,
struct lock_class_key *key);
struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
const char *name,
@@ -446,9 +451,9 @@ void kernfs_break_active_protection(struct kernfs_node *kn);
void kernfs_unbreak_active_protection(struct kernfs_node *kn);
bool kernfs_remove_self(struct kernfs_node *kn);
int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,
- const void *ns);
+ const struct ns_common *ns);
int kernfs_rename_ns(struct kernfs_node *kn, struct kernfs_node *new_parent,
- const char *new_name, const void *new_ns);
+ const char *new_name, const struct ns_common *new_ns);
int kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr);
__poll_t kernfs_generic_poll(struct kernfs_open_file *of,
struct poll_table_struct *pt);
@@ -459,7 +464,7 @@ int kernfs_xattr_get(struct kernfs_node *kn, const char *name,
int kernfs_xattr_set(struct kernfs_node *kn, const char *name,
const void *value, size_t size, int flags);
-const void *kernfs_super_ns(struct super_block *sb);
+const struct ns_common *kernfs_super_ns(struct super_block *sb);
int kernfs_get_tree(struct fs_context *fc);
void kernfs_free_fs_context(struct fs_context *fc);
void kernfs_kill_sb(struct super_block *sb);
@@ -494,11 +499,11 @@ static inline struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn)
static inline struct kernfs_node *
kernfs_find_and_get_ns(struct kernfs_node *parent, const char *name,
- const void *ns)
+ const struct ns_common *ns)
{ return NULL; }
static inline struct kernfs_node *
kernfs_walk_and_get_ns(struct kernfs_node *parent, const char *path,
- const void *ns)
+ const struct ns_common *ns)
{ return NULL; }
static inline void kernfs_get(struct kernfs_node *kn) { }
@@ -526,14 +531,15 @@ static inline unsigned int kernfs_root_flags(struct kernfs_node *kn)
static inline struct kernfs_node *
kernfs_create_dir_ns(struct kernfs_node *parent, const char *name,
umode_t mode, kuid_t uid, kgid_t gid,
- void *priv, const void *ns)
+ void *priv, const struct ns_common *ns)
{ return ERR_PTR(-ENOSYS); }
static inline struct kernfs_node *
__kernfs_create_file(struct kernfs_node *parent, const char *name,
umode_t mode, kuid_t uid, kgid_t gid,
loff_t size, const struct kernfs_ops *ops,
- void *priv, const void *ns, struct lock_class_key *key)
+ void *priv, const struct ns_common *ns,
+ struct lock_class_key *key)
{ return ERR_PTR(-ENOSYS); }
static inline struct kernfs_node *
@@ -549,12 +555,14 @@ static inline bool kernfs_remove_self(struct kernfs_node *kn)
{ return false; }
static inline int kernfs_remove_by_name_ns(struct kernfs_node *kn,
- const char *name, const void *ns)
+ const char *name,
+ const struct ns_common *ns)
{ return -ENOSYS; }
static inline int kernfs_rename_ns(struct kernfs_node *kn,
struct kernfs_node *new_parent,
- const char *new_name, const void *new_ns)
+ const char *new_name,
+ const struct ns_common *new_ns)
{ return -ENOSYS; }
static inline int kernfs_setattr(struct kernfs_node *kn,
@@ -575,7 +583,7 @@ static inline int kernfs_xattr_set(struct kernfs_node *kn, const char *name,
const void *value, size_t size, int flags)
{ return -ENOSYS; }
-static inline const void *kernfs_super_ns(struct super_block *sb)
+static inline const struct ns_common *kernfs_super_ns(struct super_block *sb)
{ return NULL; }
static inline int kernfs_get_tree(struct fs_context *fc)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index c8219505a79f9..bcb5d4e320015 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -109,7 +109,7 @@ struct kobject *kobject_get(struct kobject *kobj);
struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj);
void kobject_put(struct kobject *kobj);
-const void *kobject_namespace(const struct kobject *kobj);
+const struct ns_common *kobject_namespace(const struct kobject *kobj);
void kobject_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
char *kobject_get_path(const struct kobject *kobj, gfp_t flag);
@@ -118,7 +118,7 @@ struct kobj_type {
const struct sysfs_ops *sysfs_ops;
const struct attribute_group **default_groups;
const struct kobj_ns_type_operations *(*child_ns_type)(const struct kobject *kobj);
- const void *(*namespace)(const struct kobject *kobj);
+ const struct ns_common *(*namespace)(const struct kobject *kobj);
void (*get_ownership)(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
};
diff --git a/include/linux/kobject_ns.h b/include/linux/kobject_ns.h
index 150fe2ae1b6b2..4f0990e09b93e 100644
--- a/include/linux/kobject_ns.h
+++ b/include/linux/kobject_ns.h
@@ -16,6 +16,7 @@
#ifndef _LINUX_KOBJECT_NS_H
#define _LINUX_KOBJECT_NS_H
+struct ns_common;
struct sock;
struct kobject;
@@ -39,10 +40,10 @@ enum kobj_ns_type {
struct kobj_ns_type_operations {
enum kobj_ns_type type;
bool (*current_may_mount)(void);
- void *(*grab_current_ns)(void);
- const void *(*netlink_ns)(struct sock *sk);
- const void *(*initial_ns)(void);
- void (*drop_ns)(void *);
+ struct ns_common *(*grab_current_ns)(void);
+ const struct ns_common *(*netlink_ns)(struct sock *sk);
+ const struct ns_common *(*initial_ns)(void);
+ void (*drop_ns)(struct ns_common *);
};
int kobj_ns_type_register(const struct kobj_ns_type_operations *ops);
@@ -51,7 +52,7 @@ const struct kobj_ns_type_operations *kobj_child_ns_ops(const struct kobject *pa
const struct kobj_ns_type_operations *kobj_ns_ops(const struct kobject *kobj);
bool kobj_ns_current_may_mount(enum kobj_ns_type type);
-void *kobj_ns_grab_current(enum kobj_ns_type type);
-void kobj_ns_drop(enum kobj_ns_type type, void *ns);
+struct ns_common *kobj_ns_grab_current(enum kobj_ns_type type);
+void kobj_ns_drop(enum kobj_ns_type type, struct ns_common *ns);
#endif /* _LINUX_KOBJECT_NS_H */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index e272d0006c6bd..c7794a49dfc2a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -5319,9 +5319,9 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi
}
int netdev_class_create_file_ns(const struct class_attribute *class_attr,
- const void *ns);
+ const struct ns_common *ns);
void netdev_class_remove_file_ns(const struct class_attribute *class_attr,
- const void *ns);
+ const struct ns_common *ns);
extern const struct kobj_ns_type_operations net_ns_type_operations;
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 9a25a29116528..b94cea80479dc 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -386,13 +386,13 @@ struct sysfs_ops {
#ifdef CONFIG_SYSFS
-int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns);
+int __must_check sysfs_create_dir_ns(struct kobject *kobj, const struct ns_common *ns);
void sysfs_remove_dir(struct kobject *kobj);
int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name,
- const void *new_ns);
+ const struct ns_common *new_ns);
int __must_check sysfs_move_dir_ns(struct kobject *kobj,
struct kobject *new_parent_kobj,
- const void *new_ns);
+ const struct ns_common *new_ns);
int __must_check sysfs_create_mount_point(struct kobject *parent_kobj,
const char *name);
void sysfs_remove_mount_point(struct kobject *parent_kobj,
@@ -400,7 +400,7 @@ void sysfs_remove_mount_point(struct kobject *parent_kobj,
int __must_check sysfs_create_file_ns(struct kobject *kobj,
const struct attribute *attr,
- const void *ns);
+ const struct ns_common *ns);
int __must_check sysfs_create_files(struct kobject *kobj,
const struct attribute * const *attr);
int __must_check sysfs_chmod_file(struct kobject *kobj,
@@ -409,7 +409,7 @@ struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
const struct attribute *attr);
void sysfs_unbreak_active_protection(struct kernfs_node *kn);
void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr,
- const void *ns);
+ const struct ns_common *ns);
bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr);
void sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attr);
@@ -427,7 +427,7 @@ void sysfs_remove_link(struct kobject *kobj, const char *name);
int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *target,
const char *old_name, const char *new_name,
- const void *new_ns);
+ const struct ns_common *new_ns);
void sysfs_delete_link(struct kobject *dir, struct kobject *targ,
const char *name);
@@ -492,7 +492,7 @@ ssize_t sysfs_bin_attr_simple_read(struct file *file, struct kobject *kobj,
#else /* CONFIG_SYSFS */
-static inline int sysfs_create_dir_ns(struct kobject *kobj, const void *ns)
+static inline int sysfs_create_dir_ns(struct kobject *kobj, const struct ns_common *ns)
{
return 0;
}
@@ -502,14 +502,14 @@ static inline void sysfs_remove_dir(struct kobject *kobj)
}
static inline int sysfs_rename_dir_ns(struct kobject *kobj,
- const char *new_name, const void *new_ns)
+ const char *new_name, const struct ns_common *new_ns)
{
return 0;
}
static inline int sysfs_move_dir_ns(struct kobject *kobj,
struct kobject *new_parent_kobj,
- const void *new_ns)
+ const struct ns_common *new_ns)
{
return 0;
}
@@ -527,7 +527,7 @@ static inline void sysfs_remove_mount_point(struct kobject *parent_kobj,
static inline int sysfs_create_file_ns(struct kobject *kobj,
const struct attribute *attr,
- const void *ns)
+ const struct ns_common *ns)
{
return 0;
}
@@ -557,7 +557,7 @@ static inline void sysfs_unbreak_active_protection(struct kernfs_node *kn)
static inline void sysfs_remove_file_ns(struct kobject *kobj,
const struct attribute *attr,
- const void *ns)
+ const struct ns_common *ns)
{
}
@@ -602,7 +602,7 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name)
static inline int sysfs_rename_link_ns(struct kobject *k, struct kobject *t,
const char *old_name,
- const char *new_name, const void *ns)
+ const char *new_name, const struct ns_common *ns)
{
return 0;
}
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index cb664f6e35580..9a1d7ef17c4e9 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -259,14 +259,14 @@ void ipx_unregister_sysctl(void);
#define ipx_unregister_sysctl()
#endif
-#ifdef CONFIG_NET_NS
-void __put_net(struct net *net);
-
static inline struct net *to_net_ns(struct ns_common *ns)
{
return container_of(ns, struct net, ns);
}
+#ifdef CONFIG_NET_NS
+void __put_net(struct net *net);
+
/* Try using get_net_track() instead */
static inline struct net *get_net(struct net *net)
{
@@ -304,7 +304,7 @@ static inline int check_net(const struct net *net)
return ns_ref_read(net) != 0;
}
-void net_drop_ns(void *);
+void net_drop_ns(struct ns_common *);
void net_passive_dec(struct net *net);
#else
diff --git a/lib/kobject.c b/lib/kobject.c
index abe5f5b856ceb..dd3d42a41d0be 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -27,7 +27,7 @@
* and thus @kobj should have a namespace tag associated with it. Returns
* %NULL otherwise.
*/
-const void *kobject_namespace(const struct kobject *kobj)
+const struct ns_common *kobject_namespace(const struct kobject *kobj)
{
const struct kobj_ns_type_operations *ns_ops = kobj_ns_ops(kobj);
@@ -1083,9 +1083,9 @@ bool kobj_ns_current_may_mount(enum kobj_ns_type type)
return may_mount;
}
-void *kobj_ns_grab_current(enum kobj_ns_type type)
+struct ns_common *kobj_ns_grab_current(enum kobj_ns_type type)
{
- void *ns = NULL;
+ struct ns_common *ns = NULL;
spin_lock(&kobj_ns_type_lock);
if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type])
@@ -1096,7 +1096,7 @@ void *kobj_ns_grab_current(enum kobj_ns_type type)
}
EXPORT_SYMBOL_GPL(kobj_ns_grab_current);
-void kobj_ns_drop(enum kobj_ns_type type, void *ns)
+void kobj_ns_drop(enum kobj_ns_type type, struct ns_common *ns)
{
spin_lock(&kobj_ns_type_lock);
if (kobj_ns_type_is_valid(type) &&
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index bdc2720b7aac5..2d73d6f8355fe 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -238,7 +238,7 @@ static int kobj_usermode_filter(struct kobject *kobj)
ops = kobj_ns_ops(kobj);
if (ops) {
- const void *init_ns, *ns;
+ const struct ns_common *init_ns, *ns;
ns = kobj->ktype->namespace(kobj);
init_ns = ops->initial_ns();
@@ -388,7 +388,7 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,
#ifdef CONFIG_NET
const struct kobj_ns_type_operations *ops;
- const struct net *net = NULL;
+ const struct ns_common *ns = NULL;
ops = kobj_ns_ops(kobj);
if (!ops && kobj->kset) {
@@ -404,14 +404,17 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,
*/
if (ops && ops->netlink_ns && kobj->ktype->namespace)
if (ops->type == KOBJ_NS_TYPE_NET)
- net = kobj->ktype->namespace(kobj);
+ ns = kobj->ktype->namespace(kobj);
- if (!net)
+ if (!ns)
ret = uevent_net_broadcast_untagged(env, action_string,
devpath);
- else
+ else {
+ const struct net *net = container_of(ns, struct net, ns);
+
ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env,
action_string, devpath);
+ }
#endif
return ret;
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index ca878525ad7c7..3a3a92f3a314c 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1181,24 +1181,24 @@ static void rx_queue_release(struct kobject *kobj)
netdev_put(queue->dev, &queue->dev_tracker);
}
-static const void *rx_queue_namespace(const struct kobject *kobj)
+static const struct ns_common *rx_queue_namespace(const struct kobject *kobj)
{
struct netdev_rx_queue *queue = to_rx_queue(kobj);
struct device *dev = &queue->dev->dev;
- const void *ns = NULL;
if (dev->class && dev->class->namespace)
- ns = dev->class->namespace(dev);
+ return dev->class->namespace(dev);
- return ns;
+ return NULL;
}
static void rx_queue_get_ownership(const struct kobject *kobj,
kuid_t *uid, kgid_t *gid)
{
- const struct net *net = rx_queue_namespace(kobj);
+ const struct ns_common *ns = rx_queue_namespace(kobj);
- net_ns_get_ownership(net, uid, gid);
+ net_ns_get_ownership(ns ? container_of(ns, struct net, ns) : NULL,
+ uid, gid);
}
static const struct kobj_type rx_queue_ktype = {
@@ -1931,24 +1931,24 @@ static void netdev_queue_release(struct kobject *kobj)
netdev_put(queue->dev, &queue->dev_tracker);
}
-static const void *netdev_queue_namespace(const struct kobject *kobj)
+static const struct ns_common *netdev_queue_namespace(const struct kobject *kobj)
{
struct netdev_queue *queue = to_netdev_queue(kobj);
struct device *dev = &queue->dev->dev;
- const void *ns = NULL;
if (dev->class && dev->class->namespace)
- ns = dev->class->namespace(dev);
+ return dev->class->namespace(dev);
- return ns;
+ return NULL;
}
static void netdev_queue_get_ownership(const struct kobject *kobj,
kuid_t *uid, kgid_t *gid)
{
- const struct net *net = netdev_queue_namespace(kobj);
+ const struct ns_common *ns = netdev_queue_namespace(kobj);
- net_ns_get_ownership(net, uid, gid);
+ net_ns_get_ownership(ns ? container_of(ns, struct net, ns) : NULL,
+ uid, gid);
}
static const struct kobj_type netdev_queue_ktype = {
@@ -2185,24 +2185,24 @@ static bool net_current_may_mount(void)
return ns_capable(net->user_ns, CAP_SYS_ADMIN);
}
-static void *net_grab_current_ns(void)
+static struct ns_common *net_grab_current_ns(void)
{
- struct net *ns = current->nsproxy->net_ns;
+ struct net *net = current->nsproxy->net_ns;
#ifdef CONFIG_NET_NS
- if (ns)
- refcount_inc(&ns->passive);
+ if (net)
+ refcount_inc(&net->passive);
#endif
- return ns;
+ return net ? to_ns_common(net) : NULL;
}
-static const void *net_initial_ns(void)
+static const struct ns_common *net_initial_ns(void)
{
- return &init_net;
+ return to_ns_common(&init_net);
}
-static const void *net_netlink_ns(struct sock *sk)
+static const struct ns_common *net_netlink_ns(struct sock *sk)
{
- return sock_net(sk);
+ return to_ns_common(sock_net(sk));
}
const struct kobj_ns_type_operations net_ns_type_operations = {
@@ -2252,11 +2252,11 @@ static void netdev_release(struct device *d)
kvfree(dev);
}
-static const void *net_namespace(const struct device *d)
+static const struct ns_common *net_namespace(const struct device *d)
{
const struct net_device *dev = to_net_dev(d);
- return dev_net(dev);
+ return to_ns_common(dev_net(dev));
}
static void net_get_ownership(const struct device *d, kuid_t *uid, kgid_t *gid)
@@ -2402,14 +2402,14 @@ int netdev_change_owner(struct net_device *ndev, const struct net *net_old,
}
int netdev_class_create_file_ns(const struct class_attribute *class_attr,
- const void *ns)
+ const struct ns_common *ns)
{
return class_create_file_ns(&net_class, class_attr, ns);
}
EXPORT_SYMBOL(netdev_class_create_file_ns);
void netdev_class_remove_file_ns(const struct class_attribute *class_attr,
- const void *ns)
+ const struct ns_common *ns)
{
class_remove_file_ns(&net_class, class_attr, ns);
}
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index ae1f9cc021b87..757d387820ccf 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -538,12 +538,10 @@ void net_passive_dec(struct net *net)
}
}
-void net_drop_ns(void *p)
+void net_drop_ns(struct ns_common *ns)
{
- struct net *net = (struct net *)p;
-
- if (net)
- net_passive_dec(net);
+ if (ns)
+ net_passive_dec(to_net_ns(ns));
}
struct net *copy_net_ns(u64 flags,
diff --git a/net/sunrpc/sysfs.c b/net/sunrpc/sysfs.c
index 9dcd5e985e72a..f3c680e8846c1 100644
--- a/net/sunrpc/sysfs.c
+++ b/net/sunrpc/sysfs.c
@@ -6,6 +6,7 @@
#include <linux/kobject.h>
#include <linux/sunrpc/addr.h>
#include <linux/sunrpc/xprtsock.h>
+#include <net/net_namespace.h>
#include "sysfs.h"
@@ -553,20 +554,22 @@ static void rpc_sysfs_xprt_release(struct kobject *kobj)
kfree(xprt);
}
-static const void *rpc_sysfs_client_namespace(const struct kobject *kobj)
+static const struct ns_common *rpc_sysfs_client_namespace(const struct kobject *kobj)
{
- return container_of(kobj, struct rpc_sysfs_client, kobject)->net;
+ return to_ns_common(container_of(kobj, struct rpc_sysfs_client,
+ kobject)->net);
}
-static const void *rpc_sysfs_xprt_switch_namespace(const struct kobject *kobj)
+static const struct ns_common *rpc_sysfs_xprt_switch_namespace(const struct kobject *kobj)
{
- return container_of(kobj, struct rpc_sysfs_xprt_switch, kobject)->net;
+ return to_ns_common(container_of(kobj, struct rpc_sysfs_xprt_switch,
+ kobject)->net);
}
-static const void *rpc_sysfs_xprt_namespace(const struct kobject *kobj)
+static const struct ns_common *rpc_sysfs_xprt_namespace(const struct kobject *kobj)
{
- return container_of(kobj, struct rpc_sysfs_xprt,
- kobject)->xprt->xprt_net;
+ return to_ns_common(container_of(kobj, struct rpc_sysfs_xprt,
+ kobject)->xprt->xprt_net);
}
static struct kobj_attribute rpc_sysfs_clnt_version = __ATTR(rpc_version,
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 62f26618f6747..8ca59e7fb0f4a 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -154,11 +154,11 @@ static SIMPLE_DEV_PM_OPS(wiphy_pm_ops, wiphy_suspend, wiphy_resume);
#define WIPHY_PM_OPS NULL
#endif
-static const void *wiphy_namespace(const struct device *d)
+static const struct ns_common *wiphy_namespace(const struct device *d)
{
struct wiphy *wiphy = container_of(d, struct wiphy, dev);
- return wiphy_net(wiphy);
+ return to_ns_common(wiphy_net(wiphy));
}
struct class ieee80211_class = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0486/2151] kernfs: make directory seek namespace-aware
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (484 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0485/2151] kernfs: pass struct ns_common instead of const void * for namespace tags Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0487/2151] kernfs: dont repeat or skip an entry when readdir resumes Greg Kroah-Hartman
` (396 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Christian Brauner, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <brauner@kernel.org>
[ Upstream commit cb76a81c7cec37bdf525164561b02665cd763421 ]
The rbtree backing kernfs directories is ordered by (hash, ns_id, name)
but kernfs_dir_pos() only searches by hash when seeking to a position
during readdir. When two nodes from different namespaces share the same
hash value, the binary search can land on a node in the wrong namespace.
The subsequent skip-forward loop walks rb_next() and may overshoot the
correct node, silently dropping an entry from the readdir results.
With the recent switch from raw namespace pointers to public namespace
ids as hash seeds, computing hash collisions became an offline operation.
An unprivileged user could unshare into a new network namespace, create
a single interface whose name-hash collides with a target entry in
init_net, and cause a victim's seekdir/readdir on /sys/class/net to miss
that entry.
Fix this by extending the rbtree search in kernfs_dir_pos() to also
compare namespace ids when hashes match. Since the rbtree is already
ordered by (hash, ns_id, name), this makes the seek land directly in the
correct namespace's range, eliminating the wrong-namespace overshoot.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Stable-dep-of: 5ebcb578adee ("kernfs: don't repeat or skip an entry when readdir resumes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/kernfs/dir.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 1265ff74d9070..0fcebf4201206 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -1853,6 +1853,7 @@ static struct kernfs_node *kernfs_dir_pos(const struct ns_common *ns,
}
if (!pos && (hash > 1) && (hash < INT_MAX)) {
struct rb_node *node = parent->dir.children.rb_node;
+ u64 ns_id = kernfs_ns_id(ns);
while (node) {
pos = rb_to_kn(node);
@@ -1860,6 +1861,10 @@ static struct kernfs_node *kernfs_dir_pos(const struct ns_common *ns,
node = node->rb_left;
else if (hash > pos->hash)
node = node->rb_right;
+ else if (ns_id < kernfs_ns_id(pos->ns))
+ node = node->rb_left;
+ else if (ns_id > kernfs_ns_id(pos->ns))
+ node = node->rb_right;
else
break;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0487/2151] kernfs: dont repeat or skip an entry when readdir resumes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (485 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0486/2151] kernfs: make directory seek namespace-aware Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0488/2151] kernfs: dont hold kernfs_rwsem across dir_emit() Greg Kroah-Hartman
` (395 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tejun Heo, Shakeel Butt,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shakeel Butt <shakeel.butt@linux.dev>
[ Upstream commit 5ebcb578adeec7407dd501108ab2f423ca8e3e55 ]
readdir keeps its place as a name hash in ctx->pos and pins the entry in
file->private_data. If that entry is gone when the listing comes back,
kernfs_dir_pos() searches the rbtree for the hash and keeps whatever
node the descent stopped on. That is the entry before or after the
missing one, depending on the shape of the tree.
Landing before it repeats an entry the previous getdents(2) call already
reported. Landing after it, kernfs_dir_next_pos() calls rb_next() and
steps over an unreported entry.
With children A(10), B(20), C(30):
report A, ctx->pos = 10
A removed
kernfs_dir_next_pos(10, A)
A is gone, the search for 10 stops at B
rb_next(B) -> C, so B is never reported
Only the repeat happens today, between two getdents(2) calls. The skip
needs the pinned entry to go away inside one call, which the next patch
allows when it drops kernfs_rwsem around dir_emit().
Before the commit 4e4d6d860b93 the descent kept a node only on the way
left, which is a search for the first entry at or after the hash. That
commit moved the assignment to the top of the loop, where it runs on
right turns too. Restore that search, and step forward only when the
pinned entry is still there rather than when the hash matches, since two
entries in one directory can share a hash.
While here, kernfs_dir_next_pos() called the hash @ino. It is never an
inode number, so name it @hash.
Fixes: 4e4d6d860b93 ("sysfs: Add s_hash to sysfs_dirent and order directory entries by hash")
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20260911182815.1992483-2-shakeel.butt@linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/kernfs/dir.c | 43 ++++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 0fcebf4201206..8730e0ab96d27 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -1840,9 +1840,16 @@ static int kernfs_dir_fop_release(struct inode *inode, struct file *filp)
return 0;
}
+/*
+ * Find where a listing left off. @resumed says whether @pos is still that
+ * entry; if not, the first entry at or after @hash is returned instead.
+ */
static struct kernfs_node *kernfs_dir_pos(const struct ns_common *ns,
- struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos)
+ struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos,
+ bool *resumed)
{
+ if (resumed)
+ *resumed = false;
if (pos) {
int valid = kernfs_active(pos) &&
rcu_access_pointer(pos->__parent) == parent &&
@@ -1850,23 +1857,26 @@ static struct kernfs_node *kernfs_dir_pos(const struct ns_common *ns,
kernfs_put(pos);
if (!valid)
pos = NULL;
+ else if (resumed)
+ *resumed = true;
}
if (!pos && (hash > 1) && (hash < INT_MAX)) {
struct rb_node *node = parent->dir.children.rb_node;
- u64 ns_id = kernfs_ns_id(ns);
+
+ /*
+ * Keep a node only on the way left, so the search ends on the
+ * first entry at or after @hash. The empty name sorts before
+ * every entry sharing the hash, so it lands on the first.
+ */
while (node) {
- pos = rb_to_kn(node);
+ struct kernfs_node *kn = rb_to_kn(node);
- if (hash < pos->hash)
+ if (kernfs_name_compare(hash, "", ns, kn) < 0) {
+ pos = kn;
node = node->rb_left;
- else if (hash > pos->hash)
+ } else {
node = node->rb_right;
- else if (ns_id < kernfs_ns_id(pos->ns))
- node = node->rb_left;
- else if (ns_id > kernfs_ns_id(pos->ns))
- node = node->rb_right;
- else
- break;
+ }
}
}
/* Skip over entries which are dying/dead or in the wrong namespace */
@@ -1881,10 +1891,13 @@ static struct kernfs_node *kernfs_dir_pos(const struct ns_common *ns,
}
static struct kernfs_node *kernfs_dir_next_pos(const struct ns_common *ns,
- struct kernfs_node *parent, ino_t ino, struct kernfs_node *pos)
+ struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos)
{
- pos = kernfs_dir_pos(ns, parent, ino, pos);
- if (pos) {
+ bool resumed;
+
+ pos = kernfs_dir_pos(ns, parent, hash, pos, &resumed);
+ /* Step over @pos only if it survived; two entries can share a hash. */
+ if (pos && resumed) {
do {
struct rb_node *node = rb_next(&pos->rb);
if (!node)
@@ -1913,7 +1926,7 @@ static int kernfs_fop_readdir(struct file *file, struct dir_context *ctx)
if (kernfs_ns_enabled(parent))
ns = kernfs_info(dentry->d_sb)->ns;
- for (pos = kernfs_dir_pos(ns, parent, ctx->pos, pos);
+ for (pos = kernfs_dir_pos(ns, parent, ctx->pos, pos, NULL);
pos;
pos = kernfs_dir_next_pos(ns, parent, ctx->pos, pos)) {
const char *name = kernfs_rcu_name(pos);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0488/2151] kernfs: dont hold kernfs_rwsem across dir_emit()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (486 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0487/2151] kernfs: dont repeat or skip an entry when readdir resumes Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0489/2151] ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering Greg Kroah-Hartman
` (394 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shakeel Butt,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shakeel Butt <shakeel.butt@linux.dev>
[ Upstream commit 341c65579de5b632eb7913bb68b3e375eeeb3ddf ]
kernfs_fop_readdir() holds kernfs_rwsem for reading across the whole
listing, dir_emit() included. dir_emit() copies to userspace, so it can
fault into reclaim while holding the lock that every create, remove and
rename in the hierarchy needs. sysfs and cgroupfs have one per machine.
Under memory pressure the monitoring daemons fault on their own
getdents(2) buffer with it held:
below: page allocation stall for 120 secs: order:0,
mode:0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP)
nodemask=(null),cpuset=hostcritical.slice,mems_allowed=0
Call Trace:
<TASK>
dump_stack_lvl+0x5d/0x80
__alloc_frozen_pages_noprof+0x5f4d/0x6300
? memcg_list_lru_alloc+0x73/0x320
? ima_file_check+0xd0/0x7d0
vma_alloc_folio_noprof+0x145/0x560
handle_mm_fault+0x17c9/0x2720
? find_vma+0x27/0x30
do_user_addr_fault+0x39f/0x6e0
exc_page_fault+0x8f/0x110
asm_exc_page_fault+0x22/0x30
RIP: 0010:filldir64+0xd7/0x1a0
[Code:/RSP:/RAX:..R15: register block elided]
kernfs_fop_readdir+0x2de/0x420
iterate_dir+0x8c/0x1f0
__se_sys_getdents64+0x61/0xe0
? copy_page_from_iter+0x860/0x860
do_syscall_64+0x6a/0x250
entry_SYSCALL_64_after_hwframe+0x4b/0x53
</TASK>
Commit 9aab10a0249e ("kernfs: Don't re-lock kernfs_root::kernfs_rwsem in
kernfs_fop_readdir().") took the lock drop out because dir_emit() was
handed kernfs_node::name, which a rename can free. The previous patch
emits a copy instead, so drop the lock around dir_emit().
A listing is no longer atomic within one getdents(2) call, which for
most sysfs and cgroup directories is all of it. POSIX leaves that
unspecified for an entry added or removed since opendir(3).
Fixes: 9aab10a0249e ("kernfs: Don't re-lock kernfs_root::kernfs_rwsem in kernfs_fop_readdir().")
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Link: https://patch.msgid.link/20260911182815.1992483-4-shakeel.butt@linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/kernfs/dir.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 8730e0ab96d27..34941369dcfb4 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -1938,10 +1938,14 @@ static int kernfs_fop_readdir(struct file *file, struct dir_context *ctx)
file->private_data = pos;
kernfs_get(pos);
- if (!dir_emit(ctx, name, len, ino, type)) {
- up_read(&root->kernfs_rwsem);
+ /*
+ * dir_emit() can fault, so run it unlocked. @pos is pinned
+ * above and kernfs_dir_pos() rechecks it on the way back.
+ */
+ up_read(&root->kernfs_rwsem);
+ if (!dir_emit(ctx, name, len, ino, type))
return 0;
- }
+ down_read(&root->kernfs_rwsem);
}
up_read(&root->kernfs_rwsem);
file->private_data = NULL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0489/2151] ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (487 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0488/2151] kernfs: dont hold kernfs_rwsem across dir_emit() Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0490/2151] ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering Greg Kroah-Hartman
` (393 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vijendar Mukunda, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
[ Upstream commit db2167f2e3f72db64d01356cc9f2924d32fd5a51 ]
Call free_irq() before amd_sof_sdw_exit() in amd_sof_acp_remove().
amd_sof_sdw_exit() sets adata->sdw to NULL; if an IRQ fires between
that point and the subsequent free_irq(), acp_irq_handler() may
dereference the now-NULL pdev[] pointer, causing a use-after-free.
Fixes: d948218424bf ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260910132251.1171943-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/amd/acp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index f615b8d1c8020..df43c6000a063 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -949,12 +949,12 @@ void amd_sof_acp_remove(struct snd_sof_dev *sdev)
{
struct acp_dev_data *adata = sdev->pdata->hw_pdata;
- if (adata->sdw)
- amd_sof_sdw_exit(sdev);
-
if (sdev->ipc_irq)
free_irq(sdev->ipc_irq, sdev);
+ if (adata->sdw)
+ amd_sof_sdw_exit(sdev);
+
if (adata->dmic_dev)
platform_device_unregister(adata->dmic_dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0490/2151] ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (488 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0489/2151] ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0491/2151] spi: virtio: fix max frequency setting Greg Kroah-Hartman
` (392 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vijendar Mukunda, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
[ Upstream commit b6aaef8ca8c305170de83e621c7e16d56731312a ]
Call amd_sof_sdw_exit() after free_irq() in the free_ipc_irq error
label of amd_sof_acp_probe(). Without this, an IRQ that fires between
sdw context teardown and free_irq() can dereference freed SoundWire
resources.
Fixes: d948218424bf ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260910132251.1171943-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/amd/acp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index df43c6000a063..475b77b8ea309 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -939,6 +939,8 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
free_ipc_irq:
free_irq(sdev->ipc_irq, sdev);
+ if (adata->sdw)
+ amd_sof_sdw_exit(sdev);
unregister_dev:
platform_device_unregister(adata->dmic_dev);
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0491/2151] spi: virtio: fix max frequency setting
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (489 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0490/2151] ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0492/2151] clk: si521xx: correct the SI52147 OF output enable map Greg Kroah-Hartman
` (391 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Francesco Valla, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Valla <francesco@valla.it>
[ Upstream commit 26f42ca8becd01877e762916865a168c1b6c4ff4 ]
The maximum transfer frequency is read from the virtio config space but
never propagated to the SPI framework logic. Fix this behavior and drop
the useless setting copy from the driver's private data.
Fixes: f98cabe3f6cf ("SPI: Add virtio SPI driver")
Signed-off-by: Francesco Valla <francesco@valla.it>
Link: https://patch.msgid.link/20260915-virtio-spi-fix2-v1-1-7a474cb1b13b@valla.it
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-virtio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/spi/spi-virtio.c b/drivers/spi/spi-virtio.c
index 06845bd3fe832..c92ea19881183 100644
--- a/drivers/spi/spi-virtio.c
+++ b/drivers/spi/spi-virtio.c
@@ -33,8 +33,6 @@ struct virtio_spi_priv {
struct virtqueue *vq;
/* Copy of config space mode_func_supported */
u32 mode_func_supported;
- /* Copy of config space max_freq_hz */
- u32 max_freq_hz;
};
static void virtio_spi_msg_done(struct virtqueue *vq)
@@ -305,7 +303,7 @@ static void virtio_spi_read_config(struct virtio_device *vdev)
virtio_cread32(vdev, offsetof(struct virtio_spi_config,
bits_per_word_mask));
- priv->max_freq_hz =
+ ctrl->max_speed_hz =
virtio_cread32(vdev, offsetof(struct virtio_spi_config,
max_freq_hz));
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0492/2151] clk: si521xx: correct the SI52147 OF output enable map
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (490 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0491/2151] spi: virtio: fix max frequency setting Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0493/2151] clk: milbeaut: Return divider update timeouts Greg Kroah-Hartman
` (390 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Brian Masney,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 7a4cc47d715f08309089d40b8c29fb0ba79917db ]
The SI52147 data sheet assigns DIFF0 through DIFF3 output-enable bits to
0x17 in control register 1. The OF match data uses 0x15, leaving the
DIFF2 bit out of the map, while the I2C ID table already uses the
documented value.
Use 0x17 for the SI52147 OF entry so both enumeration paths expose the
documented outputs.
Fixes: edc12763a3a29 ("clk: si521xx: Clock driver for Skyworks Si521xx I2C PCIe clock generators")
Assisted-by: Codex:gpt-5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/clk-si521xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk-si521xx.c b/drivers/clk/clk-si521xx.c
index 4ed4e1a5f4f2b..f167fd63c5040 100644
--- a/drivers/clk/clk-si521xx.c
+++ b/drivers/clk/clk-si521xx.c
@@ -375,7 +375,7 @@ MODULE_DEVICE_TABLE(i2c, si521xx_id);
static const struct of_device_id clk_si521xx_of_match[] = {
{ .compatible = "skyworks,si52144", .data = (void *)SI521XX_OE_MAP(0x5, 0xc0) },
{ .compatible = "skyworks,si52146", .data = (void *)SI521XX_OE_MAP(0x15, 0xe0) },
- { .compatible = "skyworks,si52147", .data = (void *)SI521XX_OE_MAP(0x15, 0xf8) },
+ { .compatible = "skyworks,si52147", .data = (void *)SI521XX_OE_MAP(0x17, 0xf8) },
{ }
};
MODULE_DEVICE_TABLE(of, clk_si521xx_of_match);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0493/2151] clk: milbeaut: Return divider update timeouts
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (491 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0492/2151] clk: si521xx: correct the SI52147 OF output enable map Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0494/2151] drm/amd/pm: bound SCLK FCW range entries to the table size Greg Kroah-Hartman
` (389 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Brian Masney,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit 92d0998090d1716ee6b47174c10eb9415a12fca8 ]
m10v_clk_divider_set_rate() logs when the hardware does not clear its
write-valid request, but still returns success to the clock framework. It
also uses the sleeping poll helper while holding the divider spinlock.
Use the atomic poll helper under the lock and return its timeout so the
rate change is not reported as successful before the hardware accepts it.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 6a6ba5b55a72 ("clock: milbeaut: Add Milbeaut M10V clock controller")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/clk-milbeaut.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/clk-milbeaut.c b/drivers/clk/clk-milbeaut.c
index bb94d02a76cf1..3b33ea6c889d6 100644
--- a/drivers/clk/clk-milbeaut.c
+++ b/drivers/clk/clk-milbeaut.c
@@ -414,8 +414,8 @@ static int m10v_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
struct m10v_clk_divider *divider = to_m10v_div(hw);
- int value;
unsigned long flags = 0;
+ int value, ret = 0;
u32 val;
u32 write_en = BIT(divider->width - 1);
@@ -437,8 +437,10 @@ static int m10v_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
if (divider->write_valid_reg) {
writel(M10V_DCHREQ, divider->write_valid_reg);
- if (readl_poll_timeout(divider->write_valid_reg, val,
- !val, M10V_UPOLL_RATE, M10V_UTIMEOUT))
+ ret = readl_poll_timeout_atomic(divider->write_valid_reg, val,
+ !val, M10V_UPOLL_RATE,
+ M10V_UTIMEOUT);
+ if (ret)
pr_err("%s:%s couldn't stabilize\n",
__func__, clk_hw_get_name(hw));
}
@@ -448,7 +450,7 @@ static int m10v_clk_divider_set_rate(struct clk_hw *hw, unsigned long rate,
else
__release(divider->lock);
- return 0;
+ return ret;
}
static const struct clk_ops m10v_clk_divider_ops = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0494/2151] drm/amd/pm: bound SCLK FCW range entries to the table size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (492 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0493/2151] clk: milbeaut: Return divider update timeouts Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0495/2151] drm/amd: Add correct prefix for VBIOS message Greg Kroah-Hartman
` (388 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Hari Mishal, Alex Deucher,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hari Mishal <harimishal1@gmail.com>
[ Upstream commit f35aa5c77f5fca20fc269d6221df19c7b96704a5 ]
atomctrl_get_smc_sclk_range_table() copies ucSclkEntryNum entries from
the VBIOS SMU_Info table into pp_atom_ctrl_sclk_range_table. Both the
source (asSclkFcwRangeEntry[]) and destination (table->entry[]) arrays
are fixed at MAX_SCLK_RANGE (8) entries, but ucSclkEntryNum is an
unchecked u8 read straight from the VBIOS, so it can be up to 255. The
destination is stack-allocated in both callers
(polaris10_get_sclk_range_table(), vegam_get_sclk_range_table()), so a
count above 8 overflows a stack buffer, not just a heap read.
Reject counts above MAX_SCLK_RANGE rather than clamping to it. Only
one version of this VBIOS struct (ATOM_SMU_INFO_V2_1) has ever
existed, so a count above 8 corresponds to no legitimate table format
and means either a corrupted or a tampered VBIOS.
Fixes: a23eefa2f461 ("drm/amd/powerplay: enable dpm for baffin.")
Assisted-by: gkh_clanker_t1000
Signed-off-by: Hari Mishal <harimishal1@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
index 4b796d60b03d4..3217ad3c1d17e 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
@@ -1025,6 +1025,9 @@ int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctr
if (!psmu_info)
return -EINVAL;
+ if (psmu_info->ucSclkEntryNum > MAX_SCLK_RANGE)
+ return -EINVAL;
+
for (i = 0; i < psmu_info->ucSclkEntryNum; i++) {
table->entry[i].ucVco_setting = psmu_info->asSclkFcwRangeEntry[i].ucVco_setting;
table->entry[i].ucPostdiv = psmu_info->asSclkFcwRangeEntry[i].ucPostdiv;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0495/2151] drm/amd: Add correct prefix for VBIOS message
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (493 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0494/2151] drm/amd/pm: bound SCLK FCW range entries to the table size Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0496/2151] drm/amdgpu: Print full vbios info Greg Kroah-Hartman
` (387 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mario Limonciello (AMD),
Aurabindo Pillai, Alex Deucher, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello (AMD) <superm1@kernel.org>
[ Upstream commit e6c7ebeaba4080562e71a59a788ac90b41e09240 ]
It's not obvious which GPU the ATOM BIOS message goes with. Use
drm_info() to show the correct one.
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: aee05c455ad3 ("drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/atom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index 639649ef6dd03..92ba327f476d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1474,7 +1474,7 @@ static void atom_get_vbios_pn(struct atom_context *ctx)
ctx->vbios_pn[count] = 0;
}
- pr_info("ATOM BIOS: %s\n", ctx->vbios_pn);
+ drm_info(ctx->card->dev, "ATOM BIOS: %s\n", ctx->vbios_pn);
}
static void atom_get_vbios_version(struct atom_context *ctx)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0496/2151] drm/amdgpu: Print full vbios info
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (494 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0495/2151] drm/amd: Add correct prefix for VBIOS message Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0497/2151] drm/amdgpu: bounds check ATOM IIO table parsing Greg Kroah-Hartman
` (386 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Lijo Lazar, Alex Deucher,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijo Lazar <lijo.lazar@amd.com>
[ Upstream commit 4fd7b724a87a4051401ee2ed64c26c9249582040 ]
Add build number, version and date to the existing part number print.
Example:
[drm] ATOM BIOS: 113-PN000108-103, build: 00159017, ver: 022.040.003.043.000001, 2025/07/27
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: aee05c455ad3 ("drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/atom.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index 92ba327f476d6..a40ce7555f287 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1473,8 +1473,6 @@ static void atom_get_vbios_pn(struct atom_context *ctx)
ctx->vbios_pn[count] = 0;
}
-
- drm_info(ctx->card->dev, "ATOM BIOS: %s\n", ctx->vbios_pn);
}
static void atom_get_vbios_version(struct atom_context *ctx)
@@ -1531,6 +1529,30 @@ static void atom_get_vbios_build(struct atom_context *ctx)
strscpy(ctx->build_num, str, len);
}
+static inline void atom_print_vbios_info(struct atom_context *ctx)
+{
+ char vbios_info[256];
+ int off = 0;
+
+ if (ctx->vbios_pn[0])
+ off += scnprintf(vbios_info + off, sizeof(vbios_info) - off,
+ "%s", ctx->vbios_pn);
+ if (ctx->build_num[0])
+ off += scnprintf(vbios_info + off, sizeof(vbios_info) - off,
+ "%sbuild: %s", off ? ", " : "",
+ ctx->build_num);
+ if (ctx->vbios_ver_str[0])
+ off += scnprintf(vbios_info + off, sizeof(vbios_info) - off,
+ "%sver: %s", off ? ", " : "",
+ ctx->vbios_ver_str);
+ if (ctx->date[0])
+ off += scnprintf(vbios_info + off, sizeof(vbios_info) - off,
+ "%s%.10s", off ? ", " : "",
+ ctx->date);
+ if (off)
+ drm_info(ctx->card->dev, "ATOM BIOS: %s\n", vbios_info);
+}
+
struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
{
int base;
@@ -1593,6 +1615,8 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
atom_get_vbios_version(ctx);
atom_get_vbios_build(ctx);
+ atom_print_vbios_info(ctx);
+
return ctx;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0497/2151] drm/amdgpu: bounds check ATOM IIO table parsing
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (495 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0496/2151] drm/amdgpu: Print full vbios info Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0498/2151] drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters Greg Kroah-Hartman
` (385 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lijo Lazar, Alex Deucher, Asad Kamal,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijo Lazar <lijo.lazar@amd.com>
[ Upstream commit be88697602238c3dcb47bbc2db1eef923f63e78b ]
atom_index_iio() parsed the IIO bytecode without bounds checks, allowing
out-of-bounds reads on a malformed VBIOS. Pass the BIOS size into
amdgpu_atom_parse() and bound the parse loops by it.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Assisted-by: Claude Code
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: aee05c455ad3 ("drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +-
drivers/gpu/drm/amd/amdgpu/atom.c | 25 ++++++++++++++++----
drivers/gpu/drm/amd/amdgpu/atom.h | 3 ++-
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
index b8f7e3a18d324..8d79d98f35391 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
@@ -1923,7 +1923,7 @@ int amdgpu_atombios_init(struct amdgpu_device *adev)
atom_card_info->pll_read = cail_pll_read;
atom_card_info->pll_write = cail_pll_write;
- adev->mode_info.atom_context = amdgpu_atom_parse(atom_card_info, adev->bios);
+ adev->mode_info.atom_context = amdgpu_atom_parse(atom_card_info, adev->bios, adev->bios_size);
if (!adev->mode_info.atom_context) {
amdgpu_atombios_fini(adev);
return -ENOMEM;
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index a40ce7555f287..0d5be17959721 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1327,11 +1327,25 @@ static void atom_index_iio(struct atom_context *ctx, int base)
ctx->iio = kzalloc(2 * 256, GFP_KERNEL);
if (!ctx->iio)
return;
- while (CU8(base) == ATOM_IIO_START) {
- ctx->iio[CU8(base + 1)] = base + 2;
+ while (base + 1 < ctx->bios_size && CU8(base) == ATOM_IIO_START) {
+ uint8_t index = CU8(base + 1);
+ int start = base + 2;
base += 2;
- while (CU8(base) != ATOM_IIO_END)
- base += atom_iio_len[CU8(base)];
+ while (base < ctx->bios_size && CU8(base) != ATOM_IIO_END) {
+ uint8_t op = CU8(base);
+
+ /*
+ * Unknown opcode: its length is unknown so the byte
+ * stream cannot be resynced reliably.
+ */
+ if (op >= ARRAY_SIZE(atom_iio_len))
+ return;
+ base += atom_iio_len[op];
+ }
+ if (base >= ctx->bios_size)
+ return;
+ /* Only index well-formed methods, others stay 0 */
+ ctx->iio[index] = start;
base += 3;
}
}
@@ -1553,7 +1567,7 @@ static inline void atom_print_vbios_info(struct atom_context *ctx)
drm_info(ctx->card->dev, "ATOM BIOS: %s\n", vbios_info);
}
-struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
+struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios, uint32_t bios_size)
{
int base;
struct atom_context *ctx =
@@ -1567,6 +1581,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios)
ctx->card = card;
ctx->bios = bios;
+ ctx->bios_size = bios_size;
if (CU16(0) != ATOM_BIOS_MAGIC) {
pr_info("Invalid BIOS magic\n");
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.h b/drivers/gpu/drm/amd/amdgpu/atom.h
index bb3d9eb7eb6b5..4687c019cbe30 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.h
+++ b/drivers/gpu/drm/amd/amdgpu/atom.h
@@ -133,6 +133,7 @@ struct atom_context {
struct card_info *card;
struct mutex mutex;
void *bios;
+ uint32_t bios_size;
uint32_t cmd_table, data_table;
uint16_t *iio;
@@ -160,7 +161,7 @@ struct atom_context {
extern int amdgpu_atom_debug;
-struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios);
+struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios, uint32_t bios_size);
int amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size);
int amdgpu_atom_asic_init(struct atom_context *ctx);
void amdgpu_atom_destroy(struct atom_context *ctx);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0498/2151] drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (496 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0497/2151] drm/amdgpu: bounds check ATOM IIO table parsing Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0499/2151] ata: sata_dwc_460ex: Dont enable interrupt if libATA core registration fails Greg Kroah-Hartman
` (384 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Hari Mishal, Alex Deucher,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hari Mishal <harimishal1@gmail.com>
[ Upstream commit aee05c455ad3e72df9a0591baf0b60da518800f3 ]
atom_get_vbios_date(), atom_get_vbios_pn(), atom_get_vbios_version()
and atom_get_vbios_build() all walk the BIOS image using offsets and
counts taken from the image itself, checked only against each other
and never against ctx->bios_size:
- atom_get_vbios_date() reads 14 bytes at a fixed offset that
check_atom_bios()'s minimum size (0x49) does not cover.
- atom_get_vbios_pn() dereferences an image-supplied u16 string
offset unchecked, then walks and copies from it with only a length
cap, not an image cap.
- atom_get_vbios_version() takes its search bounds from image u16s;
atom_find_str_in_rom() already clamps the search itself, but the
match is then advanced by a fixed 18 bytes and STRLEN_NORMAL bytes
are copied from there with no check that this still lands inside
the image.
- atom_get_vbios_build() walks from an image-supplied config-string
offset toward the ROM header; a config offset at or past the
header makes the pointer difference negative, wrapping through the
u16 'len' and passing strscpy() a bound far larger than the
32-byte destination.
Bound each getter's reads, walks and copies to ctx->bios_size, falling
back to an empty string on a malformed image.
Fixes: 29b4c589b43d ("drm/amdgpu: Add vbios info ioctl interface")
Fixes: d6fa80266178 ("drm/amdgpu: Add vbios build number interface")
Assisted-by: gkh_clanker_t1000
Signed-off-by: Hari Mishal <harimishal1@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/atom.c | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c b/drivers/gpu/drm/amd/amdgpu/atom.c
index 0d5be17959721..a4ebb817f3cbf 100644
--- a/drivers/gpu/drm/amd/amdgpu/atom.c
+++ b/drivers/gpu/drm/amd/amdgpu/atom.c
@@ -1405,6 +1405,11 @@ static void atom_get_vbios_date(struct atom_context *ctx)
p_rom = ctx->bios;
+ if (ctx->bios_size < OFFSET_TO_VBIOS_DATE + 14) {
+ ctx->date[0] = '\0';
+ return;
+ }
+
date_in_rom = p_rom + OFFSET_TO_VBIOS_DATE;
ctx->date[0] = '2';
@@ -1468,10 +1473,15 @@ static void atom_get_vbios_pn(struct atom_context *ctx)
vbios_str = p_rom + OFFSET_TO_VBIOS_PART_NUMBER;
}
- if (*vbios_str == 0) {
+ if (vbios_str >= p_rom + ctx->bios_size)
+ vbios_str = NULL;
+
+ if (vbios_str == NULL || *vbios_str == 0) {
vbios_str = atom_find_str_in_rom(ctx, BIOS_ATOM_PREFIX, 3, 1024, 64);
if (vbios_str == NULL)
vbios_str += sizeof(BIOS_ATOM_PREFIX) - 1;
+ if (vbios_str >= p_rom + ctx->bios_size)
+ vbios_str = NULL;
}
OPTIMIZER_HIDE_VAR(vbios_str);
if (vbios_str != NULL && *vbios_str == 0)
@@ -1479,7 +1489,9 @@ static void atom_get_vbios_pn(struct atom_context *ctx)
if (vbios_str != NULL) {
count = 0;
- while ((count < BIOS_STRING_LENGTH) && vbios_str[count] >= ' ' &&
+ while ((count < BIOS_STRING_LENGTH) &&
+ vbios_str + count < p_rom + ctx->bios_size &&
+ vbios_str[count] >= ' ' &&
vbios_str[count] <= 'z') {
ctx->vbios_pn[count] = vbios_str[count];
count++;
@@ -1512,9 +1524,10 @@ static void atom_get_vbios_version(struct atom_context *ctx)
/* find anchor ATOMBIOSBK-AMD */
vbios_ver =
atom_find_str_in_rom(ctx, BIOS_VERSION_PREFIX, start, end, 64);
- if (vbios_ver != NULL) {
- /* skip ATOMBIOSBK-AMD VER */
- vbios_ver += 18;
+ if (vbios_ver != NULL)
+ vbios_ver += 18; /* skip ATOMBIOSBK-AMD VER */
+
+ if (vbios_ver != NULL && vbios_ver + STRLEN_NORMAL <= p_rom + ctx->bios_size) {
memcpy(ctx->vbios_ver_str, vbios_ver, STRLEN_NORMAL);
} else {
ctx->vbios_ver_str[0] = '\0';
@@ -1530,7 +1543,13 @@ static void atom_get_vbios_build(struct atom_context *ctx)
base = CU16(ATOM_ROM_TABLE_PTR);
atom_rom_hdr = CSTR(base);
+ if ((uint32_t)base + ATOM_ROM_CFG_PTR + sizeof(uint16_t) > ctx->bios_size)
+ return;
+
str = CSTR(CU16(base + ATOM_ROM_CFG_PTR));
+ if (str >= atom_rom_hdr)
+ return;
+
/* Skip config string */
while (str < atom_rom_hdr && *str++)
;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0499/2151] ata: sata_dwc_460ex: Dont enable interrupt if libATA core registration fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (497 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0498/2151] drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0500/2151] accel/amdxdna: Fully initialize map structure before registering notifier Greg Kroah-Hartman
` (383 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Nikolay Borisov, Niklas Cassel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikolay Borisov <nik.borisov@suse.com>
[ Upstream commit e137035fcd66cb454c479bb989968561bbc60341 ]
Recent 4bbc16a353a9 commit changed the timing when interrupts are
enabled. However it didn't account for the libATA registration step. So
it's possible that interrupts are enabled when the device is not
registered with libATA core.
Resolve the issue by failing the entire registration process in case of
failure to register with libATA.
Fixes: 4bbc16a353a9 ("ata: sata_dwc_460ex: enable SATA interrupts only after IRQ handler is registered")
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/20260917150707.1643330-1-nik.borisov@suse.com
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/ata/sata_dwc_460ex.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 36cc28b898650..02c2eacba82fb 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1184,11 +1184,14 @@ static int sata_dwc_probe(struct platform_device *ofdev)
* error_handler() to execute a dummy Softreset EH session
*/
err = ata_host_activate(host, irq, sata_dwc_isr, 0, &sata_dwc_sht);
- if (err)
+ if (err) {
dev_err(dev, "failed to activate host");
+ goto error_out;
+ }
/* Enable SATA Interrupts */
sata_dwc_enable_interrupts(hsdev);
+
return 0;
error_out:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0500/2151] accel/amdxdna: Fully initialize map structure before registering notifier
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (498 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0499/2151] ata: sata_dwc_460ex: Dont enable interrupt if libATA core registration fails Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0501/2151] accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults Greg Kroah-Hartman
` (382 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Max Zhen, Lizhi Hou, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lizhi Hou <lizhi.hou@amd.com>
[ Upstream commit 5eee433b5c97821979e7de58476dc245ee168d89 ]
The map structure is currently only partially initialized when the
notifier is registered. Although holding mmap_write_lock() prevents
the notifier callback from running before the remaining initialization
is complete, the ordering can be confusing during code review.
Fully initialize the map structure before registering the notifier so
that the structure is completely constructed before it is published.
Reviewed-by: Max Zhen <max.zhen@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260911163907.1193852-1-lizhi.hou@amd.com
Stable-dep-of: 2d2c4b248bff ("accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/accel/amdxdna/amdxdna_gem.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/accel/amdxdna/amdxdna_gem.c b/drivers/accel/amdxdna/amdxdna_gem.c
index 147c4c66be4cb..cad1ecdd26f8e 100644
--- a/drivers/accel/amdxdna/amdxdna_gem.c
+++ b/drivers/accel/amdxdna/amdxdna_gem.c
@@ -231,6 +231,15 @@ static int amdxdna_hmm_register(struct amdxdna_gem_obj *abo,
goto free_map;
}
+ mapp->range.notifier = &mapp->notifier;
+ mapp->range.start = vma->vm_start;
+ mapp->range.end = vma->vm_end;
+ mapp->range.default_flags = HMM_PFN_REQ_FAULT;
+ mapp->abo = abo;
+ kref_init(&mapp->refcnt);
+
+ INIT_WORK(&mapp->hmm_unreg_work, amdxdna_hmm_unreg_work);
+
ret = mmu_interval_notifier_insert_locked(&mapp->notifier,
current->mm,
addr,
@@ -241,15 +250,6 @@ static int amdxdna_hmm_register(struct amdxdna_gem_obj *abo,
goto free_pfns;
}
- mapp->range.notifier = &mapp->notifier;
- mapp->range.start = vma->vm_start;
- mapp->range.end = vma->vm_end;
- mapp->range.default_flags = HMM_PFN_REQ_FAULT;
- mapp->abo = abo;
- kref_init(&mapp->refcnt);
-
- INIT_WORK(&mapp->hmm_unreg_work, amdxdna_hmm_unreg_work);
-
down_write(&xdna->notifier_lock);
if (list_empty(&abo->mem.umap_list))
abo->mem.userptr = addr;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0501/2151] accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (499 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0500/2151] accel/amdxdna: Fully initialize map structure before registering notifier Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0502/2151] dt-bindings: interrupt-controller: chrp,open-pic: Typo s/pci/pic/ Greg Kroah-Hartman
` (381 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Max Zhen, Lizhi Hou, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lizhi Hou <lizhi.hou@amd.com>
[ Upstream commit 2d2c4b248bff9ee1ac06054a9138c1a308e2e7b8 ]
When aie2_populate_range() faults in pages, it only sets
HMM_PFN_REQ_FAULT. Without HMM_PFN_REQ_WRITE, handle_mm_fault() does not
request write permissions and may populate the CPU page tables with
read-only PTEs.
Check the VMA flags and set HMM_PFN_REQ_WRITE when the VMA has VM_WRITE.
Fixes: e486147c912f ("accel/amdxdna: Add BO import and export")
Reviewed-by: Max Zhen <max.zhen@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260917171952.1883974-1-lizhi.hou@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/accel/amdxdna/amdxdna_gem.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/accel/amdxdna/amdxdna_gem.c b/drivers/accel/amdxdna/amdxdna_gem.c
index cad1ecdd26f8e..412b48f49fa20 100644
--- a/drivers/accel/amdxdna/amdxdna_gem.c
+++ b/drivers/accel/amdxdna/amdxdna_gem.c
@@ -234,7 +234,15 @@ static int amdxdna_hmm_register(struct amdxdna_gem_obj *abo,
mapp->range.notifier = &mapp->notifier;
mapp->range.start = vma->vm_start;
mapp->range.end = vma->vm_end;
+ /*
+ * Access permissions are fixed at mmap() time. Changing them later
+ * with mprotect() is not supported: the range keeps requesting the
+ * original permissions, so the application may see a fault failure
+ * or an IOMMU fault.
+ */
mapp->range.default_flags = HMM_PFN_REQ_FAULT;
+ if (vma->vm_flags & VM_WRITE)
+ mapp->range.default_flags |= HMM_PFN_REQ_WRITE;
mapp->abo = abo;
kref_init(&mapp->refcnt);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0502/2151] dt-bindings: interrupt-controller: chrp,open-pic: Typo s/pci/pic/
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (500 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0501/2151] accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0503/2151] dt-bindings: interrupt-controller: chrp,open-pic: Fix dangling reference Greg Kroah-Hartman
` (380 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven,
Rob Herring (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert+renesas@glider.be>
[ Upstream commit f0597e96a23b0cc7877581cf907407645ca71c03 ]
The device_type for an OpenPIC node is "open-pic", not "open-pci".
Fixes: a241f1a1b338b714 ("dt-bindings: interrupt-controller: Convert chrp,open-pic to DT schema")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/f2cc11922b3e5dd73997ef8c673137951d3fe715.1788426169.git.geert+renesas@glider.be
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../devicetree/bindings/interrupt-controller/chrp,open-pic.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml b/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
index 642738512f3ce..5363f4c6ffbcf 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
@@ -24,7 +24,7 @@ properties:
- const: chrp,open-pic
device_type:
- const: open-pci
+ const: open-pic
deprecated: true
reg:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0503/2151] dt-bindings: interrupt-controller: chrp,open-pic: Fix dangling reference
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (501 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0502/2151] dt-bindings: interrupt-controller: chrp,open-pic: Typo s/pci/pic/ Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0504/2151] libbpf: Reject local struct_ops bitfields before data access Greg Kroah-Hartman
` (379 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven,
Rob Herring (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert+renesas@glider.be>
[ Upstream commit 2fb6f1a87cba099b2921fc3e777bf399d4153a39 ]
The target of "[1]" was lost during the conversion to json-schema.
Replace it by an inline reference.
Fixes: a241f1a1b338b714 ("dt-bindings: interrupt-controller: Convert chrp,open-pic to DT schema")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/86dd3544f7286fc117dc7ad0f6d799761283ec54.1788426169.git.geert+renesas@glider.be
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../bindings/interrupt-controller/chrp,open-pic.yaml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml b/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
index 5363f4c6ffbcf..294af57a7c372 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/chrp,open-pic.yaml
@@ -12,8 +12,9 @@ maintainers:
description:
This binding specifies what properties must be available in the device tree
representation of an Open PIC compliant interrupt controller. This binding is
- based on the binding defined for Open PIC in [1] and is a superset of that
- binding.
+ based on the binding defined for Open PIC in the Devicetree Specification
+ (available from https://www.devicetree.org/specifications/) and is a superset
+ of that binding.
properties:
compatible:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0504/2151] libbpf: Reject local struct_ops bitfields before data access
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (502 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0503/2151] dt-bindings: interrupt-controller: chrp,open-pic: Fix dangling reference Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0505/2151] rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path Greg Kroah-Hartman
` (378 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mingpei CAO, Andrii Nakryiko,
Amery Hung, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingpei CAO <caomingpei@gmail.com>
[ Upstream commit 961b8946acb482b6d7a39c266d623e5f9c4e873f ]
A local struct_ops type can contain a bitfield absent from the
corresponding kernel BTF type. bpf_map__init_kern_struct_ops() checks
whether data for an absent local member is zero.
For a bitfield, member->offset contains the bit offset and field width.
bpf_map__init_kern_struct_ops() used the encoded value to calculate the
member data pointer before rejecting the bitfield. The zero-data check
could therefore read outside st_ops->data and crash libbpf.
Reject local bitfields before calculating the member data pointer. Keep
the existing rejection for bitfields in the kernel type.
Fixes: c911fc61a7ce ("libbpf: Skip zeroed or null fields if not found in the kernel type.")
Signed-off-by: Mingpei CAO <caomingpei@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Amery Hung <ameryhung@gmail.com>
Link: https://lore.kernel.org/bpf/20260915162252.473044-2-caomingpei@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/bpf/libbpf.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 711a30e70ec22..f6d29013d6697 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1182,6 +1182,12 @@ static int bpf_map__init_kern_struct_ops(struct bpf_map *map)
const char *mname;
mname = btf__name_by_offset(btf, member->name_off);
+ if (btf_member_bitfield_size(type, i)) {
+ pr_warn("struct_ops init_kern %s: local bitfield %s is not supported\n",
+ map->name, mname);
+ return -ENOTSUP;
+ }
+
moff = member->offset / 8;
mdata = data + moff;
msize = btf__resolve_size(btf, member->type);
@@ -1218,8 +1224,7 @@ static int bpf_map__init_kern_struct_ops(struct bpf_map *map)
}
kern_member_idx = kern_member - btf_members(kern_type);
- if (btf_member_bitfield_size(type, i) ||
- btf_member_bitfield_size(kern_type, kern_member_idx)) {
+ if (btf_member_bitfield_size(kern_type, kern_member_idx)) {
pr_warn("struct_ops init_kern %s: bitfield %s is not supported\n",
map->name, mname);
return -ENOTSUP;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0505/2151] rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (503 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0504/2151] libbpf: Reject local struct_ops bitfields before data access Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0506/2151] rcu: fix shrink budget underflow in lazy_rcu_shrink_scan Greg Kroah-Hartman
` (377 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Frederic Weisbecker,
Paul E. McKenney, Joel Fernandes, Boqun Feng, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joel Fernandes <joelagnelf@nvidia.com>
[ Upstream commit d92eca60fea944b2e9272603308a0fde8b6ae447 ]
The WakeOvfIsDeferred code path in __call_rcu_nocb_wake() attempts to
wake rcuog when the callback count exceeds qhimark and callbacks aren't
done with their GP (newly queued or awaiting GP). However, a lot of
testing proves this wake is always redundant or useless.
In the flooding case, rcuog is always waiting for a GP to finish. So
waking up the rcuog thread is pointless. The timer wakeup adds overhead,
rcuog simply wakes up and goes back to sleep achieving nothing.
This path also adds a full memory barrier, and additional timer expiry
modifications unnecessarily.
The root cause is that WakeOvfIsDeferred fires when
!rcu_segcblist_ready_cbs() (GP not complete), but waking rcuog cannot
accelerate GP completion.
This commit therefore removes this path.
Tested with rcutorture scenarios: TREE01, TREE05, TREE08 (all NOCB
configurations) - all pass. Also stress tested using a kernel module
that floods call_rcu() to trigger the overload conditions and made the
observations confirming the findings.
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Stable-dep-of: 4c714f015d9e ("rcu: fix shrink budget underflow in lazy_rcu_shrink_scan")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/rcu/tree.c | 2 +-
kernel/rcu/tree.h | 3 +--
kernel/rcu/tree_nocb.h | 49 ++++++++++++++----------------------------
3 files changed, 18 insertions(+), 36 deletions(-)
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 8293bae1dec16..7bbd545bf0a29 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3773,7 +3773,7 @@ static void rcu_barrier_entrain(struct rcu_data *rdp)
}
rcu_nocb_unlock(rdp);
if (wake_nocb)
- wake_nocb_gp(rdp, false);
+ wake_nocb_gp(rdp);
smp_store_release(&rdp->barrier_seq_snap, gseq);
}
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index 2265b9c2906e1..7dfc57e9adb18 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -301,7 +301,6 @@ struct rcu_data {
#define RCU_NOCB_WAKE_BYPASS 1
#define RCU_NOCB_WAKE_LAZY 2
#define RCU_NOCB_WAKE 3
-#define RCU_NOCB_WAKE_FORCE 4
#define RCU_JIFFIES_TILL_FORCE_QS (1 + (HZ > 250) + (HZ > 500))
/* For jiffies_till_first_fqs and */
@@ -500,7 +499,7 @@ static void zero_cpu_stall_ticks(struct rcu_data *rdp);
static struct swait_queue_head *rcu_nocb_gp_get(struct rcu_node *rnp);
static void rcu_nocb_gp_cleanup(struct swait_queue_head *sq);
static void rcu_init_one_nocb(struct rcu_node *rnp);
-static bool wake_nocb_gp(struct rcu_data *rdp, bool force);
+static bool wake_nocb_gp(struct rcu_data *rdp);
static bool rcu_nocb_flush_bypass(struct rcu_data *rdp, struct rcu_head *rhp,
unsigned long j, bool lazy);
static void call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *head,
diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
index e6cd56603cad4..f525e4f7985b7 100644
--- a/kernel/rcu/tree_nocb.h
+++ b/kernel/rcu/tree_nocb.h
@@ -192,7 +192,7 @@ static void rcu_init_one_nocb(struct rcu_node *rnp)
static bool __wake_nocb_gp(struct rcu_data *rdp_gp,
struct rcu_data *rdp,
- bool force, unsigned long flags)
+ unsigned long flags)
__releases(rdp_gp->nocb_gp_lock)
{
bool needwake = false;
@@ -209,7 +209,7 @@ static bool __wake_nocb_gp(struct rcu_data *rdp_gp,
timer_delete(&rdp_gp->nocb_timer);
}
- if (force || READ_ONCE(rdp_gp->nocb_gp_sleep)) {
+ if (READ_ONCE(rdp_gp->nocb_gp_sleep)) {
WRITE_ONCE(rdp_gp->nocb_gp_sleep, false);
needwake = true;
}
@@ -225,13 +225,13 @@ static bool __wake_nocb_gp(struct rcu_data *rdp_gp,
/*
* Kick the GP kthread for this NOCB group.
*/
-static bool wake_nocb_gp(struct rcu_data *rdp, bool force)
+static bool wake_nocb_gp(struct rcu_data *rdp)
{
unsigned long flags;
struct rcu_data *rdp_gp = rdp->nocb_gp_rdp;
raw_spin_lock_irqsave(&rdp_gp->nocb_gp_lock, flags);
- return __wake_nocb_gp(rdp_gp, rdp, force, flags);
+ return __wake_nocb_gp(rdp_gp, rdp, flags);
}
#ifdef CONFIG_RCU_LAZY
@@ -518,10 +518,8 @@ static bool rcu_nocb_try_bypass(struct rcu_data *rdp, struct rcu_head *rhp,
}
/*
- * Awaken the no-CBs grace-period kthread if needed, either due to it
- * legitimately being asleep or due to overload conditions.
- *
- * If warranted, also wake up the kthread servicing this CPUs queues.
+ * Awaken the no-CBs grace-period kthread if needed due to it legitimately
+ * being asleep.
*/
static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
unsigned long flags)
@@ -533,7 +531,6 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
long lazy_len;
long len;
struct task_struct *t;
- struct rcu_data *rdp_gp = rdp->nocb_gp_rdp;
// If we are being polled or there is no kthread, just leave.
t = READ_ONCE(rdp->nocb_gp_kthread);
@@ -549,22 +546,22 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
lazy_len = READ_ONCE(rdp->lazy_len);
if (was_alldone) {
rdp->qlen_last_fqs_check = len;
+ rcu_nocb_unlock(rdp);
// Only lazy CBs in bypass list
if (lazy_len && bypass_len == lazy_len) {
- rcu_nocb_unlock(rdp);
wake_nocb_gp_defer(rdp, RCU_NOCB_WAKE_LAZY,
TPS("WakeLazy"));
} else if (!irqs_disabled_flags(flags)) {
/* ... if queue was empty ... */
- rcu_nocb_unlock(rdp);
- wake_nocb_gp(rdp, false);
+ wake_nocb_gp(rdp);
trace_rcu_nocb_wake(rcu_state.name, rdp->cpu,
TPS("WakeEmpty"));
} else {
- rcu_nocb_unlock(rdp);
wake_nocb_gp_defer(rdp, RCU_NOCB_WAKE,
TPS("WakeEmptyIsDeferred"));
}
+
+ return;
} else if (len > rdp->qlen_last_fqs_check + qhimark) {
/* ... or if many callbacks queued. */
rdp->qlen_last_fqs_check = len;
@@ -575,21 +572,10 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
rcu_advance_cbs_nowake(rdp->mynode, rdp);
rdp->nocb_gp_adv_time = j;
}
- smp_mb(); /* Enqueue before timer_pending(). */
- if ((rdp->nocb_cb_sleep ||
- !rcu_segcblist_ready_cbs(&rdp->cblist)) &&
- !timer_pending(&rdp_gp->nocb_timer)) {
- rcu_nocb_unlock(rdp);
- wake_nocb_gp_defer(rdp, RCU_NOCB_WAKE_FORCE,
- TPS("WakeOvfIsDeferred"));
- } else {
- rcu_nocb_unlock(rdp);
- trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("WakeNot"));
- }
- } else {
- rcu_nocb_unlock(rdp);
- trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("WakeNot"));
}
+
+ rcu_nocb_unlock(rdp);
+ trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("WakeNot"));
}
static void call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *head,
@@ -966,7 +952,6 @@ static bool do_nocb_deferred_wakeup_common(struct rcu_data *rdp_gp,
unsigned long flags)
__releases(rdp_gp->nocb_gp_lock)
{
- int ndw;
int ret;
if (!rcu_nocb_need_deferred_wakeup(rdp_gp, level)) {
@@ -974,8 +959,7 @@ static bool do_nocb_deferred_wakeup_common(struct rcu_data *rdp_gp,
return false;
}
- ndw = rdp_gp->nocb_defer_wakeup;
- ret = __wake_nocb_gp(rdp_gp, rdp, ndw == RCU_NOCB_WAKE_FORCE, flags);
+ ret = __wake_nocb_gp(rdp_gp, rdp, flags);
trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("DeferredWake"));
return ret;
@@ -991,7 +975,6 @@ static void do_nocb_deferred_wakeup_timer(struct timer_list *t)
trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("Timer"));
raw_spin_lock_irqsave(&rdp->nocb_gp_lock, flags);
- smp_mb__after_spinlock(); /* Timer expire before wakeup. */
do_nocb_deferred_wakeup_common(rdp, rdp, RCU_NOCB_WAKE_BYPASS, flags);
}
@@ -1272,7 +1255,7 @@ lazy_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
}
rcu_nocb_try_flush_bypass(rdp, jiffies);
rcu_nocb_unlock_irqrestore(rdp, flags);
- wake_nocb_gp(rdp, false);
+ wake_nocb_gp(rdp);
sc->nr_to_scan -= _count;
count += _count;
if (sc->nr_to_scan <= 0)
@@ -1657,7 +1640,7 @@ static void rcu_init_one_nocb(struct rcu_node *rnp)
{
}
-static bool wake_nocb_gp(struct rcu_data *rdp, bool force)
+static bool wake_nocb_gp(struct rcu_data *rdp)
{
return false;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0506/2151] rcu: fix shrink budget underflow in lazy_rcu_shrink_scan
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (504 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0505/2151] rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0507/2151] PCI: dra7xx: Remove device links to PHY Greg Kroah-Hartman
` (376 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Longlong Xia, Paul E. McKenney,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longlong Xia <xialonglong@kylinos.cn>
[ Upstream commit 4c714f015d9ecc37d7a330b31822ccbcaff5ddc9 ]
The lazy RCU shrinker decremented sc->nr_to_scan (unsigned long)
and then tested the result with <= 0. When a single CPU's lazy
callback count exceeds the remaining budget, the subtraction wraps
to a large positive value and the <= 0 comparison, which is
equivalent to == 0 for an unsigned type, never fires again. The
scan loop then iterates through every nocb CPU instead of honouring
the reclaim budget.
Accumulate into count and stop once count >= nr_to_scan.
Fixes: c945b4da7a448 ("rcu: Shrinker for lazy rcu")
Assisted-by: Zcode:GLM-5.2
Signed-off-by: Longlong Xia <xialonglong@kylinos.cn>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/rcu/tree_nocb.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
index f525e4f7985b7..140092b686467 100644
--- a/kernel/rcu/tree_nocb.h
+++ b/kernel/rcu/tree_nocb.h
@@ -1256,9 +1256,8 @@ lazy_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
rcu_nocb_try_flush_bypass(rdp, jiffies);
rcu_nocb_unlock_irqrestore(rdp, flags);
wake_nocb_gp(rdp);
- sc->nr_to_scan -= _count;
count += _count;
- if (sc->nr_to_scan <= 0)
+ if (count >= sc->nr_to_scan)
break;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0507/2151] PCI: dra7xx: Remove device links to PHY
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (505 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0506/2151] rcu: fix shrink budget underflow in lazy_rcu_shrink_scan Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0508/2151] PCI: dra7xx: Fix clock enable leak on probe failure Greg Kroah-Hartman
` (375 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vladimir Oltean, Bjorn Helgaas,
Aksh Garg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: vladimir.oltean@nxp.com <vladimir.oltean@nxp.com>
[ Upstream commit 52cd9bb3772e82d792cb0def3c2a5a9b6bd24ffb ]
This is a full revert of commit 7a4db656a635 ("PCI: dra7xx: Create
functional dependency between PCIe and PHY").
The trouble with this is that a PHY consumer driver dereferences fields
from struct phy, which will become no longer possible.
Since commit 987351e1ea77 ("phy: core: Add consumer device link support")
from 2019, the PHY core also adds a device link to order PHY provider and
consumer suspend/resume operations. The reverted functionality is from 2017
and is redundant with the PHY core now.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Aksh Garg <a-garg7@ti.com>
Link: https://patch.msgid.link/20260912161440.1032188-3-vladimir.oltean@nxp.com
Stable-dep-of: 768e5d0936d0 ("PCI: dra7xx: Fix clock enable leak on probe failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/controller/dwc/pci-dra7xx.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
index 01cfd9aeb0b81..8f325409d7b05 100644
--- a/drivers/pci/controller/dwc/pci-dra7xx.c
+++ b/drivers/pci/controller/dwc/pci-dra7xx.c
@@ -9,7 +9,6 @@
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/device.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
@@ -682,7 +681,6 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
int i;
int phy_count;
struct phy **phy;
- struct device_link **link;
void __iomem *base;
struct dw_pcie *pci;
struct dra7xx_pcie *dra7xx;
@@ -730,10 +728,6 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
if (!phy)
return -ENOMEM;
- link = devm_kcalloc(dev, phy_count, sizeof(*link), GFP_KERNEL);
- if (!link)
- return -ENOMEM;
-
dra7xx->clk = devm_clk_get_optional(dev, NULL);
if (IS_ERR(dra7xx->clk))
return dev_err_probe(dev, PTR_ERR(dra7xx->clk),
@@ -748,12 +742,6 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
phy[i] = devm_phy_get(dev, name);
if (IS_ERR(phy[i]))
return PTR_ERR(phy[i]);
-
- link[i] = device_link_add(dev, &phy[i]->dev, DL_FLAG_STATELESS);
- if (!link[i]) {
- ret = -EINVAL;
- goto err_link;
- }
}
dra7xx->base = base;
@@ -855,10 +843,6 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
pm_runtime_disable(dev);
dra7xx_pcie_disable_phy(dra7xx);
-err_link:
- while (--i >= 0)
- device_link_del(link[i]);
-
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0508/2151] PCI: dra7xx: Fix clock enable leak on probe failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (506 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0507/2151] PCI: dra7xx: Remove device links to PHY Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0509/2151] kconfig: fix extra output from savedefconfig on out-of-range defaults Greg Kroah-Hartman
` (374 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Felix Gu, Manivannan Sadhasivam,
Bjorn Helgaas, Luca Ceresoli, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Gu <ustc.gu@gmail.com>
[ Upstream commit 768e5d0936d00d663ce2b8c192cc6ab0b61ad461 ]
dra7xx_pcie_probe() enables the optional clock but never disables it
when probing fails afterwards.
Switch to devm_clk_get_optional_enabled(), which disables the clock
automatically on failure.
Fixes: 5af9405397bf ("PCI: dra7xx: Get an optional clock")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20260822-dra7xx-v1-1-23e204d5548b@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/controller/dwc/pci-dra7xx.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
index 8f325409d7b05..aef500fec3e96 100644
--- a/drivers/pci/controller/dwc/pci-dra7xx.c
+++ b/drivers/pci/controller/dwc/pci-dra7xx.c
@@ -728,15 +728,11 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
if (!phy)
return -ENOMEM;
- dra7xx->clk = devm_clk_get_optional(dev, NULL);
+ dra7xx->clk = devm_clk_get_optional_enabled(dev, NULL);
if (IS_ERR(dra7xx->clk))
return dev_err_probe(dev, PTR_ERR(dra7xx->clk),
"clock request failed");
- ret = clk_prepare_enable(dra7xx->clk);
- if (ret)
- return ret;
-
for (i = 0; i < phy_count; i++) {
snprintf(name, sizeof(name), "pcie-phy%d", i);
phy[i] = devm_phy_get(dev, name);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0509/2151] kconfig: fix extra output from savedefconfig on out-of-range defaults
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (507 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0508/2151] PCI: dra7xx: Fix clock enable leak on probe failure Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0510/2151] cxl/pci: Skip reset detection for DVSEC emulated decoders Greg Kroah-Hartman
` (373 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Julian Braha,
Nathan Chancellor, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Braha <julianbraha@gmail.com>
[ Upstream commit dbe1ae2304a3b02c3bf6ae82895ff232a29f3fee ]
The Kconfig interpreter currently allows defaults that are outside of the
range bounds.
In these cases, the 'sym_validate_range' function will adjust the default
value to the nearest range bound. For example, see this example:
config A
int
range 1 2
default 16
Here, since the default value of 16 is greater than the bounds, the
effective default value gets adjusted down to the upper bound, 2.
However, 'savedefconfig' writes non-default values, and without being
aware of the automatic adjustment to the range bound, it would write: A=2
This limitation is also documented in a comment: "The following fails to
handle the situation where a default value is further limited by the valid
range."
To resolve this, let's factor out the default-range adjustment logic from
the existing 'sym_validate_range' function into its own
'sym_get_near_range_bound' function for 'savedefconfig' to use too, so
that it compares against the effective value.
Adds tests, accordingly.
Fixes: 7cf3d73b4360 ("kconfig: add savedefconfig")
Assisted-by: Codex:gpt-5.6-sol
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Closes: https://lore.kernel.org/lkml/CAMuHMdVyUAA3L4mUkSjmnuE3cvj-+N8z-Bhxsh1wa-FQWc=fjw@mail.gmail.com/
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260830221129.2668354-1-julianbraha@gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
scripts/kconfig/symbol.c | 39 ++++++++----
.../kconfig/tests/savedefconfig_range/Kconfig | 60 +++++++++++++++++++
.../tests/savedefconfig_range/__init__.py | 8 +++
.../kconfig/tests/savedefconfig_range/config | 7 +++
.../savedefconfig_range/expected_defconfig | 0
5 files changed, 102 insertions(+), 12 deletions(-)
create mode 100644 scripts/kconfig/tests/savedefconfig_range/Kconfig
create mode 100644 scripts/kconfig/tests/savedefconfig_range/__init__.py
create mode 100644 scripts/kconfig/tests/savedefconfig_range/config
create mode 100644 scripts/kconfig/tests/savedefconfig_range/expected_defconfig
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 7e81b3676ee94..1536db1599f4c 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -157,7 +157,12 @@ static long long sym_get_range_val(struct symbol *sym, int base)
return strtoll(sym->curr.val, NULL, base);
}
-static void sym_validate_range(struct symbol *sym)
+/*
+ * Return the nearest range bound for an out-of-range default value.
+ * Return NULL if the value is valid or the symbol has no active range.
+ */
+static struct symbol *sym_get_near_range_bound(struct symbol *sym,
+ const char *value)
{
struct property *prop;
struct symbol *range_sym;
@@ -172,21 +177,31 @@ static void sym_validate_range(struct symbol *sym)
base = 16;
break;
default:
- return;
+ return NULL;
}
prop = sym_get_range_prop(sym);
if (!prop)
- return;
- val = strtoll(sym->curr.val, NULL, base);
+ return NULL;
+ val = strtoll(value, NULL, base);
range_sym = prop->expr->left.sym;
val2 = sym_get_range_val(range_sym, base);
if (val >= val2) {
range_sym = prop->expr->right.sym;
val2 = sym_get_range_val(range_sym, base);
if (val <= val2)
- return;
+ return NULL;
}
- sym->curr.val = range_sym->curr.val;
+
+ return range_sym;
+}
+
+static void sym_validate_range(struct symbol *sym)
+{
+ struct symbol *range_sym;
+
+ range_sym = sym_get_near_range_bound(sym, sym->curr.val);
+ if (range_sym)
+ sym->curr.val = range_sym->curr.val;
}
static void sym_set_changed(struct symbol *sym)
@@ -812,7 +827,7 @@ bool sym_set_string_value(struct symbol *sym, const char *newval)
const char *sym_get_string_default(struct symbol *sym)
{
struct property *prop;
- struct symbol *ds;
+ struct symbol *ds, *range_sym;
const char *str = "";
tristate val;
@@ -830,11 +845,6 @@ const char *sym_get_string_default(struct symbol *sym)
val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri);
break;
default:
- /*
- * The following fails to handle the situation
- * where a default value is further limited by
- * the valid range.
- */
ds = prop_get_symbol(prop);
if (ds != NULL) {
sym_calc_value(ds);
@@ -878,6 +888,11 @@ const char *sym_get_string_default(struct symbol *sym)
default:
break;
}
+
+ range_sym = sym_get_near_range_bound(sym, str);
+ if (range_sym)
+ str = range_sym->curr.val;
+
return str;
}
diff --git a/scripts/kconfig/tests/savedefconfig_range/Kconfig b/scripts/kconfig/tests/savedefconfig_range/Kconfig
new file mode 100644
index 0000000000000..fd59d9082ed5b
--- /dev/null
+++ b/scripts/kconfig/tests/savedefconfig_range/Kconfig
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0
+
+# Static default and range values
+
+config INT_DEFAULT_ABOVE_RANGE
+ int
+ range 1 1
+ default 16
+
+config INT_DEFAULT_BELOW_RANGE
+ int
+ range 4 8
+ default 2
+
+# Default and range values determined by other options
+
+config RANGE_UPPER_BOUND
+ int
+ default 3
+
+config INT_DYNAMIC_RANGE
+ int
+ range 0 RANGE_UPPER_BOUND
+ default 4
+
+# Hex
+
+config HEX_DEFAULT_ABOVE_RANGE
+ hex
+ range 0x10 0x20
+ default 0x40
+
+# Implicit default value of 0
+
+config INT_IMPLICIT_DEFAULT_ZERO
+ int
+ range 1 4
+
+# Conditional range
+
+config USE_FIRST_RANGE
+ bool
+ default y
+
+config INT_CONDITIONAL_RANGE
+ int
+ range 1 2 if USE_FIRST_RANGE
+ range 3 4 if !USE_FIRST_RANGE
+ default 3
+
+# Conditional default
+
+config USE_DEFAULT
+ bool
+ default y
+
+config INT_CONDITIONAL_DEFAULT
+ int
+ range 1 2
+ default 3 if USE_DEFAULT
diff --git a/scripts/kconfig/tests/savedefconfig_range/__init__.py b/scripts/kconfig/tests/savedefconfig_range/__init__.py
new file mode 100644
index 0000000000000..961454be732c2
--- /dev/null
+++ b/scripts/kconfig/tests/savedefconfig_range/__init__.py
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+"""Test savedefconfig with numerical defaults outside of ranges."""
+
+
+def test(conf):
+ assert conf._run_conf('--savedefconfig=defconfig', dot_config='config',
+ out_file='defconfig') == 0
+ assert conf.config_matches('expected_defconfig')
diff --git a/scripts/kconfig/tests/savedefconfig_range/config b/scripts/kconfig/tests/savedefconfig_range/config
new file mode 100644
index 0000000000000..d939cfe5fd349
--- /dev/null
+++ b/scripts/kconfig/tests/savedefconfig_range/config
@@ -0,0 +1,7 @@
+CONFIG_INT_DEFAULT_ABOVE_RANGE=1
+CONFIG_INT_DEFAULT_BELOW_RANGE=4
+CONFIG_INT_DYNAMIC_RANGE=3
+CONFIG_HEX_DEFAULT_ABOVE_RANGE=0x20
+CONFIG_INT_IMPLICIT_DEFAULT_ZERO=1
+CONFIG_INT_CONDITIONAL_RANGE=2
+CONFIG_INT_CONDITIONAL_DEFAULT=2
diff --git a/scripts/kconfig/tests/savedefconfig_range/expected_defconfig b/scripts/kconfig/tests/savedefconfig_range/expected_defconfig
new file mode 100644
index 0000000000000..e69de29bb2d1d
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0510/2151] cxl/pci: Skip reset detection for DVSEC emulated decoders
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (508 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0509/2151] kconfig: fix extra output from savedefconfig on out-of-range defaults Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0511/2151] cxl/port: Fix uninitialized coordinates reported for RCDs Greg Kroah-Hartman
` (372 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guixin Liu, Jonathan Cameron,
Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guixin Liu <kanie@linux.alibaba.com>
[ Upstream commit 17ff3a9fd8669ea53fe83a7013871f30214d5537 ]
HDM decoders are emulated from the DVSEC range registers in two cases:
(a) the component registers expose no HDM decoder capability, or (b) the
capability is present but the DVSEC ranges were the ones in use at driver
load.
After an FLR or SBR, __cxl_endpoint_decoder_reset_detected() reads the HDM
decoder Committed bit for every decoder marked enabled, emulated ones
included. In case (a) regs.hdm_decoder is NULL and the read oopses. In case
(b) the Committed bit was never set, so a reset gets reported that never
happened.
Use the absence of cxld->commit to elide the check for emulated decoders.
Case (b) tested under QEMU: a reset on an endpoint driven down the DVSEC
emulation path no longer reports a reset or strips the decoder flags.
Fixes: 934edcd436dc ("cxl: Add post-reset warning if reset results in loss of previously committed HDM decoders")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Link: https://lore.kernel.org/linux-cxl/20260811113608.2815625-1-kanie@linux.alibaba.com/
Link: https://patch.msgid.link/20260831110449.719086-1-kanie@linux.alibaba.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/pci.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index d2ee7d853f1fd..e1c2e30069fcc 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -761,6 +761,15 @@ static int __cxl_endpoint_decoder_reset_detected(struct device *dev, void *data)
if ((cxld->flags & CXL_DECODER_F_ENABLE) == 0)
return 0;
+ /*
+ * Decoders emulated from the DVSEC range registers have no commit
+ * callback and no HDM decoder registers to consult.
+ */
+ if (!cxld->commit) {
+ dev_warn(dev, "DVSEC emulated decode may have been cleared by reset\n");
+ return 0;
+ }
+
cxlhdm = dev_get_drvdata(&port->dev);
hdm = cxlhdm->regs.hdm_decoder;
ctrl = readl(hdm + CXL_HDM_DECODER0_CTRL_OFFSET(cxld->id));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0511/2151] cxl/port: Fix uninitialized coordinates reported for RCDs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (509 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0510/2151] cxl/pci: Skip reset detection for DVSEC emulated decoders Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0512/2151] cxl/test: Add support for acpi extended linear cache Greg Kroah-Hartman
` (371 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guixin Liu, Richard Cheng,
Jonathan Cameron, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guixin Liu <kanie@linux.alibaba.com>
[ Upstream commit 58b2b1ef28024093063de536c05aaea792226e24 ]
cxl_endpoint_get_perf_coordinates() returns success for a Restricted CXL
Device without calculating coordinates, so the caller's output array is
left uninitialized. Callers treat it as valid and can expose the stack
residue as access coordinates.
Initialize the coordinates to zero before returning for an RCD. Zeroing in
the helper rather than at the caller keeps the @coord output contract the
exported function documents.
Reported by the Sashiko review bot.
Fixes: 5d211c709059 ("cxl: Fix cxl_endpoint_get_perf_coordinate() support for RCH")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Link: https://patch.msgid.link/20260831092216.540644-3-kanie@linux.alibaba.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 2416a72e38ac0..62c1ca6680881 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -2402,8 +2402,10 @@ int cxl_endpoint_get_perf_coordinates(struct cxl_port *port,
* Skip calculation for RCD. Expectation is HMAT already covers RCD case
* since RCH does not support hotplug.
*/
- if (cxlmd->cxlds->rcd)
+ if (cxlmd->cxlds->rcd) {
+ memset(coord, 0, sizeof(*coord) * ACCESS_COORDINATE_MAX);
return 0;
+ }
/*
* Exit the loop when the parent port of the current iter port is cxl
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0512/2151] cxl/test: Add support for acpi extended linear cache
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (510 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0511/2151] cxl/port: Fix uninitialized coordinates reported for RCDs Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0513/2151] cxl/port: Reduce number of @dport variables in cxl_port_add_dport() Greg Kroah-Hartman
` (370 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jonathan Cameron, Alison Schofield,
Fabio M. De Francesco, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jiang <dave.jiang@intel.com>
[ Upstream commit 68f4a852e18329e84bb5d36168a45b0a52cdf236 ]
Add the mock wrappers for hmat_get_extended_linear_cache_size() in order
to emulate the ACPI helper function for the regions that are mock'd by
cxl_test.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Link: https://patch.msgid.link/20251117144611.903692-4-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Stable-dep-of: 0de71a1ab211 ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/cxl/Kbuild | 1 +
tools/testing/cxl/test/cxl.c | 21 +++++++++++++++++++++
tools/testing/cxl/test/mock.c | 20 ++++++++++++++++++++
tools/testing/cxl/test/mock.h | 3 +++
4 files changed, 45 insertions(+)
diff --git a/tools/testing/cxl/Kbuild b/tools/testing/cxl/Kbuild
index 950335b3c128f..f1ed9c46acd2d 100644
--- a/tools/testing/cxl/Kbuild
+++ b/tools/testing/cxl/Kbuild
@@ -11,6 +11,7 @@ ldflags-y += --wrap=cxl_rcd_component_reg_phys
ldflags-y += --wrap=cxl_endpoint_parse_cdat
ldflags-y += --wrap=cxl_dport_init_ras_reporting
ldflags-y += --wrap=devm_cxl_endpoint_decoders_setup
+ldflags-y += --wrap=hmat_get_extended_linear_cache_size
DRIVERS := ../../../drivers
CXL_SRC := $(DRIVERS)/cxl
diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index 3e5ae5caae94d..aadb90ec516e5 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -595,6 +595,25 @@ mock_acpi_evaluate_integer(acpi_handle handle, acpi_string pathname,
return AE_OK;
}
+static int
+mock_hmat_get_extended_linear_cache_size(struct resource *backing_res,
+ int nid, resource_size_t *cache_size)
+{
+ struct acpi_cedt_cfmws *window = mock_cfmws[0];
+ struct resource cfmws0_res =
+ DEFINE_RES_MEM(window->base_hpa, window->window_size);
+
+ if (!extended_linear_cache ||
+ !resource_contains(&cfmws0_res, backing_res)) {
+ return hmat_get_extended_linear_cache_size(backing_res,
+ nid, cache_size);
+ }
+
+ *cache_size = mock_auto_region_size;
+
+ return 0;
+}
+
static struct pci_bus mock_pci_bus[NR_BRIDGES];
static struct acpi_pci_root mock_pci_root[ARRAY_SIZE(mock_pci_bus)] = {
[0] = {
@@ -1121,6 +1140,8 @@ static struct cxl_mock_ops cxl_mock_ops = {
.devm_cxl_port_enumerate_dports = mock_cxl_port_enumerate_dports,
.cxl_endpoint_parse_cdat = mock_cxl_endpoint_parse_cdat,
.devm_cxl_add_dport_by_dev = mock_cxl_add_dport_by_dev,
+ .hmat_get_extended_linear_cache_size =
+ mock_hmat_get_extended_linear_cache_size,
.list = LIST_HEAD_INIT(cxl_mock_ops.list),
};
diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index 995269a75cbd1..bff5853717f02 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -111,6 +111,26 @@ acpi_status __wrap_acpi_evaluate_integer(acpi_handle handle,
}
EXPORT_SYMBOL(__wrap_acpi_evaluate_integer);
+int __wrap_hmat_get_extended_linear_cache_size(struct resource *backing_res,
+ int nid,
+ resource_size_t *cache_size)
+{
+ int index, rc;
+ struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
+
+ if (ops)
+ rc = ops->hmat_get_extended_linear_cache_size(backing_res, nid,
+ cache_size);
+ else
+ rc = hmat_get_extended_linear_cache_size(backing_res, nid,
+ cache_size);
+
+ put_cxl_mock_ops(index);
+
+ return rc;
+}
+EXPORT_SYMBOL_GPL(__wrap_hmat_get_extended_linear_cache_size);
+
struct acpi_pci_root *__wrap_acpi_pci_find_root(acpi_handle handle)
{
int index;
diff --git a/tools/testing/cxl/test/mock.h b/tools/testing/cxl/test/mock.h
index 4ed932e76aae8..bfd36cbdbae27 100644
--- a/tools/testing/cxl/test/mock.h
+++ b/tools/testing/cxl/test/mock.h
@@ -25,6 +25,9 @@ struct cxl_mock_ops {
void (*cxl_endpoint_parse_cdat)(struct cxl_port *port);
struct cxl_dport *(*devm_cxl_add_dport_by_dev)(struct cxl_port *port,
struct device *dport_dev);
+ int (*hmat_get_extended_linear_cache_size)(struct resource *backing_res,
+ int nid,
+ resource_size_t *cache_size);
};
void register_cxl_mock_ops(struct cxl_mock_ops *ops);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0513/2151] cxl/port: Reduce number of @dport variables in cxl_port_add_dport()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (511 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0512/2151] cxl/test: Add support for acpi extended linear cache Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0514/2151] cxl/port: Cleanup dport removal with a devres group Greg Kroah-Hartman
` (369 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jonathan Cameron, Dave Jiang,
Terry Bowman, Dan Williams, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
[ Upstream commit 83ccbaf1a1075ded82329d27de01d3b2681986ec ]
In preparation for refactoring cxl_port_add_dport() to add RAS register
setup, cleanup the number of dport variables with a dport_exists() helper.
Kill the @dport needed to check for duplicates, rename @new_dport to
@dport.
Reported-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Closes: http://lore.kernel.org/20260116150119.00003bbd@huawei.com
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-3-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Stable-dep-of: 0de71a1ab211 ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 62c1ca6680881..9990a038d2360 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -1633,30 +1633,38 @@ static int update_decoder_targets(struct device *dev, void *data)
return 0;
}
+static bool dport_exists(struct cxl_port *port, struct device *dport_dev)
+{
+ struct cxl_dport *dport = cxl_find_dport_by_dev(port, dport_dev);
+
+ if (dport) {
+ dev_dbg(&port->dev, "dport%d:%s already exists\n",
+ dport->port_id, dev_name(dport_dev));
+ return true;
+ }
+
+ return false;
+}
+
DEFINE_FREE(del_cxl_dport, struct cxl_dport *, if (!IS_ERR_OR_NULL(_T)) del_dport(_T))
static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
struct device *dport_dev)
{
- struct cxl_dport *dport;
int rc;
device_lock_assert(&port->dev);
if (!port->dev.driver)
return ERR_PTR(-ENXIO);
- dport = cxl_find_dport_by_dev(port, dport_dev);
- if (dport) {
- dev_dbg(&port->dev, "dport%d:%s already exists\n",
- dport->port_id, dev_name(dport_dev));
+ if (dport_exists(port, dport_dev))
return ERR_PTR(-EBUSY);
- }
- struct cxl_dport *new_dport __free(del_cxl_dport) =
+ struct cxl_dport *dport __free(del_cxl_dport) =
devm_cxl_add_dport_by_dev(port, dport_dev);
- if (IS_ERR(new_dport))
- return new_dport;
+ if (IS_ERR(dport))
+ return dport;
- cxl_switch_parse_cdat(new_dport);
+ cxl_switch_parse_cdat(dport);
if (port->nr_dports == 1) {
/*
@@ -1672,17 +1680,17 @@ static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
if (rc)
return ERR_PTR(rc);
dev_dbg(&port->dev, "first dport%d:%s added with decoders\n",
- new_dport->port_id, dev_name(dport_dev));
- return no_free_ptr(new_dport);
+ dport->port_id, dev_name(dport_dev));
+ return no_free_ptr(dport);
}
/* New dport added, update the decoder targets */
- device_for_each_child(&port->dev, new_dport, update_decoder_targets);
+ device_for_each_child(&port->dev, dport, update_decoder_targets);
- dev_dbg(&port->dev, "dport%d:%s added\n", new_dport->port_id,
+ dev_dbg(&port->dev, "dport%d:%s added\n", dport->port_id,
dev_name(dport_dev));
- return no_free_ptr(new_dport);
+ return no_free_ptr(dport);
}
static struct cxl_dport *devm_cxl_create_port(struct device *ep_dev,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0514/2151] cxl/port: Cleanup dport removal with a devres group
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (512 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0513/2151] cxl/port: Reduce number of @dport variables in cxl_port_add_dport() Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0515/2151] cxl/port: Move decoder setup before dport creation Greg Kroah-Hartman
` (368 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Terry Bowman, Dan Williams,
Jonathan Cameron, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
[ Upstream commit afa2bdba1ee28e21f30fe5391b0273b58b32e0d3 ]
In preparation for adding more setup actions like RAS register mapping,
introduce a devres group to collect all the dport creation / registration
actions. This replaces the maintenance tedium of open coding several
devm_release_action() calls in del_dport().
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20260131000403.2135324-4-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Stable-dep-of: 0de71a1ab211 ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 71 +++++++++++++++++++++++++++++++++++------
1 file changed, 61 insertions(+), 10 deletions(-)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 9990a038d2360..c7b46eeedb093 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -1163,6 +1163,57 @@ static void cxl_dport_unlink(void *data)
sysfs_remove_link(&port->dev.kobj, link_name);
}
+static struct device *dport_to_host(struct cxl_dport *dport)
+{
+ struct cxl_port *port = dport->port;
+
+ if (is_cxl_root(port))
+ return port->uport_dev;
+ return &port->dev;
+}
+
+static void free_dport(void *dport)
+{
+ kfree(dport);
+}
+
+/*
+ * Upon return either a group is established with one action (free_dport()), or
+ * no group established and @dport is freed.
+ */
+static void *cxl_dport_open_dr_group_or_free(struct cxl_dport *dport)
+{
+ int rc;
+ struct device *host = dport_to_host(dport);
+ void *group = devres_open_group(host, dport, GFP_KERNEL);
+
+ if (!group) {
+ kfree(dport);
+ return NULL;
+ }
+
+ rc = devm_add_action_or_reset(host, free_dport, dport);
+ if (rc) {
+ devres_release_group(host, group);
+ return NULL;
+ }
+
+ return group;
+}
+
+static void cxl_dport_close_dr_group(struct cxl_dport *dport, void *group)
+{
+ devres_close_group(dport_to_host(dport), group);
+}
+
+static void del_dport(struct cxl_dport *dport)
+{
+ devres_release_group(dport_to_host(dport), dport);
+}
+
+/* The dport group id is the dport */
+DEFINE_FREE(cxl_dport_release_dr_group, void *, if (_T) del_dport(_T))
+
static struct cxl_dport *
__devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev,
int port_id, resource_size_t component_reg_phys,
@@ -1188,14 +1239,20 @@ __devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev,
CXL_TARGET_STRLEN)
return ERR_PTR(-EINVAL);
- dport = devm_kzalloc(host, sizeof(*dport), GFP_KERNEL);
+ dport = kzalloc(sizeof(*dport), GFP_KERNEL);
if (!dport)
return ERR_PTR(-ENOMEM);
+ /* Just enough init to manage the devres group */
dport->dport_dev = dport_dev;
dport->port_id = port_id;
dport->port = port;
+ void *dport_dr_group __free(cxl_dport_release_dr_group) =
+ cxl_dport_open_dr_group_or_free(dport);
+ if (!dport_dr_group)
+ return ERR_PTR(-ENOMEM);
+
if (rcrb == CXL_RESOURCE_NONE) {
rc = cxl_dport_setup_regs(&port->dev, dport,
component_reg_phys);
@@ -1248,6 +1305,9 @@ __devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev,
cxl_debugfs_create_dport_dir(dport);
+ /* keep the group, and mark the end of devm actions */
+ cxl_dport_close_dr_group(dport, no_free_ptr(dport_dr_group));
+
return dport;
}
@@ -1474,15 +1534,6 @@ static void delete_switch_port(struct cxl_port *port)
devm_release_action(port->dev.parent, unregister_port, port);
}
-static void del_dport(struct cxl_dport *dport)
-{
- struct cxl_port *port = dport->port;
-
- devm_release_action(&port->dev, cxl_dport_unlink, dport);
- devm_release_action(&port->dev, cxl_dport_remove, dport);
- devm_kfree(&port->dev, dport);
-}
-
static void del_dports(struct cxl_port *port)
{
struct cxl_dport *dport;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0515/2151] cxl/port: Move decoder setup before dport creation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (513 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0514/2151] cxl/port: Cleanup dport removal with a devres group Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0516/2151] cxl/port: Move dport probe operations to a driver event Greg Kroah-Hartman
` (367 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dave Jiang, Jonathan Cameron,
Terry Bowman, Dan Williams, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
[ Upstream commit 86e756715db22cd79a9726c22644415c46b6b149 ]
There are port setup actions that run on first dport arrival, and there are
setup actions that run per dport.
RAS register setup is a future additional setup action to run per-port
(once the first dport arrives), and each dport also has RAS registers to
map.
Before adding that, flip the order of "first dport" and "per-dport"
actions. This makes allocation symmetric with teardown, "first dport"
actions unwind after last dport removed. It also allows for using a devres
group to collect the unrelated decoder, RAS, and dport setup actions into
one group release action.
The new cxl_port_open_group() collects "first dport" and "per-dport" into
one group that can be released on any failure. This group's lifetime only
needs to span the short duration of cxl_port_add_dport() to cleanup all
potential damage from failing to add a dport. Contrast that to the "dport"
devres group that is called upon to destruct fully formed dport objects.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-5-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Stable-dep-of: 0de71a1ab211 ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index c7b46eeedb093..441c49bb8e595 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -1697,10 +1697,14 @@ static bool dport_exists(struct cxl_port *port, struct device *dport_dev)
return false;
}
-DEFINE_FREE(del_cxl_dport, struct cxl_dport *, if (!IS_ERR_OR_NULL(_T)) del_dport(_T))
+/* note this implicitly casts the group back to its @port */
+DEFINE_FREE(cxl_port_release_dr_group, struct cxl_port *,
+ if (_T) devres_release_group(&_T->dev, _T))
+
static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
struct device *dport_dev)
{
+ struct cxl_dport *dport;
int rc;
device_lock_assert(&port->dev);
@@ -1710,14 +1714,13 @@ static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
if (dport_exists(port, dport_dev))
return ERR_PTR(-EBUSY);
- struct cxl_dport *dport __free(del_cxl_dport) =
- devm_cxl_add_dport_by_dev(port, dport_dev);
- if (IS_ERR(dport))
- return dport;
-
- cxl_switch_parse_cdat(dport);
+ /* Temp group for all "first dport" and "per dport" setup actions */
+ void *port_dr_group __free(cxl_port_release_dr_group) =
+ devres_open_group(&port->dev, port, GFP_KERNEL);
+ if (!port_dr_group)
+ return ERR_PTR(-ENOMEM);
- if (port->nr_dports == 1) {
+ if (port->nr_dports == 0) {
/*
* Some host bridges are known to not have component regsisters
* available until a root port has trained CXL. Perform that
@@ -1730,18 +1733,24 @@ static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
rc = devm_cxl_switch_port_decoders_setup(port);
if (rc)
return ERR_PTR(rc);
- dev_dbg(&port->dev, "first dport%d:%s added with decoders\n",
- dport->port_id, dev_name(dport_dev));
- return no_free_ptr(dport);
}
+ dport = devm_cxl_add_dport_by_dev(port, dport_dev);
+ if (IS_ERR(dport))
+ return dport;
+
+ /* This group was only needed for early exit above */
+ devres_remove_group(&port->dev, no_free_ptr(port_dr_group));
+
+ cxl_switch_parse_cdat(dport);
+
/* New dport added, update the decoder targets */
device_for_each_child(&port->dev, dport, update_decoder_targets);
dev_dbg(&port->dev, "dport%d:%s added\n", dport->port_id,
dev_name(dport_dev));
- return no_free_ptr(dport);
+ return dport;
}
static struct cxl_dport *devm_cxl_create_port(struct device *ep_dev,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0516/2151] cxl/port: Move dport probe operations to a driver event
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (514 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0515/2151] cxl/port: Move decoder setup before dport creation Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0517/2151] cxl/port: Move dport RAS setup to dport add time Greg Kroah-Hartman
` (366 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Terry Bowman, Dave Jiang,
Jonathan Cameron, Dan Williams, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
[ Upstream commit 3864cb60dad5a6c1bd9f444740cf541a1d8cda99 ]
In preparation for adding more register setup to the cxl_port_add_dport()
path (for RAS register mapping), move the dport creation event to a driver
callback. This achieves two goals, it puts driver operations logically
where they belong, in a driver, and it obviates the gymnastics of
DECLARE_TESTABLE() which just makes a mess of grepping for CXL symbols.
In other words, a driver callback is less of an ongoing maintenance burden
than this DECLARE_TESTABLE arrangement that does not scale and diminishes
the grep-ability of the codebase.
cxl_port_add_dport() moves mostly unmodified from drivers/cxl/core/port.c.
The only deliberate change is that it now assumes that the device_lock is
held on entry and the driver is attached (just like cxl_port_probe()).
Reviewed-by: Terry Bowman <terry.bowman@amd.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-6-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Stable-dep-of: 0de71a1ab211 ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/hdm.c | 6 +--
drivers/cxl/core/pci.c | 8 ++--
drivers/cxl/core/port.c | 68 ++++++++--------------------
drivers/cxl/cxl.h | 31 +++++--------
drivers/cxl/port.c | 50 ++++++++++++++++++++
tools/testing/cxl/Kbuild | 2 +
tools/testing/cxl/cxl_core_exports.c | 22 ---------
tools/testing/cxl/exports.h | 13 ------
tools/testing/cxl/test/mock.c | 24 +++-------
9 files changed, 98 insertions(+), 126 deletions(-)
delete mode 100644 tools/testing/cxl/exports.h
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
index c43b14533ffe0..2361245f2869e 100644
--- a/drivers/cxl/core/hdm.c
+++ b/drivers/cxl/core/hdm.c
@@ -1248,12 +1248,12 @@ static int devm_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm,
}
/**
- * __devm_cxl_switch_port_decoders_setup - allocate and setup switch decoders
+ * devm_cxl_switch_port_decoders_setup - allocate and setup switch decoders
* @port: CXL port context
*
* Return 0 or -errno on error
*/
-int __devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
+int devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
{
struct cxl_hdm *cxlhdm;
@@ -1277,7 +1277,7 @@ int __devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
dev_err(&port->dev, "HDM decoder capability not found\n");
return -ENXIO;
}
-EXPORT_SYMBOL_NS_GPL(__devm_cxl_switch_port_decoders_setup, "CXL");
+EXPORT_SYMBOL_NS_GPL(devm_cxl_switch_port_decoders_setup, "CXL");
/**
* devm_cxl_endpoint_decoders_setup - allocate and setup endpoint decoders
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index e1c2e30069fcc..e54991c74e6b3 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -41,14 +41,14 @@ static int pci_get_port_num(struct pci_dev *pdev)
}
/**
- * __devm_cxl_add_dport_by_dev - allocate a dport by dport device
+ * devm_cxl_add_dport_by_dev - allocate a dport by dport device
* @port: cxl_port that hosts the dport
* @dport_dev: 'struct device' of the dport
*
* Returns the allocated dport on success or ERR_PTR() of -errno on error
*/
-struct cxl_dport *__devm_cxl_add_dport_by_dev(struct cxl_port *port,
- struct device *dport_dev)
+struct cxl_dport *devm_cxl_add_dport_by_dev(struct cxl_port *port,
+ struct device *dport_dev)
{
struct cxl_register_map map;
struct pci_dev *pdev;
@@ -69,7 +69,7 @@ struct cxl_dport *__devm_cxl_add_dport_by_dev(struct cxl_port *port,
device_lock_assert(&port->dev);
return devm_cxl_add_dport(port, dport_dev, port_num, map.resource);
}
-EXPORT_SYMBOL_NS_GPL(__devm_cxl_add_dport_by_dev, "CXL");
+EXPORT_SYMBOL_NS_GPL(devm_cxl_add_dport_by_dev, "CXL");
struct cxl_walk_context {
struct pci_bus *bus;
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 441c49bb8e595..1d34ade204a18 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -792,7 +792,7 @@ static int cxl_setup_comp_regs(struct device *host, struct cxl_register_map *map
return cxl_setup_regs(map);
}
-static int cxl_port_setup_regs(struct cxl_port *port,
+int cxl_port_setup_regs(struct cxl_port *port,
resource_size_t component_reg_phys)
{
if (dev_is_platform(port->uport_dev))
@@ -800,6 +800,7 @@ static int cxl_port_setup_regs(struct cxl_port *port,
return cxl_setup_comp_regs(&port->dev, &port->reg_map,
component_reg_phys);
}
+EXPORT_SYMBOL_NS_GPL(cxl_port_setup_regs, "CXL");
static int cxl_dport_setup_regs(struct device *host, struct cxl_dport *dport,
resource_size_t component_reg_phys)
@@ -1684,6 +1685,13 @@ static int update_decoder_targets(struct device *dev, void *data)
return 0;
}
+void cxl_port_update_decoder_targets(struct cxl_port *port,
+ struct cxl_dport *dport)
+{
+ device_for_each_child(&port->dev, dport, update_decoder_targets);
+}
+EXPORT_SYMBOL_NS_GPL(cxl_port_update_decoder_targets, "CXL");
+
static bool dport_exists(struct cxl_port *port, struct device *dport_dev)
{
struct cxl_dport *dport = cxl_find_dport_by_dev(port, dport_dev);
@@ -1697,15 +1705,10 @@ static bool dport_exists(struct cxl_port *port, struct device *dport_dev)
return false;
}
-/* note this implicitly casts the group back to its @port */
-DEFINE_FREE(cxl_port_release_dr_group, struct cxl_port *,
- if (_T) devres_release_group(&_T->dev, _T))
-
-static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
- struct device *dport_dev)
+static struct cxl_dport *probe_dport(struct cxl_port *port,
+ struct device *dport_dev)
{
- struct cxl_dport *dport;
- int rc;
+ struct cxl_driver *drv;
device_lock_assert(&port->dev);
if (!port->dev.driver)
@@ -1714,43 +1717,12 @@ static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
if (dport_exists(port, dport_dev))
return ERR_PTR(-EBUSY);
- /* Temp group for all "first dport" and "per dport" setup actions */
- void *port_dr_group __free(cxl_port_release_dr_group) =
- devres_open_group(&port->dev, port, GFP_KERNEL);
- if (!port_dr_group)
- return ERR_PTR(-ENOMEM);
-
- if (port->nr_dports == 0) {
- /*
- * Some host bridges are known to not have component regsisters
- * available until a root port has trained CXL. Perform that
- * setup now.
- */
- rc = cxl_port_setup_regs(port, port->component_reg_phys);
- if (rc)
- return ERR_PTR(rc);
-
- rc = devm_cxl_switch_port_decoders_setup(port);
- if (rc)
- return ERR_PTR(rc);
- }
-
- dport = devm_cxl_add_dport_by_dev(port, dport_dev);
- if (IS_ERR(dport))
- return dport;
-
- /* This group was only needed for early exit above */
- devres_remove_group(&port->dev, no_free_ptr(port_dr_group));
-
- cxl_switch_parse_cdat(dport);
-
- /* New dport added, update the decoder targets */
- device_for_each_child(&port->dev, dport, update_decoder_targets);
-
- dev_dbg(&port->dev, "dport%d:%s added\n", dport->port_id,
- dev_name(dport_dev));
+ drv = container_of(port->dev.driver, struct cxl_driver, drv);
+ if (!drv->add_dport)
+ return ERR_PTR(-ENXIO);
- return dport;
+ /* see cxl_port_add_dport() */
+ return drv->add_dport(port, dport_dev);
}
static struct cxl_dport *devm_cxl_create_port(struct device *ep_dev,
@@ -1797,7 +1769,7 @@ static struct cxl_dport *devm_cxl_create_port(struct device *ep_dev,
}
guard(device)(&port->dev);
- return cxl_port_add_dport(port, dport_dev);
+ return probe_dport(port, dport_dev);
}
static int add_port_attach_ep(struct cxl_memdev *cxlmd,
@@ -1829,7 +1801,7 @@ static int add_port_attach_ep(struct cxl_memdev *cxlmd,
scoped_guard(device, &parent_port->dev) {
parent_dport = cxl_find_dport_by_dev(parent_port, dparent);
if (!parent_dport) {
- parent_dport = cxl_port_add_dport(parent_port, dparent);
+ parent_dport = probe_dport(parent_port, dparent);
if (IS_ERR(parent_dport))
return PTR_ERR(parent_dport);
}
@@ -1865,7 +1837,7 @@ static struct cxl_dport *find_or_add_dport(struct cxl_port *port,
device_lock_assert(&port->dev);
dport = cxl_find_dport_by_dev(port, dport_dev);
if (!dport) {
- dport = cxl_port_add_dport(port, dport_dev);
+ dport = probe_dport(port, dport_dev);
if (IS_ERR(dport))
return dport;
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
index 561359c2d7dc0..2d3b6875270d5 100644
--- a/drivers/cxl/cxl.h
+++ b/drivers/cxl/cxl.h
@@ -833,8 +833,11 @@ struct cxl_endpoint_dvsec_info {
};
int devm_cxl_switch_port_decoders_setup(struct cxl_port *port);
-int __devm_cxl_switch_port_decoders_setup(struct cxl_port *port);
int devm_cxl_endpoint_decoders_setup(struct cxl_port *port);
+void cxl_port_update_decoder_targets(struct cxl_port *port,
+ struct cxl_dport *dport);
+int cxl_port_setup_regs(struct cxl_port *port,
+ resource_size_t component_reg_phys);
struct cxl_dev_state;
int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
@@ -844,10 +847,18 @@ bool is_cxl_region(struct device *dev);
extern const struct bus_type cxl_bus_type;
+/*
+ * Note, add_dport() is expressly for the cxl_port driver. TODO: investigate a
+ * type-safe driver model where probe()/remove() take the type of object implied
+ * by @id and the add_dport() op only defined for the CXL_DEVICE_PORT driver
+ * template.
+ */
struct cxl_driver {
const char *name;
int (*probe)(struct device *dev);
void (*remove)(struct device *dev);
+ struct cxl_dport *(*add_dport)(struct cxl_port *port,
+ struct device *dport_dev);
struct device_driver drv;
int id;
};
@@ -932,8 +943,6 @@ void cxl_coordinates_combine(struct access_coordinate *out,
bool cxl_endpoint_decoder_reset_detected(struct cxl_port *port);
struct cxl_dport *devm_cxl_add_dport_by_dev(struct cxl_port *port,
struct device *dport_dev);
-struct cxl_dport *__devm_cxl_add_dport_by_dev(struct cxl_port *port,
- struct device *dport_dev);
/*
* Unit test builds overrides this to __weak, find the 'strong' version
@@ -945,20 +954,4 @@ struct cxl_dport *__devm_cxl_add_dport_by_dev(struct cxl_port *port,
u16 cxl_gpf_get_dvsec(struct device *dev);
-/*
- * Declaration for functions that are mocked by cxl_test that are called by
- * cxl_core. The respective functions are defined as __foo() and called by
- * cxl_core as foo(). The macros below ensures that those functions would
- * exist as foo(). See tools/testing/cxl/cxl_core_exports.c and
- * tools/testing/cxl/exports.h for setting up the mock functions. The dance
- * is done to avoid a circular dependency where cxl_core calls a function that
- * ends up being a mock function and goes to * cxl_test where it calls a
- * cxl_core function.
- */
-#ifndef CXL_TEST_ENABLE
-#define DECLARE_TESTABLE(x) __##x
-#define devm_cxl_add_dport_by_dev DECLARE_TESTABLE(devm_cxl_add_dport_by_dev)
-#define devm_cxl_switch_port_decoders_setup DECLARE_TESTABLE(devm_cxl_switch_port_decoders_setup)
-#endif
-
#endif /* __CXL_H__ */
diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c
index 51c8f2f84717a..913c469e067a1 100644
--- a/drivers/cxl/port.c
+++ b/drivers/cxl/port.c
@@ -151,9 +151,59 @@ static const struct attribute_group *cxl_port_attribute_groups[] = {
NULL,
};
+/* note this implicitly casts the group back to its @port */
+DEFINE_FREE(cxl_port_release_dr_group, struct cxl_port *,
+ if (_T) devres_release_group(&_T->dev, _T))
+
+static struct cxl_dport *cxl_port_add_dport(struct cxl_port *port,
+ struct device *dport_dev)
+{
+ struct cxl_dport *dport;
+ int rc;
+
+ /* Temp group for all "first dport" and "per dport" setup actions */
+ void *port_dr_group __free(cxl_port_release_dr_group) =
+ devres_open_group(&port->dev, port, GFP_KERNEL);
+ if (!port_dr_group)
+ return ERR_PTR(-ENOMEM);
+
+ if (port->nr_dports == 0) {
+ /*
+ * Some host bridges are known to not have component regsisters
+ * available until a root port has trained CXL. Perform that
+ * setup now.
+ */
+ rc = cxl_port_setup_regs(port, port->component_reg_phys);
+ if (rc)
+ return ERR_PTR(rc);
+
+ rc = devm_cxl_switch_port_decoders_setup(port);
+ if (rc)
+ return ERR_PTR(rc);
+ }
+
+ dport = devm_cxl_add_dport_by_dev(port, dport_dev);
+ if (IS_ERR(dport))
+ return dport;
+
+ /* This group was only needed for early exit above */
+ devres_remove_group(&port->dev, no_free_ptr(port_dr_group));
+
+ cxl_switch_parse_cdat(dport);
+
+ /* New dport added, update the decoder targets */
+ cxl_port_update_decoder_targets(port, dport);
+
+ dev_dbg(&port->dev, "dport%d:%s added\n", dport->port_id,
+ dev_name(dport_dev));
+
+ return dport;
+}
+
static struct cxl_driver cxl_port_driver = {
.name = "cxl_port",
.probe = cxl_port_probe,
+ .add_dport = cxl_port_add_dport,
.id = CXL_DEVICE_PORT,
.drv = {
.dev_groups = cxl_port_attribute_groups,
diff --git a/tools/testing/cxl/Kbuild b/tools/testing/cxl/Kbuild
index f1ed9c46acd2d..af261431aef5b 100644
--- a/tools/testing/cxl/Kbuild
+++ b/tools/testing/cxl/Kbuild
@@ -12,6 +12,8 @@ ldflags-y += --wrap=cxl_endpoint_parse_cdat
ldflags-y += --wrap=cxl_dport_init_ras_reporting
ldflags-y += --wrap=devm_cxl_endpoint_decoders_setup
ldflags-y += --wrap=hmat_get_extended_linear_cache_size
+ldflags-y += --wrap=devm_cxl_add_dport_by_dev
+ldflags-y += --wrap=devm_cxl_switch_port_decoders_setup
DRIVERS := ../../../drivers
CXL_SRC := $(DRIVERS)/cxl
diff --git a/tools/testing/cxl/cxl_core_exports.c b/tools/testing/cxl/cxl_core_exports.c
index 6754de35598d5..f088792a8925f 100644
--- a/tools/testing/cxl/cxl_core_exports.c
+++ b/tools/testing/cxl/cxl_core_exports.c
@@ -2,28 +2,6 @@
/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
#include "cxl.h"
-#include "exports.h"
/* Exporting of cxl_core symbols that are only used by cxl_test */
EXPORT_SYMBOL_NS_GPL(cxl_num_decoders_committed, "CXL");
-
-cxl_add_dport_by_dev_fn _devm_cxl_add_dport_by_dev =
- __devm_cxl_add_dport_by_dev;
-EXPORT_SYMBOL_NS_GPL(_devm_cxl_add_dport_by_dev, "CXL");
-
-struct cxl_dport *devm_cxl_add_dport_by_dev(struct cxl_port *port,
- struct device *dport_dev)
-{
- return _devm_cxl_add_dport_by_dev(port, dport_dev);
-}
-EXPORT_SYMBOL_NS_GPL(devm_cxl_add_dport_by_dev, "CXL");
-
-cxl_switch_decoders_setup_fn _devm_cxl_switch_port_decoders_setup =
- __devm_cxl_switch_port_decoders_setup;
-EXPORT_SYMBOL_NS_GPL(_devm_cxl_switch_port_decoders_setup, "CXL");
-
-int devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
-{
- return _devm_cxl_switch_port_decoders_setup(port);
-}
-EXPORT_SYMBOL_NS_GPL(devm_cxl_switch_port_decoders_setup, "CXL");
diff --git a/tools/testing/cxl/exports.h b/tools/testing/cxl/exports.h
deleted file mode 100644
index 7ebee7c0bd67e..0000000000000
--- a/tools/testing/cxl/exports.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright(c) 2025 Intel Corporation */
-#ifndef __MOCK_CXL_EXPORTS_H_
-#define __MOCK_CXL_EXPORTS_H_
-
-typedef struct cxl_dport *(*cxl_add_dport_by_dev_fn)(struct cxl_port *port,
- struct device *dport_dev);
-extern cxl_add_dport_by_dev_fn _devm_cxl_add_dport_by_dev;
-
-typedef int(*cxl_switch_decoders_setup_fn)(struct cxl_port *port);
-extern cxl_switch_decoders_setup_fn _devm_cxl_switch_port_decoders_setup;
-
-#endif
diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index bff5853717f02..4762d8c40a8b8 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -10,21 +10,12 @@
#include <cxlmem.h>
#include <cxlpci.h>
#include "mock.h"
-#include "../exports.h"
static LIST_HEAD(mock);
-static struct cxl_dport *
-redirect_devm_cxl_add_dport_by_dev(struct cxl_port *port,
- struct device *dport_dev);
-static int redirect_devm_cxl_switch_port_decoders_setup(struct cxl_port *port);
-
void register_cxl_mock_ops(struct cxl_mock_ops *ops)
{
list_add_rcu(&ops->list, &mock);
- _devm_cxl_add_dport_by_dev = redirect_devm_cxl_add_dport_by_dev;
- _devm_cxl_switch_port_decoders_setup =
- redirect_devm_cxl_switch_port_decoders_setup;
}
EXPORT_SYMBOL_GPL(register_cxl_mock_ops);
@@ -32,9 +23,6 @@ DEFINE_STATIC_SRCU(cxl_mock_srcu);
void unregister_cxl_mock_ops(struct cxl_mock_ops *ops)
{
- _devm_cxl_switch_port_decoders_setup =
- __devm_cxl_switch_port_decoders_setup;
- _devm_cxl_add_dport_by_dev = __devm_cxl_add_dport_by_dev;
list_del_rcu(&ops->list);
synchronize_srcu(&cxl_mock_srcu);
}
@@ -163,7 +151,7 @@ __wrap_nvdimm_bus_register(struct device *dev,
}
EXPORT_SYMBOL_GPL(__wrap_nvdimm_bus_register);
-int redirect_devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
+int __wrap_devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
{
int rc, index;
struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
@@ -171,11 +159,12 @@ int redirect_devm_cxl_switch_port_decoders_setup(struct cxl_port *port)
if (ops && ops->is_mock_port(port->uport_dev))
rc = ops->devm_cxl_switch_port_decoders_setup(port);
else
- rc = __devm_cxl_switch_port_decoders_setup(port);
+ rc = devm_cxl_switch_port_decoders_setup(port);
put_cxl_mock_ops(index);
return rc;
}
+EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_switch_port_decoders_setup, "CXL");
int __wrap_devm_cxl_endpoint_decoders_setup(struct cxl_port *port)
{
@@ -289,8 +278,8 @@ void __wrap_cxl_dport_init_ras_reporting(struct cxl_dport *dport, struct device
}
EXPORT_SYMBOL_NS_GPL(__wrap_cxl_dport_init_ras_reporting, "CXL");
-struct cxl_dport *redirect_devm_cxl_add_dport_by_dev(struct cxl_port *port,
- struct device *dport_dev)
+struct cxl_dport *__wrap_devm_cxl_add_dport_by_dev(struct cxl_port *port,
+ struct device *dport_dev)
{
int index;
struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
@@ -299,11 +288,12 @@ struct cxl_dport *redirect_devm_cxl_add_dport_by_dev(struct cxl_port *port,
if (ops && ops->is_mock_port(port->uport_dev))
dport = ops->devm_cxl_add_dport_by_dev(port, dport_dev);
else
- dport = __devm_cxl_add_dport_by_dev(port, dport_dev);
+ dport = devm_cxl_add_dport_by_dev(port, dport_dev);
put_cxl_mock_ops(index);
return dport;
}
+EXPORT_SYMBOL_NS_GPL(__wrap_devm_cxl_add_dport_by_dev, "CXL");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("cxl_test: emulation module");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0517/2151] cxl/port: Move dport RAS setup to dport add time
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (515 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0516/2151] cxl/port: Move dport probe operations to a driver event Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0518/2151] cxl/core: Fix dport use-after-free via the einj_inject debugfs file Greg Kroah-Hartman
` (365 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dave Jiang, Jonathan Cameron,
Terry Bowman, Dan Williams, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
[ Upstream commit 7f5ff740ce0bcde242dafcc3f9bb3cbe6b5b8f3a ]
Towards the end goal of making all CXL RAS capability handling uniform
across host bridge ports, upstream switch ports, and endpoint ports, move
dport RAS setup. Move it to cxl_switch_port_probe() context for switch / VH
dports (via cxl_port_add_dport()) and cxl_endpoint_port_probe() context for
an RCH dport. Rename the RAS setup helper to devm_cxl_dport_ras_setup() for
symmetry with devm_cxl_switch_port_decoders_setup().
Only the RCH version needs to be exported and the cxl_test mocking can be
deleted with a dev_is_pci() check on the dport_dev.
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-7-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Stable-dep-of: 0de71a1ab211 ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/core.h | 10 ++++++++++
drivers/cxl/core/port.c | 12 +++---------
drivers/cxl/core/ras.c | 30 ++++++++++++++++++------------
drivers/cxl/cxlpci.h | 7 ++++---
drivers/cxl/mem.c | 2 --
drivers/cxl/port.c | 12 ++++++++++++
tools/testing/cxl/Kbuild | 1 -
tools/testing/cxl/test/mock.c | 12 ------------
8 files changed, 47 insertions(+), 39 deletions(-)
diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h
index c38cd0fdb04c7..6058edfd9c12e 100644
--- a/drivers/cxl/core/core.h
+++ b/drivers/cxl/core/core.h
@@ -144,6 +144,14 @@ int cxl_pci_get_bandwidth(struct pci_dev *pdev, struct access_coordinate *c);
int cxl_port_get_switch_dport_bandwidth(struct cxl_port *port,
struct access_coordinate *c);
+static inline struct device *dport_to_host(struct cxl_dport *dport)
+{
+ struct cxl_port *port = dport->port;
+
+ if (is_cxl_root(port))
+ return port->uport_dev;
+ return &port->dev;
+}
#ifdef CONFIG_CXL_RAS
int cxl_ras_init(void);
void cxl_ras_exit(void);
@@ -152,6 +160,7 @@ void cxl_handle_cor_ras(struct cxl_dev_state *cxlds, void __iomem *ras_base);
void cxl_dport_map_rch_aer(struct cxl_dport *dport);
void cxl_disable_rch_root_ints(struct cxl_dport *dport);
void cxl_handle_rdport_errors(struct cxl_dev_state *cxlds);
+void devm_cxl_dport_ras_setup(struct cxl_dport *dport);
#else
static inline int cxl_ras_init(void)
{
@@ -170,6 +179,7 @@ static inline void cxl_handle_cor_ras(struct cxl_dev_state *cxlds, void __iomem
static inline void cxl_dport_map_rch_aer(struct cxl_dport *dport) { }
static inline void cxl_disable_rch_root_ints(struct cxl_dport *dport) { }
static inline void cxl_handle_rdport_errors(struct cxl_dev_state *cxlds) { }
+static inline void devm_cxl_dport_ras_setup(struct cxl_dport *dport) { }
#endif /* CONFIG_CXL_RAS */
int cxl_gpf_port_setup(struct cxl_dport *dport);
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index 1d34ade204a18..c049b0e5eca7c 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -1164,15 +1164,6 @@ static void cxl_dport_unlink(void *data)
sysfs_remove_link(&port->dev.kobj, link_name);
}
-static struct device *dport_to_host(struct cxl_dport *dport)
-{
- struct cxl_port *port = dport->port;
-
- if (is_cxl_root(port))
- return port->uport_dev;
- return &port->dev;
-}
-
static void free_dport(void *dport)
{
kfree(dport);
@@ -1306,6 +1297,9 @@ __devm_cxl_add_dport(struct cxl_port *port, struct device *dport_dev,
cxl_debugfs_create_dport_dir(dport);
+ if (!dport->rch)
+ devm_cxl_dport_ras_setup(dport);
+
/* keep the group, and mark the end of devm actions */
cxl_dport_close_dr_group(dport, no_free_ptr(dport_dr_group));
diff --git a/drivers/cxl/core/ras.c b/drivers/cxl/core/ras.c
index 34fd019da1cdc..eb663c9eaa5f8 100644
--- a/drivers/cxl/core/ras.c
+++ b/drivers/cxl/core/ras.c
@@ -152,26 +152,32 @@ static void cxl_dport_map_ras(struct cxl_dport *dport)
}
/**
- * cxl_dport_init_ras_reporting - Setup CXL RAS report on this dport
+ * devm_cxl_dport_ras_setup - Setup CXL RAS report on this dport
* @dport: the cxl_dport that needs to be initialized
- * @host: host device for devm operations
*/
-void cxl_dport_init_ras_reporting(struct cxl_dport *dport, struct device *host)
+void devm_cxl_dport_ras_setup(struct cxl_dport *dport)
{
- dport->reg_map.host = host;
+ dport->reg_map.host = dport_to_host(dport);
cxl_dport_map_ras(dport);
+}
- if (dport->rch) {
- struct pci_host_bridge *host_bridge = to_pci_host_bridge(dport->dport_dev);
+void devm_cxl_dport_rch_ras_setup(struct cxl_dport *dport)
+{
+ struct pci_host_bridge *host_bridge;
- if (!host_bridge->native_aer)
- return;
+ if (!dev_is_pci(dport->dport_dev))
+ return;
- cxl_dport_map_rch_aer(dport);
- cxl_disable_rch_root_ints(dport);
- }
+ devm_cxl_dport_ras_setup(dport);
+
+ host_bridge = to_pci_host_bridge(dport->dport_dev);
+ if (!host_bridge->native_aer)
+ return;
+
+ cxl_dport_map_rch_aer(dport);
+ cxl_disable_rch_root_ints(dport);
}
-EXPORT_SYMBOL_NS_GPL(cxl_dport_init_ras_reporting, "CXL");
+EXPORT_SYMBOL_NS_GPL(devm_cxl_dport_rch_ras_setup, "CXL");
void cxl_handle_cor_ras(struct cxl_dev_state *cxlds, void __iomem *ras_base)
{
diff --git a/drivers/cxl/cxlpci.h b/drivers/cxl/cxlpci.h
index 970e84cf49e9a..bec6018e01ccd 100644
--- a/drivers/cxl/cxlpci.h
+++ b/drivers/cxl/cxlpci.h
@@ -135,7 +135,7 @@ void read_cdat_data(struct cxl_port *port);
void cxl_cor_error_detected(struct pci_dev *pdev);
pci_ers_result_t cxl_error_detected(struct pci_dev *pdev,
pci_channel_state_t state);
-void cxl_dport_init_ras_reporting(struct cxl_dport *dport, struct device *host);
+void devm_cxl_dport_rch_ras_setup(struct cxl_dport *dport);
#else
static inline void cxl_cor_error_detected(struct pci_dev *pdev) { }
@@ -145,8 +145,9 @@ static inline pci_ers_result_t cxl_error_detected(struct pci_dev *pdev,
return PCI_ERS_RESULT_NONE;
}
-static inline void cxl_dport_init_ras_reporting(struct cxl_dport *dport,
- struct device *host) { }
+static inline void devm_cxl_dport_rch_ras_setup(struct cxl_dport *dport)
+{
+}
#endif
#endif /* __CXL_PCI_H__ */
diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
index 6e6777b7bafb5..4bf59573a1b5e 100644
--- a/drivers/cxl/mem.c
+++ b/drivers/cxl/mem.c
@@ -166,8 +166,6 @@ static int cxl_mem_probe(struct device *dev)
else
endpoint_parent = &parent_port->dev;
- cxl_dport_init_ras_reporting(dport, dev);
-
scoped_guard(device, endpoint_parent) {
if (!endpoint_parent->driver) {
dev_err(dev, "CXL port topology %s not enabled\n",
diff --git a/drivers/cxl/port.c b/drivers/cxl/port.c
index 913c469e067a1..929f7e259f0d3 100644
--- a/drivers/cxl/port.c
+++ b/drivers/cxl/port.c
@@ -71,6 +71,7 @@ static int cxl_switch_port_probe(struct cxl_port *port)
static int cxl_endpoint_port_probe(struct cxl_port *port)
{
struct cxl_memdev *cxlmd = to_cxl_memdev(port->uport_dev);
+ struct cxl_dport *dport = port->parent_dport;
int rc;
/* Cache the data early to ensure is_visible() works */
@@ -86,6 +87,17 @@ static int cxl_endpoint_port_probe(struct cxl_port *port)
if (rc)
return rc;
+ /*
+ * With VH (CXL Virtual Host) topology the cxl_port::add_dport() method
+ * handles RAS setup for downstream ports. With RCH (CXL Restricted CXL
+ * Host) topologies the downstream port is enumerated early by platform
+ * firmware, but the RCRB (root complex register block) is not mapped
+ * until after the cxl_pci driver attaches to the RCIeP (root complex
+ * integrated endpoint).
+ */
+ if (dport->rch)
+ devm_cxl_dport_rch_ras_setup(dport);
+
/*
* Now that all endpoint decoders are successfully enumerated, try to
* assemble regions from committed decoders
diff --git a/tools/testing/cxl/Kbuild b/tools/testing/cxl/Kbuild
index af261431aef5b..0fb36cbaa14e1 100644
--- a/tools/testing/cxl/Kbuild
+++ b/tools/testing/cxl/Kbuild
@@ -9,7 +9,6 @@ ldflags-y += --wrap=cxl_await_media_ready
ldflags-y += --wrap=devm_cxl_add_rch_dport
ldflags-y += --wrap=cxl_rcd_component_reg_phys
ldflags-y += --wrap=cxl_endpoint_parse_cdat
-ldflags-y += --wrap=cxl_dport_init_ras_reporting
ldflags-y += --wrap=devm_cxl_endpoint_decoders_setup
ldflags-y += --wrap=hmat_get_extended_linear_cache_size
ldflags-y += --wrap=devm_cxl_add_dport_by_dev
diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index 4762d8c40a8b8..93bb7bece9374 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -266,18 +266,6 @@ void __wrap_cxl_endpoint_parse_cdat(struct cxl_port *port)
}
EXPORT_SYMBOL_NS_GPL(__wrap_cxl_endpoint_parse_cdat, "CXL");
-void __wrap_cxl_dport_init_ras_reporting(struct cxl_dport *dport, struct device *host)
-{
- int index;
- struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
-
- if (!ops || !ops->is_mock_port(dport->dport_dev))
- cxl_dport_init_ras_reporting(dport, host);
-
- put_cxl_mock_ops(index);
-}
-EXPORT_SYMBOL_NS_GPL(__wrap_cxl_dport_init_ras_reporting, "CXL");
-
struct cxl_dport *__wrap_devm_cxl_add_dport_by_dev(struct cxl_port *port,
struct device *dport_dev)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0518/2151] cxl/core: Fix dport use-after-free via the einj_inject debugfs file
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (516 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0517/2151] cxl/port: Move dport RAS setup to dport add time Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0519/2151] crypto: qat - fix active_devs leak on crypto alg registration failure Greg Kroah-Hartman
` (364 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guixin Liu, Richard Cheng, Li Ming,
Alison Schofield, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guixin Liu <kanie@linux.alibaba.com>
[ Upstream commit 0de71a1ab211694be7e88d56fc35c9bf72078ad1 ]
The per-dport einj_inject debugfs file retains a pointer to the
'struct cxl_dport', but its lifetime is not tied to the dport. Unbinding
the dport host frees the dport and leaves einj_inject behind, so writing
the file dereferences freed memory.
The stale directory also prevents recreation on rebind.
Remove the per-dport debugfs directory when the dport host is released.
Found by code inspection, then reproduced on a QEMU CXL topology with
KASAN (the einj_cxl_is_initialized() guard had to be forced open, as
QEMU emits no EINJ table). Unpatched, writing the leftover file after
unbind gives a KASAN slab-use-after-free report in cxl_einj_inject(),
and rebind hits "already exists in 'cxl'". Patched, the directory goes
away with the dport and rebind recreates a working einj_inject.
Fixes: 8039804cfa73 ("cxl/core: Add CXL EINJ debugfs files")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260914121843.718493-1-kanie@linux.alibaba.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index c049b0e5eca7c..bfb2e457fa223 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -835,6 +835,11 @@ static int cxl_einj_inject(void *data, u64 type)
DEFINE_DEBUGFS_ATTRIBUTE(cxl_einj_inject_fops, NULL, cxl_einj_inject,
"0x%llx\n");
+static void remove_debugfs(void *dentry)
+{
+ debugfs_remove_recursive(dentry);
+}
+
static void cxl_debugfs_create_dport_dir(struct cxl_dport *dport)
{
struct cxl_port *parent = parent_port_of(dport->port);
@@ -853,6 +858,8 @@ static void cxl_debugfs_create_dport_dir(struct cxl_dport *dport)
dir = cxl_debugfs_create_dir(dev_name(dport->dport_dev));
+ devm_add_action_or_reset(dport_to_host(dport), remove_debugfs, dir);
+
debugfs_create_file("einj_inject", 0200, dir, dport,
&cxl_einj_inject_fops);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0519/2151] crypto: qat - fix active_devs leak on crypto alg registration failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (517 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0518/2151] cxl/core: Fix dport use-after-free via the einj_inject debugfs file Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0520/2151] crypto: atmel-sha - reject initialization without a device Greg Kroah-Hartman
` (363 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ahsan Atta, Giovanni Cabiddu,
Thomas Huth, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahsan Atta <ahsan.atta@intel.com>
[ Upstream commit 178829f1b5b259938188a10f4103fdb901b6435e ]
adf_dev_start() registered both alg sets in a single condition.
If qat_algs_register() succeeds but qat_asym_algs_register() fails,
ADF_STATUS_CRYPTO_ALGS_REGISTERED is left clear, so adf_dev_stop() skips
qat_algs_unregister(): the skciphers and aeads stay registered with
active_devs stuck at 1, pinning the module.
Both helpers leak active_devs internally as well - they increment it and
return without decrementing when a crypto_register_*() call fails, and
the asym path also leaves the already-registered akcipher behind.
Split the registration in adf_dev_start() so that an asym failure
unregisters qat_algs, and unwind active_devs (and the akcipher) on the
error paths of both register helpers. While at it, propagate the error
code returned by the register helpers instead of a blanket -EFAULT.
Fixes: 9b2f33a1bfcd ("crypto: qat - fix unregistration of crypto algorithms")
Signed-off-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../crypto/intel/qat/qat_common/adf_init.c | 24 ++++++++++++-----
.../crypto/intel/qat/qat_common/qat_algs.c | 15 ++++++-----
.../intel/qat/qat_common/qat_asym_algs.c | 26 ++++++++++++++-----
3 files changed, 45 insertions(+), 20 deletions(-)
diff --git a/drivers/crypto/intel/qat/qat_common/adf_init.c b/drivers/crypto/intel/qat/qat_common/adf_init.c
index fe397f39a6c4f..c1e89b0718442 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_init.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_init.c
@@ -250,13 +250,23 @@ static int adf_dev_start(struct adf_accel_dev *accel_dev)
clear_bit(ADF_STATUS_STARTING, &accel_dev->status);
set_bit(ADF_STATUS_STARTED, &accel_dev->status);
- if (!list_empty(&accel_dev->crypto_list) &&
- (qat_algs_register() || qat_asym_algs_register())) {
- dev_err(&GET_DEV(accel_dev),
- "Failed to register crypto algs\n");
- set_bit(ADF_STATUS_STARTING, &accel_dev->status);
- clear_bit(ADF_STATUS_STARTED, &accel_dev->status);
- return -EFAULT;
+ if (!list_empty(&accel_dev->crypto_list)) {
+ ret = qat_algs_register();
+ if (ret) {
+ dev_err(&GET_DEV(accel_dev), "Failed to register crypto algs\n");
+ set_bit(ADF_STATUS_STARTING, &accel_dev->status);
+ clear_bit(ADF_STATUS_STARTED, &accel_dev->status);
+ return ret;
+ }
+
+ ret = qat_asym_algs_register();
+ if (ret) {
+ dev_err(&GET_DEV(accel_dev), "Failed to register crypto asym algs\n");
+ qat_algs_unregister();
+ set_bit(ADF_STATUS_STARTING, &accel_dev->status);
+ clear_bit(ADF_STATUS_STARTED, &accel_dev->status);
+ return ret;
+ }
}
set_bit(ADF_STATUS_CRYPTO_ALGS_REGISTERED, &accel_dev->status);
diff --git a/drivers/crypto/intel/qat/qat_common/qat_algs.c b/drivers/crypto/intel/qat/qat_common/qat_algs.c
index 91663805d9e60..f954e7c0e4d0d 100644
--- a/drivers/crypto/intel/qat/qat_common/qat_algs.c
+++ b/drivers/crypto/intel/qat/qat_common/qat_algs.c
@@ -1320,19 +1320,22 @@ int qat_algs_register(void)
ret = crypto_register_skciphers(qat_skciphers,
ARRAY_SIZE(qat_skciphers));
if (ret)
- goto unlock;
+ goto err_dec;
ret = crypto_register_aeads(qat_aeads, ARRAY_SIZE(qat_aeads));
if (ret)
- goto unreg_algs;
+ goto err_unreg_skciphers;
-unlock:
mutex_unlock(&algs_lock);
- return ret;
+ return 0;
-unreg_algs:
+err_unreg_skciphers:
crypto_unregister_skciphers(qat_skciphers, ARRAY_SIZE(qat_skciphers));
- goto unlock;
+err_dec:
+ active_devs--;
+unlock:
+ mutex_unlock(&algs_lock);
+ return ret;
}
void qat_algs_unregister(void)
diff --git a/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c b/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
index aa809e6d67bfe..4292efd7c3967 100644
--- a/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/intel/qat/qat_common/qat_asym_algs.c
@@ -1340,13 +1340,25 @@ int qat_asym_algs_register(void)
int ret = 0;
mutex_lock(&algs_lock);
- if (++active_devs == 1) {
- rsa.base.cra_flags = 0;
- ret = crypto_register_akcipher(&rsa);
- if (ret)
- goto unlock;
- ret = crypto_register_kpp(&dh);
- }
+ if (++active_devs != 1)
+ goto unlock;
+
+ rsa.base.cra_flags = 0;
+ ret = crypto_register_akcipher(&rsa);
+ if (ret)
+ goto err_dec;
+
+ ret = crypto_register_kpp(&dh);
+ if (ret)
+ goto err_unreg_akcipher;
+
+ mutex_unlock(&algs_lock);
+ return 0;
+
+err_unreg_akcipher:
+ crypto_unregister_akcipher(&rsa);
+err_dec:
+ active_devs--;
unlock:
mutex_unlock(&algs_lock);
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0520/2151] crypto: atmel-sha - reject initialization without a device
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (518 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0519/2151] crypto: qat - fix active_devs leak on crypto alg registration failure Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0521/2151] interconnect: exynos: Remove the PM QoS request on unbind Greg Kroah-Hartman
` (362 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Slavin Liu, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Slavin Liu <bolin.liu@seu.edu.cn>
[ Upstream commit a9a2152d292fd0bc73814eb4a127278ee7dd3f6a ]
A transform may be initialized for the first time after the last
device has been removed from the driver list. Return -ENODEV when the
lookup is empty, before the debug message reads dd->dev.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: ebc82efa1cd6 ("crypto: atmel - add Atmel SHA1/SHA256 driver")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/atmel-sha.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index b02a71061708c..f8281a175a779 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -430,6 +430,9 @@ static int atmel_sha_init(struct ahash_request *req)
struct atmel_sha_reqctx *ctx = ahash_request_ctx(req);
struct atmel_sha_dev *dd = atmel_sha_find_dev(tctx);
+ if (!dd)
+ return -ENODEV;
+
ctx->dd = dd;
ctx->flags = 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0521/2151] interconnect: exynos: Remove the PM QoS request on unbind
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (519 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0520/2151] crypto: atmel-sha - reject initialization without a device Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0522/2151] interconnect: qcom: icc-rpm: Handle icc_link_create() failures Greg Kroah-Hartman
` (361 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak,
Georgi Djakov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit 601a54f00723b0b653d76caf26a2a78482d95f00 ]
The Exynos interconnect provider adds a minimum-frequency PM QoS request
to its parent devfreq device. The request is embedded in the provider's
device-managed private data.
The probe error path removes the request, but the remove callback does
not. Unbinding the provider while the parent device remains registered
therefore frees the private data with the request still on the parent's
QoS list. The child's device cleanup does not remove requests registered
against its parent.
Remove the request after deregistering the provider, before the private
data is released.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260911031750.8182-1-mhun512@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/interconnect/samsung/exynos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/interconnect/samsung/exynos.c b/drivers/interconnect/samsung/exynos.c
index 8e8f56186a366..9a4789fadac2e 100644
--- a/drivers/interconnect/samsung/exynos.c
+++ b/drivers/interconnect/samsung/exynos.c
@@ -98,6 +98,7 @@ static void exynos_generic_icc_remove(struct platform_device *pdev)
struct exynos_icc_priv *priv = platform_get_drvdata(pdev);
icc_provider_deregister(&priv->provider);
+ dev_pm_qos_remove_request(&priv->qos_req);
icc_nodes_remove(&priv->provider);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0522/2151] interconnect: qcom: icc-rpm: Handle icc_link_create() failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (520 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0521/2151] interconnect: exynos: Remove the PM QoS request on unbind Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0523/2151] interconnect: qcom: use 64-bit SMD RPM bus votes Greg Kroah-Hartman
` (360 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Konrad Dybcio, Dmitry Baryshkov,
Abel Vesa, Georgi Djakov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
[ Upstream commit b2079a6b8e8b92c6c45a22930e5b68a9c5c34645 ]
icc_link_create() can return errors. Don't ignore them.
Assisted-by: LLM
Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-3-6dc5b5e97626@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/interconnect/qcom/icc-rpm.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index ea1042d381287..37da715554eae 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -582,8 +582,15 @@ int qnoc_probe(struct platform_device *pdev)
node->data = qnodes[i];
icc_node_add(node, provider);
- for (j = 0; j < qnodes[i]->num_links; j++)
- icc_link_create(node, qnodes[i]->links[j]);
+ for (j = 0; j < qnodes[i]->num_links; j++) {
+ ret = icc_link_create(node, qnodes[i]->links[j]);
+ if (ret) {
+ icc_nodes_remove(provider);
+ clk_bulk_disable_unprepare(qp->num_intf_clks,
+ qp->intf_clks);
+ goto err_disable_unprepare_clk;
+ }
+ }
/* Set QoS registers (we only need to do it once, generally) */
if (qnodes[i]->qos.ap_owned &&
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0523/2151] interconnect: qcom: use 64-bit SMD RPM bus votes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (521 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0522/2151] interconnect: qcom: icc-rpm: Handle icc_link_create() failures Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0524/2151] RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device() Greg Kroah-Hartman
` (359 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Konrad Dybcio, Abel Vesa,
Gopikrishna Garmidi, Georgi Djakov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
[ Upstream commit 24e7422ce31189502d07279c083646aaca513311 ]
SMD RPM bus bandwidth requests carry a 64-bit bandwidth value.
The interconnect proxy declared the KVP payload as u32, truncating
votes above 4 GiB/s and advertising the wrong payload size to RPM.
Use a little-endian 64-bit payload and accept a u64 value in the proxy
API. This has always been the right behavior, even on msm-3.10 and
32-bit SoCs.
Fixes: be06f8e7425d ("interconnect: qcom: Add interconnect RPM over SMD driver")
Assisted-by: LLM
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Gopikrishna Garmidi <gopikrishna.garmidi@oss.qualcomm.com>
Link: https://patch.msgid.link/20260904-topic-icc_rpm_64b_req-v1-1-37e24f1991a3@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/interconnect/qcom/icc-rpm.h | 4 ++--
drivers/interconnect/qcom/smd-rpm.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
index f4883d43eae4d..9b1602b2d5c59 100644
--- a/drivers/interconnect/qcom/icc-rpm.h
+++ b/drivers/interconnect/qcom/icc-rpm.h
@@ -30,7 +30,7 @@ enum qcom_icc_type {
* @resource_type: RPM resource type of the clock resource
* @clock_id: index of the clock resource of a specific resource type
* @branch: whether the resource represents a branch clock
-*/
+ */
struct rpm_clk_resource {
u32 resource_type;
u32 clock_id;
@@ -164,7 +164,7 @@ int qnoc_probe(struct platform_device *pdev);
void qnoc_remove(struct platform_device *pdev);
bool qcom_icc_rpm_smd_available(void);
-int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val);
+int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u64 val);
int qcom_icc_rpm_set_bus_rate(const struct rpm_clk_resource *clk, int ctx, u32 rate);
#endif
diff --git a/drivers/interconnect/qcom/smd-rpm.c b/drivers/interconnect/qcom/smd-rpm.c
index 8316c87a2c60f..39831fcf191b3 100644
--- a/drivers/interconnect/qcom/smd-rpm.c
+++ b/drivers/interconnect/qcom/smd-rpm.c
@@ -21,7 +21,7 @@ static struct qcom_smd_rpm *icc_smd_rpm;
struct icc_rpm_smd_req {
__le32 key;
__le32 nbytes;
- __le32 value;
+ __le64 value;
};
bool qcom_icc_rpm_smd_available(void)
@@ -30,12 +30,12 @@ bool qcom_icc_rpm_smd_available(void)
}
EXPORT_SYMBOL_GPL(qcom_icc_rpm_smd_available);
-int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u32 val)
+int qcom_icc_rpm_smd_send(int ctx, int rsc_type, int id, u64 val)
{
struct icc_rpm_smd_req req = {
.key = cpu_to_le32(RPM_KEY_BW),
- .nbytes = cpu_to_le32(sizeof(u32)),
- .value = cpu_to_le32(val),
+ .nbytes = cpu_to_le32(sizeof(u64)),
+ .value = cpu_to_le64(val),
};
return qcom_rpm_smd_write(icc_smd_rpm, ctx, rsc_type, id, &req,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0524/2151] RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (522 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0523/2151] interconnect: qcom: use 64-bit SMD RPM bus votes Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0525/2151] RDMA/restrack: Dont set RESTRACK_DD mark after a failed xa_insert() Greg Kroah-Hartman
` (358 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit fad7b0dcb0821c0f201df3d85065145857a6f55b ]
ib_add_sub_device() links a new sub-device into its parent's sub-device
list with:
list_add_tail(&parent->subdev_list_head, &sub->subdev_list);
list_add_tail(new, head) expects the node to insert as the first
argument and the list head as the second, so the call above does the
opposite of what was intended: it treats the parent's list head as the
new node and the sub-device's node as the list head.
Because _ib_alloc_device() initialises subdev_list to a self-referencing
empty head, the misplaced insertion does not crash, but it corrupts the
parent->subdev_list_head list. After adding two or more sub-devices,
only the last one is reachable through the parent's head, and
ib_del_sub_device_and_put()'s list_del() on &sub->subdev_list rewrites
the head pointers, potentially severing earlier sub-devices from the
chain. During parent teardown, the reverse iteration over
subdev_list_head then skips the orphaned sub-devices, so their
del_sub_dev() callbacks are never invoked and ib_device_put() on the
parent is never paired, leaking both the HW sub-devices and a refcount.
Swap the arguments to match the documented intent: insert the
sub-device node into the parent's list head.
Fixes: bca51197620a ("RDMA/core: Support IB sub device with type "SMI"")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260916064435.2180-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/core/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 004952357e055..6d872c351ad0a 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -2904,7 +2904,7 @@ int ib_add_sub_device(struct ib_device *parent,
sub->parent = parent;
mutex_lock(&parent->subdev_lock);
- list_add_tail(&parent->subdev_list_head, &sub->subdev_list);
+ list_add_tail(&sub->subdev_list, &parent->subdev_list_head);
mutex_unlock(&parent->subdev_lock);
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0525/2151] RDMA/restrack: Dont set RESTRACK_DD mark after a failed xa_insert()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (523 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0524/2151] RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device() Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0526/2151] RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT Greg Kroah-Hartman
` (357 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit 391c5d826fd0a5dacad54613dbef74c50e966f5c ]
When adding a QP to the restrack xarray, rdma_restrack_add() does:
ret = xa_insert(&rt->xa, res->id, res, GFP_KERNEL);
if (ret)
res->id = 0;
if (qp->qp_type >= IB_QPT_DRIVER)
xa_set_mark(&rt->xa, res->id, RESTRACK_DD);
The xa_set_mark() call is not guarded by "!ret". When xa_insert() fails
(possible on a qp_num collision or memory pressure), res->id is reset to
0, yet the mark is still applied to index 0. If a legitimate QP whose
qp_num is 0 already occupies that slot - e.g. a normal QP or the SMI QP
- it is spuriously tagged as driver-private (RESTRACK_DD), and the
netlink dump path res_get_common_dumpit() then hides it from "rdma res"
output whenever the caller does not request driver details.
Only set the mark when the insertion actually succeeded by folding the
mark into the non-failure branch.
Fixes: e18fa0bbcedf8 ("RDMA/core: Add an option to display driver-specific QPs in the rdmatool")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260916073042.1746-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/core/restrack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c
index 56aa1def56fac..97fdfca1cd8c5 100644
--- a/drivers/infiniband/core/restrack.c
+++ b/drivers/infiniband/core/restrack.c
@@ -248,8 +248,7 @@ void rdma_restrack_add(struct rdma_restrack_entry *res)
ret = xa_insert(&rt->xa, res->id, res, GFP_KERNEL);
if (ret)
res->id = 0;
-
- if (qp->qp_type >= IB_QPT_DRIVER)
+ else if (qp->qp_type >= IB_QPT_DRIVER)
xa_set_mark(&rt->xa, res->id, RESTRACK_DD);
} else if (res->type == RDMA_RESTRACK_COUNTER) {
/* Special case to ensure that cntn points to right counter */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0526/2151] RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (524 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0525/2151] RDMA/restrack: Dont set RESTRACK_DD mark after a failed xa_insert() Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0527/2151] cxl/region: Create node access attributes for CFMWS-only NUMA nodes Greg Kroah-Hartman
` (356 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit 9dcacdc41083cccff74292851bf9fde999e0731a ]
The UVERBS_METHOD_GET_CONTEXT handler allocates the ucontext via
ib_alloc_ucontext(), which calls rdma_restrack_new() (initialising the
kref to 1) and rdma_restrack_set_name(NULL), the latter attaching the
current task and taking a task_struct reference. When ib_init_ucontext()
subsequently fails, the error path only does:
kfree(attrs->context);
attrs->context = NULL;
without first calling rdma_restrack_put() on &attrs->context->res. The
kref therefore never reaches zero, restrack_release() is never invoked,
and put_task_struct() is never called, so the task_struct reference taken
during set_name is leaked permanently.
A local user with access to an RDMA device can repeat this path (e.g. by
hitting an RDMA cgroup limit or supplying invalid ucaps) and leak one
task_struct reference per attempt, eventually preventing those processes
from being reaped or exhausting memory.
The legacy ib_uverbs_get_context() path already handles this correctly
at its err_ucontext label, where rdma_restrack_put() precedes kfree().
Mirror that ordering here.
Fixes: a1123418ba10 ("RDMA/uverbs: Add ioctl command to get a device context")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260916085529.1838-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/core/uverbs_std_types_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/core/uverbs_std_types_device.c b/drivers/infiniband/core/uverbs_std_types_device.c
index a28f9f21bed89..a93a73b1a2fd4 100644
--- a/drivers/infiniband/core/uverbs_std_types_device.c
+++ b/drivers/infiniband/core/uverbs_std_types_device.c
@@ -264,6 +264,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_GET_CONTEXT)(
return ret;
ret = ib_init_ucontext(attrs);
if (ret) {
+ rdma_restrack_put(&attrs->context->res);
kfree(attrs->context);
attrs->context = NULL;
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0527/2151] cxl/region: Create node access attributes for CFMWS-only NUMA nodes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (525 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0526/2151] RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0528/2151] cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails Greg Kroah-Hartman
` (355 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jonathan Cameron, Guixin Liu,
Gregory Price (Meta), Alison Schofield, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guixin Liu <kanie@linux.alibaba.com>
[ Upstream commit ef71014055f7b4959e4cb023ca8a18258cb5641c ]
A NUMA node that only backs a CXL fixed memory window and is not
enumerated by SRAT has no memory_target in the HMAT code, so
hmat_callback() exits early at find_mem_target() and never creates
the node's accessN attributes:
/sys/devices/system/node/nodeX/accessN/initiators/* stays missing.
Commit debdce20c4f2 ("cxl/region: Deal with numa nodes not enumerated
by SRAT") had the CXL region notifier call node_set_perf_attrs()
directly for such nodes, but commit 2e454fb8056d ("cxl, acpi/hmat:
Update CXL access coordinates directly instead of through HMAT")
replaced it with node_update_perf_attrs(), which only updates
attributes that already exist and thus does nothing for these nodes.
Create the attributes with node_set_perf_attrs() when the node is not
backed by a real SRAT pxm.
Tested on a QEMU CXL topology with a CFMWS window not described by
SRAT or HMAT: node1/access0/initiators/{read,write}_{bandwidth,latency}
appear with the calculated coordinates once the region's first memory
block comes online.
Fixes: 2e454fb8056d ("cxl, acpi/hmat: Update CXL access coordinates directly instead of through HMAT")
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260917024632.1397380-1-kanie@linux.alibaba.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/region.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index 148168319a266..46fc6644c8a72 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
+#include <linux/acpi.h>
#include <linux/memregion.h>
#include <linux/genalloc.h>
#include <linux/debugfs.h>
@@ -2450,7 +2451,19 @@ static bool cxl_region_update_coordinates(struct cxl_region *cxlr, int nid)
for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) {
if (cxlr->coord[i].read_bandwidth) {
- node_update_perf_attrs(nid, &cxlr->coord[i], i);
+ /*
+ * A CFMWS-only node (not backed by a real SRAT pxm)
+ * has no HMAT memory_target, so hmat_callback()
+ * never created the access attributes for it:
+ * create them here instead of only updating them.
+ * This is called at most once per node (see
+ * nodemask_region_seen), so the attributes are not
+ * created twice.
+ */
+ if (!acpi_node_backed_by_real_pxm(nid))
+ node_set_perf_attrs(nid, &cxlr->coord[i], i);
+ else
+ node_update_perf_attrs(nid, &cxlr->coord[i], i);
cset++;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0528/2151] cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (526 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0527/2151] cxl/region: Create node access attributes for CFMWS-only NUMA nodes Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0529/2151] ACPI: CPPC: Validate the _CPC package header Greg Kroah-Hartman
` (354 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guixin Liu, Li Ming,
Jonathan Cameron, Dave Jiang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guixin Liu <kanie@linux.alibaba.com>
[ Upstream commit b25af6afd2f26b455108bab03dfeba52378e8dd2 ]
cxl_debugfs_create_dport_dir() ignores the devm_add_action_or_reset()
result and creates the einj_inject file below @dir unconditionally.
When the devres allocation fails, remove_debugfs() has already run
before devm_add_action_or_reset() returns, i.e. debugfs_remove() has
released @dir. The subsequent debugfs_create_file() would then use
that dentry as its parent although its final reference was dropped in
the removal and its memory is subject to call_rcu() delayed freeing.
Skip the file creation in that case, consistent with how the rest of
the helper tolerates debugfs failures.
Fixes: 9185b1a3043c ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file")
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Link: https://patch.msgid.link/20260915060138.2007974-1-kanie@linux.alibaba.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/cxl/core/port.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
index bfb2e457fa223..b9a585f64b8ab 100644
--- a/drivers/cxl/core/port.c
+++ b/drivers/cxl/core/port.c
@@ -858,7 +858,8 @@ static void cxl_debugfs_create_dport_dir(struct cxl_dport *dport)
dir = cxl_debugfs_create_dir(dev_name(dport->dport_dev));
- devm_add_action_or_reset(dport_to_host(dport), remove_debugfs, dir);
+ if (devm_add_action_or_reset(dport_to_host(dport), remove_debugfs, dir))
+ return;
debugfs_create_file("einj_inject", 0200, dir, dport,
&cxl_einj_inject_fops);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0529/2151] ACPI: CPPC: Validate the _CPC package header
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (527 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0528/2151] cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0530/2151] ASoC: codecs: ab8500: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component() Greg Kroah-Hartman
` (353 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Christian Loehle,
Sumit Gupta, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Loehle <christian.loehle@arm.com>
[ Upstream commit fb345025f161d17fe7c8a6048c7e80e467fa8ddf ]
The _CPC NumEntries field includes every package element, including
NumEntries and Revision. acpi_cppc_processor_probe() nevertheless reads
those first two elements before checking that they exist and trusts
NumEntries when walking the remaining elements.
Reject packages with fewer than two elements and NumEntries values which
exceed the package count before accessing Revision or iterating over
register descriptors. Although the specification defines NumEntries as the
number of package elements, tolerate additional trailing elements because
ignoring them is safe and avoids rejecting padded firmware.
Revision is specified as a BYTE, but the parser assigns its 64-bit AML
Integer to an unsigned int before validating it. Reject values above U8_MAX
before conversion so, for example, 0x100000004 cannot truncate to revision
4.
Fixes: 337aadff8e45 ("ACPI: Introduce CPU performance controls using CPPC")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20260724134251.1632824-1-christian.loehle%40arm.com
Link: https://sashiko.dev/#/patchset/20260808082644.1251332-1-christian.loehle%40arm.com
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Tested-by: Sumit Gupta <sumitg@nvidia.com>
Link: https://patch.msgid.link/20260916162805.1039247-2-christian.loehle@arm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/cppc_acpi.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 2668004e89ec7..069159c86901c 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -727,6 +727,11 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
}
out_obj = (union acpi_object *) output.pointer;
+ if (out_obj->package.count < 2) {
+ pr_debug("Unexpected _CPC package count (%u) for CPU:%d\n",
+ out_obj->package.count, pr->id);
+ goto out_buf_free;
+ }
cpc_ptr = kzalloc(sizeof(struct cpc_desc), GFP_KERNEL);
if (!cpc_ptr) {
@@ -737,12 +742,15 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
/* First entry is NumEntries. */
cpc_obj = &out_obj->package.elements[0];
if (cpc_obj->type == ACPI_TYPE_INTEGER) {
- num_ent = cpc_obj->integer.value;
- if (num_ent <= 1) {
- pr_debug("Unexpected _CPC NumEntries value (%d) for CPU:%d\n",
- num_ent, pr->id);
+ if (cpc_obj->integer.value < 2 ||
+ cpc_obj->integer.value > out_obj->package.count) {
+ pr_debug("Invalid _CPC NumEntries (%llu) for package count (%u) on CPU:%d\n",
+ cpc_obj->integer.value, out_obj->package.count,
+ pr->id);
goto out_free;
}
+
+ num_ent = cpc_obj->integer.value;
} else {
pr_debug("Unexpected _CPC NumEntries entry type (%d) for CPU:%d\n",
cpc_obj->type, pr->id);
@@ -752,6 +760,12 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
/* Second entry should be revision. */
cpc_obj = &out_obj->package.elements[1];
if (cpc_obj->type == ACPI_TYPE_INTEGER) {
+ if (cpc_obj->integer.value > U8_MAX) {
+ pr_debug("Invalid _CPC Revision (%llu) for CPU:%d\n",
+ cpc_obj->integer.value, pr->id);
+ ret = -EINVAL;
+ goto out_free;
+ }
cpc_rev = cpc_obj->integer.value;
} else {
pr_debug("Unexpected _CPC Revision entry type (%d) for CPU:%d\n",
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0530/2151] ASoC: codecs: ab8500: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (528 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0529/2151] ACPI: CPPC: Validate the _CPC package header Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0531/2151] ASoC: codecs: ab8500: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
` (352 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kuninori Morimoto, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit 3827b34564951febc0ffa7ce93c1d9c05888e53b ]
We have very similar name functions (A)(B). Both gets component from
snd_kcontrol, but (A) is used in callback functions which is registered
through snd_soc_add_component_controls(), (B) is used through
snd_soc_dapm_new_widgets().
(A) snd_soc_kcontrol_component()
(B) snd_soc_dapm_kcontrol_component()
(B) is using very picky way to get component but using it is necessary in
ASoC. But (A) is just wrapper function to snd_kcontrol_chip(), and directly
using it without wrapper is very common way on ALSA.
To reduce confusions of similar function, let's use common way on (A).
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87plaqt8rn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 0d46182a1be7 ("ASoC: ab8500: Skip digital microphone support on AB8505")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ab8500-codec.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index a0f5663157c38..99e6772efc608 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -1106,7 +1106,7 @@ static void anc_configure(struct snd_soc_component *component,
static int sid_status_control_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
mutex_lock(&drvdata->ctrl_lock);
@@ -1120,7 +1120,7 @@ static int sid_status_control_get(struct snd_kcontrol *kcontrol,
static int sid_status_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
unsigned int param, sidconf, val;
int status = 1;
@@ -1175,7 +1175,7 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
static int anc_status_control_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
mutex_lock(&drvdata->ctrl_lock);
@@ -1188,7 +1188,7 @@ static int anc_status_control_get(struct snd_kcontrol *kcontrol,
static int anc_status_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
struct device *dev = component->dev;
@@ -1271,7 +1271,7 @@ static int filter_control_info(struct snd_kcontrol *kcontrol,
static int filter_control_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = snd_soc_component_get_drvdata(component);
struct filter_control *fc =
(struct filter_control *)kcontrol->private_value;
@@ -1288,7 +1288,7 @@ static int filter_control_get(struct snd_kcontrol *kcontrol,
static int filter_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = snd_soc_component_get_drvdata(component);
struct filter_control *fc =
(struct filter_control *)kcontrol->private_value;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0531/2151] ASoC: codecs: ab8500: convert to snd_soc_dapm_xxx()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (529 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0530/2151] ASoC: codecs: ab8500: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component() Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0532/2151] ASoC: codecs: ab8500: Remove suspicious code Greg Kroah-Hartman
` (351 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kuninori Morimoto, Charles Keepax,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit cdc8feb84f7f22a9b21483b706382cea3cd248cd ]
This patch converts below functions.
dapm->dev -> snd_soc_dapm_to_dev()
dapm->card -> snd_soc_dapm_to_card()
dapm->component -> snd_soc_dapm_to_component()
dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value()
snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()
snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87tsz18lru.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 0d46182a1be7 ("ASoC: ab8500: Skip digital microphone support on AB8505")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ab8500-codec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 99e6772efc608..0c070ab489292 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -1189,7 +1189,7 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
struct device *dev = component->dev;
bool apply_fir, apply_iir;
@@ -1926,7 +1926,7 @@ static int ab8500_audio_init_audioblock(struct snd_soc_component *component)
static int ab8500_audio_setup_mics(struct snd_soc_component *component,
struct amic_settings *amics)
{
- struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
u8 value8;
unsigned int value;
int status;
@@ -2424,7 +2424,7 @@ static void ab8500_codec_of_probe(struct device *dev, struct device_node *np,
static int ab8500_codec_probe(struct snd_soc_component *component)
{
- struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
+ struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct device *dev = component->dev;
struct device_node *np = dev->of_node;
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0532/2151] ASoC: codecs: ab8500: Remove suspicious code
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (530 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0531/2151] ASoC: codecs: ab8500: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0533/2151] ASoC: codecs: ab8500: Use guard() for mutex locks Greg Kroah-Hartman
` (350 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Uwe Kleine-König , Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
[ Upstream commit e366ce8b22ec68189ffea2bb8009f7b20d549b0f ]
anc_configure() passed values from drvdata->anc_fir_values[],
drvdata->anc_iir_values[] and drvdata->sid_fir_values[] as register
offset to snd_soc_component_read(). The content of these arrays are user
controllable via the component controls "ANC FIR Coefficients", "ANC
IIR Coefficients" and "Sidetone FIR Coefficients" which I assume are
supposed to hold register values, not register offsets.
Without a datasheet for that component and given that before commit
a201aef1a88b ("ASoC: codecs: ab8500: Fix casting of private data") the
arrays overlapped with driver control structures and thus didn't work
properly since 2012, drop that functionality and let someone repair it
who has an actual need for it.
With the core functionally removed several code parts become essentially
unused and are removed, too.
Reported-by: Sashiko (gemini/gemini-3.1-pro-preview)
Link: https://sashiko.dev/#/patchset/20260428192255.2294705-2-u.kleine-koenig%40baylibre.com
Fixes: 679d7abdc754 ("ASoC: codecs: Add AB8500 codec-driver")
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260430154524.338912-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 0d46182a1be7 ("ASoC: ab8500: Skip digital microphone support on AB8505")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ab8500-codec.c | 304 +-------------------------------
1 file changed, 3 insertions(+), 301 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 0c070ab489292..63b0d57341396 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -60,19 +60,6 @@
low before proceeding with the configuration sequence */
#define AB8500_ANC_SM_DELAY 2000
-#define AB8500_FILTER_CONTROL(xname, xcount, xmin, xmax) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
- .info = filter_control_info, \
- .get = filter_control_get, .put = filter_control_put, \
- .private_value = (unsigned long)&(struct filter_control) \
- {.count = xcount, .min = xmin, .max = xmax} }
-
-struct filter_control {
- long min, max;
- unsigned int count;
- long value[128];
-};
-
/* Sidetone states */
static const char * const enum_sid_state[] = {
"Unconfigured",
@@ -85,45 +72,13 @@ enum sid_state {
SID_FIR_CONFIGURED = 2,
};
-static const char * const enum_anc_state[] = {
- "Unconfigured",
- "Apply FIR and IIR",
- "FIR and IIR are configured",
- "Apply FIR",
- "FIR is configured",
- "Apply IIR",
- "IIR is configured"
-};
-enum anc_state {
- ANC_UNCONFIGURED = 0,
- ANC_APPLY_FIR_IIR = 1,
- ANC_FIR_IIR_CONFIGURED = 2,
- ANC_APPLY_FIR = 3,
- ANC_FIR_CONFIGURED = 4,
- ANC_APPLY_IIR = 5,
- ANC_IIR_CONFIGURED = 6
-};
-
-/* Analog microphones */
-enum amic_idx {
- AMIC_IDX_1A,
- AMIC_IDX_1B,
- AMIC_IDX_2
-};
-
/* Private data for AB8500 device-driver */
struct ab8500_codec_drvdata {
struct regmap *regmap;
struct mutex ctrl_lock;
/* Sidetone */
- long *sid_fir_values;
enum sid_state sid_status;
-
- /* ANC */
- long *anc_fir_values;
- long *anc_iir_values;
- enum anc_state anc_status;
};
static inline const char *amic_micbias_str(enum amic_micbias micbias)
@@ -1016,89 +971,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes_mic2_vamicx[] = {
{"MIC2 V-AMICx Enable", NULL, "V-AMIC2"},
};
-/* ANC FIR-coefficients configuration sequence */
-static void anc_fir(struct snd_soc_component *component,
- unsigned int bnk, unsigned int par, unsigned int val)
-{
- if (par == 0 && bnk == 0)
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ANCFIRUPDATE),
- BIT(AB8500_ANCCONF1_ANCFIRUPDATE));
-
- snd_soc_component_write(component, AB8500_ANCCONF5, val >> 8 & 0xff);
- snd_soc_component_write(component, AB8500_ANCCONF6, val & 0xff);
-
- if (par == AB8500_ANC_FIR_COEFFS - 1 && bnk == 1)
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ANCFIRUPDATE), 0);
-}
-
-/* ANC IIR-coefficients configuration sequence */
-static void anc_iir(struct snd_soc_component *component, unsigned int bnk,
- unsigned int par, unsigned int val)
-{
- if (par == 0) {
- if (bnk == 0) {
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ANCIIRINIT),
- BIT(AB8500_ANCCONF1_ANCIIRINIT));
- usleep_range(AB8500_ANC_SM_DELAY, AB8500_ANC_SM_DELAY*2);
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ANCIIRINIT), 0);
- usleep_range(AB8500_ANC_SM_DELAY, AB8500_ANC_SM_DELAY*2);
- } else {
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ANCIIRUPDATE),
- BIT(AB8500_ANCCONF1_ANCIIRUPDATE));
- }
- } else if (par > 3) {
- snd_soc_component_write(component, AB8500_ANCCONF7, 0);
- snd_soc_component_write(component, AB8500_ANCCONF8, val >> 16 & 0xff);
- }
-
- snd_soc_component_write(component, AB8500_ANCCONF7, val >> 8 & 0xff);
- snd_soc_component_write(component, AB8500_ANCCONF8, val & 0xff);
-
- if (par == AB8500_ANC_IIR_COEFFS - 1 && bnk == 1)
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ANCIIRUPDATE), 0);
-}
-
-/* ANC IIR-/FIR-coefficients configuration sequence */
-static void anc_configure(struct snd_soc_component *component,
- bool apply_fir, bool apply_iir)
-{
- struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
- unsigned int bnk, par, val;
-
- dev_dbg(component->dev, "%s: Enter.\n", __func__);
-
- if (apply_fir)
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ENANC), 0);
-
- snd_soc_component_update_bits(component, AB8500_ANCCONF1,
- BIT(AB8500_ANCCONF1_ENANC), BIT(AB8500_ANCCONF1_ENANC));
-
- if (apply_fir)
- for (bnk = 0; bnk < AB8500_NR_OF_ANC_COEFF_BANKS; bnk++)
- for (par = 0; par < AB8500_ANC_FIR_COEFFS; par++) {
- val = snd_soc_component_read(component,
- drvdata->anc_fir_values[par]);
- anc_fir(component, bnk, par, val);
- }
-
- if (apply_iir)
- for (bnk = 0; bnk < AB8500_NR_OF_ANC_COEFF_BANKS; bnk++)
- for (par = 0; par < AB8500_ANC_IIR_COEFFS; par++) {
- val = snd_soc_component_read(component,
- drvdata->anc_iir_values[par]);
- anc_iir(component, bnk, par, val);
- }
-
- dev_dbg(component->dev, "%s: Exit.\n", __func__);
-}
-
/*
* Control-events
*/
@@ -1122,7 +994,7 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
- unsigned int param, sidconf, val;
+ unsigned int param, sidconf;
int status = 1;
dev_dbg(component->dev, "%s: Enter\n", __func__);
@@ -1151,9 +1023,8 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
snd_soc_component_write(component, AB8500_SIDFIRADR, 0);
for (param = 0; param < AB8500_SID_FIR_COEFFS; param++) {
- val = snd_soc_component_read(component, drvdata->sid_fir_values[param]);
- snd_soc_component_write(component, AB8500_SIDFIRCOEF1, val >> 8 & 0xff);
- snd_soc_component_write(component, AB8500_SIDFIRCOEF2, val & 0xff);
+ snd_soc_component_write(component, AB8500_SIDFIRCOEF1, 0);
+ snd_soc_component_write(component, AB8500_SIDFIRCOEF2, 0);
}
snd_soc_component_update_bits(component, AB8500_SIDFIRADR,
@@ -1172,136 +1043,6 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
return status;
}
-static int anc_status_control_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
-{
- struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
-
- mutex_lock(&drvdata->ctrl_lock);
- ucontrol->value.enumerated.item[0] = drvdata->anc_status;
- mutex_unlock(&drvdata->ctrl_lock);
-
- return 0;
-}
-
-static int anc_status_control_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
-{
- struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
- struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
- struct device *dev = component->dev;
- bool apply_fir, apply_iir;
- unsigned int req;
- int status;
-
- dev_dbg(dev, "%s: Enter.\n", __func__);
-
- mutex_lock(&drvdata->ctrl_lock);
-
- req = ucontrol->value.enumerated.item[0];
- if (req >= ARRAY_SIZE(enum_anc_state)) {
- status = -EINVAL;
- goto cleanup;
- }
- if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR &&
- req != ANC_APPLY_IIR) {
- dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n",
- __func__, enum_anc_state[req]);
- status = -EINVAL;
- goto cleanup;
- }
- apply_fir = req == ANC_APPLY_FIR || req == ANC_APPLY_FIR_IIR;
- apply_iir = req == ANC_APPLY_IIR || req == ANC_APPLY_FIR_IIR;
-
- status = snd_soc_dapm_force_enable_pin(dapm, "ANC Configure Input");
- if (status < 0) {
- dev_err(dev,
- "%s: ERROR: Failed to enable power (status = %d)!\n",
- __func__, status);
- goto cleanup;
- }
- snd_soc_dapm_sync(dapm);
-
- anc_configure(component, apply_fir, apply_iir);
-
- if (apply_fir) {
- if (drvdata->anc_status == ANC_IIR_CONFIGURED)
- drvdata->anc_status = ANC_FIR_IIR_CONFIGURED;
- else if (drvdata->anc_status != ANC_FIR_IIR_CONFIGURED)
- drvdata->anc_status = ANC_FIR_CONFIGURED;
- }
- if (apply_iir) {
- if (drvdata->anc_status == ANC_FIR_CONFIGURED)
- drvdata->anc_status = ANC_FIR_IIR_CONFIGURED;
- else if (drvdata->anc_status != ANC_FIR_IIR_CONFIGURED)
- drvdata->anc_status = ANC_IIR_CONFIGURED;
- }
-
- status = snd_soc_dapm_disable_pin(dapm, "ANC Configure Input");
- snd_soc_dapm_sync(dapm);
-
-cleanup:
- mutex_unlock(&drvdata->ctrl_lock);
-
- if (status < 0)
- dev_err(dev, "%s: Unable to configure ANC! (status = %d)\n",
- __func__, status);
-
- dev_dbg(dev, "%s: Exit.\n", __func__);
-
- return (status < 0) ? status : 1;
-}
-
-static int filter_control_info(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_info *uinfo)
-{
- struct filter_control *fc =
- (struct filter_control *)kcontrol->private_value;
-
- uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
- uinfo->count = fc->count;
- uinfo->value.integer.min = fc->min;
- uinfo->value.integer.max = fc->max;
-
- return 0;
-}
-
-static int filter_control_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
-{
- struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct ab8500_codec_drvdata *drvdata = snd_soc_component_get_drvdata(component);
- struct filter_control *fc =
- (struct filter_control *)kcontrol->private_value;
- unsigned int i;
-
- mutex_lock(&drvdata->ctrl_lock);
- for (i = 0; i < fc->count; i++)
- ucontrol->value.integer.value[i] = fc->value[i];
- mutex_unlock(&drvdata->ctrl_lock);
-
- return 0;
-}
-
-static int filter_control_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
-{
- struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct ab8500_codec_drvdata *drvdata = snd_soc_component_get_drvdata(component);
- struct filter_control *fc =
- (struct filter_control *)kcontrol->private_value;
- unsigned int i;
-
- mutex_lock(&drvdata->ctrl_lock);
- for (i = 0; i < fc->count; i++)
- fc->value[i] = ucontrol->value.integer.value[i];
- mutex_unlock(&drvdata->ctrl_lock);
-
- return 0;
-}
-
/*
* Controls - Non-DAPM ASoC
*/
@@ -1589,7 +1330,6 @@ static SOC_ENUM_SINGLE_DECL(soc_enum_bfifomast,
static SOC_ENUM_SINGLE_EXT_DECL(soc_enum_sidstate, enum_sid_state);
/* ANC */
-static SOC_ENUM_SINGLE_EXT_DECL(soc_enum_ancstate, enum_anc_state);
static struct snd_kcontrol_new ab8500_ctrls[] = {
/* Charge pump */
@@ -1865,8 +1605,6 @@ static struct snd_kcontrol_new ab8500_ctrls[] = {
AB8500_FIFOCONF6_BFIFOSAMPLE_MAX, 0),
/* ANC */
- SOC_ENUM_EXT("ANC Status", soc_enum_ancstate,
- anc_status_control_get, anc_status_control_put),
SOC_SINGLE_XR_SX("ANC Warp Delay Shift",
AB8500_ANCCONF2, 1, AB8500_ANCCONF2_SHIFT,
AB8500_ANCCONF2_MIN, AB8500_ANCCONF2_MAX, 0),
@@ -1887,21 +1625,6 @@ static struct snd_kcontrol_new ab8500_ctrls[] = {
AB8500_SIDFIRADR, AB8500_SIDFIRADR_FIRSIDSET, 0),
};
-static struct snd_kcontrol_new ab8500_filter_controls[] = {
- AB8500_FILTER_CONTROL("ANC FIR Coefficients", AB8500_ANC_FIR_COEFFS,
- AB8500_ANC_FIR_COEFF_MIN, AB8500_ANC_FIR_COEFF_MAX),
- AB8500_FILTER_CONTROL("ANC IIR Coefficients", AB8500_ANC_IIR_COEFFS,
- AB8500_ANC_IIR_COEFF_MIN, AB8500_ANC_IIR_COEFF_MAX),
- AB8500_FILTER_CONTROL("Sidetone FIR Coefficients",
- AB8500_SID_FIR_COEFFS, AB8500_SID_FIR_COEFF_MIN,
- AB8500_SID_FIR_COEFF_MAX)
-};
-enum ab8500_filter {
- AB8500_FILTER_ANC_FIR = 0,
- AB8500_FILTER_ANC_IIR = 1,
- AB8500_FILTER_SID_FIR = 2,
-};
-
/*
* Extended interface for codec-driver
*/
@@ -2429,7 +2152,6 @@ static int ab8500_codec_probe(struct snd_soc_component *component)
struct device_node *np = dev->of_node;
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev);
struct ab8500_codec_platform_data codec_pdata;
- struct filter_control *fc;
int status;
dev_dbg(dev, "%s: Enter.\n", __func__);
@@ -2461,25 +2183,6 @@ static int ab8500_codec_probe(struct snd_soc_component *component)
snd_soc_component_write(component, AB8500_SHORTCIRCONF,
BIT(AB8500_SHORTCIRCONF_HSZCDDIS));
- /* Add filter controls */
- status = snd_soc_add_component_controls(component, ab8500_filter_controls,
- ARRAY_SIZE(ab8500_filter_controls));
- if (status < 0) {
- dev_err(dev,
- "%s: failed to add ab8500 filter controls (%d).\n",
- __func__, status);
- return status;
- }
- fc = (struct filter_control *)
- ab8500_filter_controls[AB8500_FILTER_ANC_FIR].private_value;
- drvdata->anc_fir_values = (long *)fc->value;
- fc = (struct filter_control *)
- ab8500_filter_controls[AB8500_FILTER_ANC_IIR].private_value;
- drvdata->anc_iir_values = (long *)fc->value;
- fc = (struct filter_control *)
- ab8500_filter_controls[AB8500_FILTER_SID_FIR].private_value;
- drvdata->sid_fir_values = (long *)fc->value;
-
snd_soc_dapm_disable_pin(dapm, "ANC Configure Input");
mutex_init(&drvdata->ctrl_lock);
@@ -2513,7 +2216,6 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev)
if (!drvdata)
return -ENOMEM;
drvdata->sid_status = SID_UNCONFIGURED;
- drvdata->anc_status = ANC_UNCONFIGURED;
dev_set_drvdata(&pdev->dev, drvdata);
drvdata->regmap = devm_regmap_init(&pdev->dev, NULL, &pdev->dev,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0533/2151] ASoC: codecs: ab8500: Use guard() for mutex locks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (531 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0532/2151] ASoC: codecs: ab8500: Remove suspicious code Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0534/2151] ASoC: ab8500: Remove the nonfunctional sidetone apply control Greg Kroah-Hartman
` (349 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cezary Rojewski, bui duc phuc,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 350b7eae8e8b2bd3885a3e2424381494d6bde038 ]
Clean up the code using guard() for mutex locks.
Merely code refactoring, and no behavior change.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260708125002.202515-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 0d46182a1be7 ("ASoC: ab8500: Skip digital microphone support on AB8505")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ab8500-codec.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 63b0d57341396..167f021c7ecbc 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -14,6 +14,7 @@
* for ST-Ericsson.
*/
+#include <linux/cleanup.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
@@ -981,9 +982,8 @@ static int sid_status_control_get(struct snd_kcontrol *kcontrol,
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
- mutex_lock(&drvdata->ctrl_lock);
+ guard(mutex)(&drvdata->ctrl_lock);
ucontrol->value.enumerated.item[0] = drvdata->sid_status;
- mutex_unlock(&drvdata->ctrl_lock);
return 0;
}
@@ -1006,7 +1006,7 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
return -EIO;
}
- mutex_lock(&drvdata->ctrl_lock);
+ guard(mutex)(&drvdata->ctrl_lock);
sidconf = snd_soc_component_read(component, AB8500_SIDFIRCONF);
if (((sidconf & BIT(AB8500_SIDFIRCONF_FIRSIDBUSY)) != 0)) {
@@ -1017,7 +1017,8 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
} else {
status = -EBUSY;
}
- goto out;
+ dev_dbg(component->dev, "%s: Exit\n", __func__);
+ return status;
}
snd_soc_component_write(component, AB8500_SIDFIRADR, 0);
@@ -1035,9 +1036,6 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,
drvdata->sid_status = SID_FIR_CONFIGURED;
-out:
- mutex_unlock(&drvdata->ctrl_lock);
-
dev_dbg(component->dev, "%s: Exit\n", __func__);
return status;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0534/2151] ASoC: ab8500: Remove the nonfunctional sidetone apply control
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (532 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0533/2151] ASoC: codecs: ab8500: Use guard() for mutex locks Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0535/2151] ASoC: ab8500: Skip digital microphone support on AB8505 Greg Kroah-Hartman
` (348 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit ec75e653b70ce26ea68187c2069722baa80efadb ]
After the coefficient controls were removed, writing "Apply FIR"
programs 128 zero coefficients and reports that the sidetone filter is
configured. The associated ANC configuration DAPM pins are also now
unreachable dead infrastructure.
Remove the misleading status/apply control, its private state, and the
obsolete configuration-only DAPM pins. Keep the direct sidetone reset
and remaining hardware controls.
Fixes: e366ce8b22ec ("ASoC: codecs: ab8500: Remove suspicious code")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260831-ab8500-codec-fixes-v1-5-f85024e717e3@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 0d46182a1be7 ("ASoC: ab8500: Skip digital microphone support on AB8505")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ab8500-codec.c | 114 --------------------------------
1 file changed, 114 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 167f021c7ecbc..11142d15df450 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -14,17 +14,14 @@
* for ST-Ericsson.
*/
-#include <linux/cleanup.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
-#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/platform_device.h>
-#include <linux/mutex.h>
#include <linux/mfd/abx500/ab8500.h>
#include <linux/mfd/abx500.h>
#include <linux/mfd/abx500/ab8500-sysctrl.h>
@@ -54,32 +51,9 @@
/* Macrocell register definitions */
#define AB8500_GPIO_DIR4_REG 0x13 /* Bank AB8500_MISC */
-/* Nr of FIR/IIR-coeff banks in ANC-block */
-#define AB8500_NR_OF_ANC_COEFF_BANKS 2
-
-/* Minimum duration to keep ANC IIR Init bit high or
-low before proceeding with the configuration sequence */
-#define AB8500_ANC_SM_DELAY 2000
-
-/* Sidetone states */
-static const char * const enum_sid_state[] = {
- "Unconfigured",
- "Apply FIR",
- "FIR is configured",
-};
-enum sid_state {
- SID_UNCONFIGURED = 0,
- SID_APPLY_FIR = 1,
- SID_FIR_CONFIGURED = 2,
-};
-
/* Private data for AB8500 device-driver */
struct ab8500_codec_drvdata {
struct regmap *regmap;
- struct mutex ctrl_lock;
-
- /* Sidetone */
- enum sid_state sid_status;
};
static inline const char *amic_micbias_str(enum amic_micbias micbias)
@@ -642,9 +616,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {
NULL, 0),
/* Acoustical Noise Cancellation path */
- SND_SOC_DAPM_INPUT("ANC Configure Input"),
- SND_SOC_DAPM_OUTPUT("ANC Configure Output"),
-
SND_SOC_DAPM_MUX("ANC Source",
SND_SOC_NOPM, 0, 0,
dapm_anc_in_select),
@@ -687,10 +658,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = {
{"Main Supply", NULL, "Audio Power"},
{"Main Supply", NULL, "Audio Analog Power"},
- /* ANC Configure */
- {"ANC Configure Input", NULL, "Main Supply"},
- {"ANC Configure Output", NULL, "ANC Configure Input"},
-
/* Powerup charge pump if DA1/2 is in use */
{"DA_IN1", NULL, "ab8500_0p"},
@@ -972,75 +939,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes_mic2_vamicx[] = {
{"MIC2 V-AMICx Enable", NULL, "V-AMIC2"},
};
-/*
- * Control-events
- */
-
-static int sid_status_control_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
-{
- struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
-
- guard(mutex)(&drvdata->ctrl_lock);
- ucontrol->value.enumerated.item[0] = drvdata->sid_status;
-
- return 0;
-}
-
-/* Write sidetone FIR-coefficients configuration sequence */
-static int sid_status_control_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
-{
- struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(component->dev);
- unsigned int param, sidconf;
- int status = 1;
-
- dev_dbg(component->dev, "%s: Enter\n", __func__);
-
- if (ucontrol->value.enumerated.item[0] != SID_APPLY_FIR) {
- dev_err(component->dev,
- "%s: ERROR: This control supports '%s' only!\n",
- __func__, enum_sid_state[SID_APPLY_FIR]);
- return -EIO;
- }
-
- guard(mutex)(&drvdata->ctrl_lock);
-
- sidconf = snd_soc_component_read(component, AB8500_SIDFIRCONF);
- if (((sidconf & BIT(AB8500_SIDFIRCONF_FIRSIDBUSY)) != 0)) {
- if ((sidconf & BIT(AB8500_SIDFIRCONF_ENFIRSIDS)) == 0) {
- dev_err(component->dev, "%s: Sidetone busy while off!\n",
- __func__);
- status = -EPERM;
- } else {
- status = -EBUSY;
- }
- dev_dbg(component->dev, "%s: Exit\n", __func__);
- return status;
- }
-
- snd_soc_component_write(component, AB8500_SIDFIRADR, 0);
-
- for (param = 0; param < AB8500_SID_FIR_COEFFS; param++) {
- snd_soc_component_write(component, AB8500_SIDFIRCOEF1, 0);
- snd_soc_component_write(component, AB8500_SIDFIRCOEF2, 0);
- }
-
- snd_soc_component_update_bits(component, AB8500_SIDFIRADR,
- BIT(AB8500_SIDFIRADR_FIRSIDSET),
- BIT(AB8500_SIDFIRADR_FIRSIDSET));
- snd_soc_component_update_bits(component, AB8500_SIDFIRADR,
- BIT(AB8500_SIDFIRADR_FIRSIDSET), 0);
-
- drvdata->sid_status = SID_FIR_CONFIGURED;
-
- dev_dbg(component->dev, "%s: Exit\n", __func__);
-
- return status;
-}
-
/*
* Controls - Non-DAPM ASoC
*/
@@ -1324,9 +1222,6 @@ static SOC_ENUM_SINGLE_DECL(soc_enum_bfifomast,
AB8500_FIFOCONF3, AB8500_FIFOCONF3_BFIFOMAST_SHIFT,
enum_slavemaster);
-/* Sidetone */
-static SOC_ENUM_SINGLE_EXT_DECL(soc_enum_sidstate, enum_sid_state);
-
/* ANC */
static struct snd_kcontrol_new ab8500_ctrls[] = {
@@ -1617,8 +1512,6 @@ static struct snd_kcontrol_new ab8500_ctrls[] = {
AB8500_ANC_WARP_DELAY_MIN, AB8500_ANC_WARP_DELAY_MAX, 0),
/* Sidetone */
- SOC_ENUM_EXT("Sidetone Status", soc_enum_sidstate,
- sid_status_control_get, sid_status_control_put),
SOC_SINGLE_STROBE("Sidetone Reset",
AB8500_SIDFIRADR, AB8500_SIDFIRADR_FIRSIDSET, 0),
};
@@ -2145,10 +2038,8 @@ static void ab8500_codec_of_probe(struct device *dev, struct device_node *np,
static int ab8500_codec_probe(struct snd_soc_component *component)
{
- struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
struct device *dev = component->dev;
struct device_node *np = dev->of_node;
- struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(dev);
struct ab8500_codec_platform_data codec_pdata;
int status;
@@ -2181,10 +2072,6 @@ static int ab8500_codec_probe(struct snd_soc_component *component)
snd_soc_component_write(component, AB8500_SHORTCIRCONF,
BIT(AB8500_SHORTCIRCONF_HSZCDDIS));
- snd_soc_dapm_disable_pin(dapm, "ANC Configure Input");
-
- mutex_init(&drvdata->ctrl_lock);
-
return status;
}
@@ -2213,7 +2100,6 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev)
GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
- drvdata->sid_status = SID_UNCONFIGURED;
dev_set_drvdata(&pdev->dev, drvdata);
drvdata->regmap = devm_regmap_init(&pdev->dev, NULL, &pdev->dev,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0535/2151] ASoC: ab8500: Skip digital microphone support on AB8505
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (533 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0534/2151] ASoC: ab8500: Remove the nonfunctional sidetone apply control Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0536/2151] spi: mxic: fix ps_clk leak in runtime resume Greg Kroah-Hartman
` (347 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit 0d46182a1be7ef12f85433d91315d4d7091dd8c8 ]
The AB8505 does not have the digital microphone interface, its six
input pins or the VDMIC regulator found in AB8500. The shared codec
driver nevertheless creates the entire AB8500 DMIC DAPM graph. When an
AB8505 sound card binds, the regulator widget requests the nonexistent
V-DMIC supply and falls back to a dummy regulator.
Split the digital microphone widgets and routes from the common codec
graph and add them only when the parent MFD is an actual AB8500. This
also removes the DMIC4-only AD_OUT4 path from AB8505.
Fixes: 679d7abdc754 ("ASoC: codecs: Add AB8500 codec-driver")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260918-ux500-simple-sound-v2-4-88d29416e3c3@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ab8500-codec.c | 144 ++++++++++++++++++--------------
1 file changed, 82 insertions(+), 62 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 11142d15df450..a3197d0a9c36f 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -299,7 +299,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {
SND_SOC_DAPM_REGULATOR_SUPPLY("V-AUD", 0, 0),
SND_SOC_DAPM_REGULATOR_SUPPLY("V-AMIC1", 0, 0),
SND_SOC_DAPM_REGULATOR_SUPPLY("V-AMIC2", 0, 0),
- SND_SOC_DAPM_REGULATOR_SUPPLY("V-DMIC", 0, 0),
/* Power */
SND_SOC_DAPM_SUPPLY("Audio Power",
@@ -324,7 +323,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {
SND_SOC_DAPM_AIF_OUT("AD_OUT1", NULL, 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("AD_OUT2", NULL, 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("AD_OUT3", NULL, 0, SND_SOC_NOPM, 0, 0),
- SND_SOC_DAPM_AIF_OUT("AD_OUT4", NULL, 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("AD_OUT57", NULL, 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("AD_OUT68", NULL, 0, SND_SOC_NOPM, 0, 0),
@@ -584,36 +582,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY("AD5768 Enable", AB8500_ADPATHENA,
AB8500_ADPATHENA_ENAD5768, 0, NULL, 0),
- /* Digital Microphone path */
-
- SND_SOC_DAPM_INPUT("DMic 1"),
- SND_SOC_DAPM_INPUT("DMic 2"),
- SND_SOC_DAPM_INPUT("DMic 3"),
- SND_SOC_DAPM_INPUT("DMic 4"),
- SND_SOC_DAPM_INPUT("DMic 5"),
- SND_SOC_DAPM_INPUT("DMic 6"),
-
- SND_SOC_DAPM_MIXER("DMIC1",
- AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC1, 0,
- NULL, 0),
- SND_SOC_DAPM_MIXER("DMIC2",
- AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC2, 0,
- NULL, 0),
- SND_SOC_DAPM_MIXER("DMIC3",
- AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC3, 0,
- NULL, 0),
- SND_SOC_DAPM_MIXER("DMIC4",
- AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC4, 0,
- NULL, 0),
- SND_SOC_DAPM_MIXER("DMIC5",
- AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC5, 0,
- NULL, 0),
- SND_SOC_DAPM_MIXER("DMIC6",
- AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC6, 0,
- NULL, 0),
- SND_SOC_DAPM_MIXER("AD4 Channel Volume",
- SND_SOC_NOPM, 0, 0,
- NULL, 0),
/* Acoustical Noise Cancellation path */
SND_SOC_DAPM_MUX("ANC Source",
@@ -648,6 +616,40 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {
NULL, 0),
};
+static const struct snd_soc_dapm_widget ab8500_dmic_dapm_widgets[] = {
+ SND_SOC_DAPM_REGULATOR_SUPPLY("V-DMIC", 0, 0),
+ SND_SOC_DAPM_AIF_OUT("AD_OUT4", NULL, 0, SND_SOC_NOPM, 0, 0),
+
+ SND_SOC_DAPM_INPUT("DMic 1"),
+ SND_SOC_DAPM_INPUT("DMic 2"),
+ SND_SOC_DAPM_INPUT("DMic 3"),
+ SND_SOC_DAPM_INPUT("DMic 4"),
+ SND_SOC_DAPM_INPUT("DMic 5"),
+ SND_SOC_DAPM_INPUT("DMic 6"),
+
+ SND_SOC_DAPM_MIXER("DMIC1",
+ AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC1, 0,
+ NULL, 0),
+ SND_SOC_DAPM_MIXER("DMIC2",
+ AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC2, 0,
+ NULL, 0),
+ SND_SOC_DAPM_MIXER("DMIC3",
+ AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC3, 0,
+ NULL, 0),
+ SND_SOC_DAPM_MIXER("DMIC4",
+ AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC4, 0,
+ NULL, 0),
+ SND_SOC_DAPM_MIXER("DMIC5",
+ AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC5, 0,
+ NULL, 0),
+ SND_SOC_DAPM_MIXER("DMIC6",
+ AB8500_DIGMICCONF, AB8500_DIGMICCONF_ENDMIC6, 0,
+ NULL, 0),
+ SND_SOC_DAPM_MIXER("AD4 Channel Volume",
+ SND_SOC_NOPM, 0, 0,
+ NULL, 0),
+};
+
/*
* DAPM-routes
*/
@@ -853,35 +855,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = {
{"AD_OUT68", NULL, "Main Supply"},
{"AD_OUT68", NULL, "AD6 Channel Volume"},
- /* Digital Microphone path */
-
- {"DMic 1", NULL, "V-DMIC"},
- {"DMic 2", NULL, "V-DMIC"},
- {"DMic 3", NULL, "V-DMIC"},
- {"DMic 4", NULL, "V-DMIC"},
- {"DMic 5", NULL, "V-DMIC"},
- {"DMic 6", NULL, "V-DMIC"},
-
- {"DMIC1", NULL, "DMic 1"},
- {"DMIC2", NULL, "DMic 2"},
- {"DMIC3", NULL, "DMic 3"},
- {"DMIC4", NULL, "DMic 4"},
- {"DMIC5", NULL, "DMic 5"},
- {"DMIC6", NULL, "DMic 6"},
-
- {"AD1 Source Select", "DMic 1", "DMIC1"},
- {"AD2 Source Select", "DMic 2", "DMIC2"},
- {"AD3 Source Select", "DMic 3", "DMIC3"},
- {"AD5 Source Select", "DMic 5", "DMIC5"},
- {"AD6 Source Select", "DMic 6", "DMIC6"},
-
- {"AD4 Channel Volume", NULL, "DMIC4"},
- {"AD4 Channel Volume", NULL, "AD34 Enable"},
-
- {"ab8500_0c", NULL, "AD_OUT4"},
- {"AD_OUT4", NULL, "Main Supply"},
- {"AD_OUT4", NULL, "AD4 Channel Volume"},
-
/* LineIn Bypass path */
{"LINL to HSL Volume", NULL, "LINL Enable"},
@@ -911,7 +884,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = {
{"Sidetone Left Source", "Headset Left", "DA_IN1"},
{"Sidetone Right Source", "LineIn Right", "AD2 Channel Volume"},
{"Sidetone Right Source", "Mic 1", "AD3 Channel Volume"},
- {"Sidetone Right Source", "DMic 4", "AD4 Channel Volume"},
{"Sidetone Right Source", "Headset Right", "DA_IN2"},
{"STFIR1 Control", NULL, "Sidetone Left Source"},
@@ -924,6 +896,37 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = {
{"DA2 Enable", NULL, "STFIR2 Volume"},
};
+static const struct snd_soc_dapm_route ab8500_dmic_dapm_routes[] = {
+ {"DMic 1", NULL, "V-DMIC"},
+ {"DMic 2", NULL, "V-DMIC"},
+ {"DMic 3", NULL, "V-DMIC"},
+ {"DMic 4", NULL, "V-DMIC"},
+ {"DMic 5", NULL, "V-DMIC"},
+ {"DMic 6", NULL, "V-DMIC"},
+
+ {"DMIC1", NULL, "DMic 1"},
+ {"DMIC2", NULL, "DMic 2"},
+ {"DMIC3", NULL, "DMic 3"},
+ {"DMIC4", NULL, "DMic 4"},
+ {"DMIC5", NULL, "DMic 5"},
+ {"DMIC6", NULL, "DMic 6"},
+
+ {"AD1 Source Select", "DMic 1", "DMIC1"},
+ {"AD2 Source Select", "DMic 2", "DMIC2"},
+ {"AD3 Source Select", "DMic 3", "DMIC3"},
+ {"AD5 Source Select", "DMic 5", "DMIC5"},
+ {"AD6 Source Select", "DMic 6", "DMIC6"},
+
+ {"AD4 Channel Volume", NULL, "DMIC4"},
+ {"AD4 Channel Volume", NULL, "AD34 Enable"},
+
+ {"ab8500_0c", NULL, "AD_OUT4"},
+ {"AD_OUT4", NULL, "Main Supply"},
+ {"AD_OUT4", NULL, "AD4 Channel Volume"},
+
+ {"Sidetone Right Source", "DMic 4", "AD4 Channel Volume"},
+};
+
static const struct snd_soc_dapm_route ab8500_dapm_routes_mic1a_vamicx[] = {
{"MIC1A V-AMICx Enable", NULL, "V-AMIC1"},
{"MIC1A V-AMICx Enable", NULL, "V-AMIC2"},
@@ -2040,13 +2043,30 @@ static int ab8500_codec_probe(struct snd_soc_component *component)
{
struct device *dev = component->dev;
struct device_node *np = dev->of_node;
+ struct ab8500 *ab8500 = dev_get_drvdata(dev->parent);
struct ab8500_codec_platform_data codec_pdata;
+ struct snd_soc_dapm_context *dapm;
int status;
dev_dbg(dev, "%s: Enter.\n", __func__);
ab8500_codec_of_probe(dev, np, &codec_pdata);
+ if (is_ab8500(ab8500)) {
+ dapm = snd_soc_component_to_dapm(component);
+ status = snd_soc_dapm_new_controls(dapm,
+ ab8500_dmic_dapm_widgets,
+ ARRAY_SIZE(ab8500_dmic_dapm_widgets));
+ if (status)
+ return status;
+
+ status = snd_soc_dapm_add_routes(dapm,
+ ab8500_dmic_dapm_routes,
+ ARRAY_SIZE(ab8500_dmic_dapm_routes));
+ if (status)
+ return status;
+ }
+
status = ab8500_audio_init_audioblock(component);
if (status < 0) {
dev_err(dev, "%s: failed to init audio-block (%d)!\n",
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0536/2151] spi: mxic: fix ps_clk leak in runtime resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (534 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0535/2151] ASoC: ab8500: Skip digital microphone support on AB8505 Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0537/2151] ACPI: HMAT: preserve hmat_adist_nb notifier block Greg Kroah-Hartman
` (346 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Felix Gu, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Gu <ustc.gu@gmail.com>
[ Upstream commit 648e3c436032b675b339662ea9c0edd9221add76 ]
mxic_spi_runtime_resume() enables ps_clk before calling
mxic_spi_clk_enable(). If the latter fails, ps_clk was not
disabled.
Unwind ps_clk with clk_disable_unprepare() before returning
the error.
Fixes: b942d80b0a39 ("spi: Add MXIC controller driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260902-mxic-v1-1-76806325826d@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-mxic.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
index eea4a588e8a0c..9ab94a8f573b6 100644
--- a/drivers/spi/spi-mxic.c
+++ b/drivers/spi/spi-mxic.c
@@ -744,7 +744,13 @@ static int __maybe_unused mxic_spi_runtime_resume(struct device *dev)
return ret;
}
- return mxic_spi_clk_enable(mxic);
+ ret = mxic_spi_clk_enable(mxic);
+ if (ret) {
+ clk_disable_unprepare(mxic->ps_clk);
+ return ret;
+ }
+
+ return 0;
}
static const struct dev_pm_ops mxic_spi_dev_pm_ops = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0537/2151] ACPI: HMAT: preserve hmat_adist_nb notifier block
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (535 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0536/2151] spi: mxic: fix ps_clk leak in runtime resume Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0538/2151] perf tool: Add the perf_tool argument to all callbacks Greg Kroah-Hartman
` (345 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alejandro Lucero, Dave Jiang,
Jonathan Cameron, Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alejandro Lucero <alucerop@amd.com>
[ Upstream commit b1c75a77d494298b8dedf46062f2072239bbc33b ]
Remove __meminitdata from hmat_adist_nb declaration preserving it even
when CONFIG_MEMORY_HOTPLUG is not set. Otherwise further notifier
registrations using register_mt_adistance_algorithm() will find a
notifier chain likely corrupted.
This is the case when cxl_region_probe() calls
register_mt_adistance_algorithm() what can happen when CXL regions
are dynamically created at any time from Type3 device(s) or when a Type2
device is initialized at its driver probe.
Fixes: 3718c02dbd4c ("acpi, hmat: calculate abstract distance with HMAT")
Signed-off-by: Alejandro Lucero <alucerop@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
[ rjw: Subject tweak ]
Link: https://patch.msgid.link/20260716181114.35962-2-alejandro.lucero-palau@amd.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/numa/hmat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
index 11e4483685c9c..a63af4efa0e18 100644
--- a/drivers/acpi/numa/hmat.c
+++ b/drivers/acpi/numa/hmat.c
@@ -994,7 +994,7 @@ static int hmat_calculate_adistance(struct notifier_block *self,
return NOTIFY_STOP;
}
-static struct notifier_block hmat_adist_nb __meminitdata = {
+static struct notifier_block hmat_adist_nb = {
.notifier_call = hmat_calculate_adistance,
.priority = 100,
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0538/2151] perf tool: Add the perf_tool argument to all callbacks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (536 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0537/2151] ACPI: HMAT: preserve hmat_adist_nb notifier block Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0539/2151] perf build: Dont add NO_AUXTRACE if missing feature-get_cpuid Greg Kroah-Hartman
` (344 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 71062e282d6a662b75df9aff65702455563ff7c9 ]
Getting context for what a tool is doing, such as the perf_inject
instance, using container_of the tool is a common pattern in the
code. This isn't possible event_op2, event_op3 and event_op4 callbacks
as the tool isn't passed. Add the argument and then fix function
signatures to match. As tools maybe reading a tool from somewhere
else, change that code to use the passed in tool.
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Stable-dep-of: 0824af00a8d2 ("perf topdown: Don't require config1==0 for a slots event")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-annotate.c | 3 ++-
tools/perf/builtin-evlist.c | 3 ++-
tools/perf/builtin-inject.c | 36 +++++++++++++++------------
tools/perf/builtin-report.c | 5 ++--
tools/perf/builtin-script.c | 31 +++++++++++++----------
tools/perf/builtin-stat.c | 15 ++++++------
tools/perf/util/auxtrace.c | 9 ++++---
tools/perf/util/auxtrace.h | 18 +++++++++-----
| 6 +++--
| 6 +++--
tools/perf/util/intel-tpebs.c | 3 ++-
tools/perf/util/session.c | 35 +++++++++++++-------------
tools/perf/util/session.h | 3 ++-
tools/perf/util/stat.c | 3 ++-
tools/perf/util/stat.h | 3 ++-
tools/perf/util/tool.c | 46 ++++++++++++++++++++---------------
tools/perf/util/tool.h | 10 +++++---
17 files changed, 138 insertions(+), 97 deletions(-)
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 0485bddb02464..844c8a8536d5b 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -314,7 +314,8 @@ static int process_sample_event(const struct perf_tool *tool,
return ret;
}
-static int process_feature_event(struct perf_session *session,
+static int process_feature_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
if (event->feat.feat_id < HEADER_LAST_FEATURE)
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c
index a9bd7bbef5a96..fb6e2c3c24c8e 100644
--- a/tools/perf/builtin-evlist.c
+++ b/tools/perf/builtin-evlist.c
@@ -19,7 +19,8 @@
#include "util/tool.h"
#include "util/util.h"
-static int process_header_feature(struct perf_session *session __maybe_unused,
+static int process_header_feature(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
session_done = 1;
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index e8278999b12d5..c41970928f180 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -199,18 +199,20 @@ static int perf_event__drop_oe(const struct perf_tool *tool __maybe_unused,
}
#endif
-static int perf_event__repipe_op2_synth(struct perf_session *session,
+static int perf_event__repipe_op2_synth(const struct perf_tool *tool,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
- return perf_event__repipe_synth(session->tool, event);
+ return perf_event__repipe_synth(tool, event);
}
-static int perf_event__repipe_op4_synth(struct perf_session *session,
+static int perf_event__repipe_op4_synth(const struct perf_tool *tool,
+ struct perf_session *session __maybe_unused,
union perf_event *event,
u64 data __maybe_unused,
const char *str __maybe_unused)
{
- return perf_event__repipe_synth(session->tool, event);
+ return perf_event__repipe_synth(tool, event);
}
static int perf_event__repipe_attr(const struct perf_tool *tool,
@@ -260,12 +262,11 @@ static int copy_bytes(struct perf_inject *inject, struct perf_data *data, off_t
return 0;
}
-static s64 perf_event__repipe_auxtrace(struct perf_session *session,
+static s64 perf_event__repipe_auxtrace(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event)
{
- const struct perf_tool *tool = session->tool;
- struct perf_inject *inject = container_of(tool, struct perf_inject,
- tool);
+ struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
int ret;
inject->have_auxtrace = true;
@@ -301,7 +302,8 @@ static s64 perf_event__repipe_auxtrace(struct perf_session *session,
#else
static s64
-perf_event__repipe_auxtrace(struct perf_session *session __maybe_unused,
+perf_event__repipe_auxtrace(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
pr_err("AUX area tracing not supported\n");
@@ -748,12 +750,13 @@ static int perf_event__repipe_exit(const struct perf_tool *tool,
}
#ifdef HAVE_LIBTRACEEVENT
-static int perf_event__repipe_tracing_data(struct perf_session *session,
+static int perf_event__repipe_tracing_data(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event)
{
- perf_event__repipe_synth(session->tool, event);
+ perf_event__repipe_synth(tool, event);
- return perf_event__process_tracing_data(session, event);
+ return perf_event__process_tracing_data(tool, session, event);
}
#endif
@@ -1435,7 +1438,7 @@ static int process_build_id(const struct perf_tool *tool,
{
struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
- return perf_event__process_build_id(inject->session, event);
+ return perf_event__process_build_id(tool, inject->session, event);
}
static int synthesize_build_id(struct perf_inject *inject, struct dso *dso, pid_t machine_pid)
@@ -1867,9 +1870,10 @@ static int host__repipe(const struct perf_tool *tool,
return perf_event__repipe(tool, event, sample, machine);
}
-static int host__finished_init(struct perf_session *session, union perf_event *event)
+static int host__finished_init(const struct perf_tool *tool, struct perf_session *session,
+ union perf_event *event)
{
- struct perf_inject *inject = container_of(session->tool, struct perf_inject, tool);
+ struct perf_inject *inject = container_of(tool, struct perf_inject, tool);
struct guest_session *gs = &inject->guest_session;
int ret;
@@ -1916,7 +1920,7 @@ static int host__finished_init(struct perf_session *session, union perf_event *e
if (ret)
return ret;
- return perf_event__repipe_op2_synth(session, event);
+ return perf_event__repipe_op2_synth(tool, session, event);
}
/*
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index fd5bd3d976862..b893491fe5f15 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -240,10 +240,11 @@ static void setup_forced_leader(struct report *report,
evlist__force_leader(evlist);
}
-static int process_feature_event(struct perf_session *session,
+static int process_feature_event(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event)
{
- struct report *rep = container_of(session->tool, struct report, tool);
+ struct report *rep = container_of(tool, struct report, tool);
if (event->feat.feat_id < HEADER_LAST_FEATURE)
return perf_event__process_feature(session, event);
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 8124fcb51da9c..d813adbf98895 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2729,7 +2729,8 @@ static int process_switch_event(const struct perf_tool *tool,
sample->tid);
}
-static int process_auxtrace_error(struct perf_session *session,
+static int process_auxtrace_error(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event)
{
if (scripting_ops && scripting_ops->process_auxtrace_error) {
@@ -2737,7 +2738,7 @@ static int process_auxtrace_error(struct perf_session *session,
return 0;
}
- return perf_event__process_auxtrace_error(session, event);
+ return perf_event__process_auxtrace_error(tool, session, event);
}
static int
@@ -2785,7 +2786,8 @@ process_bpf_events(const struct perf_tool *tool __maybe_unused,
}
static int
-process_bpf_metadata_event(struct perf_session *session __maybe_unused,
+process_bpf_metadata_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
perf_event__fprintf(event, NULL, stdout);
@@ -3544,7 +3546,8 @@ static void script__setup_sample_type(struct perf_script *script)
}
}
-static int process_stat_round_event(struct perf_session *session,
+static int process_stat_round_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
struct perf_record_stat_round *round = &event->stat_round;
@@ -3559,7 +3562,8 @@ static int process_stat_round_event(struct perf_session *session,
return 0;
}
-static int process_stat_config_event(struct perf_session *session __maybe_unused,
+static int process_stat_config_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
perf_event__read_stat_config(&stat_config, &event->stat_config);
@@ -3593,10 +3597,10 @@ static int set_maps(struct perf_script *script)
}
static
-int process_thread_map_event(struct perf_session *session,
+int process_thread_map_event(const struct perf_tool *tool,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
- const struct perf_tool *tool = session->tool;
struct perf_script *script = container_of(tool, struct perf_script, tool);
if (dump_trace)
@@ -3615,10 +3619,10 @@ int process_thread_map_event(struct perf_session *session,
}
static
-int process_cpu_map_event(struct perf_session *session,
+int process_cpu_map_event(const struct perf_tool *tool,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
- const struct perf_tool *tool = session->tool;
struct perf_script *script = container_of(tool, struct perf_script, tool);
if (dump_trace)
@@ -3636,7 +3640,8 @@ int process_cpu_map_event(struct perf_session *session,
return set_maps(script);
}
-static int process_feature_event(struct perf_session *session,
+static int process_feature_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
if (event->feat.feat_id < HEADER_LAST_FEATURE)
@@ -3645,13 +3650,13 @@ static int process_feature_event(struct perf_session *session,
}
#ifdef HAVE_AUXTRACE_SUPPORT
-static int perf_script__process_auxtrace_info(struct perf_session *session,
+static int perf_script__process_auxtrace_info(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event)
{
- int ret = perf_event__process_auxtrace_info(session, event);
+ int ret = perf_event__process_auxtrace_info(tool, session, event);
if (ret == 0) {
- const struct perf_tool *tool = session->tool;
struct perf_script *script = container_of(tool, struct perf_script, tool);
ret = perf_script__setup_per_event_dump(script);
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 3fc05180b157c..57f1f3f4d593f 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -2141,7 +2141,8 @@ static int __cmd_record(const struct option stat_options[], struct opt_aggr_mode
return argc;
}
-static int process_stat_round_event(struct perf_session *session,
+static int process_stat_round_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
struct perf_record_stat_round *stat_round = &event->stat_round;
@@ -2166,10 +2167,10 @@ static int process_stat_round_event(struct perf_session *session,
}
static
-int process_stat_config_event(struct perf_session *session,
+int process_stat_config_event(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event)
{
- const struct perf_tool *tool = session->tool;
struct perf_stat *st = container_of(tool, struct perf_stat, tool);
perf_event__read_stat_config(&stat_config, &event->stat_config);
@@ -2215,10 +2216,10 @@ static int set_maps(struct perf_stat *st)
}
static
-int process_thread_map_event(struct perf_session *session,
+int process_thread_map_event(const struct perf_tool *tool,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
- const struct perf_tool *tool = session->tool;
struct perf_stat *st = container_of(tool, struct perf_stat, tool);
if (st->threads) {
@@ -2234,10 +2235,10 @@ int process_thread_map_event(struct perf_session *session,
}
static
-int process_cpu_map_event(struct perf_session *session,
+int process_cpu_map_event(const struct perf_tool *tool,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
- const struct perf_tool *tool = session->tool;
struct perf_stat *st = container_of(tool, struct perf_stat, tool);
struct perf_cpu_map *cpus;
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index 1749359aa9a20..63c816ef5984b 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -1368,7 +1368,8 @@ static void unleader_auxtrace(struct perf_session *session)
}
}
-int perf_event__process_auxtrace_info(struct perf_session *session,
+int perf_event__process_auxtrace_info(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
enum auxtrace_type type = event->auxtrace_info.type;
@@ -1412,7 +1413,8 @@ int perf_event__process_auxtrace_info(struct perf_session *session,
return 0;
}
-s64 perf_event__process_auxtrace(struct perf_session *session,
+s64 perf_event__process_auxtrace(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
s64 err;
@@ -1809,7 +1811,8 @@ void events_stats__auxtrace_error_warn(const struct events_stats *stats)
}
}
-int perf_event__process_auxtrace_error(struct perf_session *session,
+int perf_event__process_auxtrace_error(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
if (auxtrace__dont_decode(session))
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index e0a5b39fed123..bab05ba01e41d 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -615,11 +615,14 @@ void auxtrace_synth_error(struct perf_record_auxtrace_error *auxtrace_error, int
int code, int cpu, pid_t pid, pid_t tid, u64 ip,
const char *msg, u64 timestamp);
-int perf_event__process_auxtrace_info(struct perf_session *session,
+int perf_event__process_auxtrace_info(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
-s64 perf_event__process_auxtrace(struct perf_session *session,
+s64 perf_event__process_auxtrace(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
-int perf_event__process_auxtrace_error(struct perf_session *session,
+int perf_event__process_auxtrace_error(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts,
const char *str, int unset);
@@ -727,21 +730,24 @@ int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused,
}
static inline
-int perf_event__process_auxtrace_info(struct perf_session *session __maybe_unused,
+int perf_event__process_auxtrace_info(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
return 0;
}
static inline
-s64 perf_event__process_auxtrace(struct perf_session *session __maybe_unused,
+s64 perf_event__process_auxtrace(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
return 0;
}
static inline
-int perf_event__process_auxtrace_error(struct perf_session *session __maybe_unused,
+int perf_event__process_auxtrace_error(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
return 0;
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 5bf826911cf3a..5d2419bac674c 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -4600,7 +4600,8 @@ int perf_event__process_event_update(const struct perf_tool *tool __maybe_unused
}
#ifdef HAVE_LIBTRACEEVENT
-int perf_event__process_tracing_data(struct perf_session *session,
+int perf_event__process_tracing_data(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
ssize_t size_read, padding, size = event->tracing_data.size;
@@ -4648,7 +4649,8 @@ int perf_event__process_tracing_data(struct perf_session *session,
}
#endif
-int perf_event__process_build_id(struct perf_session *session,
+int perf_event__process_build_id(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
__event_process_build_id(&event->build_id,
--git a/tools/perf/util/header.h b/tools/perf/util/header.h
index d16dfceccd740..c058021c3150b 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -178,10 +178,12 @@ int perf_event__process_event_update(const struct perf_tool *tool,
size_t perf_event__fprintf_attr(union perf_event *event, FILE *fp);
size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp);
#ifdef HAVE_LIBTRACEEVENT
-int perf_event__process_tracing_data(struct perf_session *session,
+int perf_event__process_tracing_data(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
#endif
-int perf_event__process_build_id(struct perf_session *session,
+int perf_event__process_build_id(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
bool is_perf_magic(u64 magic);
diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c
index 8c9aee157ec48..21359155f2a0b 100644
--- a/tools/perf/util/intel-tpebs.c
+++ b/tools/perf/util/intel-tpebs.c
@@ -216,7 +216,8 @@ static int process_sample_event(const struct perf_tool *tool __maybe_unused,
return 0;
}
-static int process_feature_event(struct perf_session *session,
+static int process_feature_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
if (event->feat.feat_id < HEADER_LAST_FEATURE)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 3a37f6df7e78f..0eee9d2f59d9a 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1437,19 +1437,19 @@ static s64 perf_session__process_user_event(struct perf_session *session,
*/
if (!perf_data__is_pipe(session->data))
lseek(fd, file_offset, SEEK_SET);
- err = tool->tracing_data(session, event);
+ err = tool->tracing_data(tool, session, event);
break;
case PERF_RECORD_HEADER_BUILD_ID:
- err = tool->build_id(session, event);
+ err = tool->build_id(tool, session, event);
break;
case PERF_RECORD_FINISHED_ROUND:
err = tool->finished_round(tool, event, oe);
break;
case PERF_RECORD_ID_INDEX:
- err = tool->id_index(session, event);
+ err = tool->id_index(tool, session, event);
break;
case PERF_RECORD_AUXTRACE_INFO:
- err = tool->auxtrace_info(session, event);
+ err = tool->auxtrace_info(tool, session, event);
break;
case PERF_RECORD_AUXTRACE:
/*
@@ -1459,45 +1459,45 @@ static s64 perf_session__process_user_event(struct perf_session *session,
*/
if (!perf_data__is_pipe(session->data))
lseek(fd, file_offset + event->header.size, SEEK_SET);
- err = tool->auxtrace(session, event);
+ err = tool->auxtrace(tool, session, event);
break;
case PERF_RECORD_AUXTRACE_ERROR:
perf_session__auxtrace_error_inc(session, event);
- err = tool->auxtrace_error(session, event);
+ err = tool->auxtrace_error(tool, session, event);
break;
case PERF_RECORD_THREAD_MAP:
- err = tool->thread_map(session, event);
+ err = tool->thread_map(tool, session, event);
break;
case PERF_RECORD_CPU_MAP:
- err = tool->cpu_map(session, event);
+ err = tool->cpu_map(tool, session, event);
break;
case PERF_RECORD_STAT_CONFIG:
- err = tool->stat_config(session, event);
+ err = tool->stat_config(tool, session, event);
break;
case PERF_RECORD_STAT:
- err = tool->stat(session, event);
+ err = tool->stat(tool, session, event);
break;
case PERF_RECORD_STAT_ROUND:
- err = tool->stat_round(session, event);
+ err = tool->stat_round(tool, session, event);
break;
case PERF_RECORD_TIME_CONV:
session->time_conv = event->time_conv;
- err = tool->time_conv(session, event);
+ err = tool->time_conv(tool, session, event);
break;
case PERF_RECORD_HEADER_FEATURE:
- err = tool->feature(session, event);
+ err = tool->feature(tool, session, event);
break;
case PERF_RECORD_COMPRESSED:
case PERF_RECORD_COMPRESSED2:
- err = tool->compressed(session, event, file_offset, file_path);
+ err = tool->compressed(tool, session, event, file_offset, file_path);
if (err)
dump_event(session->evlist, event, file_offset, &sample, file_path);
break;
case PERF_RECORD_FINISHED_INIT:
- err = tool->finished_init(session, event);
+ err = tool->finished_init(tool, session, event);
break;
case PERF_RECORD_BPF_METADATA:
- err = tool->bpf_metadata(session, event);
+ err = tool->bpf_metadata(tool, session, event);
break;
default:
err = -EINVAL;
@@ -2648,7 +2648,8 @@ static int perf_session__set_guest_cpu(struct perf_session *session, pid_t pid,
return 0;
}
-int perf_event__process_id_index(struct perf_session *session,
+int perf_event__process_id_index(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
struct evlist *evlist = session->evlist;
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index cf88d65a25cb6..22d3ff877e83a 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -202,7 +202,8 @@ int perf_session__deliver_synth_attr_event(struct perf_session *session,
int perf_session__dsos_hit_all(struct perf_session *session);
-int perf_event__process_id_index(struct perf_session *session,
+int perf_event__process_id_index(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
int perf_event__process_finished_round(const struct perf_tool *tool,
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 101ed6c497bca..976a06e632529 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -645,7 +645,8 @@ void perf_stat_process_percore(struct perf_stat_config *config, struct evlist *e
evsel__process_percore(evsel);
}
-int perf_event__process_stat_event(struct perf_session *session,
+int perf_event__process_stat_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event)
{
struct perf_counts_values count, *ptr;
diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
index 34f30a295f891..230474f493151 100644
--- a/tools/perf/util/stat.h
+++ b/tools/perf/util/stat.h
@@ -216,7 +216,8 @@ union perf_event;
struct perf_session;
struct target;
-int perf_event__process_stat_event(struct perf_session *session,
+int perf_event__process_stat_event(const struct perf_tool *tool,
+ struct perf_session *session,
union perf_event *event);
size_t perf_event__fprintf_stat(union perf_event *event, FILE *fp);
diff --git a/tools/perf/util/tool.c b/tools/perf/util/tool.c
index e83c7ababc2ad..c983b526b30d1 100644
--- a/tools/perf/util/tool.c
+++ b/tools/perf/util/tool.c
@@ -13,7 +13,8 @@
#include <unistd.h>
#ifdef HAVE_ZSTD_SUPPORT
-static int perf_session__process_compressed_event(struct perf_session *session,
+static int perf_session__process_compressed_event(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session,
union perf_event *event, u64 file_offset,
const char *file_path)
{
@@ -79,10 +80,9 @@ static int perf_session__process_compressed_event(struct perf_session *session,
}
#endif
-static int process_event_synth_tracing_data_stub(struct perf_session *session
- __maybe_unused,
- union perf_event *event
- __maybe_unused)
+static int process_event_synth_tracing_data_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
+ union perf_event *event __maybe_unused)
{
dump_printf(": unhandled!\n");
return 0;
@@ -90,8 +90,7 @@ static int process_event_synth_tracing_data_stub(struct perf_session *session
static int process_event_synth_attr_stub(const struct perf_tool *tool __maybe_unused,
union perf_event *event __maybe_unused,
- struct evlist **pevlist
- __maybe_unused)
+ struct evlist **pevlist __maybe_unused)
{
dump_printf(": unhandled!\n");
return 0;
@@ -99,8 +98,7 @@ static int process_event_synth_attr_stub(const struct perf_tool *tool __maybe_un
static int process_event_synth_event_update_stub(const struct perf_tool *tool __maybe_unused,
union perf_event *event __maybe_unused,
- struct evlist **pevlist
- __maybe_unused)
+ struct evlist **pevlist __maybe_unused)
{
if (dump_trace)
perf_event__fprintf_event_update(event, stdout);
@@ -151,7 +149,8 @@ static int skipn(int fd, off_t n)
return 0;
}
-static s64 process_event_auxtrace_stub(struct perf_session *session __maybe_unused,
+static s64 process_event_auxtrace_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event)
{
dump_printf(": unhandled!\n");
@@ -160,7 +159,8 @@ static s64 process_event_auxtrace_stub(struct perf_session *session __maybe_unus
return event->auxtrace.size;
}
-static int process_event_op2_stub(struct perf_session *session __maybe_unused,
+static int process_event_op2_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
dump_printf(": unhandled!\n");
@@ -169,7 +169,8 @@ static int process_event_op2_stub(struct perf_session *session __maybe_unused,
static
-int process_event_thread_map_stub(struct perf_session *session __maybe_unused,
+int process_event_thread_map_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
if (dump_trace)
@@ -180,7 +181,8 @@ int process_event_thread_map_stub(struct perf_session *session __maybe_unused,
}
static
-int process_event_cpu_map_stub(struct perf_session *session __maybe_unused,
+int process_event_cpu_map_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
if (dump_trace)
@@ -191,7 +193,8 @@ int process_event_cpu_map_stub(struct perf_session *session __maybe_unused,
}
static
-int process_event_stat_config_stub(struct perf_session *session __maybe_unused,
+int process_event_stat_config_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused)
{
if (dump_trace)
@@ -201,7 +204,8 @@ int process_event_stat_config_stub(struct perf_session *session __maybe_unused,
return 0;
}
-static int process_stat_stub(struct perf_session *perf_session __maybe_unused,
+static int process_stat_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *perf_session __maybe_unused,
union perf_event *event)
{
if (dump_trace)
@@ -211,7 +215,8 @@ static int process_stat_stub(struct perf_session *perf_session __maybe_unused,
return 0;
}
-static int process_stat_round_stub(struct perf_session *perf_session __maybe_unused,
+static int process_stat_round_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *perf_session __maybe_unused,
union perf_event *event)
{
if (dump_trace)
@@ -221,7 +226,8 @@ static int process_stat_round_stub(struct perf_session *perf_session __maybe_unu
return 0;
}
-static int process_event_time_conv_stub(struct perf_session *perf_session __maybe_unused,
+static int process_event_time_conv_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *perf_session __maybe_unused,
union perf_event *event)
{
if (dump_trace)
@@ -231,7 +237,8 @@ static int process_event_time_conv_stub(struct perf_session *perf_session __mayb
return 0;
}
-static int perf_session__process_compressed_event_stub(struct perf_session *session __maybe_unused,
+static int perf_session__process_compressed_event_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *session __maybe_unused,
union perf_event *event __maybe_unused,
u64 file_offset __maybe_unused,
const char *file_path __maybe_unused)
@@ -240,7 +247,8 @@ static int perf_session__process_compressed_event_stub(struct perf_session *sess
return 0;
}
-static int perf_event__process_bpf_metadata_stub(struct perf_session *perf_session __maybe_unused,
+static int perf_event__process_bpf_metadata_stub(const struct perf_tool *tool __maybe_unused,
+ struct perf_session *perf_session __maybe_unused,
union perf_event *event)
{
if (dump_trace)
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h
index 18b76ff0f26ac..1f14618083718 100644
--- a/tools/perf/util/tool.h
+++ b/tools/perf/util/tool.h
@@ -26,10 +26,12 @@ typedef int (*event_attr_op)(const struct perf_tool *tool,
union perf_event *event,
struct evlist **pevlist);
-typedef int (*event_op2)(struct perf_session *session, union perf_event *event);
-typedef s64 (*event_op3)(struct perf_session *session, union perf_event *event);
-typedef int (*event_op4)(struct perf_session *session, union perf_event *event, u64 data,
- const char *str);
+typedef int (*event_op2)(const struct perf_tool *tool, struct perf_session *session,
+ union perf_event *event);
+typedef s64 (*event_op3)(const struct perf_tool *tool, struct perf_session *session,
+ union perf_event *event);
+typedef int (*event_op4)(const struct perf_tool *tool, struct perf_session *session,
+ union perf_event *event, u64 data, const char *str);
typedef int (*event_oe)(const struct perf_tool *tool, union perf_event *event,
struct ordered_events *oe);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0539/2151] perf build: Dont add NO_AUXTRACE if missing feature-get_cpuid
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (537 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0538/2151] perf tool: Add the perf_tool argument to all callbacks Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0540/2151] perf build: Remove NO_AUXTRACE build option Greg Kroah-Hartman
` (343 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, James Clark,
Namhyung Kim, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 2566bbfc0a042feadeb0bea1f1f4b2b13f91c664 ]
The intel-pt code dependent on __get_cpuid is no longer present so
remove the feature test in the Makefile.config.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Stable-dep-of: 0824af00a8d2 ("perf topdown: Don't require config1==0 for a slots event")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Makefile.config | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 8ae13809f68b2..d91ec4450cc66 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1114,16 +1114,8 @@ ifndef NO_CAPSTONE
endif
ifndef NO_AUXTRACE
- ifeq ($(SRCARCH),x86)
- ifeq ($(feature-get_cpuid), 0)
- $(warning Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc)
- NO_AUXTRACE := 1
- endif
- endif
- ifndef NO_AUXTRACE
- $(call detected,CONFIG_AUXTRACE)
- CFLAGS += -DHAVE_AUXTRACE_SUPPORT
- endif
+ $(call detected,CONFIG_AUXTRACE)
+ CFLAGS += -DHAVE_AUXTRACE_SUPPORT
endif
ifdef EXTRA_TESTS
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0540/2151] perf build: Remove NO_AUXTRACE build option
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (538 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0539/2151] perf build: Dont add NO_AUXTRACE if missing feature-get_cpuid Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0541/2151] perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies Greg Kroah-Hartman
` (342 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, James Clark,
Namhyung Kim, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 754187ad73b73bcb44f106a8e5fc88789beff1bd ]
The NO_AUXTRACE build option was used when the __get_cpuid feature
test failed or if it was provided on the command line. The option no
longer avoids a dependency on a library and so having the option is
just adding complexity to the code base. Remove the option
CONFIG_AUXTRACE from Build files and HAVE_AUXTRACE_SUPPORT by assuming
it is always defined.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Stable-dep-of: 0824af00a8d2 ("perf topdown: Don't require config1==0 for a slots event")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Documentation/perf-check.txt | 1 -
tools/perf/Makefile.config | 5 -
tools/perf/Makefile.perf | 2 -
tools/perf/arch/arm/util/Build | 2 +-
tools/perf/arch/arm/util/pmu.c | 2 -
tools/perf/arch/arm64/util/Build | 19 +-
tools/perf/arch/powerpc/util/Build | 2 +-
tools/perf/arch/s390/util/Build | 2 +-
tools/perf/arch/x86/tests/Build | 4 +-
tools/perf/arch/x86/tests/arch-tests.c | 4 -
tools/perf/arch/x86/util/Build | 6 +-
tools/perf/arch/x86/util/pmu.c | 2 -
tools/perf/builtin-check.c | 1 -
tools/perf/builtin-inject.c | 15 --
tools/perf/builtin-record.c | 36 ----
tools/perf/builtin-script.c | 12 --
tools/perf/tests/make | 4 +-
tools/perf/util/Build | 24 +--
tools/perf/util/arm-spe-decoder/Build | 2 +-
tools/perf/util/auxtrace.h | 220 +-----------------------
tools/perf/util/cs-etm-decoder/Build | 2 +-
tools/perf/util/hisi-ptt-decoder/Build | 2 +-
tools/perf/util/intel-pt-decoder/Build | 8 +-
tools/perf/util/synthetic-events.h | 15 --
24 files changed, 37 insertions(+), 355 deletions(-)
diff --git a/tools/perf/Documentation/perf-check.txt b/tools/perf/Documentation/perf-check.txt
index 4c9ccda6ce916..09e1d35677f5b 100644
--- a/tools/perf/Documentation/perf-check.txt
+++ b/tools/perf/Documentation/perf-check.txt
@@ -50,7 +50,6 @@ feature::
dwarf / HAVE_LIBDW_SUPPORT
dwarf_getlocations / HAVE_LIBDW_SUPPORT
dwarf-unwind / HAVE_DWARF_UNWIND_SUPPORT
- auxtrace / HAVE_AUXTRACE_SUPPORT
libbfd / HAVE_LIBBFD_SUPPORT
libbpf-strings / HAVE_LIBBPF_STRINGS_SUPPORT
libcapstone / HAVE_LIBCAPSTONE_SUPPORT
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index d91ec4450cc66..06b6b4ce903c4 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1113,11 +1113,6 @@ ifndef NO_CAPSTONE
endif
endif
-ifndef NO_AUXTRACE
- $(call detected,CONFIG_AUXTRACE)
- CFLAGS += -DHAVE_AUXTRACE_SUPPORT
-endif
-
ifdef EXTRA_TESTS
$(call detected,CONFIG_EXTRA_TESTS)
CFLAGS += -DHAVE_EXTRA_TESTS
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 562b9d356d2a2..5aee6f6e8b983 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -84,8 +84,6 @@ include ../scripts/utilities.mak
#
# Define NO_LZMA if you do not want to support compressed (xz) kernel modules
#
-# Define NO_AUXTRACE if you do not want AUX area tracing support
-#
# Define NO_LIBBPF if you do not want BPF support
#
# Define NO_SDT if you do not want to define SDT event in perf tools,
diff --git a/tools/perf/arch/arm/util/Build b/tools/perf/arch/arm/util/Build
index f7a8b37d1c688..fd695e1fdaee2 100644
--- a/tools/perf/arch/arm/util/Build
+++ b/tools/perf/arch/arm/util/Build
@@ -3,4 +3,4 @@ perf-util-y += perf_regs.o
perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
-perf-util-$(CONFIG_AUXTRACE) += pmu.o auxtrace.o cs-etm.o
+perf-util-y += pmu.o auxtrace.o cs-etm.o
diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
index f70075c89aa07..9be8da5207f55 100644
--- a/tools/perf/arch/arm/util/pmu.c
+++ b/tools/perf/arch/arm/util/pmu.c
@@ -20,7 +20,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
{
struct perf_cpu_map *intersect, *online = cpu_map__online();
-#ifdef HAVE_AUXTRACE_SUPPORT
if (!strcmp(pmu->name, CORESIGHT_ETM_PMU_NAME)) {
/* add ETM default config here */
pmu->auxtrace = true;
@@ -39,7 +38,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
pmu->selectable = true;
#endif
}
-#endif
/* Workaround some ARM PMU's failing to correctly set CPU maps for online processors. */
intersect = perf_cpu_map__intersect(online, pmu->cpus);
perf_cpu_map__put(online);
diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/Build
index a74521b79eaaa..d63881081d2eb 100644
--- a/tools/perf/arch/arm64/util/Build
+++ b/tools/perf/arch/arm64/util/Build
@@ -1,13 +1,14 @@
+perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
+perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o
+perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
+perf-util-y += ../../arm/util/auxtrace.o
+perf-util-y += ../../arm/util/cs-etm.o
+perf-util-y += ../../arm/util/pmu.o
+perf-util-y += arm-spe.o
perf-util-y += header.o
+perf-util-y += hisi-ptt.o
perf-util-y += machine.o
+perf-util-y += mem-events.o
perf-util-y += perf_regs.o
-perf-util-y += tsc.o
perf-util-y += pmu.o
-perf-util-$(CONFIG_LIBTRACEEVENT) += kvm-stat.o
-perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
-perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
-
-perf-util-$(CONFIG_AUXTRACE) += ../../arm/util/pmu.o \
- ../../arm/util/auxtrace.o \
- ../../arm/util/cs-etm.o \
- arm-spe.o mem-events.o hisi-ptt.o
+perf-util-y += tsc.o
diff --git a/tools/perf/arch/powerpc/util/Build b/tools/perf/arch/powerpc/util/Build
index a5b0babd307e9..3d0d5427aef7f 100644
--- a/tools/perf/arch/powerpc/util/Build
+++ b/tools/perf/arch/powerpc/util/Build
@@ -10,4 +10,4 @@ perf-util-$(CONFIG_LIBDW) += skip-callchain-idx.o
perf-util-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
-perf-util-$(CONFIG_AUXTRACE) += auxtrace.o
+perf-util-y += auxtrace.o
diff --git a/tools/perf/arch/s390/util/Build b/tools/perf/arch/s390/util/Build
index 736c0ad091943..c64eb18dbdae9 100644
--- a/tools/perf/arch/s390/util/Build
+++ b/tools/perf/arch/s390/util/Build
@@ -7,4 +7,4 @@ perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
perf-util-y += machine.o
perf-util-y += pmu.o
-perf-util-$(CONFIG_AUXTRACE) += auxtrace.o
+perf-util-y += auxtrace.o
diff --git a/tools/perf/arch/x86/tests/Build b/tools/perf/arch/x86/tests/Build
index 7790b3e20f4e4..b017d1ca6e3c9 100644
--- a/tools/perf/arch/x86/tests/Build
+++ b/tools/perf/arch/x86/tests/Build
@@ -3,9 +3,9 @@ perf-test-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
perf-test-y += arch-tests.o
perf-test-y += hybrid.o
-perf-test-$(CONFIG_AUXTRACE) += intel-pt-test.o
+perf-test-y += intel-pt-test.o
ifeq ($(CONFIG_EXTRA_TESTS),y)
-perf-test-$(CONFIG_AUXTRACE) += insn-x86.o
+perf-test-y += insn-x86.o
endif
perf-test-$(CONFIG_X86_64) += bp-modify.o
perf-test-y += amd-ibs-via-core-pmu.o
diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/tests/arch-tests.c
index 8f9cfeaa170ff..c3e1619c5e794 100644
--- a/tools/perf/arch/x86/tests/arch-tests.c
+++ b/tools/perf/arch/x86/tests/arch-tests.c
@@ -3,7 +3,6 @@
#include "tests/tests.h"
#include "arch-tests.h"
-#ifdef HAVE_AUXTRACE_SUPPORT
#ifdef HAVE_EXTRA_TESTS
DEFINE_SUITE("x86 instruction decoder - new instructions", insn_x86);
#endif
@@ -19,7 +18,6 @@ struct test_suite suite__intel_pt = {
.test_cases = intel_pt_tests,
};
-#endif
#if defined(__x86_64__)
DEFINE_SUITE("x86 bp modify", bp_modify);
#endif
@@ -39,12 +37,10 @@ struct test_suite *arch_tests[] = {
#ifdef HAVE_DWARF_UNWIND_SUPPORT
&suite__dwarf_unwind,
#endif
-#ifdef HAVE_AUXTRACE_SUPPORT
#ifdef HAVE_EXTRA_TESTS
&suite__insn_x86,
#endif
&suite__intel_pt,
-#endif
#if defined(__x86_64__)
&suite__bp_modify,
#endif
diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build
index 06d7c0205b3d0..c0dc5965f3624 100644
--- a/tools/perf/arch/x86/util/Build
+++ b/tools/perf/arch/x86/util/Build
@@ -14,7 +14,7 @@ perf-util-y += iostat.o
perf-util-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o
perf-util-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
-perf-util-$(CONFIG_AUXTRACE) += auxtrace.o
+perf-util-y += auxtrace.o
perf-util-y += archinsn.o
-perf-util-$(CONFIG_AUXTRACE) += intel-pt.o
-perf-util-$(CONFIG_AUXTRACE) += intel-bts.o
+perf-util-y += intel-pt.o
+perf-util-y += intel-bts.o
diff --git a/tools/perf/arch/x86/util/pmu.c b/tools/perf/arch/x86/util/pmu.c
index 58113482654b7..a3f96221758d5 100644
--- a/tools/perf/arch/x86/util/pmu.c
+++ b/tools/perf/arch/x86/util/pmu.c
@@ -273,7 +273,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
{
struct perf_pmu_caps *ldlat_cap;
-#ifdef HAVE_AUXTRACE_SUPPORT
if (!strcmp(pmu->name, INTEL_PT_PMU_NAME)) {
pmu->auxtrace = true;
pmu->selectable = true;
@@ -283,7 +282,6 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
pmu->auxtrace = true;
pmu->selectable = true;
}
-#endif
if (x86__is_amd_cpu()) {
if (strcmp(pmu->name, "ibs_op"))
diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c
index 9ce2e71999dfd..d19769a8f6897 100644
--- a/tools/perf/builtin-check.c
+++ b/tools/perf/builtin-check.c
@@ -42,7 +42,6 @@ struct feature_status supported_features[] = {
FEATURE_STATUS("dwarf", HAVE_LIBDW_SUPPORT),
FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT),
FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT),
- FEATURE_STATUS("auxtrace", HAVE_AUXTRACE_SUPPORT),
FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el]"),
FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT),
FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT),
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index c41970928f180..d560e49b93d3c 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -241,8 +241,6 @@ static int perf_event__repipe_event_update(const struct perf_tool *tool,
return perf_event__repipe_synth(tool, event);
}
-#ifdef HAVE_AUXTRACE_SUPPORT
-
static int copy_bytes(struct perf_inject *inject, struct perf_data *data, off_t size)
{
char buf[4096];
@@ -299,19 +297,6 @@ static s64 perf_event__repipe_auxtrace(const struct perf_tool *tool,
return event->auxtrace.size;
}
-#else
-
-static s64
-perf_event__repipe_auxtrace(const struct perf_tool *tool __maybe_unused,
- struct perf_session *session __maybe_unused,
- union perf_event *event __maybe_unused)
-{
- pr_err("AUX area tracing not supported\n");
- return -EINVAL;
-}
-
-#endif
-
static int perf_event__repipe(const struct perf_tool *tool,
union perf_event *event,
struct perf_sample *sample __maybe_unused,
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 87cff5f5a99c1..8c8d67a3da982 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -718,8 +718,6 @@ static void record__sig_exit(void)
raise(signr);
}
-#ifdef HAVE_AUXTRACE_SUPPORT
-
static int record__process_auxtrace(const struct perf_tool *tool,
struct mmap *map,
union perf_event *event, void *data1,
@@ -878,40 +876,6 @@ static int record__auxtrace_init(struct record *rec)
return auxtrace_parse_filters(rec->evlist);
}
-#else
-
-static inline
-int record__auxtrace_mmap_read(struct record *rec __maybe_unused,
- struct mmap *map __maybe_unused)
-{
- return 0;
-}
-
-static inline
-void record__read_auxtrace_snapshot(struct record *rec __maybe_unused,
- bool on_exit __maybe_unused)
-{
-}
-
-static inline
-int auxtrace_record__snapshot_start(struct auxtrace_record *itr __maybe_unused)
-{
- return 0;
-}
-
-static inline
-int record__auxtrace_snapshot_exit(struct record *rec __maybe_unused)
-{
- return 0;
-}
-
-static int record__auxtrace_init(struct record *rec __maybe_unused)
-{
- return 0;
-}
-
-#endif
-
static int record__config_text_poke(struct evlist *evlist)
{
struct evsel *evsel;
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index d813adbf98895..bd82315bdf8e6 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2002,7 +2002,6 @@ static int perf_sample__fprintf_synth_iflag_chg(struct perf_sample *sample, FILE
return len + perf_sample__fprintf_pt_spacing(len, fp);
}
-#ifdef HAVE_AUXTRACE_SUPPORT
static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data, FILE *fp)
{
struct powerpc_vpadtl_entry *dtl = (struct powerpc_vpadtl_entry *)data->raw_data;
@@ -2021,13 +2020,6 @@ static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data, FILE *fp)
return len;
}
-#else
-static int perf_sample__fprintf_synth_vpadtl(struct perf_sample *data __maybe_unused,
- FILE *fp __maybe_unused)
-{
- return 0;
-}
-#endif
static int perf_sample__fprintf_synth(struct perf_sample *sample,
struct evsel *evsel, FILE *fp)
@@ -3649,7 +3641,6 @@ static int process_feature_event(const struct perf_tool *tool __maybe_unused,
return 0;
}
-#ifdef HAVE_AUXTRACE_SUPPORT
static int perf_script__process_auxtrace_info(const struct perf_tool *tool,
struct perf_session *session,
union perf_event *event)
@@ -3664,9 +3655,6 @@ static int perf_script__process_auxtrace_info(const struct perf_tool *tool,
return ret;
}
-#else
-#define perf_script__process_auxtrace_info 0
-#endif
static int parse_insn_trace(const struct option *opt __maybe_unused,
const char *str, int unset __maybe_unused)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index fa4500c65949a..c721cd1bcaa9a 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -88,7 +88,6 @@ make_no_backtrace := NO_BACKTRACE=1
make_no_libcapstone := NO_CAPSTONE=1
make_no_libnuma := NO_LIBNUMA=1
make_no_libbionic := NO_LIBBIONIC=1
-make_no_auxtrace := NO_AUXTRACE=1
make_no_libbpf := NO_LIBBPF=1
make_libbpf_dynamic := LIBBPF_DYNAMIC=1
make_no_libbpf_DEBUG := NO_LIBBPF=1 DEBUG=1
@@ -121,7 +120,7 @@ make_static := LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX3
make_minimal := NO_LIBPYTHON=1 NO_GTK2=1
make_minimal += NO_DEMANGLE=1 NO_LIBELF=1 NO_BACKTRACE=1
make_minimal += NO_LIBNUMA=1 NO_LIBBIONIC=1 NO_LIBDW=1
-make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1
+make_minimal += NO_LIBDW_DWARF_UNWIND=1 NO_LIBBPF=1
make_minimal += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
make_minimal += NO_CAPSTONE=1
@@ -158,7 +157,6 @@ run += make_no_backtrace
run += make_no_libcapstone
run += make_no_libnuma
run += make_no_libbionic
-run += make_no_auxtrace
run += make_no_libbpf
run += make_no_libbpf_DEBUG
run += make_no_libllvm
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 4be313cd115ae..1c2a43e1dc68e 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -129,22 +129,22 @@ perf-util-y += iostat.o
perf-util-y += stream.o
perf-util-y += kvm-stat.o
perf-util-y += lock-contention.o
-perf-util-$(CONFIG_AUXTRACE) += auxtrace.o
+perf-util-y += auxtrace.o
perf-util-y += intel-pt-decoder/
-perf-util-$(CONFIG_AUXTRACE) += intel-pt.o
-perf-util-$(CONFIG_AUXTRACE) += intel-bts.o
-perf-util-$(CONFIG_AUXTRACE) += arm-spe.o
-perf-util-$(CONFIG_AUXTRACE) += arm-spe-decoder/
-perf-util-$(CONFIG_AUXTRACE) += hisi-ptt.o
-perf-util-$(CONFIG_AUXTRACE) += hisi-ptt-decoder/
-perf-util-$(CONFIG_AUXTRACE) += s390-cpumsf.o
-perf-util-$(CONFIG_AUXTRACE) += powerpc-vpadtl.o
+perf-util-y += intel-pt.o
+perf-util-y += intel-bts.o
+perf-util-y += arm-spe.o
+perf-util-y += arm-spe-decoder/
+perf-util-y += hisi-ptt.o
+perf-util-y += hisi-ptt-decoder/
+perf-util-y += s390-cpumsf.o
+perf-util-y += powerpc-vpadtl.o
ifdef CONFIG_LIBOPENCSD
-perf-util-$(CONFIG_AUXTRACE) += cs-etm.o
-perf-util-$(CONFIG_AUXTRACE) += cs-etm-decoder/
+perf-util-y += cs-etm.o
+perf-util-y += cs-etm-decoder/
endif
-perf-util-$(CONFIG_AUXTRACE) += cs-etm-base.o
+perf-util-y += cs-etm-base.o
perf-util-y += parse-branch-options.o
perf-util-y += dump-insn.o
diff --git a/tools/perf/util/arm-spe-decoder/Build b/tools/perf/util/arm-spe-decoder/Build
index 960062b3cb9ea..ab500e0efe244 100644
--- a/tools/perf/util/arm-spe-decoder/Build
+++ b/tools/perf/util/arm-spe-decoder/Build
@@ -1 +1 @@
-perf-util-$(CONFIG_AUXTRACE) += arm-spe-pkt-decoder.o arm-spe-decoder.o
+perf-util-y += arm-spe-pkt-decoder.o arm-spe-decoder.o
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index bab05ba01e41d..79ffdddab7ab4 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -7,17 +7,12 @@
#ifndef __PERF_AUXTRACE_H
#define __PERF_AUXTRACE_H
-#include <sys/types.h>
#include <errno.h>
-#include <stdbool.h>
-#include <stddef.h>
#include <stdio.h> // FILE
-#include <linux/list.h>
#include <linux/perf_event.h>
#include <linux/types.h>
-#include <perf/cpumap.h>
-#include <asm/bitsperlong.h>
#include <asm/barrier.h>
+#include <perf/cpumap.h>
union perf_event;
struct perf_session;
@@ -459,8 +454,6 @@ struct addr_filters {
struct auxtrace_cache;
-#ifdef HAVE_AUXTRACE_SUPPORT
-
u64 compat_auxtrace_mmap__read_head(struct auxtrace_mmap *mm);
int compat_auxtrace_mmap__write_tail(struct auxtrace_mmap *mm, u64 tail);
@@ -705,215 +698,4 @@ void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts)
opts->range_num = 0;
}
-#else
-#include "debug.h"
-
-static inline struct auxtrace_record *
-auxtrace_record__init(struct evlist *evlist __maybe_unused,
- int *err)
-{
- *err = 0;
- return NULL;
-}
-
-static inline
-void auxtrace_record__free(struct auxtrace_record *itr __maybe_unused)
-{
-}
-
-static inline
-int auxtrace_record__options(struct auxtrace_record *itr __maybe_unused,
- struct evlist *evlist __maybe_unused,
- struct record_opts *opts __maybe_unused)
-{
- return 0;
-}
-
-static inline
-int perf_event__process_auxtrace_info(const struct perf_tool *tool __maybe_unused,
- struct perf_session *session __maybe_unused,
- union perf_event *event __maybe_unused)
-{
- return 0;
-}
-
-static inline
-s64 perf_event__process_auxtrace(const struct perf_tool *tool __maybe_unused,
- struct perf_session *session __maybe_unused,
- union perf_event *event __maybe_unused)
-{
- return 0;
-}
-
-static inline
-int perf_event__process_auxtrace_error(const struct perf_tool *tool __maybe_unused,
- struct perf_session *session __maybe_unused,
- union perf_event *event __maybe_unused)
-{
- return 0;
-}
-
-static inline
-void perf_session__auxtrace_error_inc(struct perf_session *session
- __maybe_unused,
- union perf_event *event
- __maybe_unused)
-{
-}
-
-static inline
-void events_stats__auxtrace_error_warn(const struct events_stats *stats
- __maybe_unused)
-{
-}
-
-static inline
-int itrace_do_parse_synth_opts(struct itrace_synth_opts *synth_opts __maybe_unused,
- const char *str __maybe_unused, int unset __maybe_unused)
-{
- pr_err("AUX area tracing not supported\n");
- return -EINVAL;
-}
-
-static inline
-int itrace_parse_synth_opts(const struct option *opt __maybe_unused,
- const char *str __maybe_unused,
- int unset __maybe_unused)
-{
- pr_err("AUX area tracing not supported\n");
- return -EINVAL;
-}
-
-static inline
-int auxtrace_parse_snapshot_options(struct auxtrace_record *itr __maybe_unused,
- struct record_opts *opts __maybe_unused,
- const char *str)
-{
- if (!str)
- return 0;
- pr_err("AUX area tracing not supported\n");
- return -EINVAL;
-}
-
-static inline
-int auxtrace_parse_sample_options(struct auxtrace_record *itr __maybe_unused,
- struct evlist *evlist __maybe_unused,
- struct record_opts *opts __maybe_unused,
- const char *str)
-{
- if (!str)
- return 0;
- pr_err("AUX area tracing not supported\n");
- return -EINVAL;
-}
-
-static inline
-int auxtrace_parse_aux_action(struct evlist *evlist __maybe_unused)
-{
- pr_err("AUX area tracing not supported\n");
- return -EINVAL;
-}
-
-static inline
-int auxtrace__process_event(struct perf_session *session __maybe_unused,
- union perf_event *event __maybe_unused,
- struct perf_sample *sample __maybe_unused,
- const struct perf_tool *tool __maybe_unused)
-{
- return 0;
-}
-
-static inline
-void auxtrace__dump_auxtrace_sample(struct perf_session *session __maybe_unused,
- struct perf_sample *sample __maybe_unused)
-{
-}
-
-static inline
-int auxtrace__flush_events(struct perf_session *session __maybe_unused,
- const struct perf_tool *tool __maybe_unused)
-{
- return 0;
-}
-
-static inline
-void auxtrace__free_events(struct perf_session *session __maybe_unused)
-{
-}
-
-static inline
-void auxtrace_cache__free(struct auxtrace_cache *auxtrace_cache __maybe_unused)
-{
-}
-
-static inline
-void auxtrace__free(struct perf_session *session __maybe_unused)
-{
-}
-
-static inline
-int auxtrace_index__write(int fd __maybe_unused,
- struct list_head *head __maybe_unused)
-{
- return -EINVAL;
-}
-
-static inline
-int auxtrace_index__process(int fd __maybe_unused,
- u64 size __maybe_unused,
- struct perf_session *session __maybe_unused,
- bool needs_swap __maybe_unused)
-{
- return -EINVAL;
-}
-
-static inline
-void auxtrace_index__free(struct list_head *head __maybe_unused)
-{
-}
-
-static inline
-bool auxtrace__evsel_is_auxtrace(struct perf_session *session __maybe_unused,
- struct evsel *evsel __maybe_unused)
-{
- return false;
-}
-
-static inline
-int auxtrace_parse_filters(struct evlist *evlist __maybe_unused)
-{
- return 0;
-}
-
-int auxtrace_mmap__mmap(struct auxtrace_mmap *mm,
- struct auxtrace_mmap_params *mp,
- void *userpg, int fd);
-void auxtrace_mmap__munmap(struct auxtrace_mmap *mm);
-void auxtrace_mmap_params__init(struct auxtrace_mmap_params *mp,
- off_t auxtrace_offset,
- unsigned int auxtrace_pages,
- bool auxtrace_overwrite);
-void auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp,
- struct evlist *evlist,
- struct evsel *evsel, int idx);
-
-#define ITRACE_HELP ""
-
-static inline
-void itrace_synth_opts__set_time_range(struct itrace_synth_opts *opts
- __maybe_unused,
- struct perf_time_interval *ptime_range
- __maybe_unused,
- int range_num __maybe_unused)
-{
-}
-
-static inline
-void itrace_synth_opts__clear_time_range(struct itrace_synth_opts *opts
- __maybe_unused)
-{
-}
-
-#endif
-
#endif
diff --git a/tools/perf/util/cs-etm-decoder/Build b/tools/perf/util/cs-etm-decoder/Build
index 056d665f7f88a..27550db2aa4c5 100644
--- a/tools/perf/util/cs-etm-decoder/Build
+++ b/tools/perf/util/cs-etm-decoder/Build
@@ -1 +1 @@
-perf-util-$(CONFIG_AUXTRACE) += cs-etm-decoder.o
+perf-util-y += cs-etm-decoder.o
diff --git a/tools/perf/util/hisi-ptt-decoder/Build b/tools/perf/util/hisi-ptt-decoder/Build
index 3298f7b7e308b..2ee0eb7316565 100644
--- a/tools/perf/util/hisi-ptt-decoder/Build
+++ b/tools/perf/util/hisi-ptt-decoder/Build
@@ -1 +1 @@
-perf-util-$(CONFIG_AUXTRACE) += hisi-ptt-pkt-decoder.o
+perf-util-y += hisi-ptt-pkt-decoder.o
diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
index 5b8f0149167d9..8fd7e4330044e 100644
--- a/tools/perf/util/intel-pt-decoder/Build
+++ b/tools/perf/util/intel-pt-decoder/Build
@@ -1,4 +1,4 @@
-perf-util-$(CONFIG_AUXTRACE) += intel-pt-pkt-decoder.o intel-pt-insn-decoder.o intel-pt-log.o intel-pt-decoder.o
+perf-util-y += intel-pt-pkt-decoder.o intel-pt-insn-decoder.o intel-pt-log.o intel-pt-decoder.o
inat_tables_script = $(srctree)/tools/arch/x86/tools/gen-insn-attr-x86.awk
inat_tables_maps = $(srctree)/tools/arch/x86/lib/x86-opcode-map.txt
@@ -7,11 +7,7 @@ $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_table
$(call rule_mkdir)
@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
-ifeq ($(SRCARCH),x86)
- perf-util-y += inat.o insn.o
-else
- perf-util-$(CONFIG_AUXTRACE) += inat.o insn.o
-endif
+perf-util-y += inat.o insn.o
$(OUTPUT)util/intel-pt-decoder/inat.o: $(srctree)/tools/arch/x86/lib/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
$(call rule_mkdir)
diff --git a/tools/perf/util/synthetic-events.h b/tools/perf/util/synthetic-events.h
index ee29615d68e57..f8588b6cf11a0 100644
--- a/tools/perf/util/synthetic-events.h
+++ b/tools/perf/util/synthetic-events.h
@@ -107,24 +107,9 @@ int machine__synthesize_threads(struct machine *machine, struct target *target,
struct perf_thread_map *threads, bool needs_mmap, bool data_mmap,
unsigned int nr_threads_synthesize);
-#ifdef HAVE_AUXTRACE_SUPPORT
int perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr, const struct perf_tool *tool,
struct perf_session *session, perf_event__handler_t process);
-#else // HAVE_AUXTRACE_SUPPORT
-
-#include <errno.h>
-
-static inline int
-perf_event__synthesize_auxtrace_info(struct auxtrace_record *itr __maybe_unused,
- const struct perf_tool *tool __maybe_unused,
- struct perf_session *session __maybe_unused,
- perf_event__handler_t process __maybe_unused)
-{
- return -EINVAL;
-}
-#endif // HAVE_AUXTRACE_SUPPORT
-
#ifdef HAVE_LIBBPF_SUPPORT
int perf_event__synthesize_bpf_events(struct perf_session *session, perf_event__handler_t process,
struct machine *machine, struct record_opts *opts);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0541/2151] perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (539 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0540/2151] perf build: Remove NO_AUXTRACE build option Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0542/2151] perf arch x86 tests: Add test for topdown event sorting Greg Kroah-Hartman
` (341 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, James Clark,
Namhyung Kim, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit ca016b6527e154013693722a2cdbec7c05fb6df7 ]
errno.h isn't used in auxtrace.h so remove it and fix build failures
caused by transitive dependencies through auxtrace.h on errno.h.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Stable-dep-of: 0824af00a8d2 ("perf topdown: Don't require config1==0 for a slots event")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/arch/arm/annotate/instructions.c | 1 +
tools/perf/arch/arm/util/auxtrace.c | 1 +
tools/perf/arch/arm64/annotate/instructions.c | 1 +
tools/perf/arch/arm64/util/arm-spe.c | 1 +
tools/perf/arch/arm64/util/hisi-ptt.c | 1 +
tools/perf/arch/powerpc/util/auxtrace.c | 2 +-
tools/perf/arch/s390/util/auxtrace.c | 1 +
tools/perf/arch/x86/tests/topdown.c | 1 +
tools/perf/arch/x86/util/topdown.c | 1 +
tools/perf/bench/evlist-open-close.c | 1 +
tools/perf/bench/futex.c | 1 +
tools/perf/bench/pmu-scan.c | 1 +
tools/perf/bench/synthesize.c | 1 +
tools/perf/builtin-mem.c | 1 +
tools/perf/tests/hwmon_pmu.c | 1 +
tools/perf/tests/parse-metric.c | 1 +
tools/perf/tests/pfm.c | 1 +
tools/perf/ui/hist.c | 1 +
tools/perf/util/annotate-data.c | 2 +-
tools/perf/util/auxtrace.h | 1 -
tools/perf/util/bpf-filter.h | 2 ++
tools/perf/util/bpf-trace-summary.c | 1 +
tools/perf/util/bpf_counter_cgroup.c | 1 +
tools/perf/util/bpf_ftrace.c | 3 ++-
tools/perf/util/bpf_map.c | 1 +
tools/perf/util/cgroup.c | 1 +
tools/perf/util/drm_pmu.c | 1 +
tools/perf/util/evswitch.c | 1 +
tools/perf/util/intel-tpebs.c | 1 +
tools/perf/util/kvm-stat.h | 1 +
tools/perf/util/mmap.c | 1 +
tools/perf/util/pfm.c | 1 +
tools/perf/util/powerpc-vpadtl.c | 1 +
tools/perf/util/stat-shadow.c | 1 +
34 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/tools/perf/arch/arm/annotate/instructions.c b/tools/perf/arch/arm/annotate/instructions.c
index cf91a43362b0e..5e667b0f55126 100644
--- a/tools/perf/arch/arm/annotate/instructions.c
+++ b/tools/perf/arch/arm/annotate/instructions.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
#include <linux/zalloc.h>
+#include <errno.h>
#include <sys/types.h>
#include <regex.h>
#include <stdlib.h>
diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
index 3b8eca0ffb171..eb6404267f171 100644
--- a/tools/perf/arch/arm/util/auxtrace.c
+++ b/tools/perf/arch/arm/util/auxtrace.c
@@ -5,6 +5,7 @@
*/
#include <dirent.h>
+#include <errno.h>
#include <stdbool.h>
#include <linux/coresight-pmu.h>
#include <linux/zalloc.h>
diff --git a/tools/perf/arch/arm64/annotate/instructions.c b/tools/perf/arch/arm64/annotate/instructions.c
index d465d093e7eb5..16cb62d40bd96 100644
--- a/tools/perf/arch/arm64/annotate/instructions.c
+++ b/tools/perf/arch/arm64/annotate/instructions.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
+#include <errno.h>
#include <sys/types.h>
#include <regex.h>
#include <stdlib.h>
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index cac43cde7dbee..d5ec1408d0aec 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -10,6 +10,7 @@
#include <linux/log2.h>
#include <linux/string.h>
#include <linux/zalloc.h>
+#include <errno.h>
#include <time.h>
#include "../../../util/cpumap.h"
diff --git a/tools/perf/arch/arm64/util/hisi-ptt.c b/tools/perf/arch/arm64/util/hisi-ptt.c
index eac9739c87e6c..fe457fd58c9e8 100644
--- a/tools/perf/arch/arm64/util/hisi-ptt.c
+++ b/tools/perf/arch/arm64/util/hisi-ptt.c
@@ -9,6 +9,7 @@
#include <linux/bitops.h>
#include <linux/log2.h>
#include <linux/zalloc.h>
+#include <errno.h>
#include <time.h>
#include <internal/lib.h> // page_size
diff --git a/tools/perf/arch/powerpc/util/auxtrace.c b/tools/perf/arch/powerpc/util/auxtrace.c
index 57f2910c0b019..d0082eb276425 100644
--- a/tools/perf/arch/powerpc/util/auxtrace.c
+++ b/tools/perf/arch/powerpc/util/auxtrace.c
@@ -2,7 +2,7 @@
/*
* VPA support
*/
-
+#include <errno.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
diff --git a/tools/perf/arch/s390/util/auxtrace.c b/tools/perf/arch/s390/util/auxtrace.c
index 5068baa3e092b..1a36761450661 100644
--- a/tools/perf/arch/s390/util/auxtrace.c
+++ b/tools/perf/arch/s390/util/auxtrace.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <linux/kernel.h>
diff --git a/tools/perf/arch/x86/tests/topdown.c b/tools/perf/arch/x86/tests/topdown.c
index 1eba3b4594ef2..3ee4e5e71be3b 100644
--- a/tools/perf/arch/x86/tests/topdown.c
+++ b/tools/perf/arch/x86/tests/topdown.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include "arch-tests.h"
#include "../util/topdown.h"
#include "debug.h"
diff --git a/tools/perf/arch/x86/util/topdown.c b/tools/perf/arch/x86/util/topdown.c
index 0d01b662627a3..bafd285119d7a 100644
--- a/tools/perf/arch/x86/util/topdown.c
+++ b/tools/perf/arch/x86/util/topdown.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include "util/evlist.h"
#include "util/pmu.h"
#include "util/pmus.h"
diff --git a/tools/perf/bench/evlist-open-close.c b/tools/perf/bench/evlist-open-close.c
index bfaf50e4e5193..faf9c34b4a5dc 100644
--- a/tools/perf/bench/evlist-open-close.c
+++ b/tools/perf/bench/evlist-open-close.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/perf/bench/futex.c b/tools/perf/bench/futex.c
index 1481196a22f0c..1968c9d00b5bb 100644
--- a/tools/perf/bench/futex.c
+++ b/tools/perf/bench/futex.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <err.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/prctl.h>
diff --git a/tools/perf/bench/pmu-scan.c b/tools/perf/bench/pmu-scan.c
index 9e4d36486f625..14a464ad8cea8 100644
--- a/tools/perf/bench/pmu-scan.c
+++ b/tools/perf/bench/pmu-scan.c
@@ -4,6 +4,7 @@
*
* Copyright 2023 Google LLC.
*/
+#include <errno.h>
#include <stdio.h>
#include "bench.h"
#include "util/debug.h"
diff --git a/tools/perf/bench/synthesize.c b/tools/perf/bench/synthesize.c
index b3d493697675c..265d49a913d94 100644
--- a/tools/perf/bench/synthesize.c
+++ b/tools/perf/bench/synthesize.c
@@ -6,6 +6,7 @@
*
* Copyright 2019 Google LLC.
*/
+#include <errno.h>
#include <stdio.h>
#include "bench.h"
#include "../util/debug.h"
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index c6496adff3fea..d43500b92a7b9 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/tools/perf/tests/hwmon_pmu.c b/tools/perf/tests/hwmon_pmu.c
index 151f02701c8cc..4aa4aac94f09c 100644
--- a/tools/perf/tests/hwmon_pmu.c
+++ b/tools/perf/tests/hwmon_pmu.c
@@ -4,6 +4,7 @@
#include "hwmon_pmu.h"
#include "parse-events.h"
#include "tests.h"
+#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <linux/compiler.h>
diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
index 66a5275917e22..9b1df1eb455a7 100644
--- a/tools/perf/tests/parse-metric.c
+++ b/tools/perf/tests/parse-metric.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
+#include <errno.h>
#include <string.h>
#include <perf/cpumap.h>
#include <perf/evlist.h>
diff --git a/tools/perf/tests/pfm.c b/tools/perf/tests/pfm.c
index 2e38dfa34b6ce..fca4a86452df6 100644
--- a/tools/perf/tests/pfm.c
+++ b/tools/perf/tests/pfm.c
@@ -4,6 +4,7 @@
*
* Copyright 2020 Google LLC.
*/
+#include <errno.h>
#include "tests.h"
#include "util/debug.h"
#include "util/evlist.h"
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index b085eb0de8499..e58327595d37d 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include <inttypes.h>
#include <math.h>
#include <stdlib.h>
diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-data.c
index 903027a6fb7d3..687f381aeaec2 100644
--- a/tools/perf/util/annotate-data.c
+++ b/tools/perf/util/annotate-data.c
@@ -4,7 +4,7 @@
*
* Written by Namhyung Kim <namhyung@kernel.org>
*/
-
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index 79ffdddab7ab4..ab826d4a58e02 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -7,7 +7,6 @@
#ifndef __PERF_AUXTRACE_H
#define __PERF_AUXTRACE_H
-#include <errno.h>
#include <stdio.h> // FILE
#include <linux/perf_event.h>
#include <linux/types.h>
diff --git a/tools/perf/util/bpf-filter.h b/tools/perf/util/bpf-filter.h
index 122477f2de44b..818c554b91b28 100644
--- a/tools/perf/util/bpf-filter.h
+++ b/tools/perf/util/bpf-filter.h
@@ -36,6 +36,8 @@ int perf_bpf_filter__unpin(void);
#else /* !HAVE_BPF_SKEL */
+#include <errno.h>
+
static inline int perf_bpf_filter__parse(struct list_head *expr_head __maybe_unused,
const char *str __maybe_unused)
{
diff --git a/tools/perf/util/bpf-trace-summary.c b/tools/perf/util/bpf-trace-summary.c
index 8dfe7e678941d..cf6e1e4402d52 100644
--- a/tools/perf/util/bpf-trace-summary.c
+++ b/tools/perf/util/bpf-trace-summary.c
@@ -1,4 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#include <errno.h>
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
diff --git a/tools/perf/util/bpf_counter_cgroup.c b/tools/perf/util/bpf_counter_cgroup.c
index 690be3ce3e114..8d701724a807c 100644
--- a/tools/perf/util/bpf_counter_cgroup.c
+++ b/tools/perf/util/bpf_counter_cgroup.c
@@ -4,6 +4,7 @@
/* Copyright (c) 2021 Google */
#include <assert.h>
+#include <errno.h>
#include <limits.h>
#include <unistd.h>
#include <sys/file.h>
diff --git a/tools/perf/util/bpf_ftrace.c b/tools/perf/util/bpf_ftrace.c
index e61a3b20be0a0..c456d24efa308 100644
--- a/tools/perf/util/bpf_ftrace.c
+++ b/tools/perf/util/bpf_ftrace.c
@@ -1,6 +1,7 @@
-#include <stdio.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <bpf/bpf.h>
diff --git a/tools/perf/util/bpf_map.c b/tools/perf/util/bpf_map.c
index 578f27d2d6b46..442f91b4e8e15 100644
--- a/tools/perf/util/bpf_map.c
+++ b/tools/perf/util/bpf_map.c
@@ -5,6 +5,7 @@
#include <bpf/libbpf.h>
#include <linux/err.h>
#include <linux/kernel.h>
+#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/tools/perf/util/cgroup.c b/tools/perf/util/cgroup.c
index 0038d2ac647c4..1b5664d1481f5 100644
--- a/tools/perf/util/cgroup.c
+++ b/tools/perf/util/cgroup.c
@@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statfs.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tools/perf/util/drm_pmu.c b/tools/perf/util/drm_pmu.c
index 98d4d2b556d4e..b3052266d5993 100644
--- a/tools/perf/util/drm_pmu.c
+++ b/tools/perf/util/drm_pmu.c
@@ -10,6 +10,7 @@
#include <api/io.h>
#include <ctype.h>
#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/unistd.h>
diff --git a/tools/perf/util/evswitch.c b/tools/perf/util/evswitch.c
index 40cb56a9347da..d4c06a3f825a8 100644
--- a/tools/perf/util/evswitch.c
+++ b/tools/perf/util/evswitch.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
+#include <errno.h>
#include "evswitch.h"
#include "evlist.h"
diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c
index 21359155f2a0b..3c958d738ca6c 100644
--- a/tools/perf/util/intel-tpebs.c
+++ b/tools/perf/util/intel-tpebs.c
@@ -25,6 +25,7 @@
#include "stat.h"
#include <sys/stat.h>
#include <sys/file.h>
+#include <errno.h>
#include <poll.h>
#include <math.h>
diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h
index 53db3d56108bd..a356b839c2ee0 100644
--- a/tools/perf/util/kvm-stat.h
+++ b/tools/perf/util/kvm-stat.h
@@ -10,6 +10,7 @@
#include "symbol.h"
#include "record.h"
+#include <errno.h>
#include <stdlib.h>
#include <linux/zalloc.h>
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
index fcc0939846830..d64aec6c7c843 100644
--- a/tools/perf/util/mmap.c
+++ b/tools/perf/util/mmap.c
@@ -7,6 +7,7 @@
*/
#include <sys/mman.h>
+#include <errno.h>
#include <inttypes.h>
#include <asm/bug.h>
#include <linux/zalloc.h>
diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
index e5b3a2a5ddef5..d9043f4afbe7b 100644
--- a/tools/perf/util/pfm.c
+++ b/tools/perf/util/pfm.c
@@ -15,6 +15,7 @@
#include "util/strbuf.h"
#include "util/thread_map.h"
+#include <errno.h>
#include <string.h>
#include <linux/kernel.h>
#include <perfmon/pfmlib_perf_event.h>
diff --git a/tools/perf/util/powerpc-vpadtl.c b/tools/perf/util/powerpc-vpadtl.c
index eacc845ebda26..740fef005cf56 100644
--- a/tools/perf/util/powerpc-vpadtl.c
+++ b/tools/perf/util/powerpc-vpadtl.c
@@ -4,6 +4,7 @@
*/
#include <linux/string.h>
+#include <errno.h>
#include <inttypes.h>
#include "color.h"
#include "evlist.h"
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index abaf6b579bfc2..0002e51194c2c 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include <math.h>
#include <stdio.h>
#include "evsel.h"
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0542/2151] perf arch x86 tests: Add test for topdown event sorting
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (540 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0541/2151] perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0543/2151] perf topdown: Dont require config1==0 for a slots event Greg Kroah-Hartman
` (340 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Zide Chen, Adrian Hunter,
Alexander Shishkin, Collin Funk, Dmitrii Dolgov, German Gomez,
Ingo Molnar, James Clark, Jiri Olsa, Namhyung Kim, Peter Zijlstra,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit b439c20b2fe1cfed2210e50c06006845ae424c48 ]
Add a test to capture the comment in tools/perf/arch/x86/util/evlist.c.
Test that slots and topdown-retiring get appropriately sorted with
respect to instructions when they're all specified together.
When the PMU requires topdown event grouping (indicated by the pressence
of the slots event) metric events should be after slots, which should be
the group leader.
Add a related test that when the slots event isn't given it is injected
into the appropriate group.
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Zide Chen <zide.chen@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Collin Funk <collin.funk1@gmail.com>
Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: German Gomez <german.gomez@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: 0824af00a8d2 ("perf topdown: Don't require config1==0 for a slots event")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/arch/x86/tests/topdown.c | 166 +++++++++++++++++++++++++++-
1 file changed, 165 insertions(+), 1 deletion(-)
diff --git a/tools/perf/arch/x86/tests/topdown.c b/tools/perf/arch/x86/tests/topdown.c
index 3ee4e5e71be3b..221f2c4bbb615 100644
--- a/tools/perf/arch/x86/tests/topdown.c
+++ b/tools/perf/arch/x86/tests/topdown.c
@@ -75,4 +75,168 @@ static int test__x86_topdown(struct test_suite *test __maybe_unused, int subtest
return ret;
}
-DEFINE_SUITE("x86 topdown", x86_topdown);
+#define CHECK_COND(cond, text) \
+do { \
+ if (!(cond)) { \
+ pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
+ ret = TEST_FAIL; \
+ goto out_err; \
+ } \
+} while (0)
+
+#define CHECK_EQUAL(val, expected, text) \
+do { \
+ if ((val) != (expected)) { \
+ pr_debug("FAILED %s:%d %s (%d != %d)\n", \
+ __FILE__, __LINE__, text, (val), (expected)); \
+ ret = TEST_FAIL; \
+ goto out_err; \
+ } \
+} while (0)
+
+static int test_sort(const char *str, int expected_slots_group_size,
+ int expected_instructions_group_size)
+{
+ struct evlist *evlist = NULL;
+ struct parse_events_error err;
+ struct evsel *evsel;
+ int ret = TEST_FAIL;
+ bool slots_seen = false;
+
+ parse_events_error__init(&err);
+
+ evlist = evlist__new();
+ if (!evlist)
+ goto out_err;
+
+ if (parse_events(evlist, str, &err)) {
+ pr_debug("parse_events failed for %s\n", str);
+ goto out_err;
+ }
+
+ evlist__for_each_entry(evlist, evsel) {
+ if (!evsel__is_group_leader(evsel))
+ continue;
+
+ if (strstr(evsel__name(evsel), "slots")) {
+ /*
+ * Slots as a leader means the PMU is for a perf metric
+ * group as the slots event isn't present when not.
+ */
+ slots_seen = true;
+ CHECK_EQUAL(evsel->core.nr_members, expected_slots_group_size,
+ "slots group size");
+ if (expected_slots_group_size == 3) {
+ struct evsel *next = evsel__next(evsel);
+ struct evsel *next2 = evsel__next(next);
+
+ CHECK_COND(strstr(evsel__name(next), "instructions") != NULL,
+ "slots second event is instructions");
+ CHECK_COND(strstr(evsel__name(next2), "topdown-retiring") != NULL,
+ "slots third event is topdown-retiring");
+ } else if (expected_slots_group_size == 2) {
+ struct evsel *next = evsel__next(evsel);
+
+ CHECK_COND(strstr(evsel__name(next), "topdown-retiring") != NULL,
+ "slots second event is topdown-retiring");
+ }
+ } else if (strstr(evsel__name(evsel), "instructions")) {
+ CHECK_EQUAL(evsel->core.nr_members, expected_instructions_group_size,
+ "instructions group size");
+ if (expected_instructions_group_size == 2) {
+ /*
+ * On Intel hybrid CPUs (e.g., Alder Lake/
+ * Raptor Lake), E-cores (cpu_atom) do not
+ * support/enforce the slots event. When
+ * parsing event groups containing slots
+ * across all PMUs, slots is automatically
+ * filtered out from cpu_atom, leaving
+ * {cpu_atom/instructions/,
+ * cpu_atom/topdown-retiring/}. On cpu_atom,
+ * instructions correctly leads this group of
+ * 2 without slots reordering.
+ */
+ struct evsel *next = evsel__next(evsel);
+
+ CHECK_COND(strstr(evsel__name(next), "topdown-retiring") != NULL,
+ "instructions second event is topdown-retiring");
+ }
+ } else if (strstr(evsel__name(evsel), "topdown-retiring")) {
+ /*
+ * A perf metric event where the PMU doesn't require
+ * slots as a leader.
+ */
+ CHECK_EQUAL(evsel->core.nr_members, 1, "topdown-retiring group size");
+ } else if (strstr(evsel__name(evsel), "cycles")) {
+ CHECK_EQUAL(evsel->core.nr_members, 1, "cycles group size");
+ }
+ }
+ CHECK_COND(slots_seen, "slots seen");
+ ret = TEST_OK;
+out_err:
+ evlist__delete(evlist);
+ parse_events_error__exit(&err);
+ return ret;
+}
+
+static int test__x86_topdown_sorting(struct test_suite *test __maybe_unused,
+ int subtest __maybe_unused)
+{
+ int ret;
+
+ if (!topdown_sys_has_perf_metrics())
+ return TEST_OK;
+
+ ret = test_sort("{instructions,topdown-retiring,slots}", 3, 2);
+ TEST_ASSERT_EQUAL("all events in a group", ret, TEST_OK);
+ ret = test_sort("instructions,topdown-retiring,slots", 2, 1);
+ TEST_ASSERT_EQUAL("all events not in a group", ret, TEST_OK);
+ ret = test_sort("{instructions,slots},topdown-retiring", 2, 1);
+ TEST_ASSERT_EQUAL("slots event in a group but topdown metrics events outside the group",
+ ret, TEST_OK);
+ ret = test_sort("{instructions,slots},{topdown-retiring}", 2, 1);
+ TEST_ASSERT_EQUAL("slots event and topdown metrics events in two groups",
+ ret, TEST_OK);
+ ret = test_sort("{instructions,slots},cycles,topdown-retiring", 2, 1);
+ TEST_ASSERT_EQUAL("slots event and metrics event are not in a group and not adjacent",
+ ret, TEST_OK);
+
+ return TEST_OK;
+}
+
+static int test__x86_topdown_slots_injection(struct test_suite *test __maybe_unused,
+ int subtest __maybe_unused)
+{
+ int ret;
+
+ if (!topdown_sys_has_perf_metrics())
+ return TEST_OK;
+
+ ret = test_sort("{instructions,topdown-retiring}", 3, 2);
+ TEST_ASSERT_EQUAL("all events in a group", ret, TEST_OK);
+ ret = test_sort("instructions,topdown-retiring", 2, 1);
+ TEST_ASSERT_EQUAL("all events not in a group", ret, TEST_OK);
+ ret = test_sort("{instructions},topdown-retiring", 2, 1);
+ TEST_ASSERT_EQUAL("event in a group but topdown metrics events outside the group",
+ ret, TEST_OK);
+ ret = test_sort("{instructions},{topdown-retiring}", 2, 1);
+ TEST_ASSERT_EQUAL("event and topdown metrics events in two groups",
+ ret, TEST_OK);
+ ret = test_sort("{instructions},cycles,topdown-retiring", 2, 1);
+ TEST_ASSERT_EQUAL("event and metrics event are not in a group and not adjacent",
+ ret, TEST_OK);
+
+ return TEST_OK;
+}
+
+static struct test_case x86_topdown_tests[] = {
+ TEST_CASE("topdown events", x86_topdown),
+ TEST_CASE("topdown sorting", x86_topdown_sorting),
+ TEST_CASE("topdown slots injection", x86_topdown_slots_injection),
+ { .name = NULL, }
+};
+
+struct test_suite suite__x86_topdown = {
+ .desc = "x86 topdown",
+ .test_cases = x86_topdown_tests,
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0543/2151] perf topdown: Dont require config1==0 for a slots event
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (541 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0542/2151] perf arch x86 tests: Add test for topdown event sorting Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0544/2151] dt-bindings: vendor-prefixes: add ESS Technology Greg Kroah-Hartman
` (339 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dapeng Mi, Ian Rogers, Zide Chen,
Namhyung Kim, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zide Chen <zide.chen@intel.com>
[ Upstream commit 0824af00a8d2ede0d8bc70bdc0b493ecfd167900 ]
arch_is_topdown_slots() requires config1 == 0, so it misidentified
"cpu/slots,metrics_clear=1/" as not being the slots event, and an
additional slots event gets inserted, which fails event scheduling
since the group now needs two fixed counter 3.
$ perf stat -e "{cpu/slots,metrics_clear=1/,cpu/topdown-retiring/}" -- sleep 1
WARNING: events were regrouped to match PMUs
<not counted> slots
<not supported> cpu/slots,metrics_clear=1/
<not counted> cpu/topdown-retiring/
Drop the config1 == 0 check from arch_is_topdown_slots(). This is
safe: config1 has no bearing on the event's identifying config value
(TOPDOWN_SLOTS, 0x0400).
The attr.type == PERF_TYPE_RAW check is what actually matters: only the
core PMU is registered with PERF_TYPE_RAW, and on x86, 0x400 is
guaranteed to be slots event on core CPU.
arch_is_topdown_metrics() keeps its own config1 == 0 check, since
genuine metrics events have no "metrics_clear" and config1 remains 0.
Add a test verifying that an explicit "slots,metrics_clear=1" event in
a group does not trigger an extra slots event injection.
Fixes: 5b546de9cc177936 ("perf topdown: Use attribute to see an event is a topdown metic or slots")
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
[ Add missing stdio.h and string.h as noticed by Sashiko ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/arch/x86/tests/topdown.c | 30 +++++++++++++++++++++++++++++
tools/perf/arch/x86/util/topdown.c | 3 +--
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/tools/perf/arch/x86/tests/topdown.c b/tools/perf/arch/x86/tests/topdown.c
index 221f2c4bbb615..2ccbfa0ebbb41 100644
--- a/tools/perf/arch/x86/tests/topdown.c
+++ b/tools/perf/arch/x86/tests/topdown.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
+#include <stdio.h>
+#include <string.h>
#include "arch-tests.h"
#include "../util/topdown.h"
#include "debug.h"
@@ -229,10 +231,38 @@ static int test__x86_topdown_slots_injection(struct test_suite *test __maybe_unu
return TEST_OK;
}
+/*
+ * An explicit "slots,metrics_clear=1" event is still the slots event and
+ * must not cause an extra slots event to be injected into the group.
+ */
+static int test__x86_topdown_metrics_clear(struct test_suite *test __maybe_unused,
+ int subtest __maybe_unused)
+{
+ struct perf_pmu *pmu;
+ char event_str[128];
+ int ret;
+
+ if (!topdown_sys_has_perf_metrics())
+ return TEST_OK;
+
+ pmu = perf_pmus__find_by_type(PERF_TYPE_RAW);
+ if (!pmu || !perf_pmu__has_format(pmu, "metrics_clear"))
+ return TEST_OK;
+
+ snprintf(event_str, sizeof(event_str),
+ "{%s/slots,metrics_clear=1/,%s/topdown-retiring/}",
+ pmu->name, pmu->name);
+ ret = test_sort(event_str, 2, 1);
+ TEST_ASSERT_EQUAL("explicit metrics_clear slots event isn't duplicated", ret, TEST_OK);
+
+ return TEST_OK;
+}
+
static struct test_case x86_topdown_tests[] = {
TEST_CASE("topdown events", x86_topdown),
TEST_CASE("topdown sorting", x86_topdown_sorting),
TEST_CASE("topdown slots injection", x86_topdown_slots_injection),
+ TEST_CASE("topdown metrics_clear no extra slots", x86_topdown_metrics_clear),
{ .name = NULL, }
};
diff --git a/tools/perf/arch/x86/util/topdown.c b/tools/perf/arch/x86/util/topdown.c
index bafd285119d7a..64bc64e335a2a 100644
--- a/tools/perf/arch/x86/util/topdown.c
+++ b/tools/perf/arch/x86/util/topdown.c
@@ -37,8 +37,7 @@ bool topdown_sys_has_perf_metrics(void)
bool arch_is_topdown_slots(const struct evsel *evsel)
{
return evsel->core.attr.type == PERF_TYPE_RAW &&
- evsel->core.attr.config == TOPDOWN_SLOTS &&
- evsel->core.attr.config1 == 0;
+ evsel->core.attr.config == TOPDOWN_SLOTS;
}
bool arch_is_topdown_metrics(const struct evsel *evsel)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0544/2151] dt-bindings: vendor-prefixes: add ESS Technology
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (542 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0543/2151] perf topdown: Dont require config1==0 for a slots event Greg Kroah-Hartman
@ 2026-11-18 14:37 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0545/2151] clk: raspberrypi: Handle cpufreq device registration failure Greg Kroah-Hartman
` (338 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:37 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Asseily, Krzysztof Kozlowski,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Asseily <karl@asseily.com>
[ Upstream commit beb56d1d3de522885b30bb97fee83825041d65c2 ]
Add the vendor prefix for ESS Technology, Inc., maker of the SABRE family
of audio DACs. The prefix follows the company's domain, esstech.com.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Karl Asseily <karl@asseily.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260918182317.143223-2-karl@asseily.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index a9cf85fd6fbec..6de8d02320b52 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -527,6 +527,8 @@ patternProperties:
description: Seiko Epson Corp.
"^esp,.*":
description: Espressif Systems Co. Ltd.
+ "^esstech,.*":
+ description: ESS Technology, Inc.
"^est,.*":
description: ESTeem Wireless Modems
"^eswin,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0545/2151] clk: raspberrypi: Handle cpufreq device registration failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (543 preceding siblings ...)
2026-11-18 14:37 ` [PATCH 6.18 0544/2151] dt-bindings: vendor-prefixes: add ESS Technology Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0546/2151] clk: versatile: clk-icst: Fix node reference leak in of_syscon_icst_setup() Greg Kroah-Hartman
` (337 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Triet Hoang, Stefan Wahren,
Brian Masney, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Triet Hoang <triet.hoang.dev@gmail.com>
[ Upstream commit e98e3d712023859af7cd78bb7fdb87ea3a9ffb83 ]
Check the return value of platform_device_register_data() when
registering the raspberrypi-cpufreq device and propagate the error
if registration fails.
This prevents the clock driver from reporting a successful probe
when the cpufreq device could not be registered.
Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Fixes: e2bb18347c8e5 ("clk: raspberrypi: register platform device for raspberrypi-cpufreq")
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/bcm/clk-raspberrypi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index 1a9162f0ae31e..eb08dcf7f827f 100644
--- a/drivers/clk/bcm/clk-raspberrypi.c
+++ b/drivers/clk/bcm/clk-raspberrypi.c
@@ -516,6 +516,8 @@ static int raspberrypi_clk_probe(struct platform_device *pdev)
rpi->cpufreq = platform_device_register_data(dev, "raspberrypi-cpufreq",
-1, NULL, 0);
+ if (IS_ERR(rpi->cpufreq))
+ return PTR_ERR(rpi->cpufreq);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0546/2151] clk: versatile: clk-icst: Fix node reference leak in of_syscon_icst_setup()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (544 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0545/2151] clk: raspberrypi: Handle cpufreq device registration failure Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0547/2151] clk: starfive: jh7110: reject oscillator lookup errors Greg Kroah-Hartman
` (336 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wentao Liang, Linus Walleij,
Brian Masney, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <vulab@iscas.ac.cn>
[ Upstream commit c90a50d07f0c38c62ce13a60806ab5e3b841f70f ]
of_get_parent() takes a reference on the syscon parent node. The
reference is intentionally kept on the success path, but the error paths
return without dropping it, leaking the node reference. Release the
reference before returning on the error paths.
Fixes: d430819d69a5 ("clk: versatile-icst: add device tree support")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/versatile/clk-icst.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index 86ca04ad9fab0..8d198ab248402 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -516,16 +516,19 @@ static void __init of_syscon_icst_setup(struct device_node *np)
map = syscon_node_to_regmap(parent);
if (IS_ERR(map)) {
pr_err("no regmap for syscon ICST clock parent\n");
+ of_node_put(parent);
return;
}
if (of_property_read_u32(np, "reg", &icst_desc.vco_offset) &&
of_property_read_u32(np, "vco-offset", &icst_desc.vco_offset)) {
pr_err("no VCO register offset for ICST clock\n");
+ of_node_put(parent);
return;
}
if (of_property_read_u32(np, "lock-offset", &icst_desc.lock_offset)) {
pr_err("no lock register offset for ICST clock\n");
+ of_node_put(parent);
return;
}
@@ -552,6 +555,7 @@ static void __init of_syscon_icst_setup(struct device_node *np)
ctype = ICST_INTEGRATOR_CP_CM_MEM;
} else {
pr_err("unknown ICST clock %pOF\n", np);
+ of_node_put(parent);
return;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0547/2151] clk: starfive: jh7110: reject oscillator lookup errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (545 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0546/2151] clk: versatile: clk-icst: Fix node reference leak in of_syscon_icst_setup() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0548/2151] bpf, lsm: Reject writes into the BPF LSM program context Greg Kroah-Hartman
` (335 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Slavin Liu, Brian Masney,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Slavin Liu <bolin.liu@seu.edu.cn>
[ Upstream commit 54d0b6903921d121fa750546f2b38cc3f5c7e64f ]
Clock lookup may fail while allocating a consumer reference. Return
a notifier error rather than passing ERR_PTR as the new clock parent.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: 538d5477b252 ("clk: starfive: jh7110-sys: Add notifier for PLL0 clock")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/starfive/clk-starfive-jh7110-sys.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/starfive/clk-starfive-jh7110-sys.c b/drivers/clk/starfive/clk-starfive-jh7110-sys.c
index 52833d4241c5f..39a95a32e9a02 100644
--- a/drivers/clk/starfive/clk-starfive-jh7110-sys.c
+++ b/drivers/clk/starfive/clk-starfive-jh7110-sys.c
@@ -390,6 +390,9 @@ static int jh7110_pll0_clk_notifier_cb(struct notifier_block *nb,
if (action == PRE_RATE_CHANGE) {
struct clk *osc = clk_get(priv->dev, "osc");
+ if (IS_ERR(osc))
+ return notifier_from_errno(PTR_ERR(osc));
+
priv->original_clk = clk_get_parent(cpu_root);
ret = clk_set_parent(cpu_root, osc);
clk_put(osc);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0548/2151] bpf, lsm: Reject writes into the BPF LSM program context
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (546 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0547/2151] clk: starfive: jh7110: reject oscillator lookup errors Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0549/2151] pinctrl: fix PINCTRL_SPPCTL=m Greg Kroah-Hartman
` (334 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Borkmann, Alexei Starovoitov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <daniel@iogearbox.net>
[ Upstream commit c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1 ]
The verifier types a load from a tracing-style context by its offset
alone: btf_ctx_access() looks the offset up in the attach hook's
prototype, and check_mem_access() stamps the resulting type onto the
destination register. Nothing tracks what the slot actually holds.
That is sound only as long as the context is read-only, and for BPF LSM
it is not. lsm_verifier_ops wires ->is_valid_access() straight to
btf_ctx_access(), which never looks at enum bpf_access_type, so a store
into the context passes verification. Every other user of the helper
either goes through bpf_tracing_btf_ctx_access() or open-codes the same
type != BPF_READ test first; BPF LSM is the only one that does neither.
A program can therefore store a scalar of its choosing into a context
slot, read the slot back, and get a register the verifier believes is a
trusted pointer of the hook's argument type. Handing that to a kfunc or
helper which dereferences a trusted argument turns it into an arbitrary
kernel access. Route BPF LSM through bpf_tracing_btf_ctx_access() like
everyone else.
Fixes: fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20260915150739.284189-3-daniel@iogearbox.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/bpf_lsm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c
index 48876fe838ab9..116c91680cc7a 100644
--- a/kernel/bpf/bpf_lsm.c
+++ b/kernel/bpf/bpf_lsm.c
@@ -408,8 +408,8 @@ const struct bpf_prog_ops lsm_prog_ops = {
};
const struct bpf_verifier_ops lsm_verifier_ops = {
- .get_func_proto = bpf_lsm_func_proto,
- .is_valid_access = btf_ctx_access,
+ .get_func_proto = bpf_lsm_func_proto,
+ .is_valid_access = bpf_tracing_btf_ctx_access,
};
/* hooks return 0 or 1 */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0549/2151] pinctrl: fix PINCTRL_SPPCTL=m
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (547 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0548/2151] bpf, lsm: Reject writes into the BPF LSM program context Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0550/2151] fs/ntfs3: check INDEX_ROOT resident size before use in ntfs_read_mft() Greg Kroah-Hartman
` (333 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrew Gaylard, Linus Walleij,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Gaylard <ag@ffroot.co.za>
[ Upstream commit 7dcf87d2dbbe8c9c1efb69fe9be728a3dfd51d3d ]
The PINCTRL_SPPCTL option is defined as a tristate in Kconfig, and the
help text suggests that the user can build it as a module by setting to
'm'.
However, it cannot currently be set to 'm', because SOC_SP7021, the only
platform that supports it, is a bool option that uses 'select' on it.
Also, the SP7021 requires this driver to be built in, in order to boot.
Change the tristate to bool and fix the help text.
Tested on linux-next-2026-09-14 on a LTPP3G2 board.
This impossible tristate was detected by kconfirm, a static analysis tool
for Kconfig, by Julian Braha <julianbraha@gmail.com>.
Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021")
Signed-off-by: Andrew Gaylard <ag@ffroot.co.za>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pinctrl/sunplus/Kconfig | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/sunplus/Kconfig b/drivers/pinctrl/sunplus/Kconfig
index 4b5c47c193d97..a359fdbda1b3a 100644
--- a/drivers/pinctrl/sunplus/Kconfig
+++ b/drivers/pinctrl/sunplus/Kconfig
@@ -4,8 +4,8 @@
#
config PINCTRL_SPPCTL
- tristate "Sunplus SP7021 PinMux and GPIO driver"
- depends on SOC_SP7021
+ bool "Sunplus SP7021 PinMux and GPIO driver"
+ depends on SOC_SP7021 || COMPILE_TEST
depends on OF && HAS_IOMEM
select GENERIC_PINCTRL_GROUPS
select GENERIC_PINMUX_FUNCTIONS
@@ -17,6 +17,4 @@ config PINCTRL_SPPCTL
help
Say Y here to support Sunplus SP7021 pinmux controller.
This driver requires the pinctrl framework.
- GPIO is provided by the same driver.
- To compile this driver as a module, choose M here.
- The module will be called sppinctrl.
+ This driver also provides GPIO.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0550/2151] fs/ntfs3: check INDEX_ROOT resident size before use in ntfs_read_mft()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (548 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0549/2151] pinctrl: fix PINCTRL_SPPCTL=m Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0551/2151] fs/ntfs3: fix valid_size not being updated in attr_allocate_frame() Greg Kroah-Hartman
` (332 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, AutonomousCodeSecurity,
Xiang Mei (Microsoft), Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei (Microsoft) <xmei5@asu.edu>
[ Upstream commit d0ac69ce3af4dbae01d4f064b7482f0c5440dbde ]
When ntfs_read_mft() parses an ATTR_ROOT attribute it computes
root = Add2Ptr(attr, roff);
using the on-disk resident data offset (roff = attr->res.data_off) and
then dereferences root->type and root->rule, and later passes root on to
indx_init(). Unlike the ATTR_STD and ATTR_NAME cases, which validate that
the resident data is large enough (asize >= sizeof(struct X) + roff and
rsize >= sizeof(struct X)) before accessing it, the ATTR_ROOT case has no
such check.
mi_enum_attr() only guarantees data_off + data_size <= attribute size, so
a crafted image can set data_off such that root lands at (or past) the end
of the MFT record's slab allocation while still passing that check (e.g.
data_size == 0). The subsequent read of root->type is then a
slab-out-of-bounds read, reported by KASAN when mounting the image:
BUG: KASAN: slab-out-of-bounds in ntfs_iget5 (fs/ntfs3/inode.c:283)
Read of size 4 at addr ffff88800c06a400 by task exploit/142
Call Trace:
... [KASAN report internals]
ntfs_iget5 (fs/ntfs3/inode.c:283 fs/ntfs3/inode.c:542)
ntfs_fill_super (fs/ntfs3/super.c:1690)
get_tree_bdev_flags (fs/super.c:1634)
vfs_get_tree (fs/super.c:1694)
fc_mount (fs/namespace.c:1198)
path_mount (fs/namespace.c:3765 ...)
__x64_sys_mount (fs/namespace.c:4174 ...)
do_syscall_64 (arch/x86/entry/syscall_64.c:63)
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
The buggy address is located 0 bytes to the right of
allocated 1024-byte region [ffff88800c06a000, ffff88800c06a400)
which belongs to the cache kmalloc-1k of size 1024
Validate the resident data size in the ATTR_ROOT case the same way the
neighbouring cases do, so that a truncated or mis-offset INDEX_ROOT is
rejected before root is dereferenced.
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Reported-by: AutonomousCodeSecurity@microsoft.com
Signed-off-by: Xiang Mei (Microsoft) <xmei5@asu.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/inode.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index e9ac5c5c7239d..bad5d16fed2c1 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -283,7 +283,9 @@ static struct inode *ntfs_read_mft(struct inode *inode,
break;
case ATTR_ROOT:
- if (attr->non_res)
+ if (attr->non_res ||
+ asize < sizeof(struct INDEX_ROOT) + roff ||
+ rsize < sizeof(struct INDEX_ROOT))
goto out;
root = Add2Ptr(attr, roff);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0551/2151] fs/ntfs3: fix valid_size not being updated in attr_allocate_frame()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (549 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0550/2151] fs/ntfs3: check INDEX_ROOT resident size before use in ntfs_read_mft() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0552/2151] fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea Greg Kroah-Hartman
` (331 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zhan Xusheng, Konstantin Komarov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhan Xusheng <zhanxusheng1024@gmail.com>
[ Upstream commit a1972501ffb15313f7ae598989bb2cd32829e625 ]
At the end of attr_allocate_frame() the on-disk valid_size is meant to be
updated to the value passed in via @new_valid:
valid_size = le64_to_cpu(attr_b->nres.valid_size);
if (new_valid != valid_size) {
attr_b->nres.valid_size = cpu_to_le64(valid_size);
mi_b->dirty = true;
}
but it writes back the old valid_size that was just read instead of
new_valid, so the field is never actually changed even though the record
is marked dirty -- the intended update is a no-op.
ni_update_parent() spells the same read-compare-write out correctly a few
hundred lines away, storing the newly derived value:
valid_le = cpu_to_le64(new_valid);
if (valid_le != attr->nres.valid_size) {
attr->nres.valid_size = valid_le;
In practice that path, reached from ni_write_inode(), re-derives
nres.valid_size from ni->i_valid on inode write-back, which normally masks
this, so the visible impact is limited. The assignment here is still
wrong though; store @new_valid as intended.
Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/attrib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index e500f7be8cc38..4e348c0f813e1 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -1868,7 +1868,7 @@ int attr_allocate_frame(struct ntfs_inode *ni, CLST frame, size_t compr_size,
valid_size = le64_to_cpu(attr_b->nres.valid_size);
if (new_valid != valid_size) {
- attr_b->nres.valid_size = cpu_to_le64(valid_size);
+ attr_b->nres.valid_size = cpu_to_le64(new_valid);
mi_b->dirty = true;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0552/2151] fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (550 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0551/2151] fs/ntfs3: fix valid_size not being updated in attr_allocate_frame() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0553/2151] fs/ntfs3: validate $SDH entry size in ntfs_insert_security Greg Kroah-Hartman
` (330 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Weiming Shi, Xiang Mei,
Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
[ Upstream commit 01e56820ef52d14a5560fb7c0c6f2f75ef6f9393 ]
In ntfs_read_ea(), the ef->size branch only checks that the declared
entry size fits the remaining buffer; unlike the zero-size branch it
never verifies that the entry's own name and value fit inside ef->size.
A crafted image can thus present an in-bounds ef->size with an arbitrary
elength, which find_ea()/ntfs_get_ea() later use as the memcpy length,
reading past the allocation and leaking adjacent heap memory:
BUG: KASAN: slab-out-of-bounds in ntfs_get_ea (fs/ntfs3/xattr.c:302)
Read of size 65535 at addr ffff888010770b0f by task exploit/142
...
__asan_memcpy (mm/kasan/shadow.c:105)
ntfs_get_ea (fs/ntfs3/xattr.c:302)
ntfs_getxattr (fs/ntfs3/xattr.c:848)
__vfs_getxattr (fs/xattr.c:446)
vfs_getxattr (fs/xattr.c:479)
do_getxattr (fs/xattr.c:808)
filename_getxattr (fs/xattr.c:837)
path_getxattrat (fs/xattr.c:876)
do_syscall_64 (arch/x86/entry/syscall_64.c:94)
...
The buggy address is located 15 bytes inside of
allocated 20-byte region, cache kmalloc-32
Validate the name/value layout in the ef->size branch too, bounding it
against ef->size, as the zero-size branch validates it against the
buffer.
Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations")
Reported-by: Weiming Shi <bestswngs@gmail.com>
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Xiang Mei <xmei5@asu.edu>
[almaz.alexandrovich@paragon-software.com: remove duplicate check of need > ea_size]
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/xattr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
index d25de94b878ea..317f56f2c533e 100644
--- a/fs/ntfs3/xattr.c
+++ b/fs/ntfs3/xattr.c
@@ -168,6 +168,8 @@ static int ntfs_read_ea(struct ntfs_inode *ni, struct EA_FULL **ea,
ea_size = le32_to_cpu(ef->size);
if (ea_size > bytes || packed_size > ea_size)
goto out1;
+ if (bytes < offsetof(struct EA_FULL, name))
+ goto out1;
continue;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0553/2151] fs/ntfs3: validate $SDH entry size in ntfs_insert_security
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (551 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0552/2151] fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0554/2151] pmdomain: imx: Propagate SCU provider registration failures Greg Kroah-Hartman
` (329 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Weiming Shi, Xiang Mei,
Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei <xmei5@asu.edu>
[ Upstream commit 5b76487f94dacc2884135ce9a7bda61ce7ffa209 ]
ntfs_insert_security() walks the $Secure::$SDH index and reads
e->sec_hdr.size for every entry returned by indx_find()/indx_find_sort().
Those only guarantee the NTFS_DE envelope (e->size), so a crafted $SDH
entry shorter than a full NTFS_DE_SDH at the tail of an index buffer makes
the read of e->sec_hdr.size run past the allocation. Triggerable by an
unprivileged setxattr(2) on a crafted NTFS image.
BUG: KASAN: slab-out-of-bounds in ntfs_insert_security (fs/ntfs3/fsntfs.c:2148)
Read of size 4 at addr ffff88800fa1de00 by task exploit/142
ntfs_insert_security (fs/ntfs3/fsntfs.c:2148)
ntfs_setxattr (fs/ntfs3/xattr.c:947)
__vfs_setxattr (fs/xattr.c:223)
__vfs_setxattr_noperm (fs/xattr.c:257)
vfs_setxattr (fs/xattr.c:344)
filename_setxattr (fs/xattr.c:690)
path_setxattrat (fs/xattr.c:734)
__x64_sys_setxattr (fs/xattr.c:764)
[...]
The buggy address is located 0 bytes to the right of
allocated 512-byte region [ffff88800fa1dc00, ffff88800fa1de00)
Stop the scan when an entry is too small to hold a SECURITY_HDR.
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Reported-by: Weiming Shi <bestswngs@gmail.com>
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/fsntfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
index 5e3506815c279..5bb66ad2513ad 100644
--- a/fs/ntfs3/fsntfs.c
+++ b/fs/ntfs3/fsntfs.c
@@ -2136,6 +2136,9 @@ int ntfs_insert_security(struct ntfs_sb_info *sbi,
goto out;
while (e) {
+ if (le16_to_cpu(e->de.size) < SIZEOF_SDH_DIRENTRY)
+ break;
+
if (le32_to_cpu(e->sec_hdr.size) == new_sec_size) {
err = ntfs_read_run_nb(sbi, &ni->file.run,
le64_to_cpu(e->sec_hdr.off),
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0554/2151] pmdomain: imx: Propagate SCU provider registration failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (552 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0553/2151] fs/ntfs3: validate $SDH entry size in ntfs_insert_security Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0555/2151] dt-bindings: vendor-prefixes: add vendor prefix for Nexperia B.V Greg Kroah-Hartman
` (328 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Ulf Hansson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit d3efba7921f3ebebd91fc481910a428c78414fd8 ]
imx_scu_init_pm_domains() ignores of_genpd_add_provider_onecell() and
returns success even when none of the initialized domains are published to
DT consumers.
Return the provider error and remove the initialized domains in reverse
order before devm releases their backing storage on probe failure.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: c800cd7824bd ("firmware: imx: add SCU power domain driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pmdomain/imx/scu-pd.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/pmdomain/imx/scu-pd.c b/drivers/pmdomain/imx/scu-pd.c
index 3ec33667a308c..41dd45b48a762 100644
--- a/drivers/pmdomain/imx/scu-pd.c
+++ b/drivers/pmdomain/imx/scu-pd.c
@@ -474,7 +474,7 @@ static int imx_scu_init_pm_domains(struct device *dev,
struct genpd_onecell_data *pd_data;
struct imx_sc_pm_domain *sc_pd;
u32 count = 0;
- int i, j;
+ int i, j, ret;
for (i = 0; i < pd_soc->num_ranges; i++)
count += pd_ranges[i].num;
@@ -503,7 +503,13 @@ static int imx_scu_init_pm_domains(struct device *dev,
pd_data->num_domains = count;
pd_data->xlate = imx_scu_pd_xlate;
- of_genpd_add_provider_onecell(dev->of_node, pd_data);
+ ret = of_genpd_add_provider_onecell(dev->of_node, pd_data);
+ if (ret) {
+ while (count)
+ pm_genpd_remove(domains[--count]);
+
+ return ret;
+ }
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0555/2151] dt-bindings: vendor-prefixes: add vendor prefix for Nexperia B.V.
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (553 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0554/2151] pmdomain: imx: Propagate SCU provider registration failures Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0556/2151] thermal: renesas: rzg3e: make min and max temperature per-chip Greg Kroah-Hartman
` (327 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Neil Armstrong, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <neil.armstrong@linaro.org>
[ Upstream commit 819a3e62d37a2fe73c1e7f241f2ac086042e7757 ]
Document the vendor prefix for the semiconductor company Nexperia B.V.
The company website is https://www.nexperia.com/
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260921-topic-sm8x50-nex10000ub-v2-1-eeeaf9b0c913@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 6de8d02320b52..61490f3e31498 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1122,6 +1122,8 @@ patternProperties:
description: New Vision Display (Shenzhen) Co., Ltd.
"^nexbox,.*":
description: Nexbox
+ "^nexperia,.*":
+ description: Nexperia B.V.
"^nextthing,.*":
description: Next Thing Co.
"^ni,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0556/2151] thermal: renesas: rzg3e: make min and max temperature per-chip
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (554 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0555/2151] dt-bindings: vendor-prefixes: add vendor prefix for Nexperia B.V Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0557/2151] drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code() Greg Kroah-Hartman
` (326 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, John Madieu,
Cosmin Tanislav, Daniel Lezcano, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
[ Upstream commit 6c7f87f517d3704a3fcc3b1c7f4220c2fcf75322 ]
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have
different minimum and maximum temperatures compared to the already
supported RZ/G3E.
Prepare for them by moving these into a chip-specific struct.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Link: https://patch.msgid.link/20260108195223.193531-3-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Stable-dep-of: 84f0e14e6261 ("drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/renesas/rzg3e_thermal.c | 35 ++++++++++++++++---------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index e66d73ca67527..246ff368b0346 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -62,8 +62,6 @@
#define TSU_SICR_CMPCLR BIT(1)
/* Temperature calculation constants from datasheet */
-#define TSU_TEMP_D (-41)
-#define TSU_TEMP_E 126
#define TSU_CODE_MAX 0xFFF
/* Timing specifications from datasheet */
@@ -72,6 +70,11 @@
#define TSU_POLL_DELAY_US 10 /* Polling interval */
#define TSU_MIN_CLOCK_RATE 24000000 /* TSU_PCLK minimum 24MHz */
+struct rzg3e_thermal_info {
+ int temp_d_mc;
+ int temp_e_mc;
+};
+
/**
* struct rzg3e_thermal_priv - RZ/G3E TSU private data
* @base: TSU register base
@@ -79,6 +82,7 @@
* @syscon: regmap for calibration values
* @zone: thermal zone device
* @rstc: reset control
+ * @info: chip type specific information
* @trmval0: calibration value 0 (b)
* @trmval1: calibration value 1 (c)
* @trim_offset: offset for trim registers in syscon
@@ -90,6 +94,7 @@ struct rzg3e_thermal_priv {
struct regmap *syscon;
struct thermal_zone_device *zone;
struct reset_control *rstc;
+ const struct rzg3e_thermal_info *info;
u16 trmval0;
u16 trmval1;
u32 trim_offset;
@@ -161,17 +166,17 @@ static void rzg3e_thermal_power_off(struct rzg3e_thermal_priv *priv)
*/
static int rzg3e_thermal_code_to_temp(struct rzg3e_thermal_priv *priv, u16 code)
{
- int temp_e_mc = TSU_TEMP_E * MILLIDEGREE_PER_DEGREE;
- int temp_d_mc = TSU_TEMP_D * MILLIDEGREE_PER_DEGREE;
+ const struct rzg3e_thermal_info *info = priv->info;
s64 numerator, denominator;
int temp_mc;
- numerator = (temp_e_mc - temp_d_mc) * (s64)(code - priv->trmval0);
+ numerator = (info->temp_e_mc - info->temp_d_mc) *
+ (s64)(code - priv->trmval0);
denominator = priv->trmval1 - priv->trmval0;
- temp_mc = div64_s64(numerator, denominator) + temp_d_mc;
+ temp_mc = div64_s64(numerator, denominator) + info->temp_d_mc;
- return clamp(temp_mc, temp_d_mc, temp_e_mc);
+ return clamp(temp_mc, info->temp_d_mc, info->temp_e_mc);
}
/*
@@ -180,13 +185,12 @@ static int rzg3e_thermal_code_to_temp(struct rzg3e_thermal_priv *priv, u16 code)
*/
static u16 rzg3e_thermal_temp_to_code(struct rzg3e_thermal_priv *priv, int temp_mc)
{
- int temp_e_mc = TSU_TEMP_E * MILLIDEGREE_PER_DEGREE;
- int temp_d_mc = TSU_TEMP_D * MILLIDEGREE_PER_DEGREE;
+ const struct rzg3e_thermal_info *info = priv->info;
s64 numerator, denominator;
s64 code;
- numerator = (temp_mc - temp_d_mc) * (priv->trmval1 - priv->trmval0);
- denominator = temp_e_mc - temp_d_mc;
+ numerator = (temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0);
+ denominator = info->temp_e_mc - info->temp_d_mc;
code = div64_s64(numerator, denominator) + priv->trmval0;
@@ -392,6 +396,8 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
return ret;
platform_set_drvdata(pdev, priv);
+ priv->info = device_get_match_data(dev);
+
priv->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
@@ -526,8 +532,13 @@ static const struct dev_pm_ops rzg3e_thermal_pm_ops = {
SYSTEM_SLEEP_PM_OPS(rzg3e_thermal_suspend, rzg3e_thermal_resume)
};
+static const struct rzg3e_thermal_info rzg3e_thermal_info = {
+ .temp_d_mc = -41000,
+ .temp_e_mc = 126000,
+};
+
static const struct of_device_id rzg3e_thermal_dt_ids[] = {
- { .compatible = "renesas,r9a09g047-tsu" },
+ { .compatible = "renesas,r9a09g047-tsu", .data = &rzg3e_thermal_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzg3e_thermal_dt_ids);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0557/2151] drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (555 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0556/2151] thermal: renesas: rzg3e: make min and max temperature per-chip Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0558/2151] thermal: renesas: rzg3e: make calibration value retrieval per-chip Greg Kroah-Hartman
` (325 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ovidiu Panait, Daniel Lezcano,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
[ Upstream commit 84f0e14e6261ef718e6a8583073097ad9ea70e14 ]
The thermal core passes -INT_MAX/INT_MAX as low/high trip points, which
the driver then converts to code values for programming the registers:
numerator = (temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0);
Although 'numerator' is defined as s64, the arithmetic is performed as int.
Because of this, the multiplication overflows for -INT_MAX and, because
temp_d_mc is negative, the subtraction overflows for INT_MAX.
To fix this, cast the temperature to s64, so that the arithmetic is
performed as s64.
Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC")
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260916120003.87018-2-ovidiu.panait.rb@renesas.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/renesas/rzg3e_thermal.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 246ff368b0346..53fabda23244a 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -189,7 +189,12 @@ static u16 rzg3e_thermal_temp_to_code(struct rzg3e_thermal_priv *priv, int temp_
s64 numerator, denominator;
s64 code;
- numerator = (temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0);
+ /*
+ * Perform the arithmetic in 64 bits so that it cannot overflow for
+ * -INT_MAX/INT_MAX values passed from the thermal core or when
+ * userspace writes arbitrary trip point temperatures.
+ */
+ numerator = ((s64)temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0);
denominator = info->temp_e_mc - info->temp_d_mc;
code = div64_s64(numerator, denominator) + priv->trmval0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0558/2151] thermal: renesas: rzg3e: make calibration value retrieval per-chip
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (556 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0557/2151] drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0559/2151] thermal: renesas: rzg3e: Remove stale @trim_offset kernel-doc entry Greg Kroah-Hartman
` (324 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, John Madieu, Cosmin Tanislav,
Geert Uytterhoeven, Daniel Lezcano, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
[ Upstream commit c33edd8f936ccf2e47eb1883f6b6944643d325c7 ]
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the
temperature calibration data via SMC SIP calls.
To prepare for supporting these SoCs, do the following changes.
Rename rzg3e_thermal_parse_dt() to rzg3e_thermal_get_syscon_trim().
Move the syscon usage out of rzg3e_thermal_get_calibration() and into
rzg3e_thermal_get_syscon_trim() and remove single-use variables from the
private state.
Place a pointer to rzg3e_thermal_get_syscon_trim() into the
chip-specific struct, and use it in the probe function to retrieve the
calibration values.
Now that syscon usage has been moved out of
rzg3e_thermal_get_calibration(), remove it and inline the calibration
validation into the probe function.
Also, reuse the TSU_CODE_MAX macro to mask the calibration values, as
GEMASK(11, 0) and 0xFFF are equivalent, and replace the hardcoded 0xFFF
with TSU_CODE_MAX in the calibration validation.
Reviewed-by: John Madieu <john.madieu.xa@bp.renesas.com>
Tested-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260108195223.193531-4-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Stable-dep-of: aa1bc39e45f2 ("thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/renesas/rzg3e_thermal.c | 71 ++++++++++---------------
1 file changed, 29 insertions(+), 42 deletions(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 53fabda23244a..fc42be7f91355 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -70,7 +70,10 @@
#define TSU_POLL_DELAY_US 10 /* Polling interval */
#define TSU_MIN_CLOCK_RATE 24000000 /* TSU_PCLK minimum 24MHz */
+struct rzg3e_thermal_priv;
+
struct rzg3e_thermal_info {
+ int (*get_trim)(struct rzg3e_thermal_priv *priv);
int temp_d_mc;
int temp_e_mc;
};
@@ -91,13 +94,11 @@ struct rzg3e_thermal_info {
struct rzg3e_thermal_priv {
void __iomem *base;
struct device *dev;
- struct regmap *syscon;
struct thermal_zone_device *zone;
struct reset_control *rstc;
const struct rzg3e_thermal_info *info;
u16 trmval0;
u16 trmval1;
- u32 trim_offset;
struct mutex lock;
};
@@ -339,51 +340,33 @@ static const struct thermal_zone_device_ops rzg3e_tz_ops = {
.set_trips = rzg3e_thermal_set_trips,
};
-static int rzg3e_thermal_get_calibration(struct rzg3e_thermal_priv *priv)
+static int rzg3e_thermal_get_syscon_trim(struct rzg3e_thermal_priv *priv)
{
- u32 val;
+ struct device_node *np = priv->dev->of_node;
+ struct regmap *syscon;
+ u32 offset;
int ret;
+ u32 val;
+
+ syscon = syscon_regmap_lookup_by_phandle_args(np, "renesas,tsu-trim", 1, &offset);
+ if (IS_ERR(syscon))
+ return dev_err_probe(priv->dev, PTR_ERR(syscon),
+ "Failed to parse renesas,tsu-trim\n");
/* Read calibration values from syscon */
- ret = regmap_read(priv->syscon, priv->trim_offset, &val);
+ ret = regmap_read(syscon, offset, &val);
if (ret)
return ret;
- priv->trmval0 = val & GENMASK(11, 0);
+ priv->trmval0 = val & TSU_CODE_MAX;
- ret = regmap_read(priv->syscon, priv->trim_offset + 4, &val);
+ ret = regmap_read(syscon, offset + 4, &val);
if (ret)
return ret;
- priv->trmval1 = val & GENMASK(11, 0);
-
- /* Validate calibration data */
- if (!priv->trmval0 || !priv->trmval1 ||
- priv->trmval0 == priv->trmval1 ||
- priv->trmval0 == 0xFFF || priv->trmval1 == 0xFFF) {
- dev_err(priv->dev, "Invalid calibration: b=0x%03x, c=0x%03x\n",
- priv->trmval0, priv->trmval1);
- return -EINVAL;
- }
-
- dev_dbg(priv->dev, "Calibration: b=0x%03x (%u), c=0x%03x (%u)\n",
- priv->trmval0, priv->trmval0, priv->trmval1, priv->trmval1);
+ priv->trmval1 = val & TSU_CODE_MAX;
return 0;
}
-static int rzg3e_thermal_parse_dt(struct rzg3e_thermal_priv *priv)
-{
- struct device_node *np = priv->dev->of_node;
- u32 offset;
-
- priv->syscon = syscon_regmap_lookup_by_phandle_args(np, "renesas,tsu-trim", 1, &offset);
- if (IS_ERR(priv->syscon))
- return dev_err_probe(priv->dev, PTR_ERR(priv->syscon),
- "Failed to parse renesas,tsu-trim\n");
-
- priv->trim_offset = offset;
- return 0;
-}
-
static int rzg3e_thermal_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -407,11 +390,20 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
- /* Parse device tree for trim register info */
- ret = rzg3e_thermal_parse_dt(priv);
+ ret = priv->info->get_trim(priv);
if (ret)
return ret;
+ if (!priv->trmval0 || !priv->trmval1 ||
+ priv->trmval0 == priv->trmval1 ||
+ priv->trmval0 == TSU_CODE_MAX || priv->trmval1 == TSU_CODE_MAX)
+ return dev_err_probe(priv->dev, -EINVAL,
+ "Invalid calibration: b=0x%03x, c=0x%03x\n",
+ priv->trmval0, priv->trmval1);
+
+ dev_dbg(priv->dev, "Calibration: b=0x%03x (%u), c=0x%03x (%u)\n",
+ priv->trmval0, priv->trmval0, priv->trmval1, priv->trmval1);
+
/* Get clock to verify frequency - clock is managed by power domain */
clk = devm_clk_get(dev, NULL);
if (IS_ERR(clk))
@@ -428,12 +420,6 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(priv->rstc),
"Failed to get/deassert reset control\n");
- /* Get calibration data */
- ret = rzg3e_thermal_get_calibration(priv);
- if (ret)
- return dev_err_probe(dev, ret,
- "Failed to get valid calibration data\n");
-
/* Get comparison interrupt */
irq = platform_get_irq_byname(pdev, "adcmpi");
if (irq < 0)
@@ -538,6 +524,7 @@ static const struct dev_pm_ops rzg3e_thermal_pm_ops = {
};
static const struct rzg3e_thermal_info rzg3e_thermal_info = {
+ .get_trim = rzg3e_thermal_get_syscon_trim,
.temp_d_mc = -41000,
.temp_e_mc = 126000,
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0559/2151] thermal: renesas: rzg3e: Remove stale @trim_offset kernel-doc entry
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (557 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0558/2151] thermal: renesas: rzg3e: make calibration value retrieval per-chip Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0560/2151] thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq Greg Kroah-Hartman
` (323 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, John Madieu, Daniel Lezcano,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Madieu <john.madieu.xa@bp.renesas.com>
[ Upstream commit bf746e2a41efd98668c97759e06d436ae5af5a82 ]
The trim_offset field was removed from struct rzg3e_thermal_priv but
its kernel-doc entry was left behind. Remove it to fix the mismatch.
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260409125916.2244241-1-john.madieu.xa@bp.renesas.com
Stable-dep-of: aa1bc39e45f2 ("thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/renesas/rzg3e_thermal.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index fc42be7f91355..b797c367ae44f 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -88,7 +88,6 @@ struct rzg3e_thermal_info {
* @info: chip type specific information
* @trmval0: calibration value 0 (b)
* @trmval1: calibration value 1 (c)
- * @trim_offset: offset for trim registers in syscon
* @lock: protects hardware access during conversions
*/
struct rzg3e_thermal_priv {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0560/2151] thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (558 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0559/2151] thermal: renesas: rzg3e: Remove stale @trim_offset kernel-doc entry Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0561/2151] thermal/drivers/renesas/rzg3e: Fix race between set_trips() and get_temp() Greg Kroah-Hartman
` (322 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ovidiu Panait, Daniel Lezcano,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
[ Upstream commit aa1bc39e45f29a4f56d7e6be7164e100727df465 ]
The TSU hw is limited in the sense that lower and upper trip points can be
set, but the hw cannot raise interrupts on its own. It can only signal that
the thresholds were passed when the temperature is read, either during
polling or on a manual read. Therefore, the interrupt enable state
configured by set_trips() must remain active for the next read to trigger
an event.
Currently, runtime PM autosuspend puts the chip to sleep and clears the
compare interrupt that was enabled during set_trips(). On power up, the
compare interrupt enable is not restored, which means that it won't ever
fire.
Fix this by caching the contents of the SIER register during runtime power
off and restore it during runtime power on.
Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC")
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260916120003.87018-3-ovidiu.panait.rb@renesas.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/renesas/rzg3e_thermal.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index b797c367ae44f..423e852f4cbf1 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -88,6 +88,7 @@ struct rzg3e_thermal_info {
* @info: chip type specific information
* @trmval0: calibration value 0 (b)
* @trmval1: calibration value 1 (c)
+ * @sier: cached interrupt enable register
* @lock: protects hardware access during conversions
*/
struct rzg3e_thermal_priv {
@@ -98,6 +99,7 @@ struct rzg3e_thermal_priv {
const struct rzg3e_thermal_info *info;
u16 trmval0;
u16 trmval1;
+ u32 sier;
struct mutex lock;
};
@@ -143,12 +145,16 @@ static int rzg3e_thermal_power_on(struct rzg3e_thermal_priv *priv)
return ret;
}
+ /* Restore interrupt enable state */
+ writel(priv->sier, priv->base + TSU_SIER);
+
return 0;
}
static void rzg3e_thermal_power_off(struct rzg3e_thermal_priv *priv)
{
- /* Disable all interrupts */
+ /* Save and disable all interrupts */
+ priv->sier = readl(priv->base + TSU_SIER);
writel(0, priv->base + TSU_SIER);
/* Clear pending interrupts */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0561/2151] thermal/drivers/renesas/rzg3e: Fix race between set_trips() and get_temp()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (559 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0560/2151] thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0562/2151] bpftool: Make skeleton C++ compatible with explicit casts Greg Kroah-Hartman
` (321 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ovidiu Panait, Daniel Lezcano,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
[ Upstream commit acd9bf8f9047b03f023514bceab6a00e037977ca ]
Datasheet section 7.11.9.2 "Conversion Start Trigger" states that a
conversion must only be started while no other conversion is in
progress:
"Before making the setting to start conversion by software or an ELC
trigger, check that the CONV bit of the sensor status register is 0b."
set_trips() starts a conversion at the end of the function and returns
without waiting for it to finish. A get_temp() call arriving right after
that starts a conversion while the CONV bit may still be set, violating
the requirement above.
Fix this by:
- polling for CONV == 0 in get_temp() before starting a conversion
- not starting a conversion at the end of set_trips() anymore
The conversion started at the end of set_trips() was supposed to check
whether the thresholds have been passed, since the hw cannot raise
interrupts on its own, but only when the temperature is read. However,
the thermal core reads the temperature and computes the trip window from
it just before calling into set_trips(), so reading the temperature again
straight away is useless.
Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC")
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260916120003.87018-4-ovidiu.panait.rb@renesas.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/renesas/rzg3e_thermal.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index 423e852f4cbf1..94ac1935c64d4 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -220,6 +220,16 @@ static int rzg3e_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
guard(mutex)(&priv->lock);
+ /* Make sure a previous conversion is not in progress */
+ ret = readl_poll_timeout(priv->base + TSU_SSR, status,
+ !(status & TSU_SSR_CONV),
+ TSU_POLL_DELAY_US,
+ USEC_PER_MSEC);
+ if (ret) {
+ dev_err(priv->dev, "Timeout waiting for conversion\n");
+ goto out;
+ }
+
/* Clear any previous conversion status */
writel(TSU_SICR_ADCLR, priv->base + TSU_SICR);
@@ -299,9 +309,8 @@ static int rzg3e_thermal_set_trips(struct thermal_zone_device *tz,
/* Enable comparison with "out of range" mode (CMPCOND=0) */
writel(TSU_CMSR_CMPEN, priv->base + TSU_CMSR);
- /* Unmask compare IRQ and start a conversion to evaluate window */
+ /* Unmask compare IRQ */
writel(TSU_SIER_CMPIE, priv->base + TSU_SIER);
- writel(TSU_STRGR_ADST, priv->base + TSU_STRGR);
pm_runtime_mark_last_busy(priv->dev);
pm_runtime_put_autosuspend(priv->dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0562/2151] bpftool: Make skeleton C++ compatible with explicit casts
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (560 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0561/2151] thermal/drivers/renesas/rzg3e: Fix race between set_trips() and get_temp() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0563/2151] bpftool: Generate skeleton for global percpu data Greg Kroah-Hartman
` (320 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, WanLi Niu, Menglong Dong,
Andrii Nakryiko, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: WanLi Niu <niuwl1@chinatelecom.cn>
[ Upstream commit 4effccde0a0521b220c3585c9a0d8e677d345209 ]
Fix C++ compilation errors in generated skeleton by adding explicit
pointer casts and use char * subtraction for offset calculation
error: invalid conversion from 'void*' to '<obj_name>*' [-fpermissive]
| skel = skel_alloc(sizeof(*skel));
| ~~~~~~~~~~^~~~~~~~~~~~~~~
| |
| void*
error: arithmetic on pointers to void
| skel->ctx.sz = (void *)&skel->links - (void *)skel;
| ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
error: assigning to 'struct <obj_name>__<ident> *' from incompatible type 'void *'
| skel-><ident> = skel_prep_map_data((void *)data, 4096,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| sizeof(data) - 1);
| ~~~~~~~~~~~~~~~~~
error: assigning to 'struct <obj_name>__<ident> *' from incompatible type 'void *'
| skel-><ident> = skel_finalize_map_data(&skel->maps.<ident>.initial_value,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 4096, PROT_READ | PROT_WRITE, skel->maps.<ident>.map_fd);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Minimum reproducer:
$ cat test.bpf.c
int val; // placed in .bss section
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
SEC("raw_tracepoint/sched_wakeup_new") int handle(void *ctx) { return 0; }
$ cat test.cpp
#include <cerrno>
extern "C" {
#include "test.bpf.skel.h"
}
$ bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
$ clang -g -O2 -target bpf -c test.bpf.c -o test.bpf.o
$ bpftool gen skeleton test.bpf.o -L > test.bpf.skel.h
$ g++ -c test.cpp -I.
Co-developed-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: WanLi Niu <niuwl1@chinatelecom.cn>
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260106023123.2928-1-kiraskyler@163.com
Stable-dep-of: a885470df10b ("bpftool: Compute map size of light skeletons at runtime")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/gen.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index bdef69c5e6cd4..d6040b52d4e1b 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -731,10 +731,10 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
{ \n\
struct %1$s *skel; \n\
\n\
- skel = skel_alloc(sizeof(*skel)); \n\
+ skel = (struct %1$s *)skel_alloc(sizeof(*skel)); \n\
if (!skel) \n\
goto cleanup; \n\
- skel->ctx.sz = (void *)&skel->links - (void *)skel; \n\
+ skel->ctx.sz = (char *)&skel->links - (char *)skel; \n\
",
obj_name, opts.data_sz);
bpf_object__for_each_map(map, obj) {
@@ -755,7 +755,7 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
\n\
\"; \n\
\n\
- skel->%1$s = skel_prep_map_data((void *)data, %2$zd,\n\
+ skel->%1$s = (__typeof__(skel->%1$s))skel_prep_map_data((void *)data, %2$zd,\n\
sizeof(data) - 1);\n\
if (!skel->%1$s) \n\
goto cleanup; \n\
@@ -857,7 +857,7 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
codegen("\
\n\
- skel->%1$s = skel_finalize_map_data(&skel->maps.%1$s.initial_value, \n\
+ skel->%1$s = (__typeof__(skel->%1$s))skel_finalize_map_data(&skel->maps.%1$s.initial_value,\n\
%2$zd, %3$s, skel->maps.%1$s.map_fd);\n\
if (!skel->%1$s) \n\
return -ENOMEM; \n\
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0563/2151] bpftool: Generate skeleton for global percpu data
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (561 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0562/2151] bpftool: Make skeleton C++ compatible with explicit casts Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0564/2151] bpftool: Compute map size of light skeletons at runtime Greg Kroah-Hartman
` (319 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Leon Hwang, Andrii Nakryiko,
Quentin Monnet, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Hwang <leon.hwang@linux.dev>
[ Upstream commit 68d4fde73cf78a7ab858ed040f54e1851cc3815c ]
Enhance bpftool to generate skeletons that properly handle global percpu
variables. The generated skeleton now includes a dedicated structure for
percpu data, allowing users to initialize and access percpu variables more
efficiently.
For global percpu variables, the skeleton now includes a nested
structure, e.g.:
struct test_global_percpu_data {
struct bpf_object_skeleton *skeleton;
struct bpf_object *obj;
struct {
struct bpf_map *percpu;
} maps;
// ...
struct test_global_percpu_data__percpu {
int data;
char run;
struct {
char set;
int i;
int nums[7];
} struct_data;
int nums[7];
} *percpu;
// ...
};
* The "struct test_global_percpu_data__percpu *percpu" points to
initialized data, which is actually "maps.percpu->mmaped".
* Before loading the skeleton, updating the
"struct test_global_percpu_data__percpu *percpu" modifies the initial
value of the corresponding global percpu variables.
* After loading the skeleton, "maps.percpu->mmaped" has been marked as
read-only in libbpf. If users want to update the global percpu
variables, they have to update the "maps.percpu" map instead.
* For lightweight skeleton, "lskel->percpu" will be protected by
"mprotect(p, sz, PROT_READ)".
* For subskeleton, those variables of global percpu data will be
skipped.
Assisted-by: Codex:gpt-5.5-xhigh
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20260813152324.97937-7-leon.hwang@linux.dev
Stable-dep-of: a885470df10b ("bpftool: Compute map size of light skeletons at runtime")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/gen.c | 53 +++++++++++++++++++++++++++--------
tools/lib/bpf/skel_internal.h | 24 ++++++++++++++--
2 files changed, 63 insertions(+), 14 deletions(-)
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index d6040b52d4e1b..72fe9d4f34b1f 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -101,6 +101,12 @@ static bool get_map_ident(const struct bpf_map *map, char *buf, size_t buf_sz)
return true;
}
+ if (bpf_map__type(map) == BPF_MAP_TYPE_PERCPU_ARRAY) {
+ snprintf(buf, buf_sz, "%s", name + 1);
+ sanitize_identifier(buf);
+ return true;
+ }
+
for (i = 0, n = ARRAY_SIZE(sfxs); i < n; i++) {
const char *sfx = sfxs[i], *p;
@@ -117,7 +123,7 @@ static bool get_map_ident(const struct bpf_map *map, char *buf, size_t buf_sz)
static bool get_datasec_ident(const char *sec_name, char *buf, size_t buf_sz)
{
- static const char *pfxs[] = { ".data", ".rodata", ".bss", ".kconfig" };
+ static const char *pfxs[] = { ".data", ".rodata", ".bss", ".percpu", ".kconfig" };
int i, n;
/* recognize hard coded LLVM section name */
@@ -254,7 +260,7 @@ static const struct btf_type *find_type_for_map(struct btf *btf, const char *map
return NULL;
}
-static bool is_mmapable_map(const struct bpf_map *map, char *buf, size_t sz)
+static bool is_skel_data(const struct bpf_map *map, char *buf, size_t sz)
{
size_t tmp_sz;
@@ -263,13 +269,24 @@ static bool is_mmapable_map(const struct bpf_map *map, char *buf, size_t sz)
return true;
}
- if (!bpf_map__is_internal(map) || !(bpf_map__map_flags(map) & BPF_F_MMAPABLE))
+ if (!bpf_map__is_internal(map))
return false;
if (!get_map_ident(map, buf, sz))
return false;
- return true;
+ if (bpf_map__map_flags(map) & BPF_F_MMAPABLE)
+ return true;
+
+ if (bpf_map__type(map) == BPF_MAP_TYPE_PERCPU_ARRAY)
+ return bpf_map__btf_value_type_id(map) != 0;
+
+ return false;
+}
+
+static bool is_mmapable_map(const struct bpf_map *map, char *buf, size_t sz)
+{
+ return is_skel_data(map, buf, sz) && bpf_map__type(map) != BPF_MAP_TYPE_PERCPU_ARRAY;
}
static int codegen_datasecs(struct bpf_object *obj, const char *obj_name)
@@ -287,7 +304,7 @@ static int codegen_datasecs(struct bpf_object *obj, const char *obj_name)
bpf_object__for_each_map(map, obj) {
/* only generate definitions for memory-mapped internal maps */
- if (!is_mmapable_map(map, map_ident, sizeof(map_ident)))
+ if (!is_skel_data(map, map_ident, sizeof(map_ident)))
continue;
sec = find_type_for_map(btf, map_ident);
@@ -517,7 +534,7 @@ static void codegen_asserts(struct bpf_object *obj, const char *obj_name)
", obj_name);
bpf_object__for_each_map(map, obj) {
- if (!is_mmapable_map(map, map_ident, sizeof(map_ident)))
+ if (!is_skel_data(map, map_ident, sizeof(map_ident)))
continue;
sec = find_type_for_map(btf, map_ident);
@@ -668,8 +685,7 @@ static void codegen_destroy(struct bpf_object *obj, const char *obj_name)
bpf_object__for_each_map(map, obj) {
if (!get_map_ident(map, ident, sizeof(ident)))
continue;
- if (bpf_map__is_internal(map) &&
- (bpf_map__map_flags(map) & BPF_F_MMAPABLE))
+ if (is_skel_data(map, ident, sizeof(ident)))
printf("\tskel_free_map_data(skel->%1$s, skel->maps.%1$s.initial_value, %2$zu);\n",
ident, bpf_map_mmap_sz(map));
codegen("\
@@ -741,7 +757,7 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
const void *mmap_data = NULL;
size_t mmap_size = 0;
- if (!is_mmapable_map(map, ident, sizeof(ident)))
+ if (!is_skel_data(map, ident, sizeof(ident)))
continue;
codegen("\
@@ -847,9 +863,23 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
bpf_object__for_each_map(map, obj) {
const char *mmap_flags;
- if (!is_mmapable_map(map, ident, sizeof(ident)))
+ if (!is_skel_data(map, ident, sizeof(ident)))
continue;
+ if (bpf_map__type(map) == BPF_MAP_TYPE_PERCPU_ARRAY) {
+ codegen("\
+ \n\
+ err = skel_protect_map_data(skel->%1$s, &skel->maps.%1$s.initial_value, %2$zd);\n\
+ if (err) \n\
+ return err; \n\
+ #ifdef __KERNEL__ \n\
+ skel->%1$s = NULL; \n\
+ #endif \n\
+ ",
+ ident, bpf_map_mmap_sz(map));
+ continue;
+ }
+
if (bpf_map__map_flags(map) & BPF_F_RDONLY_PROG)
mmap_flags = "PROT_READ";
else
@@ -953,8 +983,7 @@ codegen_maps_skeleton(struct bpf_object *obj, size_t map_cnt, bool mmaped, bool
map->map = &obj->maps.%s; \n\
",
i, bpf_map__name(map), ident);
- /* memory-mapped internal maps */
- if (mmaped && is_mmapable_map(map, ident, sizeof(ident))) {
+ if (mmaped && is_skel_data(map, ident, sizeof(ident))) {
printf("\tmap->mmaped = (void **)&obj->%s;\n", ident);
}
diff --git a/tools/lib/bpf/skel_internal.h b/tools/lib/bpf/skel_internal.h
index 6a8f5c7a02eb9..da0669b5b5af0 100644
--- a/tools/lib/bpf/skel_internal.h
+++ b/tools/lib/bpf/skel_internal.h
@@ -135,8 +135,10 @@ static inline void skel_free_map_data(void *p, __u64 addr, size_t sz)
{
if (addr != ~0ULL)
kvfree(p);
- /* When addr == ~0ULL the 'p' points to
- * ((struct bpf_array *)map)->value. See skel_finalize_map_data.
+ /*
+ * When addr == ~0ULL the init buffer has already been released.
+ * For skel_finalize_map_data(), 'p' points to
+ * ((struct bpf_array *)map)->value.
*/
}
@@ -174,6 +176,15 @@ static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int
return addr;
}
+static inline int skel_protect_map_data(void *p, __u64 *init_val, size_t sz)
+{
+ (void)sz;
+
+ kvfree(p);
+ *init_val = ~0ULL;
+ return 0;
+}
+
#else
static inline void *skel_alloc(size_t size)
@@ -212,6 +223,15 @@ static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int
return NULL;
return addr;
}
+
+static inline int skel_protect_map_data(void *p, __u64 *init_val, size_t sz)
+{
+ (void)init_val;
+
+ if (mprotect(p, sz, PROT_READ))
+ return -errno;
+ return 0;
+}
#endif
static inline int skel_closenz(int fd)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0564/2151] bpftool: Compute map size of light skeletons at runtime
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (562 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0563/2151] bpftool: Generate skeleton for global percpu data Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0565/2151] selftests/bpf: Clean up child when task_work__open() fails Greg Kroah-Hartman
` (318 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Leon Hwang, Andrii Nakryiko,
Quentin Monnet, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Hwang <leon.hwang@linux.dev>
[ Upstream commit a885470df10b1c0dbc011177c19d3fd3bb8af2e9 ]
bpftool rounds memory-mapped data map sizes to the host page size when
generating a light skeleton. The generated code therefore uses a 64K
mapping size when bpftool runs on a 64K-page host, even if the skeleton
runs on a 4K-page target. The target rejects the oversized map mmap(),
causing failure of loading the light skeleton.
When try to run 64K-page selftests on 4K-page VM, the error message does
not provide the reason about page size.
test_atomics:PASS:atomics skeleton open 0 nsec
test_atomics:FAIL:atomics skeleton load unexpected error: -12 (errno 22)
#15 atomics:FAIL
Pass the original map value size and max entries to the generated code and
round mmap size to the runtime page size in the user-space light
skeleton helpers. This keeps generated light skeletons independent of the
build host page size.
Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.")
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20260915161450.96249-1-leon.hwang@linux.dev
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/gen.c | 26 ++++++-------------
tools/lib/bpf/skel_internal.h | 48 +++++++++++++++++++++++++----------
2 files changed, 42 insertions(+), 32 deletions(-)
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 72fe9d4f34b1f..78b915bfcc8ed 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -500,16 +500,6 @@ static void print_hex(const char *data, int data_sz)
}
}
-static size_t bpf_map_mmap_sz(const struct bpf_map *map)
-{
- long page_sz = sysconf(_SC_PAGE_SIZE);
- size_t map_sz;
-
- map_sz = (size_t)roundup(bpf_map__value_size(map), 8) * bpf_map__max_entries(map);
- map_sz = roundup(map_sz, page_sz);
- return map_sz;
-}
-
/* Emit type size asserts for all top-level fields in memory-mapped internal maps. */
static void codegen_asserts(struct bpf_object *obj, const char *obj_name)
{
@@ -686,8 +676,8 @@ static void codegen_destroy(struct bpf_object *obj, const char *obj_name)
if (!get_map_ident(map, ident, sizeof(ident)))
continue;
if (is_skel_data(map, ident, sizeof(ident)))
- printf("\tskel_free_map_data(skel->%1$s, skel->maps.%1$s.initial_value, %2$zu);\n",
- ident, bpf_map_mmap_sz(map));
+ printf("\tskel_free_map_data(skel->%1$s, skel->maps.%1$s.initial_value, %2$u, %3$u);\n",
+ ident, bpf_map__value_size(map), bpf_map__max_entries(map));
codegen("\
\n\
skel_closenz(skel->maps.%1$s.map_fd); \n\
@@ -771,13 +761,13 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
\n\
\"; \n\
\n\
- skel->%1$s = (__typeof__(skel->%1$s))skel_prep_map_data((void *)data, %2$zd,\n\
+ skel->%1$s = (__typeof__(skel->%1$s))skel_prep_map_data((void *)data, %2$u, %3$u,\n\
sizeof(data) - 1);\n\
if (!skel->%1$s) \n\
goto cleanup; \n\
skel->maps.%1$s.initial_value = (__u64) (long) skel->%1$s;\n\
} \n\
- ", ident, bpf_map_mmap_sz(map));
+ ", ident, bpf_map__value_size(map), bpf_map__max_entries(map));
}
codegen("\
\n\
@@ -869,14 +859,14 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
if (bpf_map__type(map) == BPF_MAP_TYPE_PERCPU_ARRAY) {
codegen("\
\n\
- err = skel_protect_map_data(skel->%1$s, &skel->maps.%1$s.initial_value, %2$zd);\n\
+ err = skel_protect_map_data(skel->%1$s, &skel->maps.%1$s.initial_value, %2$u, %3$u);\n\
if (err) \n\
return err; \n\
#ifdef __KERNEL__ \n\
skel->%1$s = NULL; \n\
#endif \n\
",
- ident, bpf_map_mmap_sz(map));
+ ident, bpf_map__value_size(map), bpf_map__max_entries(map));
continue;
}
@@ -888,11 +878,11 @@ static int gen_trace(struct bpf_object *obj, const char *obj_name, const char *h
codegen("\
\n\
skel->%1$s = (__typeof__(skel->%1$s))skel_finalize_map_data(&skel->maps.%1$s.initial_value,\n\
- %2$zd, %3$s, skel->maps.%1$s.map_fd);\n\
+ %2$u, %3$u, %4$s, skel->maps.%1$s.map_fd);\n\
if (!skel->%1$s) \n\
return -ENOMEM; \n\
",
- ident, bpf_map_mmap_sz(map), mmap_flags);
+ ident, bpf_map__value_size(map), bpf_map__max_entries(map), mmap_flags);
}
codegen("\
\n\
diff --git a/tools/lib/bpf/skel_internal.h b/tools/lib/bpf/skel_internal.h
index da0669b5b5af0..6dd1795c796fc 100644
--- a/tools/lib/bpf/skel_internal.h
+++ b/tools/lib/bpf/skel_internal.h
@@ -11,6 +11,7 @@
#include <linux/bpf.h>
#else
#include <unistd.h>
+#include <sys/param.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <linux/keyctl.h>
@@ -131,7 +132,7 @@ static inline void skel_free(const void *p)
* either bpf_probe_read_kernel() or bpf_copy_from_user() from initial_value
* depending on bpf_loader_ctx->flags.
*/
-static inline void skel_free_map_data(void *p, __u64 addr, size_t sz)
+static inline void skel_free_map_data(void *p, __u64 addr, size_t val_sz, __u32 max_entries)
{
if (addr != ~0ULL)
kvfree(p);
@@ -142,18 +143,20 @@ static inline void skel_free_map_data(void *p, __u64 addr, size_t sz)
*/
}
-static inline void *skel_prep_map_data(const void *val, size_t mmap_sz, size_t val_sz)
+static inline void *skel_prep_map_data(const void *val, size_t val_sz, __u32 max_entries,
+ size_t data_sz)
{
void *addr;
- addr = kvmalloc(val_sz, GFP_KERNEL);
+ addr = kvmalloc(data_sz, GFP_KERNEL);
if (!addr)
return NULL;
- memcpy(addr, val, val_sz);
+ memcpy(addr, val, data_sz);
return addr;
}
-static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int flags, int fd)
+static inline void *skel_finalize_map_data(__u64 *init_val, size_t val_sz, __u32 max_entries,
+ int flags, int fd)
{
struct bpf_map *map;
void *addr = NULL;
@@ -176,9 +179,10 @@ static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int
return addr;
}
-static inline int skel_protect_map_data(void *p, __u64 *init_val, size_t sz)
+static inline int skel_protect_map_data(void *p, __u64 *init_val, size_t val_sz, __u32 max_entries)
{
- (void)sz;
+ (void)val_sz;
+ (void)max_entries;
kvfree(p);
*init_val = ~0ULL;
@@ -197,25 +201,39 @@ static inline void skel_free(void *p)
free(p);
}
-static inline void skel_free_map_data(void *p, __u64 addr, size_t sz)
+static inline size_t skel_map_mmap_sz(size_t val_sz, __u32 max_entries)
{
- munmap(p, sz);
+ const long page_sz = sysconf(_SC_PAGE_SIZE);
+ size_t mmap_sz;
+
+ mmap_sz = roundup(val_sz, 8) * max_entries;
+ mmap_sz = roundup(mmap_sz, page_sz);
+ return mmap_sz;
}
-static inline void *skel_prep_map_data(const void *val, size_t mmap_sz, size_t val_sz)
+static inline void skel_free_map_data(void *p, __u64 addr, size_t val_sz, __u32 max_entries)
{
+ munmap(p, skel_map_mmap_sz(val_sz, max_entries));
+}
+
+static inline void *skel_prep_map_data(const void *val, size_t val_sz, __u32 max_entries,
+ size_t data_sz)
+{
+ size_t mmap_sz = skel_map_mmap_sz(val_sz, max_entries);
void *addr;
addr = mmap(NULL, mmap_sz, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if (addr == (void *) -1)
return NULL;
- memcpy(addr, val, val_sz);
+ memcpy(addr, val, data_sz);
return addr;
}
-static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int flags, int fd)
+static inline void *skel_finalize_map_data(__u64 *init_val, size_t val_sz, __u32 max_entries,
+ int flags, int fd)
{
+ size_t mmap_sz = skel_map_mmap_sz(val_sz, max_entries);
void *addr;
addr = mmap((void *) (long) *init_val, mmap_sz, flags, MAP_SHARED | MAP_FIXED, fd, 0);
@@ -224,11 +242,13 @@ static inline void *skel_finalize_map_data(__u64 *init_val, size_t mmap_sz, int
return addr;
}
-static inline int skel_protect_map_data(void *p, __u64 *init_val, size_t sz)
+static inline int skel_protect_map_data(void *p, __u64 *init_val, size_t val_sz, __u32 max_entries)
{
+ size_t mmap_sz = skel_map_mmap_sz(val_sz, max_entries);
+
(void)init_val;
- if (mprotect(p, sz, PROT_READ))
+ if (mprotect(p, mmap_sz, PROT_READ))
return -errno;
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0565/2151] selftests/bpf: Clean up child when task_work__open() fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (563 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0564/2151] bpftool: Compute map size of light skeletons at runtime Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0566/2151] i3c: mipi-i3c-hci: Restore controller state if i3c_hci_enable_ibi() returns an error Greg Kroah-Hartman
` (317 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yun Lu, Andrii Nakryiko,
Mykyta Yatsenko, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yun Lu <luyun@kylinos.cn>
[ Upstream commit 8715b13c1a800f34f9d8177837e5244ac8288f60 ]
task_work_run() forks a child that blocks reading a pipe until the
parent wakes it. If task_work__open() fails afterwards, the parent
returns without closing either pipe fd or waiting for the child.
Because the parent retains the write end, the child remains blocked in
read() until test_progs exits.
Route this failure through the common cleanup path. At this point
cleanup is safe: pe_fd is -1, link is NULL, task_work__destroy() accepts
NULL, and the pid > 0 branch closes the read end, wakes the child,
closes the write end and waits for it.
This is the last early return after a successful fork. The fork failure
path already closes both pipe fds after commit 5730dacb3f17
("selftests/bpf: Task_work selftest cleanup fixes").
Fixes: 39fd74dfd5d2 ("selftests/bpf: BPF task work scheduling tests")
Signed-off-by: Yun Lu <luyun@kylinos.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Mykyta Yatsenko <yatsenko@meta.com>
Link: https://lore.kernel.org/bpf/20260918024300.18321-1-luyun_611@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/bpf/prog_tests/test_task_work.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_task_work.c b/tools/testing/selftests/bpf/prog_tests/test_task_work.c
index 774b31a5f6ca1..fe0cb1702eaa0 100644
--- a/tools/testing/selftests/bpf/prog_tests/test_task_work.c
+++ b/tools/testing/selftests/bpf/prog_tests/test_task_work.c
@@ -85,7 +85,7 @@ static void task_work_run(const char *prog_name, const char *map_name)
skel = task_work__open();
if (!ASSERT_OK_PTR(skel, "task_work__open"))
- return;
+ goto cleanup;
bpf_object__for_each_program(prog, skel->obj) {
bpf_program__set_autoload(prog, false);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0566/2151] i3c: mipi-i3c-hci: Restore controller state if i3c_hci_enable_ibi() returns an error
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (564 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0565/2151] selftests/bpf: Clean up child when task_work__open() fails Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0567/2151] i3c: mipi-i3c-hci: Fix runtime PM violation in i3c_hci_free_ibi() Greg Kroah-Hartman
` (316 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Adrian Hunter, Frank Li,
Alexandre Belloni, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <adrian.hunter@intel.com>
[ Upstream commit ad869331ac616bf192c04081ef7e206e1d106ad8 ]
i3c_hci_enable_ibi() performs controller-side setup before sending the
ENEC CCC to enable IBIs on the target. If the ENEC CCC fails, the
function returns an error but leaves the controller configured as if IBI
enabling had succeeded.
Fix the error path by undoing the earlier setup when the ENEC CCC fails,
ensuring the controller state remains consistent with the failed enable
operation.
Fixes: 9ad9a52cce282 ("i3c/master: introduce the mipi-i3c-hci driver")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260920151248.46936-7-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/i3c/master/mipi-i3c-hci/core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index e9fd314eb17b9..6bb33193970b2 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -522,11 +522,15 @@ static int i3c_hci_enable_ibi(struct i3c_dev_desc *dev)
struct i3c_master_controller *m = i3c_dev_get_master(dev);
struct i3c_hci *hci = to_i3c_hci(m);
struct i3c_hci_dev_data *dev_data = i3c_dev_get_master_data(dev);
+ int ret;
mipi_i3c_hci_dat_v1.clear_flags(hci, dev_data->dat_idx, DAT_0_SIR_REJECT, 0);
scoped_guard(spinlock_irqsave, &hci->lock)
hci->ibi_devs[dev_data->dat_idx] = dev;
- return i3c_master_enec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
+ ret = i3c_master_enec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
+ if (ret)
+ __i3c_hci_disable_ibi(hci, dev);
+ return ret;
}
static int i3c_hci_disable_ibi(struct i3c_dev_desc *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0567/2151] i3c: mipi-i3c-hci: Fix runtime PM violation in i3c_hci_free_ibi()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (565 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0566/2151] i3c: mipi-i3c-hci: Restore controller state if i3c_hci_enable_ibi() returns an error Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0568/2151] pstore: dont leave an ERR_PTR in the ramoops zone pointer Greg Kroah-Hartman
` (315 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Adrian Hunter, Frank Li,
Alexandre Belloni, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <adrian.hunter@intel.com>
[ Upstream commit 1570265b225757e3684a7c13c36915823f62675d ]
i3c_hci_free_ibi() calls __i3c_hci_disable_ibi(), but the latter
requires runtime PM to be resumed. The ->free_ibi() callback does not
guarantee that condition.
The cases where ->free_ibi() may be called without a preceding
->disable_ibi() do not require re-enabling runtime PM handling:
- runtime resume failed in i3c_dev_free_ibi_locked(), so it skips the
IBI disable but still proceeds to call ->free_ibi()
- the device has been re-enumerated under a new dynamic address in
__i3c_master_add_i3c_dev_locked(), which tears down the old device
descriptor and deliberately clears olddev->ibi->enabled (to avoid
sending a DISEC to the stale old address) before calling
i3c_dev_free_ibi_locked(). As a result ->free_ibi() is reached with
neither a hardware IBI disable nor runtime PM resumed.
In both cases the important requirement is to prevent further IBI
processing for the device. That can be done without accessing hardware
by removing the device from the ibi_devs[] table.
Replace the call to __i3c_hci_disable_ibi() with clearing the
corresponding ibi_devs[] entry under the controller lock.
Fixes: 650716f23eac4 ("i3c: mipi-i3c-hci: Fix race in i3c_hci_addr_to_dev()")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260920151248.46936-9-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/i3c/master/mipi-i3c-hci/core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index 6bb33193970b2..4907d5d724284 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -494,11 +494,13 @@ static void __i3c_hci_disable_ibi(struct i3c_hci *hci, struct i3c_dev_desc *dev)
static void i3c_hci_free_ibi(struct i3c_dev_desc *dev)
{
+ struct i3c_hci_dev_data *dev_data = i3c_dev_get_master_data(dev);
struct i3c_master_controller *m = i3c_dev_get_master(dev);
struct i3c_hci *hci = to_i3c_hci(m);
- /* Must ensure the IBI has been disabled */
- __i3c_hci_disable_ibi(hci, dev);
+ /* Must ensure IBIs for this device will no longer be processed */
+ scoped_guard(spinlock_irqsave, &hci->lock)
+ hci->ibi_devs[dev_data->dat_idx] = NULL;
hci->io->free_ibi(hci, dev);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0568/2151] pstore: dont leave an ERR_PTR in the ramoops zone pointer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (566 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0567/2151] i3c: mipi-i3c-hci: Fix runtime PM violation in i3c_hci_free_ibi() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0569/2151] pstore: reject persistent RAM zones too small for the buffer header Greg Kroah-Hartman
` (314 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Andrea Parri, Kees Cook, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrea Parri <parri.andrea@gmail.com>
[ Upstream commit 70fec428c845216da98041b1ae9f16a8f54b3d68 ]
ramoops_init_prz() stores the result of persistent_ram_new() in *prz and
returns the error without clearing it when initialization fails.
ramoops_probe() then cleans up through ramoops_free_przs(), which hands
*prz to persistent_ram_free(); that treats the ERR_PTR as a valid zone
and dereferences it, crashing the kernel.
Clear *prz before returning so that cleanup sees a NULL zone.
Fixes: b5d38e9bf1b0c ("pstore/ram: Add console messages handling")
Assisted-by: LLM
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://patch.msgid.link/20260921202317.70595-2-parri.andrea@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/pstore/ram.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index bc68b4de5287d..a11036272a4eb 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -605,6 +605,7 @@ static int ramoops_init_prz(const char *name,
if (IS_ERR(*prz)) {
int err = PTR_ERR(*prz);
+ *prz = NULL;
dev_err(dev, "failed to request %s mem region (0x%zx@0x%llx): %d\n",
name, sz, (unsigned long long)*paddr, err);
return err;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0569/2151] pstore: reject persistent RAM zones too small for the buffer header
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (567 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0568/2151] pstore: dont leave an ERR_PTR in the ramoops zone pointer Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0570/2151] KMSAN: fix memset() when using fortify-source, again Greg Kroah-Hartman
` (313 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Andrea Parri, Kees Cook, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrea Parri <parri.andrea@gmail.com>
[ Upstream commit 1b30df8662ac85a6759be4332f3bec7e3cb28efc ]
persistent_ram_buffer_map() computes
prz->buffer_size = size - sizeof(struct persistent_ram_buffer);
without checking that size is large enough to hold the header. A
ramoops zone configured with a tiny size (e.g. ramoops.pmsg_size=1)
underflows buffer_size to a huge value, which defeats every bounds
check in persistent_ram_write() and persistent_ram_write_user(); a
write to /dev/pmsg0 then copies user data far past the end of the zone
and corrupts kernel memory.
Reject zones that are not larger than the buffer header.
Fixes: 404a6043385de ("staging: android: persistent_ram: handle reserving and mapping memory")
Assisted-by: LLM
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://patch.msgid.link/20260921202317.70595-3-parri.andrea@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/pstore/ram_core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index 95675d4bab141..4d07280768975 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -507,6 +507,12 @@ static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size,
prz->paddr = start;
prz->size = size;
+ if (size <= sizeof(struct persistent_ram_buffer)) {
+ pr_err("%s: persistent ram zone too small (%#llx bytes)\n",
+ prz->label, (unsigned long long)size);
+ return -EINVAL;
+ }
+
if (pfn_valid(start >> PAGE_SHIFT))
prz->vaddr = persistent_ram_vmap(start, size, memtype);
else
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0570/2151] KMSAN: fix memset() when using fortify-source, again
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (568 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0569/2151] pstore: reject persistent RAM zones too small for the buffer header Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0571/2151] md/raid5: give the io_unit slab caches per-array names Greg Kroah-Hartman
` (312 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Arnd Bergmann, Kees Cook,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 3555409e524a0279845f91273ba714998658c163 ]
Both kmsan and fortify-source replace the memset function. When both
are enabled at the same time, the kmsan version gets used, which triggers
a warning about fortify-source being nonfunctional:
warning: unsafe memset() usage lacked '__write_overflow' symbol in /home/arnd/arm-soc/lib/test_fortify/write_overflow-memset.c
warning: unsafe memset() usage lacked '__write_overflow_field' symbol in /home/arnd/arm-soc/lib/test_fortify/write_overflow_field-memset.c
Commit 78a498c3a227 already tried to address this, but this seems
to only have worked for memcpy() and memmove() but not memset(),
which is still lacking the macro definition when KMSAN is enabled.
Remove the incorrect #ifndef check around the memset() macro.
Fixes: ff901d80fff6 ("x86: kmsan: use __msan_ string functions where possible.")
Fixes: 78a498c3a227 ("x86: fortify: kmsan: fix KMSAN fortify builds")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260618142951.1739694-1-arnd@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/fortify-string.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/fortify-string.h b/include/linux/fortify-string.h
index b3b53f8c1b28e..93654e9973a6a 100644
--- a/include/linux/fortify-string.h
+++ b/include/linux/fortify-string.h
@@ -508,10 +508,8 @@ __FORTIFY_INLINE bool fortify_memset_chk(__kernel_size_t size,
* __struct_size() vs __member_size() must be captured here to avoid
* evaluating argument side-effects further into the macro layers.
*/
-#ifndef CONFIG_KMSAN
#define memset(p, c, s) __fortify_memset_chk(p, c, s, \
__struct_size(p), __member_size(p))
-#endif
/*
* To make sure the compiler can enforce protection against buffer overflows,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0571/2151] md/raid5: give the io_unit slab caches per-array names
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (569 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0570/2151] KMSAN: fix memset() when using fortify-source, again Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0572/2151] mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() Greg Kroah-Hartman
` (311 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+2ef75c54d0b2ac5d00ba,
Yogesh Gaur, Yu Kuai, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yogesh Gaur <yogeshgaur.83@gmail.com>
[ Upstream commit 96858e2308431ff5678e0e6fab1a06e19f3d95da ]
Both raid5 log backends create their io_unit slab cache per array but
name it after the struct:
ppl_conf->io_kc = KMEM_CACHE(ppl_io_unit, 0);
log->io_kc = KMEM_CACHE(r5l_io_unit, 0);
KMEM_CACHE() passes the stringified type as the cache name, so every
array that enables PPL or attaches a journal asks for a cache called
"ppl_io_unit" or "r5l_io_unit". With two such arrays live at the same
time the second one trips kmem_cache_sanity_check():
kmem_cache of name 'ppl_io_unit' already exists
WARNING: mm/slab_common.c:112 at __kmem_cache_create_args+0xae/0x460
ppl_init_log+0x285/0x1310 drivers/md/raid5-ppl.c:1363
log_init drivers/md/raid5-log.h:138 [inline]
raid5_change_consistency_policy+0x255/0x740 drivers/md/raid5.c:9141
consistency_policy_store+0x7f/0x230 drivers/md/md.c:5883
md_attr_store+0x3b7/0x640 drivers/md/md.c:6158
which is reachable by any user that can write "ppl" to
md/consistency_policy on two arrays, and equally by assembling two
journalled arrays. The cache is created and destroyed correctly on
every path, so this is a name collision only - duplicate names confuse
slabtop and /proc/slabinfo, which is what the check is there to catch.
Build the name from the array instead, the way grow_stripes() already
does for the stripe_head cache in this driver, and fall back to the
mddev pointer for dm-raid where mdname() is the constant "mdX". The
buffer is sized like conf->cache_name[] because mdname() can return up
to DISK_NAME_LEN bytes.
The explicit size/align arguments keep what KMEM_CACHE() expanded to,
so object layout does not change.
Fixes: 3418d036c81d ("raid5-ppl: Partial Parity Log write logging implementation")
Fixes: f6bed0ef0a80 ("raid5: add basic stripe log")
Reported-by: syzbot+2ef75c54d0b2ac5d00ba@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=2ef75c54d0b2ac5d00ba
Assisted-by: LLM
Signed-off-by: Yogesh Gaur <yogeshgaur.83@gmail.com>
Link: https://patch.msgid.link/20260920091533.413-1-yogeshgaur.83@gmail.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/md/raid5-cache.c | 12 +++++++++++-
drivers/md/raid5-ppl.c | 12 +++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
index 1f7bf680234d0..b3e2582a39d03 100644
--- a/drivers/md/raid5-cache.c
+++ b/drivers/md/raid5-cache.c
@@ -3084,6 +3084,7 @@ int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev)
{
struct r5l_log *log;
struct md_thread *thread;
+ char cache_name[48];
int ret;
pr_debug("md/raid:%s: using device %pg as journal\n",
@@ -3123,7 +3124,16 @@ int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev)
INIT_LIST_HEAD(&log->flushing_ios);
INIT_LIST_HEAD(&log->finished_ios);
- log->io_kc = KMEM_CACHE(r5l_io_unit, 0);
+ if (mddev_is_dm(conf->mddev))
+ snprintf(cache_name, sizeof(cache_name), "r5l_io_unit-%p",
+ conf->mddev);
+ else
+ snprintf(cache_name, sizeof(cache_name), "r5l_io_unit-%s",
+ mdname(conf->mddev));
+
+ log->io_kc = kmem_cache_create(cache_name, sizeof(struct r5l_io_unit),
+ __alignof__(struct r5l_io_unit),
+ 0, NULL);
if (!log->io_kc)
goto io_kc;
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index 2678e82bfa52d..9a58f0c19a39f 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -1318,6 +1318,7 @@ int ppl_init_log(struct r5conf *conf)
{
struct ppl_conf *ppl_conf;
struct mddev *mddev = conf->mddev;
+ char cache_name[48];
int ret = 0;
int max_disks;
int i;
@@ -1360,7 +1361,16 @@ int ppl_init_log(struct r5conf *conf)
ppl_conf->mddev = mddev;
- ppl_conf->io_kc = KMEM_CACHE(ppl_io_unit, 0);
+ if (mddev_is_dm(mddev))
+ snprintf(cache_name, sizeof(cache_name), "ppl_io_unit-%p", mddev);
+ else
+ snprintf(cache_name, sizeof(cache_name), "ppl_io_unit-%s",
+ mdname(mddev));
+
+ ppl_conf->io_kc = kmem_cache_create(cache_name,
+ sizeof(struct ppl_io_unit),
+ __alignof__(struct ppl_io_unit),
+ 0, NULL);
if (!ppl_conf->io_kc) {
ret = -ENOMEM;
goto err;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0572/2151] mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (570 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0571/2151] md/raid5: give the io_unit slab caches per-array names Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0573/2151] leds: lp8860: Fix device_node leak in lp8860_probe() Greg Kroah-Hartman
` (310 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrew Morton, David Hildenbrand,
Jason Gunthorpe, John Hubbard, Peter Xu, Lance Yang, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit da01399b90a73cd00b502f7903fa5acbfac4a103 ]
The !CONFIG_MMU implementation of __get_user_pages_locked() takes a bare
get_page() reference for each page regardless of foll_flags:
if (pages[i])
get_page(pages[i]);
This is reached from pin_user_pages*() with FOLL_PIN set.
unpin_user_page() is shared between MMU and NOMMU configurations and
unconditionally calls gup_put_folio(..., FOLL_PIN), which subtracts
GUP_PIN_COUNTING_BIAS (1024) from the folio refcount.
This means that pin adds 1, and then unpin will subtract 1024.
If a user maps a page (refcount 1), registers it 1023 times as an
io_uring fixed buffer (1023 pin_user_pages calls -> refcount 1024), then
unregisters: the first unpin_user_page subtracts 1024, refcount hits 0,
the page is freed and returned to the buddy allocator. The remaining
1022 unpins write into whatever was reallocated, and the user's VMA
still maps the freed page (NOMMU has no MMU to invalidate it).
Reallocating the page for an io_uring pbuf_ring then lets userspace
corrupt the new owner's data through the stale mapping.
Use try_grab_folio() which adds GUP_PIN_COUNTING_BIAS for FOLL_PIN and 1
for FOLL_GET, mirroring the CONFIG_MMU path so pin and unpin are
symmetric. Keep supporting the traditional behavior where users specify
a pages array but don't set FOLL_GET.
While at it, don't return NULL pointers in the page array,
as this is really not expected for GUP users; instead, just fail and return
-EFAULT.
[ david: support traditional behavior with no FOLL_GET, extend
description ]
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Lance Yang <lance.yang@linux.dev>
Reported-by: Anthropic
Fixes: 3faa52c03f44 ("mm/gup: track FOLL_PIN pages")
Assisted-by: gkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Lance Yang <lance.yang@linux.dev>
Link: https://patch.msgid.link/20260921-nommu_gup_pin-v4-1-c410041cc479@kernel.org
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/gup.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index c345bca01e3af..f74fe4b17d017 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1987,6 +1987,7 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start,
struct vm_area_struct *vma;
bool must_unlock = false;
vm_flags_t vm_flags;
+ int ret, err = -EFAULT;
long i;
if (!nr_pages)
@@ -2003,6 +2004,10 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start,
*locked = 1;
}
+ /* See the MMU variant: support the traditional behavior. */
+ if (pages && !(foll_flags & FOLL_PIN))
+ foll_flags |= FOLL_GET;
+
/* calculate required read or write permissions.
* If FOLL_FORCE is set, we only require the "MAY" flags.
*/
@@ -2023,8 +2028,14 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start,
if (pages) {
pages[i] = virt_to_page((void *)start);
- if (pages[i])
- get_page(pages[i]);
+ if (!pages[i])
+ break;
+ ret = try_grab_folio(page_folio(pages[i]), 1, foll_flags);
+ if (unlikely(ret)) {
+ pages[i] = NULL;
+ err = ret;
+ break;
+ }
}
start = (start + PAGE_SIZE) & PAGE_MASK;
@@ -2035,7 +2046,7 @@ static long __get_user_pages_locked(struct mm_struct *mm, unsigned long start,
*locked = 0;
}
- return i ? : -EFAULT;
+ return i ? : err;
}
#endif /* !CONFIG_MMU */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0573/2151] leds: lp8860: Fix device_node leak in lp8860_probe()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (571 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0572/2151] mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0574/2151] leds: pca9532: Check i2c_smbus_read_byte_data() return value Greg Kroah-Hartman
` (309 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Miles Krause, Lee Jones, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miles Krause <mileskrause5200@gmail.com>
[ Upstream commit f9879086c4eb4b3b0f4baa80139a5720b99b229e ]
lp8860_probe() looks up the driver's single LED child node with
of_get_next_available_child() and hands it to the LED core as
init_data.fwnode, but never drops the reference that lookup returned:
child_node = of_get_next_available_child(np, NULL);
if (!child_node)
return -EINVAL;
...
init_data.fwnode = of_fwnode_handle(child_node);
of_get_next_available_child() returns the node with its refcount
incremented, and the LED core does not take a reference of its own:
led_classdev_register_ext() only reads properties out of
init_data.fwnode and then stores the bare pointer with
device_set_node(). The reference therefore stays owned by the driver
for as long as it holds the node.
Nothing in lp8860_probe() ever releases it, so it is leaked on every
error return taken after the lookup - the enable GPIO, the vled
regulator, devm_mutex_init(), the regmap allocation, the optional
EEPROM programming and the LED class registration - and on a fully
successful probe alike. A device that binds and unbinds repeatedly
leaks one device_node reference per bind.
Sibling drivers already get this right: leds-lm3692x.c, from the same
TI LED family, calls fwnode_handle_put(init_data.fwnode) once after
devm_led_classdev_register_ext() to cover both outcomes, while
leds-ktd2692.c and leds-aat1290.c take the node with __free(device_node).
Use __free(device_node) here too. Unlike a single of_node_put() at the
end of probe it also covers the intermediate error returns, and it keeps
the node alive for the whole function, which the LED core still needs
when it reads the child's properties during registration.
Fixes: 99ca0ea57309 ("leds: lp8860: Use generic support for composing LED names")
Signed-off-by: Miles Krause <mileskrause5200@gmail.com>
Link: https://patch.msgid.link/20260910-leds-lp8860-of-node-leak-v1-1-d333cff4345b@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-lp8860.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c
index 0962c00c215a1..2f30593cd3208 100644
--- a/drivers/leds/leds-lp8860.c
+++ b/drivers/leds/leds-lp8860.c
@@ -7,6 +7,7 @@
* Author: Dan Murphy <dmurphy@ti.com>
*/
+#include <linux/cleanup.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/leds.h>
@@ -281,7 +282,6 @@ static int lp8860_probe(struct i2c_client *client)
int ret;
struct lp8860_led *led;
struct device_node *np = dev_of_node(&client->dev);
- struct device_node *child_node;
struct led_init_data init_data = {};
struct gpio_desc *enable_gpio;
@@ -289,7 +289,8 @@ static int lp8860_probe(struct i2c_client *client)
if (!led)
return -ENOMEM;
- child_node = of_get_next_available_child(np, NULL);
+ struct device_node *child_node __free(device_node) =
+ of_get_next_available_child(np, NULL);
if (!child_node)
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0574/2151] leds: pca9532: Check i2c_smbus_read_byte_data() return value
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (572 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0573/2151] leds: lp8860: Fix device_node leak in lp8860_probe() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0575/2151] perf test: Fix a leaked map reference in the arch dwarf unwind tests Greg Kroah-Hartman
` (308 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Haibo Chen, Frank Li, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haibo Chen <haibo.chen@nxp.com>
[ Upstream commit 1b75f038e5f71ed32ce6593b5763f9776ec58a25 ]
Coverity report INTEGER_OVERFLOW (tainted_data_return ->
cast_underflow -> overflow) in pca9532_getled().
pca9532_getled() stored the return value of i2c_smbus_read_byte_data()
into a char and used it directly to compute the LED state without
checking for an error. i2c_smbus_read_byte_data() returns a negative
error code on failure. On an I2C read error the negative value was
assigned to an unsigned type, triggering an integer underflow/overflow,
and a meaningless LED state was returned to the caller.
Read the value into an int, check for the error, and fall back to
PCA9532_OFF while emitting a warning when the read fails.
Fixes: 28c5fe99016d ("leds: pca9532: Extend pca9532 device tree support")
Assisted-by: VeroCoder:vero-1 [cli]
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260727-led-fix-v1-1-d635c5037109@nxp.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-pca9532.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
index ba0fea0add2b7..cdcb4ab2ee60b 100644
--- a/drivers/leds/leds-pca9532.c
+++ b/drivers/leds/leds-pca9532.c
@@ -298,12 +298,15 @@ static enum pca9532_state pca9532_getled(struct pca9532_led *led)
struct i2c_client *client = led->client;
struct pca9532_data *data = i2c_get_clientdata(client);
u8 maxleds = data->chip_info->num_leds;
- char reg;
- enum pca9532_state ret;
+ int reg;
+ enum pca9532_state ret = PCA9532_OFF;
mutex_lock(&data->update_lock);
reg = i2c_smbus_read_byte_data(client, LED_REG(maxleds, led->id));
- ret = (reg & LED_MASK(led->id)) >> LED_SHIFT(led->id);
+ if (reg >= 0)
+ ret = (reg & LED_MASK(led->id)) >> LED_SHIFT(led->id);
+ else
+ dev_warn(&client->dev, "failed to read LED register: %d\n", reg);
mutex_unlock(&data->update_lock);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0575/2151] perf test: Fix a leaked map reference in the arch dwarf unwind tests
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (573 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0574/2151] leds: pca9532: Check i2c_smbus_read_byte_data() return value Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0576/2151] perf libbfd: Fix the clang -Wthread-safety build failure Greg Kroah-Hartman
` (307 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Chen Pei,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Pei <cp0613@linux.alibaba.com>
[ Upstream commit 1622c9ae39e2882fcbbae7c9d27dda13f1880b93 ]
maps__find() has returned a reference to the map it finds since
commit 42fd623b58db ("perf maps: Get map before returning in
maps__find"), which updated arch/x86/tests/dwarf-unwind.c but missed
the arm, arm64 and powerpc copies. Release the map after reading its
end, as x86 does. All other callers of maps__find() already release
what they get.
Fixes: 42fd623b58dbcc48 ("perf maps: Get map before returning in maps__find")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/arch/arm/tests/dwarf-unwind.c | 1 +
tools/perf/arch/arm64/tests/dwarf-unwind.c | 1 +
tools/perf/arch/powerpc/tests/dwarf-unwind.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/tools/perf/arch/arm/tests/dwarf-unwind.c b/tools/perf/arch/arm/tests/dwarf-unwind.c
index f421910e07097..d4707e9ffd2a8 100644
--- a/tools/perf/arch/arm/tests/dwarf-unwind.c
+++ b/tools/perf/arch/arm/tests/dwarf-unwind.c
@@ -34,6 +34,7 @@ static int sample_ustack(struct perf_sample *sample,
}
stack_size = map__end(map) - sp;
+ map__put(map);
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
diff --git a/tools/perf/arch/arm64/tests/dwarf-unwind.c b/tools/perf/arch/arm64/tests/dwarf-unwind.c
index 440d00f0de141..fbc161a493697 100644
--- a/tools/perf/arch/arm64/tests/dwarf-unwind.c
+++ b/tools/perf/arch/arm64/tests/dwarf-unwind.c
@@ -34,6 +34,7 @@ static int sample_ustack(struct perf_sample *sample,
}
stack_size = map__end(map) - sp;
+ map__put(map);
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
diff --git a/tools/perf/arch/powerpc/tests/dwarf-unwind.c b/tools/perf/arch/powerpc/tests/dwarf-unwind.c
index 66af884baa660..b4bade5d59e24 100644
--- a/tools/perf/arch/powerpc/tests/dwarf-unwind.c
+++ b/tools/perf/arch/powerpc/tests/dwarf-unwind.c
@@ -34,6 +34,7 @@ static int sample_ustack(struct perf_sample *sample,
}
stack_size = map__end(map) - sp;
+ map__put(map);
stack_size = stack_size > STACK_SIZE ? STACK_SIZE : stack_size;
memcpy(buf, (void *) sp, stack_size);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0576/2151] perf libbfd: Fix the clang -Wthread-safety build failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (574 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0575/2151] perf test: Fix a leaked map reference in the arch dwarf unwind tests Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0577/2151] perf symbol: Fix the build when demangling with libbfd Greg Kroah-Hartman
` (306 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit c4c43343501bd9fc24ec501ecaf43b7ef2da44d2 ]
perf_bfd_lock() and perf_bfd_unlock() are the callbacks given to
bfd_thread_init(), so by design they acquire and release the lock on
libbfd's behalf and the lock state differs between entry and exit.
clang's thread safety analysis, which perf builds with as an error,
flags both:
util/libbfd.c:56:1: error: mutex 'bfd_mutex' is still held at the end of function [-Werror,-Wthread-safety-analysis]
util/libbfd.c:60:2: error: releasing mutex 'bfd_mutex' that was not held [-Werror,-Wthread-safety-analysis]
Mark both functions NO_THREAD_SAFETY_ANALYSIS so that libbfd.c compiles
with "make CC=clang BUILD_NONDISTRO=1".
Fixes: b72b8132d8fd2d6b ("perf libbfd: Ensure libbfd is initialized prior to use")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/libbfd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c
index 6df72889e5075..6e00f9dab9ac4 100644
--- a/tools/perf/util/libbfd.c
+++ b/tools/perf/util/libbfd.c
@@ -39,13 +39,13 @@ struct a2l_data {
asymbol **syms;
};
-static bool perf_bfd_lock(void *bfd_mutex)
+static bool perf_bfd_lock(void *bfd_mutex) NO_THREAD_SAFETY_ANALYSIS
{
mutex_lock(bfd_mutex);
return true;
}
-static bool perf_bfd_unlock(void *bfd_mutex)
+static bool perf_bfd_unlock(void *bfd_mutex) NO_THREAD_SAFETY_ANALYSIS
{
mutex_unlock(bfd_mutex);
return true;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0577/2151] perf symbol: Fix the build when demangling with libbfd
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (575 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0576/2151] perf libbfd: Fix the clang -Wthread-safety build failure Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0578/2151] perf build: Only pass clang flags to CXX when CXX is clang Greg Kroah-Hartman
` (305 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit ecbc5aac7d9218320f2c734d75798f34c15a9d85 ]
cxx_demangle_sym() calls bfd_demangle() with the DMGL_PARAMS and
DMGL_ANSI flags, but nothing declares them. The
"#define PACKAGE 'perf'", "#include <bfd.h>" and the DMGL_ definitions
were left behind in symbol-elf.c when the demangling code moved to
symbol.c, and libiberty's demangle.h that defines the flags isn't
installed by every binutils package. The cplus_demangle() variant is
missing a declaration for the same reason.
The code is only built when the C++ ABI's __cxa_demangle() is
unavailable, so most builds never compile it:
$ make BUILD_NONDISTRO=1 NO_DEMANGLE=1
util/symbol.c:2714: error: 'DMGL_PARAMS' undeclared
util/symbol.c:2714: error: 'DMGL_ANSI' undeclared
util/symbol.c:2716: error: implicit declaration of 'bfd_demangle'
Move the libbfd demangling into libbfd.c, which already includes bfd.h,
and declare in symbol.c the libiberty interfaces the cplus_demangle()
variant needs.
Fixes: 4d9b5146f0d91472 ("perf symbol: Move demangling code out of symbol-elf.c")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/libbfd.c | 17 +++++++++++++++++
tools/perf/util/libbfd.h | 9 +++++++++
tools/perf/util/symbol.c | 18 +++++++++++++++---
3 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/libbfd.c b/tools/perf/util/libbfd.c
index 6e00f9dab9ac4..04e6e96f716d8 100644
--- a/tools/perf/util/libbfd.c
+++ b/tools/perf/util/libbfd.c
@@ -72,6 +72,23 @@ static void ensure_bfd_init(void)
pthread_once(&bfd_init_once, perf_bfd_init);
}
+/*
+ * Flags from libiberty's demangle.h. bfd.h declares bfd_demangle but not the
+ * flags to pass to it, and demangle.h isn't installed by every binutils
+ * package.
+ */
+#ifndef DMGL_PARAMS
+#define DMGL_PARAMS (1 << 0) /* Include function arguments. */
+#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc. */
+#endif
+
+char *libbfd__demangle_sym(const char *str, bool params, bool modifiers)
+{
+ int flags = (params ? DMGL_PARAMS : 0) | (modifiers ? DMGL_ANSI : 0);
+
+ return bfd_demangle(/*abfd=*/NULL, str, flags);
+}
+
static int bfd_error(const char *string)
{
const char *errmsg;
diff --git a/tools/perf/util/libbfd.h b/tools/perf/util/libbfd.h
index 953886f3d62f3..14171db8b1120 100644
--- a/tools/perf/util/libbfd.h
+++ b/tools/perf/util/libbfd.h
@@ -31,6 +31,8 @@ int libbfd_filename__read_debuglink(const char *filename, char *debuglink, size_
int symbol__disassemble_bpf_libbfd(struct symbol *sym, struct annotate_args *args);
+char *libbfd__demangle_sym(const char *str, bool params, bool modifiers);
+
#else // !defined(HAVE_LIBBFD_SUPPORT)
#include "annotate.h"
@@ -77,6 +79,13 @@ static inline int symbol__disassemble_bpf_libbfd(struct symbol *sym __always_unu
return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF;
}
+static inline char *libbfd__demangle_sym(const char *str __always_unused,
+ bool params __always_unused,
+ bool modifiers __always_unused)
+{
+ return NULL;
+}
+
#endif // defined(HAVE_LIBBFD_SUPPORT)
#endif /* __PERF_LIBBFD_H */
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index c1e8f5b371777..ddea3c9a09efd 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -28,6 +28,7 @@
#include "util.h" // lsdir()
#include "debug.h"
#include "event.h"
+#include "libbfd.h"
#include "machine.h"
#include "map.h"
#include "symbol.h"
@@ -2553,13 +2554,24 @@ static bool want_demangle(bool is_kernel_sym)
* version.
*/
#ifndef HAVE_CXA_DEMANGLE_SUPPORT
+#ifdef HAVE_CPLUS_DEMANGLE_SUPPORT
+/*
+ * Declarations from libiberty's demangle.h, the header isn't installed by
+ * every binutils package.
+ */
+#ifndef DMGL_PARAMS
+#define DMGL_PARAMS (1 << 0) /* Include function arguments. */
+#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc. */
+#endif
+
+char *cplus_demangle(const char *mangled, int options);
+#endif
+
char *cxx_demangle_sym(const char *str __maybe_unused, bool params __maybe_unused,
bool modifiers __maybe_unused)
{
#ifdef HAVE_LIBBFD_SUPPORT
- int flags = (params ? DMGL_PARAMS : 0) | (modifiers ? DMGL_ANSI : 0);
-
- return bfd_demangle(NULL, str, flags);
+ return libbfd__demangle_sym(str, params, modifiers);
#elif defined(HAVE_CPLUS_DEMANGLE_SUPPORT)
int flags = (params ? DMGL_PARAMS : 0) | (modifiers ? DMGL_ANSI : 0);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0578/2151] perf build: Only pass clang flags to CXX when CXX is clang
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (576 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0577/2151] perf symbol: Fix the build when demangling with libbfd Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0579/2151] perf build: Use the given CC rather than clang in clang builds Greg Kroah-Hartman
` (304 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit c8592f8da838a07ddd0011eeb444771b64193a0f ]
Building with "make CC=clang" appends clang's --target= and
-fintegrated-as to CXX, but CXX is only set to clang++ by "make LLVM=1".
With just CC=clang, CXX is still g++ and every C++ feature test dies:
g++: error: unrecognized command-line option '--target=...'
g++: error: unrecognized command-line option '-fintegrated-as'
The failures are silent, as feature tests are allowed to fail, so the
build quietly loses libllvm and C++ demangling support:
$ make CC=clang && grep LIBLLVM .config-detected
(nothing, whereas a gcc build reports CONFIG_LIBLLVM=y)
The block is entered when CC_NO_CLANG says CC is clang, which says
nothing about CXX. Probe CXX the same way tools/scripts/Makefile.include
probes CC, and only add the flags when CXX really is clang++.
Mixing a clang-built C with a g++-built C++ is fine here, the C++ code
is linked with -lstdc++ already.
Fixes: 4772e66cb45e0dd2 ("perf build: Support build with clang")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Makefile.config | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 06b6b4ce903c4..1941700ed6ef0 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -53,7 +53,14 @@ ifeq ($(CC_NO_CLANG), 0)
endif # CROSS_COMPILE
CC := $(CLANG) $(CLANG_FLAGS) -fintegrated-as
- CXX := $(CXX) $(CLANG_FLAGS) -fintegrated-as
+
+ # CC being clang says nothing about CXX: "make LLVM=1" overrides both, but
+ # "make CC=clang" leaves CXX as g++. Probe CXX the way Makefile.include
+ # probes CC rather than assuming the two match.
+ CXX_NO_CLANG := $(shell if command -v $(firstword $(CXX)) >/dev/null 2>&1; then $(CXX) -dM -E -x c++ /dev/null; fi | grep -Fq "__clang__"; echo $$?)
+ ifeq ($(CXX_NO_CLANG), 0)
+ CXX := $(CXX) $(CLANG_FLAGS) -fintegrated-as
+ endif
# Enabled Wthread-safety analysis for clang builds.
CFLAGS += -Wthread-safety
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0579/2151] perf build: Use the given CC rather than clang in clang builds
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (577 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0578/2151] perf build: Only pass clang flags to CXX when CXX is clang Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0580/2151] perf build: Check the version of the compiler that is used Greg Kroah-Hartman
` (303 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit bd874cd8356166d8fb262d32f368c0e460910d5d ]
The clang block is entered when CC_NO_CLANG has determined that CC is
clang, but it then ignores CC and hard codes $(CLANG), which defaults to
plain "clang". Building with a versioned compiler silently switches
compiler:
$ make CC=clang-19 # actually builds with "clang"
Worse, the target triple is probed with $(CLANG) too, so on a machine
that only has versioned binaries installed the probe produces nothing
and the build stops:
$ make CC=clang-19
*** Specify CROSS_COMPILE or add CLANG_TARGET_FLAGS for x86_64
Use $(CC) in both places. Within the block CC is known to be clang, and
for "make LLVM=1" CC is already $(CLANG), so nothing changes there.
$(CLANG) is left as it is for BPF skeletons, as bpf_skel.mak builds
those with "$(CLANG) --target=bpf" whatever CC happens to be.
Fixes: 4772e66cb45e0dd2 ("perf build: Support build with clang")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Makefile.config | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 1941700ed6ef0..1f96a1dd8dae8 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -37,7 +37,7 @@ ifeq ($(CC_NO_CLANG), 0)
# Default to host architecture if ARCH is not explicitly given.
ifeq ($(ARCH), $(HOSTARCH))
- CLANG_TARGET_FLAGS := $(shell $(CLANG) -print-target-triple)
+ CLANG_TARGET_FLAGS := $(shell $(CC) -print-target-triple)
else
CLANG_TARGET_FLAGS := $(CLANG_TARGET_FLAGS_$(ARCH))
endif
@@ -52,7 +52,7 @@ ifeq ($(CC_NO_CLANG), 0)
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%))
endif # CROSS_COMPILE
- CC := $(CLANG) $(CLANG_FLAGS) -fintegrated-as
+ CC := $(CC) $(CLANG_FLAGS) -fintegrated-as
# CC being clang says nothing about CXX: "make LLVM=1" overrides both, but
# "make CC=clang" leaves CXX as g++. Probe CXX the way Makefile.include
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0580/2151] perf build: Check the version of the compiler that is used
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (578 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0579/2151] perf build: Use the given CC rather than clang in clang builds Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0581/2151] perf check: Add libbabeltrace to the listed features Greg Kroah-Hartman
` (302 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 4f4387a07f601988e44fc6a4f4663aa1ff264f94 ]
The flex and bison flags are adjusted for clang older than 13.0.0, which
doesn't grok -Wno-unused-but-set-variable. The test is reached because
CC_NO_CLANG says CC is clang, but the version comes from $(CLANG), which
defaults to plain "clang" and needn't be the compiler in use:
$ make CC=clang-19 CLANG=clang-12
version from $(CLANG) -> 12.0.0, flag stripped
version from $(CC) -> 19.1.7, flag kept
Dropping the flag lets the warnings it suppresses in the generated flex
and bison code through, and those are errors under -Werror.
Ask $(CC) instead, as that is what compiles the code.
Fixes: 878460e8d0ff84a0 ("perf build: Remove -Wno-unused-but-set-variable from the flex flags when building with clang < 13.0.0")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/Build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 1c2a43e1dc68e..dd4bd73f6c281 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -340,7 +340,7 @@ bison_flags := -DYYENABLE_NLS=0 -Wno-unused-but-set-variable
# Old clangs don't grok -Wno-unused-but-set-variable, remove it
ifeq ($(CC_NO_CLANG), 0)
- CLANG_VERSION := $(shell $(CLANG) --version | head -1 | sed 's/.*clang version \([[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+\).*/\1/g')
+ CLANG_VERSION := $(shell $(CC) --version | head -1 | sed 's/.*clang version \([[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+\).*/\1/g')
ifeq ($(call version-lt3,$(CLANG_VERSION),13.0.0),1)
bison_flags := $(subst -Wno-unused-but-set-variable,,$(bison_flags))
flex_flags := $(subst -Wno-unused-but-set-variable,,$(flex_flags))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0581/2151] perf check: Add libbabeltrace to the listed features
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (579 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0580/2151] perf build: Check the version of the compiler that is used Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0582/2151] perf test: perf data --to-ctf testing Greg Kroah-Hartman
` (301 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Adrian Hunter, Alexander Shishkin, Derek Foreman, Ingo Molnar,
James Clark, Jiri Olsa, Namhyung Kim, Peter Zijlstra, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 8772598b7801a2bb235bd35a858017e0fb939c38 ]
This enables scripts to more easily determine if `perf data --to-ctf`
is supported.
Committer testing:
$ perf check feature libbabeltrace
libbabeltrace: [ on ] # HAVE_LIBBABELTRACE_SUPPORT
$ perf check feature -q libbabeltrace && echo have libbabeltrace support
have libbabeltrace support
$
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Derek Foreman <derek.foreman@collabora.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: a5cac2df8b4a ("perf build: Remove leftovers of removed build options")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/builtin-check.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c
index d19769a8f6897..a6e4cc6bd51a4 100644
--- a/tools/perf/builtin-check.c
+++ b/tools/perf/builtin-check.c
@@ -43,6 +43,7 @@ struct feature_status supported_features[] = {
FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT),
FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT),
FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el]"),
+ FEATURE_STATUS("libbabeltrace", HAVE_LIBBABELTRACE_SUPPORT),
FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT),
FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT),
FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT),
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0582/2151] perf test: perf data --to-ctf testing
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (580 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0581/2151] perf check: Add libbabeltrace to the listed features Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0583/2151] tools build: Deduplicate test-libunwind for different architectures Greg Kroah-Hartman
` (300 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Adrian Hunter, Alexander Shishkin, Derek Foreman, Ingo Molnar,
James Clark, Jiri Olsa, Namhyung Kim, Peter Zijlstra, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 9083ce531a1f7fb5186be934f42d884de34698da ]
If babeltrace is detected check that --to-ctf functions with a data
file and in pipe mode.
Committer testing:
$ perf test 'perf data convert --to-ctf'
124: 'perf data convert --to-ctf' command test : Ok
$ perf test -vv 'perf data convert --to-ctf'
124: 'perf data convert --to-ctf' command test:
--- start ---
test child forked, pid 556008
libbabeltrace: [ on ] # HAVE_LIBBABELTRACE_SUPPORT
Testing Perf Data Conversion Command to CTF (File input)
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.021 MB /tmp/__perf_test.perf.data.9TxzZ (115 samples) ]
[ perf data convert: Converted '/tmp/__perf_test.perf.data.9TxzZ' into CTF data '/tmp/__perf_test.ctf.f5EkS' ]
[ perf data convert: Converted and wrote 0.012 MB (115 samples) ]
Perf Data Converter Command to CTF (File input) [SUCCESS]
Testing Perf Data Conversion Command to CTF (Pipe mode)
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.047 MB - ]
Failed to setup all events.
[ perf data convert: Converted '/tmp/__perf_test.perf.data.9TxzZ' into CTF data '/tmp/__perf_test.ctf.f5EkS' ]
[ perf data convert: Converted and wrote 0.000 MB (0 samples) ]
Perf Data Converter Command to CTF (Pipe mode) [SUCCESS]
Unexpected signal in main
---- end(0) ----
124: 'perf data convert --to-ctf' command test : Ok
$
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Derek Foreman <derek.foreman@collabora.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: a5cac2df8b4a ("perf build: Remove leftovers of removed build options")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../shell/test_perf_data_converter_ctf.sh | 104 ++++++++++++++++++
1 file changed, 104 insertions(+)
create mode 100755 tools/perf/tests/shell/test_perf_data_converter_ctf.sh
diff --git a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
new file mode 100755
index 0000000000000..334eebc9945eb
--- /dev/null
+++ b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
@@ -0,0 +1,104 @@
+#!/bin/bash
+# 'perf data convert --to-ctf' command test
+# SPDX-License-Identifier: GPL-2.0
+
+set -e
+
+err=0
+
+perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
+ctf_dir=$(mktemp -d /tmp/__perf_test.ctf.XXXXX)
+
+cleanup()
+{
+ rm -f "${perfdata}"
+ rm -rf "${ctf_dir}"
+ trap - exit term int
+}
+
+trap_cleanup()
+{
+ echo "Unexpected signal in ${FUNCNAME[1]}"
+ cleanup
+ exit ${err}
+}
+trap trap_cleanup exit term int
+
+check_babeltrace_support()
+{
+ if ! perf check feature libbabeltrace
+ then
+ echo "perf not linked with libbabeltrace, skipping test"
+ exit 2
+ fi
+}
+
+test_ctf_converter_file()
+{
+ echo "Testing Perf Data Conversion Command to CTF (File input)"
+ # Record some data
+ if ! perf record -o "$perfdata" -F 99 -g -- perf test -w noploop
+ then
+ echo "Failed to record perf data"
+ err=1
+ return
+ fi
+
+ # Cleanup previous ctf dir
+ rm -rf "${ctf_dir}"
+
+ # Convert
+ if ! perf data convert --to-ctf "$ctf_dir" --force -i "$perfdata"
+ then
+ echo "Perf Data Converter Command to CTF (File input) [FAILED]"
+ err=1
+ return
+ fi
+
+ if [ -d "${ctf_dir}" ] && [ "$(ls -A "${ctf_dir}")" ]
+ then
+ echo "Perf Data Converter Command to CTF (File input) [SUCCESS]"
+ else
+ echo "Perf Data Converter Command to CTF (File input) [FAILED]"
+ echo " Output directory empty or missing"
+ err=1
+ fi
+}
+
+test_ctf_converter_pipe()
+{
+ echo "Testing Perf Data Conversion Command to CTF (Pipe mode)"
+
+ # Cleanup previous ctf dir
+ rm -rf "${ctf_dir}"
+
+ # Record to stdout and pipe to $perfdata file
+ if ! perf record -o - -F 99 -g -- perf test -w noploop > "$perfdata"
+ then
+ echo "Failed to record perf data"
+ err=1
+ return
+ fi
+
+ if ! perf data convert --to-ctf "$ctf_dir" --force -i "$perfdata"
+ then
+ echo "Perf Data Converter Command to CTF (Pipe mode) [FAILED]"
+ err=1
+ return
+ fi
+
+ if [ -d "${ctf_dir}" ] && [ "$(ls -A "${ctf_dir}")" ]
+ then
+ echo "Perf Data Converter Command to CTF (Pipe mode) [SUCCESS]"
+ else
+ echo "Perf Data Converter Command to CTF (Pipe mode) [FAILED]"
+ echo " Output directory empty or missing"
+ err=1
+ fi
+}
+
+check_babeltrace_support
+test_ctf_converter_file
+test_ctf_converter_pipe
+
+exit ${err}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0583/2151] tools build: Deduplicate test-libunwind for different architectures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (581 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0582/2151] perf test: perf data --to-ctf testing Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0584/2151] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer Greg Kroah-Hartman
` (299 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Adrian Hunter, Albert Ou,
Alexander Shishkin, Alexandre Ghiti, Andrew Jones, Athira Rajeev,
Dapeng Mi, Dmitrii Dolgov, Florian Fainelli, Howard Chu,
Ingo Molnar, James Clark, Jiri Olsa, John Garry, Leo Yan, Li Guan,
Namhyung Kim, Palmer Dabbelt, Paul Walmsley, Peter Zijlstra,
Shimin Guo, Thomas Richter, Tomas Glozar, Will Deacon,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 6d13d53be9ddab1425e0c2789788adc4d6f05d74 ]
The separate test files only exist to pass a different #include,
instead have a single source file and pass -include to $(CC) to
include the relevant header file for the architecture being
tested. Generate the rules using a foreach loop. Include tests for all
current libunwind architectures.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Andrew Jones <andrew.jones@oss.qualcomm.com>
Cc: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <pjw@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shimin Guo <shimin.guo@skydio.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Tomas Glozar <tglozar@redhat.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: a5cac2df8b4a ("perf build: Remove leftovers of removed build options")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/build/Makefile.feature | 12 ++++-
tools/build/feature/Makefile | 46 +++++++++----------
tools/build/feature/test-libunwind-aarch64.c | 27 -----------
tools/build/feature/test-libunwind-arm.c | 28 -----------
.../test-libunwind-debug-frame-aarch64.c | 17 -------
.../feature/test-libunwind-debug-frame-arm.c | 17 -------
.../feature/test-libunwind-debug-frame.c | 1 -
tools/build/feature/test-libunwind-x86.c | 28 -----------
tools/build/feature/test-libunwind-x86_64.c | 28 -----------
tools/build/feature/test-libunwind.c | 1 -
10 files changed, 32 insertions(+), 173 deletions(-)
delete mode 100644 tools/build/feature/test-libunwind-aarch64.c
delete mode 100644 tools/build/feature/test-libunwind-arm.c
delete mode 100644 tools/build/feature/test-libunwind-debug-frame-aarch64.c
delete mode 100644 tools/build/feature/test-libunwind-debug-frame-arm.c
delete mode 100644 tools/build/feature/test-libunwind-x86.c
delete mode 100644 tools/build/feature/test-libunwind-x86_64.c
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index a0133d52aa8a0..d188cdbee4e53 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -104,6 +104,9 @@ FEATURE_TESTS_BASIC := \
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
# of all feature tests
+
+LIBUNWIND_ARCHS:=aarch64 arm loongarch64 mips ppc32 ppc64 riscv s390x x86 x86_64
+
FEATURE_TESTS_EXTRA := \
bionic \
compile-32 \
@@ -124,7 +127,10 @@ FEATURE_TESTS_EXTRA := \
libpfm4 \
libdebuginfod \
clang-bpf-co-re \
- bpftool-skeletons
+ bpftool-skeletons \
+ libunwind \
+ libunwind-debug-frame \
+ $(foreach arch,$(LIBUNWIND_ARCHS),libunwind-$(arch) libunwind-debug-frame-$(arch))
FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC)
@@ -206,6 +212,10 @@ ifeq ($(feature-all), 1)
$(call feature_check,compile-x32)
$(call feature_check,bionic)
$(call feature_check,libbabeltrace)
+ $(call feature_check,libunwind)
+ $(call feature_check,libunwind-debug-frame)
+ $(foreach arch,$(LIBUNWIND_ARCHS),$(call feature_check,libunwind-$(arch)))
+ $(foreach arch,$(LIBUNWIND_ARCHS),$(call feature_check,libunwind-debug-frame-$(arch)))
else
$(foreach feat,$(FEATURE_TESTS),$(call feature_check,$(feat)))
endif
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index c972304c32117..9a85b884e964b 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
include ../../scripts/Makefile.include
+LIBUNWIND_ARCHS:=aarch64 arm loongarch64 mips ppc32 ppc64 riscv s390x x86 x86_64
+
FILES= \
test-all.bin \
test-backtrace.bin \
@@ -38,12 +40,7 @@ FILES= \
test-libtracefs.bin \
test-libunwind.bin \
test-libunwind-debug-frame.bin \
- test-libunwind-x86.bin \
- test-libunwind-x86_64.bin \
- test-libunwind-arm.bin \
- test-libunwind-aarch64.bin \
- test-libunwind-debug-frame-arm.bin \
- test-libunwind-debug-frame-aarch64.bin \
+ $(foreach arch,$(LIBUNWIND_ARCHS),test-libunwind-$(arch).bin test-libunwind-debug-frame-$(arch).bin) \
test-pthread-attr-setaffinity-np.bin \
test-pthread-barrier.bin \
test-stackprotector-all.bin \
@@ -201,27 +198,26 @@ $(OUTPUT)test-numa_num_possible_cpus.bin:
$(BUILD) -lnuma
$(OUTPUT)test-libunwind.bin:
- $(BUILD) -lelf -llzma
+ $(BUILD) -include libunwind.h -lelf -llzma -lunwind
$(OUTPUT)test-libunwind-debug-frame.bin:
- $(BUILD) -lelf -llzma
-$(OUTPUT)test-libunwind-x86.bin:
- $(BUILD) -lelf -llzma -lunwind-x86
-
-$(OUTPUT)test-libunwind-x86_64.bin:
- $(BUILD) -lelf -llzma -lunwind-x86_64
-
-$(OUTPUT)test-libunwind-arm.bin:
- $(BUILD) -lelf -llzma -lunwind-arm
-
-$(OUTPUT)test-libunwind-aarch64.bin:
- $(BUILD) -lelf -llzma -lunwind-aarch64
-
-$(OUTPUT)test-libunwind-debug-frame-arm.bin:
- $(BUILD) -lelf -llzma -lunwind-arm
-
-$(OUTPUT)test-libunwind-debug-frame-aarch64.bin:
- $(BUILD) -lelf -llzma -lunwind-aarch64
+ $(BUILD) -include libunwind.h -lelf -llzma -lunwind
+
+define LIBUNWIND_RULE
+$$(OUTPUT)test-libunwind-$(1).bin:
+ $$(CC) $$(CFLAGS) -MD -Wall -Werror -include libunwind-$(1).h -o $$@ \
+ test-libunwind.c $$(LDFLAGS) -lelf -llzma -lunwind-$(1) \
+ > $$(@:.bin=.make.output) 2>&1
+
+$$(OUTPUT)test-libunwind-debug-frame-$(1).bin:
+ $$(CC) $$(CFLAGS) -MD -Wall -Werror -include libunwind-$(1).h -o $$@ \
+ test-libunwind-debug-frame.c $$(LDFLAGS) -lelf -llzma -lunwind-$(1) \
+ > $$(@:.bin=.make.output) 2>&1
+
+endef
+$(foreach arch,$(LIBUNWIND_ARCHS), \
+ $(eval $(call LIBUNWIND_RULE,$(arch))) \
+)
$(OUTPUT)test-libslang.bin:
$(BUILD) -lslang
diff --git a/tools/build/feature/test-libunwind-aarch64.c b/tools/build/feature/test-libunwind-aarch64.c
deleted file mode 100644
index 323803f49212a..0000000000000
--- a/tools/build/feature/test-libunwind-aarch64.c
+++ /dev/null
@@ -1,27 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <libunwind-aarch64.h>
-#include <stdlib.h>
-
-extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
- unw_word_t ip,
- unw_dyn_info_t *di,
- unw_proc_info_t *pi,
- int need_unwind_info, void *arg);
-
-#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
-
-static unw_accessors_t accessors;
-
-int main(void)
-{
- unw_addr_space_t addr_space;
-
- addr_space = unw_create_addr_space(&accessors, 0);
- if (addr_space)
- return 0;
-
- unw_init_remote(NULL, addr_space, NULL);
- dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
-
- return 0;
-}
diff --git a/tools/build/feature/test-libunwind-arm.c b/tools/build/feature/test-libunwind-arm.c
deleted file mode 100644
index cb378b7d68669..0000000000000
--- a/tools/build/feature/test-libunwind-arm.c
+++ /dev/null
@@ -1,28 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <libunwind-arm.h>
-#include <stdlib.h>
-
-extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
- unw_word_t ip,
- unw_dyn_info_t *di,
- unw_proc_info_t *pi,
- int need_unwind_info, void *arg);
-
-
-#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
-
-static unw_accessors_t accessors;
-
-int main(void)
-{
- unw_addr_space_t addr_space;
-
- addr_space = unw_create_addr_space(&accessors, 0);
- if (addr_space)
- return 0;
-
- unw_init_remote(NULL, addr_space, NULL);
- dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
-
- return 0;
-}
diff --git a/tools/build/feature/test-libunwind-debug-frame-aarch64.c b/tools/build/feature/test-libunwind-debug-frame-aarch64.c
deleted file mode 100644
index 36d6646c185e1..0000000000000
--- a/tools/build/feature/test-libunwind-debug-frame-aarch64.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <libunwind-aarch64.h>
-#include <stdlib.h>
-
-extern int
-UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug,
- unw_word_t ip, unw_word_t segbase,
- const char *obj_name, unw_word_t start,
- unw_word_t end);
-
-#define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame)
-
-int main(void)
-{
- dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0);
- return 0;
-}
diff --git a/tools/build/feature/test-libunwind-debug-frame-arm.c b/tools/build/feature/test-libunwind-debug-frame-arm.c
deleted file mode 100644
index 8696e48e12684..0000000000000
--- a/tools/build/feature/test-libunwind-debug-frame-arm.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <libunwind-arm.h>
-#include <stdlib.h>
-
-extern int
-UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug,
- unw_word_t ip, unw_word_t segbase,
- const char *obj_name, unw_word_t start,
- unw_word_t end);
-
-#define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame)
-
-int main(void)
-{
- dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0);
- return 0;
-}
diff --git a/tools/build/feature/test-libunwind-debug-frame.c b/tools/build/feature/test-libunwind-debug-frame.c
index efb55cdd8d019..4c57e37004b3a 100644
--- a/tools/build/feature/test-libunwind-debug-frame.c
+++ b/tools/build/feature/test-libunwind-debug-frame.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#include <libunwind.h>
#include <stdlib.h>
extern int
diff --git a/tools/build/feature/test-libunwind-x86.c b/tools/build/feature/test-libunwind-x86.c
deleted file mode 100644
index e5e0f6c896374..0000000000000
--- a/tools/build/feature/test-libunwind-x86.c
+++ /dev/null
@@ -1,28 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <libunwind-x86.h>
-#include <stdlib.h>
-
-extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
- unw_word_t ip,
- unw_dyn_info_t *di,
- unw_proc_info_t *pi,
- int need_unwind_info, void *arg);
-
-
-#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
-
-static unw_accessors_t accessors;
-
-int main(void)
-{
- unw_addr_space_t addr_space;
-
- addr_space = unw_create_addr_space(&accessors, 0);
- if (addr_space)
- return 0;
-
- unw_init_remote(NULL, addr_space, NULL);
- dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
-
- return 0;
-}
diff --git a/tools/build/feature/test-libunwind-x86_64.c b/tools/build/feature/test-libunwind-x86_64.c
deleted file mode 100644
index 62ae4db597dca..0000000000000
--- a/tools/build/feature/test-libunwind-x86_64.c
+++ /dev/null
@@ -1,28 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <libunwind-x86_64.h>
-#include <stdlib.h>
-
-extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
- unw_word_t ip,
- unw_dyn_info_t *di,
- unw_proc_info_t *pi,
- int need_unwind_info, void *arg);
-
-
-#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
-
-static unw_accessors_t accessors;
-
-int main(void)
-{
- unw_addr_space_t addr_space;
-
- addr_space = unw_create_addr_space(&accessors, 0);
- if (addr_space)
- return 0;
-
- unw_init_remote(NULL, addr_space, NULL);
- dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
-
- return 0;
-}
diff --git a/tools/build/feature/test-libunwind.c b/tools/build/feature/test-libunwind.c
index 53fd26614ff0f..5af5dc3a73d4e 100644
--- a/tools/build/feature/test-libunwind.c
+++ b/tools/build/feature/test-libunwind.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
-#include <libunwind.h>
#include <stdlib.h>
extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0584/2151] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (582 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0583/2151] tools build: Deduplicate test-libunwind for different architectures Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0585/2151] perf build: Remove leftovers of removed build options Greg Kroah-Hartman
` (298 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Michael Jeanson,
Adrian Hunter, Alexander Shishkin, Derek Foreman, Ingo Molnar,
James Clark, Jiri Olsa, Mark Rutland, Mathieu Desnoyers,
Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Jeanson <mjeanson@efficios.com>
[ Upstream commit 536e81f07450562caba8e62022763a78fd00a0a7 ]
The 1.x branch of Babeltrace has been superseded by 2.x in 2020 and has
been unmaintained since 2022, efforts have started to remove it from
popular distributions.
Babeltrace 2.x offers a very similar 'ctf-writer' library that can be used
with minimal changes for the '--to-ctf' feature and has been packaged
since Debian 11 and Fedora 32.
This patch replaces the 'libbabeltrace' build feature with
'babeltrace2-ctf-writer' using pkgconfig detection, adjusts the naming of
the public headers and applies minor API cleanups.
There is no changes to the output ctf traces, the ctf-writer API still
implements version 1.8 of the CTF specification that can be read by
either Babeltrace 1 / 2 or any CTF compliant reader.
Also remove some ifdefs in the cli option parsing to allow printing the
helpful error message with '--to-ctf' when built without babeltrace2.
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Derek Foreman <derek.foreman@collabora.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: a5cac2df8b4a ("perf build: Remove leftovers of removed build options")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/build/Makefile.feature | 5 +--
tools/build/feature/Makefile | 6 ++--
tools/build/feature/test-all.c | 6 ++--
...ltrace.c => test-babeltrace2-ctf-writer.c} | 3 +-
tools/perf/Makefile.config | 27 +++++++--------
tools/perf/Makefile.perf | 2 +-
tools/perf/builtin-check.c | 2 +-
tools/perf/builtin-data.c | 18 +++-------
tools/perf/tests/make | 4 +--
.../shell/test_perf_data_converter_ctf.sh | 8 ++---
tools/perf/util/Build | 2 +-
tools/perf/util/data-convert-bt.c | 33 +++++++++----------
tools/perf/util/data-convert.h | 4 +--
13 files changed, 53 insertions(+), 67 deletions(-)
rename tools/build/feature/{test-libbabeltrace.c => test-babeltrace2-ctf-writer.c} (59%)
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index d188cdbee4e53..066e368e7fa91 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -116,7 +116,7 @@ FEATURE_TESTS_EXTRA := \
gtk2 \
gtk2-infobar \
hello \
- libbabeltrace \
+ babeltrace2-ctf-writer \
libcapstone \
libbfd-liberty \
libbfd-liberty-z \
@@ -165,6 +165,7 @@ FEATURE_GROUP_MEMBERS-libbfd = libbfd-liberty libbfd-liberty-z
# Declare list of feature dependency packages that provide pkg-config files.
#
FEATURE_PKG_CONFIG ?= \
+ babeltrace2-ctf-writer \
libtraceevent \
libtracefs
@@ -211,7 +212,7 @@ ifeq ($(feature-all), 1)
$(call feature_check,compile-32)
$(call feature_check,compile-x32)
$(call feature_check,bionic)
- $(call feature_check,libbabeltrace)
+ $(call feature_check,babeltrace2-ctf-writer)
$(call feature_check,libunwind)
$(call feature_check,libunwind-debug-frame)
$(foreach arch,$(LIBUNWIND_ARCHS),$(call feature_check,libunwind-$(arch)))
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 9a85b884e964b..b22e5a2db2820 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -45,7 +45,7 @@ FILES= \
test-pthread-barrier.bin \
test-stackprotector-all.bin \
test-timerfd.bin \
- test-libbabeltrace.bin \
+ test-babeltrace2-ctf-writer.bin \
test-libcapstone.bin \
test-compile-32.bin \
test-compile-x32.bin \
@@ -294,8 +294,8 @@ $(OUTPUT)test-backtrace.bin:
$(OUTPUT)test-timerfd.bin:
$(BUILD)
-$(OUTPUT)test-libbabeltrace.bin:
- $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
+$(OUTPUT)test-babeltrace2-ctf-writer.bin:
+ $(BUILD) # -lbabeltrace2-ctf-writer provided by $(FEATURE_CHECK_LDFLAGS-babeltrace2-ctf-writer)
$(OUTPUT)test-libcapstone.bin:
$(BUILD) # -lcapstone provided by $(FEATURE_CHECK_LDFLAGS-libcapstone)
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 8a354b81417c6..3e81c2b2d4298 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -100,13 +100,13 @@
# if 0
/*
- * Disable libbabeltrace check for test-all, because the requested
+ * Disable babeltrace2-ctf-writer check for test-all, because the requested
* library version is not released yet in most distributions. Will
* reenable later.
*/
-#define main main_test_libbabeltrace
-# include "test-libbabeltrace.c"
+#define main main_test_babeltrace2_ctf_writer
+# include "test-babeltrace2-ctf-writer.c"
#undef main
#endif
diff --git a/tools/build/feature/test-libbabeltrace.c b/tools/build/feature/test-babeltrace2-ctf-writer.c
similarity index 59%
rename from tools/build/feature/test-libbabeltrace.c
rename to tools/build/feature/test-babeltrace2-ctf-writer.c
index 10bb69d55694c..9c89082e9f884 100644
--- a/tools/build/feature/test-libbabeltrace.c
+++ b/tools/build/feature/test-babeltrace2-ctf-writer.c
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
-#include <babeltrace/ctf-writer/writer.h>
-#include <babeltrace/ctf-ir/stream-class.h>
+#include <babeltrace2-ctf-writer/writer.h>
int main(void)
{
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 1f96a1dd8dae8..284d5d0348f9c 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -212,14 +212,11 @@ endif
FEATURE_CHECK_CFLAGS-libdw := $(LIBDW_CFLAGS)
FEATURE_CHECK_LDFLAGS-libdw := $(LIBDW_LDFLAGS) $(DWARFLIBS)
-# for linking with debug library, run like:
-# make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/
-ifdef LIBBABELTRACE_DIR
- LIBBABELTRACE_CFLAGS := -I$(LIBBABELTRACE_DIR)/include
- LIBBABELTRACE_LDFLAGS := -L$(LIBBABELTRACE_DIR)/lib
+ifneq ($(NO_BABELTRACE2),1)
+ ifeq ($(call get-executable,$(PKG_CONFIG)),)
+ $(error Error: $(PKG_CONFIG) needed by babeltrace2 is missing on this system, please install it)
+ endif
endif
-FEATURE_CHECK_CFLAGS-libbabeltrace := $(LIBBABELTRACE_CFLAGS)
-FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf
# for linking with debug library, run like:
# make DEBUG=1 LIBCAPSTONE_DIR=/opt/capstone/
@@ -1096,15 +1093,15 @@ else
NO_PERF_READ_VDSOX32 := 1
endif
-ifndef NO_LIBBABELTRACE
- $(call feature_check,libbabeltrace)
- ifeq ($(feature-libbabeltrace), 1)
- CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS)
- LDFLAGS += $(LIBBABELTRACE_LDFLAGS)
- EXTLIBS += -lbabeltrace-ctf
- $(call detected,CONFIG_LIBBABELTRACE)
+ifndef NO_BABELTRACE2
+ $(call feature_check,babeltrace2-ctf-writer)
+ ifeq ($(feature-babeltrace2-ctf-writer), 1)
+ CFLAGS += -DHAVE_BABELTRACE2_CTF_WRITER_SUPPORT $(shell $(PKG_CONFIG) --cflags babeltrace2-ctf-writer)
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L babeltrace2-ctf-writer)
+ EXTLIBS += $(shell $(PKG_CONFIG) --libs-only-l babeltrace2-ctf-writer)
+ $(call detected,CONFIG_BABELTRACE2_CTF_WRITER)
else
- $(warning No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev)
+ $(warning No babeltrace2 found, disables 'perf data' CTF format support, please install libbabeltrace2-dev[el])
endif
endif
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 5aee6f6e8b983..4b184859cbd24 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -76,7 +76,7 @@ include ../scripts/utilities.mak
#
# Define NO_ZLIB if you do not want to support compressed kernel modules
#
-# Define NO_LIBBABELTRACE if you do not want libbabeltrace support
+# Define NO_BABELTRACE2 if you do not want babeltrace2-ctf-writer support
# for CTF data format.
#
# Define NO_CAPSTONE if you do not want libcapstone support
diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c
index a6e4cc6bd51a4..534004a656758 100644
--- a/tools/perf/builtin-check.c
+++ b/tools/perf/builtin-check.c
@@ -43,7 +43,7 @@ struct feature_status supported_features[] = {
FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT),
FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT),
FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license incompatibility, use BUILD_NONDISTRO=1 and install binutils-dev[el]"),
- FEATURE_STATUS("libbabeltrace", HAVE_LIBBABELTRACE_SUPPORT),
+ FEATURE_STATUS("babeltrace2-ctf-writer", HAVE_BABELTRACE2_CTF_WRITER_SUPPORT),
FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT),
FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT),
FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT),
diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
index ce51cbf6dc97e..1c521b1b2d78e 100644
--- a/tools/perf/builtin-data.c
+++ b/tools/perf/builtin-data.c
@@ -39,10 +39,8 @@ const struct option data_options[] = {
OPT_INCR('v', "verbose", &verbose, "be more verbose"),
OPT_STRING('i', "input", &input_name, "file", "input file name"),
OPT_STRING(0, "to-json", &to_json, NULL, "Convert to JSON format"),
-#ifdef HAVE_LIBBABELTRACE_SUPPORT
OPT_STRING(0, "to-ctf", &to_ctf, NULL, "Convert to CTF format"),
OPT_BOOLEAN(0, "tod", &opts.tod, "Convert time to wall clock time"),
-#endif
OPT_BOOLEAN('f', "force", &opts.force, "don't complain, do it"),
OPT_BOOLEAN(0, "all", &opts.all, "Convert all events"),
OPT_END()
@@ -62,29 +60,21 @@ static int cmd_data_convert(int argc, const char **argv)
pr_err("You cannot specify both --to-ctf and --to-json.\n");
return -1;
}
-#ifdef HAVE_LIBBABELTRACE_SUPPORT
if (!to_json && !to_ctf) {
pr_err("You must specify one of --to-ctf or --to-json.\n");
return -1;
}
-#else
- if (!to_json) {
- pr_err("You must specify --to-json.\n");
- return -1;
-}
-#endif
if (to_json)
return bt_convert__perf2json(input_name, to_json, &opts);
if (to_ctf) {
-#if defined(HAVE_LIBBABELTRACE_SUPPORT) && defined(HAVE_LIBTRACEEVENT)
+#if defined(HAVE_BABELTRACE2_CTF_WRITER_SUPPORT) && defined(HAVE_LIBTRACEEVENT)
return bt_convert__perf2ctf(input_name, to_ctf, &opts);
#else
- pr_err("The libbabeltrace support is not compiled in. perf should be "
- "compiled with environment variables LIBBABELTRACE=1 and "
- "LIBBABELTRACE_DIR=/path/to/libbabeltrace/.\n"
- "Check also if libbtraceevent devel files are available.\n");
+ pr_err("The babeltrace2 ctf support is not compiled in. Ensure you have both\n"
+ "libbabeltrace2-dev[el] and libtraceevent-dev[el] installed or set\n"
+ "PKG_CONFIG_PATH to find a local installation of those libraries.\n");
return -1;
#endif
}
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index c721cd1bcaa9a..1fe1ef45e5c10 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -92,7 +92,7 @@ make_no_libbpf := NO_LIBBPF=1
make_libbpf_dynamic := LIBBPF_DYNAMIC=1
make_no_libbpf_DEBUG := NO_LIBBPF=1 DEBUG=1
make_no_libllvm := NO_LIBLLVM=1
-make_with_babeltrace:= LIBBABELTRACE=1
+make_no_babeltrace2 := NO_BABELTRACE2=1
make_with_coresight := CORESIGHT=1
make_no_sdt := NO_SDT=1
make_no_libpfm4 := NO_LIBPFM4=1
@@ -162,7 +162,7 @@ run += make_no_libbpf_DEBUG
run += make_no_libllvm
run += make_no_sdt
run += make_no_syscall_tbl
-run += make_with_babeltrace
+run += make_no_babeltrace2
run += make_with_coresight
run += make_with_clangllvm
run += make_no_libpfm4
diff --git a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
index 334eebc9945eb..bc58a8dabf4cd 100755
--- a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
+++ b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh
@@ -24,11 +24,11 @@ trap_cleanup()
}
trap trap_cleanup exit term int
-check_babeltrace_support()
+check_babeltrace2_support()
{
- if ! perf check feature libbabeltrace
+ if ! perf check feature babeltrace2-ctf-writer
then
- echo "perf not linked with libbabeltrace, skipping test"
+ echo "perf not linked with babeltrace2-ctf-writer, skipping test"
exit 2
fi
}
@@ -97,7 +97,7 @@ test_ctf_converter_pipe()
fi
}
-check_babeltrace_support
+check_babeltrace2_support
test_ctf_converter_file
test_ctf_converter_pipe
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index dd4bd73f6c281..90b9274543596 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -232,7 +232,7 @@ perf-util-$(CONFIG_LIBUNWIND_X86) += libunwind/x86_32.o
perf-util-$(CONFIG_LIBUNWIND_AARCH64) += libunwind/arm64.o
ifeq ($(CONFIG_LIBTRACEEVENT),y)
- perf-util-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
+ perf-util-$(CONFIG_BABELTRACE2_CTF_WRITER) += data-convert-bt.o
endif
perf-util-y += data-convert-json.o
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 3d2e437e1354c..f8767753ce723 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -11,14 +11,13 @@
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/zalloc.h>
-#include <babeltrace/ctf-writer/writer.h>
-#include <babeltrace/ctf-writer/clock.h>
-#include <babeltrace/ctf-writer/stream.h>
-#include <babeltrace/ctf-writer/event.h>
-#include <babeltrace/ctf-writer/event-types.h>
-#include <babeltrace/ctf-writer/event-fields.h>
-#include <babeltrace/ctf-ir/utils.h>
-#include <babeltrace/ctf/events.h>
+#include <babeltrace2-ctf-writer/writer.h>
+#include <babeltrace2-ctf-writer/clock.h>
+#include <babeltrace2-ctf-writer/stream.h>
+#include <babeltrace2-ctf-writer/event.h>
+#include <babeltrace2-ctf-writer/event-types.h>
+#include <babeltrace2-ctf-writer/event-fields.h>
+#include <babeltrace2-ctf-writer/utils.h>
#include "asm/bug.h"
#include "data-convert.h"
#include "session.h"
@@ -114,13 +113,13 @@ static int value_set(struct bt_ctf_field_type *type,
}
if (sign) {
- ret = bt_ctf_field_signed_integer_set_value(field, val);
+ ret = bt_ctf_field_integer_signed_set_value(field, val);
if (ret) {
pr_err("failed to set field value %s\n", name);
goto err;
}
} else {
- ret = bt_ctf_field_unsigned_integer_set_value(field, val);
+ ret = bt_ctf_field_integer_unsigned_set_value(field, val);
if (ret) {
pr_err("failed to set field value %s\n", name);
goto err;
@@ -367,10 +366,10 @@ static int add_tracepoint_field_value(struct ctf_writer *cw,
data + offset + i * len, len);
if (!(flags & TEP_FIELD_IS_SIGNED))
- ret = bt_ctf_field_unsigned_integer_set_value(
+ ret = bt_ctf_field_integer_unsigned_set_value(
field, value_int);
else
- ret = bt_ctf_field_signed_integer_set_value(
+ ret = bt_ctf_field_integer_signed_set_value(
field, adjust_signedness(value_int, len));
}
@@ -464,7 +463,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
goto put_len_type;
}
- ret = bt_ctf_field_unsigned_integer_set_value(len_field, nr_elements);
+ ret = bt_ctf_field_integer_unsigned_set_value(len_field, nr_elements);
if (ret) {
pr_err("failed to set field value for raw_len\n");
goto put_len_field;
@@ -493,7 +492,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
struct bt_ctf_field *elem_field =
bt_ctf_field_sequence_get_field(seq_field, i);
- ret = bt_ctf_field_unsigned_integer_set_value(elem_field,
+ ret = bt_ctf_field_integer_unsigned_set_value(elem_field,
((u32 *)(sample->raw_data))[i]);
bt_ctf_field_put(elem_field);
@@ -538,7 +537,7 @@ add_callchain_output_values(struct bt_ctf_event_class *event_class,
goto put_len_type;
}
- ret = bt_ctf_field_unsigned_integer_set_value(len_field, nr_elements);
+ ret = bt_ctf_field_integer_unsigned_set_value(len_field, nr_elements);
if (ret) {
pr_err("failed to set field value for perf_callchain_size\n");
goto put_len_field;
@@ -568,7 +567,7 @@ add_callchain_output_values(struct bt_ctf_event_class *event_class,
struct bt_ctf_field *elem_field =
bt_ctf_field_sequence_get_field(seq_field, i);
- ret = bt_ctf_field_unsigned_integer_set_value(elem_field,
+ ret = bt_ctf_field_integer_unsigned_set_value(elem_field,
((u64 *)(callchain->ips))[i]);
bt_ctf_field_put(elem_field);
@@ -721,7 +720,7 @@ static struct ctf_stream *ctf_stream__create(struct ctf_writer *cw, int cpu)
goto out;
}
- ret = bt_ctf_field_unsigned_integer_set_value(cpu_field, (u32) cpu);
+ ret = bt_ctf_field_integer_unsigned_set_value(cpu_field, (u32) cpu);
if (ret) {
pr_err("Failed to update CPU number\n");
goto out;
diff --git a/tools/perf/util/data-convert.h b/tools/perf/util/data-convert.h
index 1b4c5f598415d..7c8d160fe3d93 100644
--- a/tools/perf/util/data-convert.h
+++ b/tools/perf/util/data-convert.h
@@ -10,10 +10,10 @@ struct perf_data_convert_opts {
bool tod;
};
-#ifdef HAVE_LIBBABELTRACE_SUPPORT
+#ifdef HAVE_BABELTRACE2_CTF_WRITER_SUPPORT
int bt_convert__perf2ctf(const char *input_name, const char *to_ctf,
struct perf_data_convert_opts *opts);
-#endif /* HAVE_LIBBABELTRACE_SUPPORT */
+#endif /* HAVE_BABELTRACE2_CTF_WRITER_SUPPORT */
int bt_convert__perf2json(const char *input_name, const char *to_ctf,
struct perf_data_convert_opts *opts);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0585/2151] perf build: Remove leftovers of removed build options
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (583 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0584/2151] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0586/2151] leds: lm3692x: Fix regulator/gpio leak and wrong enabled state on last write failure Greg Kroah-Hartman
` (297 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit a5cac2df8b4af0410dd6339e6491cb1e4fbc6986 ]
NO_LIBDW_DWARF_UNWIND, NO_SYSCALL_TABLE and the embedded clang/LLVM
support were all removed, but each removal left the matching entry in
the build test suite behind:
run += make_no_libdw_dwarf_unwind
run += make_no_syscall_tbl
run += make_with_clangllvm
None of these have a make_* variable defining what to build, so $($@)
expands to nothing and each one silently repeats the plain "make_pure"
build. The suite therefore spends six builds, as every test is also run
with O=, appearing to cover options that no longer exist.
Remove them, along with the NO_LIBDW_DWARF_UNWIND comment that is still
in Makefile.perf.
Fixes: 2e9191573a69ff96 ("perf build: Remove NO_LIBDW_DWARF_UNWIND option")
Fixes: 3cc550f5bbcf54ab ("perf tools: Remove dependency on libaudit")
Fixes: 56b11a2126bf2f42 ("perf bpf: Remove support for embedding clang for compiling BPF events (-e foo.c)")
Signed-off-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Makefile.perf | 3 ---
tools/perf/tests/make | 3 ---
2 files changed, 6 deletions(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 4b184859cbd24..3e3e266c5bc1d 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -61,9 +61,6 @@ include ../scripts/utilities.mak
#
# Define NO_LIBBIONIC if you do not want bionic support
#
-# Define NO_LIBDW_DWARF_UNWIND if you do not want libdw support
-# for dwarf backtrace post unwind.
-#
# Define NO_LIBTRACEEVENT=1 if you don't want libtraceevent to be linked,
# this will remove multiple features and tools, such as 'perf trace',
# that need it to read tracefs event format files, etc.
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 1fe1ef45e5c10..e91f46970d8f7 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -152,7 +152,6 @@ run += make_no_demangle
run += make_no_libelf
run += make_no_libdw
run += make_libunwind
-run += make_no_libdw_dwarf_unwind
run += make_no_backtrace
run += make_no_libcapstone
run += make_no_libnuma
@@ -161,10 +160,8 @@ run += make_no_libbpf
run += make_no_libbpf_DEBUG
run += make_no_libllvm
run += make_no_sdt
-run += make_no_syscall_tbl
run += make_no_babeltrace2
run += make_with_coresight
-run += make_with_clangllvm
run += make_no_libpfm4
run += make_refcnt_check
run += make_help
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0586/2151] leds: lm3692x: Fix regulator/gpio leak and wrong enabled state on last write failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (584 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0585/2151] perf build: Remove leftovers of removed build options Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0587/2151] perf annotate-data: Show the sample count in the data-type browser Greg Kroah-Hartman
` (296 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Cong Nguyen, Lee Jones, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Nguyen <congnt264@gmail.com>
[ Upstream commit 145ca6bca2cc5fd8d9c7af216df58a9c75c0e84c ]
Every write in lm3692x_leds_enable() checks its return and jumps to
out: on failure -- except the last one, which falls through and sets
led->enabled = true regardless of whether it actually succeeded. Leaks
the regulator on a failing probe, and short-circuits later
brightness_set() calls without retrying.
Route it through out: like every other write here, and only set
enabled = true once it succeeds.
Fixes: 260718b3a35d ("leds: lm3692x: Disable chip on brightness 0")
Assisted-by: Claude:claude-opus-4
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Link: https://patch.msgid.link/20260915034515.4147981-1-congnt264@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-lm3692x.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-lm3692x.c b/drivers/leds/leds-lm3692x.c
index c319ff4d70b2a..03f2196836751 100644
--- a/drivers/leds/leds-lm3692x.c
+++ b/drivers/leds/leds-lm3692x.c
@@ -274,9 +274,11 @@ static int lm3692x_leds_enable(struct lm3692x_led *led)
ret = regmap_update_bits(led->regmap, LM3692X_EN, LM3692X_ENABLE_MASK,
enable_state | LM3692X_DEVICE_EN);
+ if (ret)
+ goto out;
led->enabled = true;
- return ret;
+ return 0;
out:
dev_err(&led->client->dev, "Fail writing initialization values\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0587/2151] perf annotate-data: Show the sample count in the data-type browser
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (585 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0586/2151] leds: lm3692x: Fix regulator/gpio leak and wrong enabled state on last write failure Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0588/2151] RDMA/core: Fix partial copy of IPv6 flow_lbl in LAG hash skb Greg Kroah-Hartman
` (295 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 9db4e9d6cc7c7d318fb6d6bb73abe3fed27385a8 ]
The data-type browser has a samples view, selected with -n (or with
annotate.show_nr_samples), in which browser__write_overhead() prints a
local nr_samples variable that is initialized to zero and never
updated, so every member is listed as having no samples while the
period and percent columns for the same entry are filled in.
Print the histogram entry's own count instead.
This predates the load/store counter split, so fix it ahead of that
patch: the split then only has to adapt a line that is already correct,
and this fix can be picked on its own.
Fixes: d001c7a7f4736743 ("perf annotate-data: Add hist_entry__annotate_data_tui()")
Acked-by: Namhyung Kim <namhyung@kernel.org>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/ui/browsers/annotate-data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/ui/browsers/annotate-data.c b/tools/perf/ui/browsers/annotate-data.c
index aa8c89fe2e82c..1080ed1a40d26 100644
--- a/tools/perf/ui/browsers/annotate-data.c
+++ b/tools/perf/ui/browsers/annotate-data.c
@@ -370,7 +370,7 @@ static void browser__write_overhead(struct ui_browser *uib,
u64 period = hist->period;
double percent = total->period ? (100.0 * period / total->period) : 0;
bool current = ui_browser__is_current_entry(uib, row);
- int nr_samples = 0;
+ int nr_samples = hist->nr_samples;
ui_browser__set_percent_color(uib, percent, current);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0588/2151] RDMA/core: Fix partial copy of IPv6 flow_lbl in LAG hash skb
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (586 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0587/2151] perf annotate-data: Show the sample count in the data-type browser Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0589/2151] RDMA/irdma: Fix erroneous -ENOMEM for large MR registration Greg Kroah-Hartman
` (294 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit b63d21631f836528ef660d7b5a0d84890ff6dbd5 ]
rdma_build_skb() constructs a synthetic IPv6 header for LAG slave
selection and copies the flow label from the AH attribute:
memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label,
sizeof(*ip6h->flow_lbl));
ipv6hdr.flow_lbl is __u8[3], so sizeof(*ip6h->flow_lbl) dereferences the
array to a single __u8 and yields 1. The memcpy therefore copies only
the first byte of the flow label, leaving flow_lbl[1] and flow_lbl[2]
uninitialised in the skb buffer (alloc_skb() does not zero the data).
The resulting LAG hash is computed over one byte of real flow-label
data and two bytes of kmalloc residue, so IPv6 RoCEv2 traffic on a
bonded interface can be steered to the wrong slave.
Use sizeof(ip6h->flow_lbl) (the array, 3 bytes) so the whole flow label
is copied.
Fixes: bd3920eac1331 ("RDMA/core: Add LAG functionality")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260916120926.1761-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/core/lag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/lag.c b/drivers/infiniband/core/lag.c
index 8fd80adfe833e..eeae4b0898ee0 100644
--- a/drivers/infiniband/core/lag.c
+++ b/drivers/infiniband/core/lag.c
@@ -59,7 +59,7 @@ static struct sk_buff *rdma_build_skb(struct net_device *netdev,
ip6h->version = 6;
ip6h->nexthdr = IPPROTO_UDP;
memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label,
- sizeof(*ip6h->flow_lbl));
+ sizeof(ip6h->flow_lbl));
memcpy(&ip6h->saddr, ah_attr->grh.sgid_attr->gid.raw,
sizeof(struct in6_addr));
memcpy(&ip6h->daddr, ah_attr->grh.dgid.raw,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0589/2151] RDMA/irdma: Fix erroneous -ENOMEM for large MR registration
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (587 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0588/2151] RDMA/core: Fix partial copy of IPv6 flow_lbl in LAG hash skb Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0590/2151] leds: st1202: Clear unused pattern slots in pattern_set() Greg Kroah-Hartman
` (293 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jacob Moroni, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacob Moroni <jmoroni@google.com>
[ Upstream commit 5bb710151753fe53047b1d34b1b54d0f179cec68 ]
Commit cc8997c94bf3 ("RDMA/irdma: Refactor PBLE functions")
replaced the explicit level1_only boolean with a bit mask
but did not properly convert the "if (level1_only)" check
in irdma_get_pble() to be "lvl == PBLE_LEVEL_1" and instead
left it as "if (lvl)".
User MR registration passes "lvl = PBLE_LEVEL_1 | PBLE_LEVEL_2"
so this check always evaluates to true and causes the
loop to bail after grabbing a single SD even if the region
actually requires more than one SD (as is the case for
regions larger than 1 GiB with 4k pages). As a result, these
registrations can fail with -ENOMEM even if there are
sufficient PBLE resources.
Fixes: cc8997c94bf3 ("RDMA/irdma: Refactor PBLE functions")
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Link: https://patch.msgid.link/20260915170317.2901672-1-jmoroni@google.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/irdma/pble.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/pble.c b/drivers/infiniband/hw/irdma/pble.c
index 28dfad7f940c2..14318af97d581 100644
--- a/drivers/infiniband/hw/irdma/pble.c
+++ b/drivers/infiniband/hw/irdma/pble.c
@@ -482,7 +482,7 @@ int irdma_get_pble(struct irdma_hmc_pble_rsrc *pble_rsrc,
status = get_lvl1_lvl2_pble(pble_rsrc, palloc, lvl);
/* if level1_only, only go through it once */
- if (!status || lvl)
+ if (!status || lvl == PBLE_LEVEL_1)
break;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0590/2151] leds: st1202: Clear unused pattern slots in pattern_set()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (588 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0589/2151] RDMA/irdma: Fix erroneous -ENOMEM for large MR registration Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0591/2151] leds: st1202: Name pattern index variables consistently Greg Kroah-Hartman
` (292 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 119a7d375e5caedaf252198fa64e7df5d7269ab4 ]
The pattern duration registers are chip-wide while the PWM registers are
per-channel, so a channel can end up driven by a sequencer timeline it
never programmed.
st1202_led_pattern_set() programs only the first len slots. The pattern
trigger calls pattern_clear() before pattern_set() only once a channel is
already in PATTERN_TYPE_HW mode, and activating the trigger resets that
mode, so the first hardware pattern written after every activation skips
it. If another channel has already programmed a longer pattern,
durations [len, 8) are still set, and this channel's PWM for those slots
holds whatever was last written there.
That used to be LED_OFF, so a channel stayed dark for the slots it had
not programmed itself. Since commit d2ca0e2b6d64 ("leds: st1202: Set all
pattern PWM slots to full after clearing pattern") pattern_clear() leaves
ST1202_PATTERN_PWM_FULL there, and so does the brightness path since
commit 7cbe470366bd ("leds: st1202: Fix brightness having no effect while
pattern mode is active"). The channel now plays its own steps and then
sits at full brightness for the rest of the sequence.
Zero this channel's PWM for the unused slots so it stays dark for the
remainder of the timeline, as st1202_blink_set() already does for the
channels it is not driving.
The duration registers are deliberately left alone. All twelve channels
share them, so clearing them would truncate a longer pattern still
running elsewhere on the same device. A channel whose pattern is shorter
than the active timeline therefore keeps the longer period; that follows
from having a single hardware sequencer and is not something this can
correct.
Fixes: d2ca0e2b6d64 ("leds: st1202: Set all pattern PWM slots to full after clearing pattern")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497E9939E3C0D68401659D0C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 684d77fbe1d81..a9e616b7be66e 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -260,6 +260,12 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
return ret;
}
+ for (int pattern = len; pattern < ST1202_MAX_PATTERNS; pattern++) {
+ ret = st1202_pwm_pattern_write(chip, led->led_num, pattern, LED_OFF);
+ if (ret != 0)
+ return ret;
+ }
+
ret = st1202_write_reg(chip, ST1202_PATTERN_REP, repeat);
if (ret != 0)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0591/2151] leds: st1202: Name pattern index variables consistently
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (589 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0590/2151] leds: st1202: Clear unused pattern slots in pattern_set() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0592/2151] leds: st1202: Scale pattern brightness to the 12-bit PWM range Greg Kroah-Hartman
` (291 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 0aed225f40613253617ad30a57492043a3448938 ]
The driver already names pattern indices "pattern" in the signatures of
st1202_pwm_pattern_write() and st1202_duration_pattern_write(), and
st1202_blink_set() follows the same convention. The remaining loops
abbreviate it to "patt", which matches nothing else in the file.
Rename those loop variables to "pattern". In st1202_led_pattern_set()
that name is taken by the array of pattern steps, so rename the
parameter to "patterns", which also reflects better that it is an array.
Two st1202_pwm_pattern_write() calls exceed 100 columns with the longer
name and are wrapped accordingly.
No functional change.
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497AD614B8686BBDA654674C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Stable-dep-of: 82f8b88d6ac2 ("leds: st1202: Scale pattern brightness to the 12-bit PWM range")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index a9e616b7be66e..b567f97a313c0 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -176,8 +176,8 @@ static void st1202_brightness_set(struct led_classdev *led_cdev,
guard(mutex)(&chip->lock);
- for (int patt = 0; patt < ST1202_MAX_PATTERNS; patt++)
- st1202_pwm_pattern_write(chip, led->led_num, patt, ST1202_PATTERN_PWM_FULL);
+ for (int pattern = 0; pattern < ST1202_MAX_PATTERNS; pattern++)
+ st1202_pwm_pattern_write(chip, led->led_num, pattern, ST1202_PATTERN_PWM_FULL);
st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, value);
__st1202_channel_set(chip, led->led_num, !!value);
}
@@ -214,12 +214,13 @@ static int st1202_led_pattern_clear(struct led_classdev *ldev)
if (ret != 0)
return ret;
- for (int patt = 0; patt < ST1202_MAX_PATTERNS; patt++) {
- ret = st1202_pwm_pattern_write(chip, led->led_num, patt, ST1202_PATTERN_PWM_FULL);
+ for (int pattern = 0; pattern < ST1202_MAX_PATTERNS; pattern++) {
+ ret = st1202_pwm_pattern_write(chip, led->led_num, pattern,
+ ST1202_PATTERN_PWM_FULL);
if (ret != 0)
return ret;
- ret = st1202_write_reg(chip, ST1202_PATTERN_DUR + patt, 0);
+ ret = st1202_write_reg(chip, ST1202_PATTERN_DUR + pattern, 0);
if (ret != 0)
return ret;
}
@@ -228,7 +229,7 @@ static int st1202_led_pattern_clear(struct led_classdev *ldev)
}
static int st1202_led_pattern_set(struct led_classdev *ldev,
- struct led_pattern *pattern,
+ struct led_pattern *patterns,
u32 len, int repeat)
{
struct st1202_led *led = cdev_to_st1202_led(ldev);
@@ -238,9 +239,9 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
if (len > ST1202_MAX_PATTERNS)
return -EINVAL;
- for (int patt = 0; patt < len; patt++) {
- if (pattern[patt].delta_t < ST1202_MILLIS_PATTERN_DUR_MIN ||
- pattern[patt].delta_t > ST1202_MILLIS_PATTERN_DUR_MAX)
+ for (int pattern = 0; pattern < len; pattern++) {
+ if (patterns[pattern].delta_t < ST1202_MILLIS_PATTERN_DUR_MIN ||
+ patterns[pattern].delta_t > ST1202_MILLIS_PATTERN_DUR_MAX)
return -EINVAL;
}
@@ -250,12 +251,13 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
if (ret != 0)
return ret;
- for (int patt = 0; patt < len; patt++) {
- ret = st1202_pwm_pattern_write(chip, led->led_num, patt, pattern[patt].brightness);
+ for (int pattern = 0; pattern < len; pattern++) {
+ ret = st1202_pwm_pattern_write(chip, led->led_num, pattern,
+ patterns[pattern].brightness);
if (ret != 0)
return ret;
- ret = st1202_duration_pattern_write(chip, patt, pattern[patt].delta_t);
+ ret = st1202_duration_pattern_write(chip, pattern, patterns[pattern].delta_t);
if (ret != 0)
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0592/2151] leds: st1202: Scale pattern brightness to the 12-bit PWM range
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (590 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0591/2151] leds: st1202: Name pattern index variables consistently Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0593/2151] leds: st1202: Add hardware-accelerated blink support Greg Kroah-Hartman
` (290 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 82f8b88d6ac2edf01651bbd84e03ede04b2ca80e ]
The LED1202 PWM registers are 12 bits wide, but st1202_led_pattern_set()
writes the 8-bit brightness value carried by struct led_pattern into
them unscaled. A pattern step asking for full brightness therefore
drives the channel at 255 out of 4095, about 6% duty cycle, so a pattern
is dimmer than the same brightness set directly.
Scale the value to the full PWM range before programming it.
Scale against max_brightness rather than the register maximum. The LED
core takes max_brightness from the DT max-brightness property, so a
board can declare a ceiling below full scale, and the pattern trigger
already rejects steps above it. Scaling against a hardcoded 255 would
leave such a board unable to reach its own declared maximum from the
pattern path while the brightness path reaches it.
Scaling divides by max_brightness. The LED core replaces a zero
max-brightness from the device tree with LED_FULL, so the divisor should
never be zero, but the helper returns zero rather than rely on that.
max_brightness is capped at U8_MAX, the driver's own maximum, so a
device tree declaring more than the part supports is treated as full
scale. struct led_pattern brightness is signed, so clamp both ends and
floor a negative value to LED_OFF rather than let it wrap.
Document that a step is relative to max_brightness, since the range
given in the documentation no longer holds when the device tree sets
max-brightness.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497B938D3592582E17CB757C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/leds/leds-st1202.rst | 5 +++++
drivers/leds/leds-st1202.c | 16 +++++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/Documentation/leds/leds-st1202.rst b/Documentation/leds/leds-st1202.rst
index a2353549469ee..eacc7cfef7415 100644
--- a/Documentation/leds/leds-st1202.rst
+++ b/Documentation/leds/leds-st1202.rst
@@ -19,6 +19,11 @@ brightness (PWM) and duration must be written to hw_pattern.
- Min pattern duration: 22 ms
- Max pattern duration: 5610 ms
+If the device tree sets max-brightness, that value replaces 255 as the
+upper limit, and a step equal to it drives the channel at full scale.
+The hardware cannot go above 255, so with a larger max-brightness every
+step from 255 upwards is full scale.
+
The format of the hardware pattern values should be:
"brightness duration brightness duration ..."
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index b567f97a313c0..8110860d018b9 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -90,6 +90,16 @@ static uint8_t st1202_prescalar_to_miliseconds(unsigned int value)
return value / ST1202_MILLIS_PATTERN_DUR_MIN;
}
+static u16 st1202_brightness_to_pwm(int brightness, unsigned int max_brightness)
+{
+ if (!max_brightness)
+ return 0;
+
+ brightness = clamp_t(int, brightness, LED_OFF, max_brightness);
+
+ return brightness * ST1202_PATTERN_PWM_FULL / max_brightness;
+}
+
static int st1202_pwm_pattern_write(struct st1202_chip *chip, int led_num,
int pattern, unsigned int value)
{
@@ -234,8 +244,11 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
{
struct st1202_led *led = cdev_to_st1202_led(ldev);
struct st1202_chip *chip = led->chip;
+ unsigned int max_brightness;
int ret;
+ max_brightness = min_t(unsigned int, ldev->max_brightness, U8_MAX);
+
if (len > ST1202_MAX_PATTERNS)
return -EINVAL;
@@ -253,7 +266,8 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
for (int pattern = 0; pattern < len; pattern++) {
ret = st1202_pwm_pattern_write(chip, led->led_num, pattern,
- patterns[pattern].brightness);
+ st1202_brightness_to_pwm(patterns[pattern].brightness,
+ max_brightness));
if (ret != 0)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0593/2151] leds: st1202: Add hardware-accelerated blink support
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (591 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0592/2151] leds: st1202: Scale pattern brightness to the 12-bit PWM range Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0594/2151] leds: st1202: Spell out the phase-shift configuration bit Greg Kroah-Hartman
` (289 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 35cbd34a6a05cc53882b1b7ca6f338a93ab29fcb ]
Implement blink_set() to enable hardware-accelerated blinking via the
timer trigger. The LED1202 pattern engine is used to produce a two-step
sequence: full brightness for delay_on, off for delay_off, repeating
indefinitely.
Requested delays are clamped to the hardware range [22ms, 5610ms] then
rounded up to the nearest 22ms step. Clamping before rounding prevents
integer overflow in roundup() for extreme input values; since
ST1202_MILLIS_PATTERN_DUR_MAX is an exact multiple of
ST1202_MILLIS_PATTERN_DUR_MIN, rounding a clamped value cannot exceed
the maximum. A zero delay is replaced with the default of 500ms
independently for each of delay_on and delay_off.
The LED1202 pattern sequencer is global and its timing registers are
shared across all channels, so only one blink configuration can be
active at a time. Other active channels have their PWM slots zeroed for
both pattern steps so they remain dark rather than outputting unintended
values when the sequencer runs. The target channel's ILED register is
set to full brightness and the channel is enabled, since the timer
trigger deactivates the current trigger before calling blink_set which
would otherwise leave the channel disabled.
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Link: https://patch.msgid.link/GV1PR08MB84973F79E871176EB387C377C5DA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Stable-dep-of: 878eec1475e7 ("leds: st1202: Program the channel current for hardware patterns")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 89 ++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 8110860d018b9..f1abb37520188 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <linux/string.h>
+#define ST1202_BLINK_DEFAULT_DELAY 500
#define ST1202_CHAN_DISABLE_ALL 0x00
#define ST1202_CHAN_ENABLE_HIGH 0x03
#define ST1202_CHAN_ENABLE_LOW 0x02
@@ -298,6 +299,93 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
return 0;
}
+static int st1202_blink_set(struct led_classdev *led_cdev,
+ unsigned long *delay_on, unsigned long *delay_off)
+{
+ struct st1202_led *led = cdev_to_st1202_led(led_cdev);
+ struct st1202_chip *chip = led->chip;
+ unsigned long on, off;
+ int ret;
+
+ if (!*delay_on)
+ *delay_on = ST1202_BLINK_DEFAULT_DELAY;
+ if (!*delay_off)
+ *delay_off = ST1202_BLINK_DEFAULT_DELAY;
+
+ on = *delay_on;
+ off = *delay_off;
+
+ on = clamp_val(on, ST1202_MILLIS_PATTERN_DUR_MIN, ST1202_MILLIS_PATTERN_DUR_MAX);
+ off = clamp_val(off, ST1202_MILLIS_PATTERN_DUR_MIN, ST1202_MILLIS_PATTERN_DUR_MAX);
+ on = roundup(on, ST1202_MILLIS_PATTERN_DUR_MIN);
+ off = roundup(off, ST1202_MILLIS_PATTERN_DUR_MIN);
+
+ guard(mutex)(&chip->lock);
+
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_SHFT);
+ if (ret)
+ return ret;
+
+ /* Zero out PWM for all other active channels to prevent them from blinking */
+ for (int chan = 0; chan < ST1202_MAX_LEDS; chan++) {
+ if (!chip->leds[chan].is_active || chan == led->led_num)
+ continue;
+
+ ret = st1202_pwm_pattern_write(chip, chan, 0, LED_OFF);
+ if (ret)
+ return ret;
+
+ ret = st1202_pwm_pattern_write(chip, chan, 1, LED_OFF);
+ if (ret)
+ return ret;
+ }
+
+ ret = st1202_pwm_pattern_write(chip, led->led_num, 0, ST1202_PATTERN_PWM_FULL);
+ if (ret)
+ return ret;
+
+ ret = st1202_pwm_pattern_write(chip, led->led_num, 1, LED_OFF);
+ if (ret)
+ return ret;
+
+ ret = st1202_duration_pattern_write(chip, 0, on);
+ if (ret)
+ return ret;
+
+ ret = st1202_duration_pattern_write(chip, 1, off);
+ if (ret)
+ return ret;
+
+ for (int pattern = 2; pattern < ST1202_MAX_PATTERNS; pattern++) {
+ ret = st1202_write_reg(chip, ST1202_PATTERN_DUR + pattern, 0);
+ if (ret)
+ return ret;
+ }
+
+ ret = st1202_write_reg(chip, ST1202_PATTERN_REP, U8_MAX);
+ if (ret)
+ return ret;
+
+ ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, U8_MAX);
+ if (ret)
+ return ret;
+
+ ret = __st1202_channel_set(chip, led->led_num, true);
+ if (ret)
+ return ret;
+
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG,
+ ST1202_CONFIG_REG_PATSR | ST1202_CONFIG_REG_PATS |
+ ST1202_CONFIG_REG_SHFT);
+ if (ret)
+ return ret;
+
+ *delay_on = on;
+ *delay_off = off;
+
+ return 0;
+}
+
static int st1202_dt_init(struct st1202_chip *chip)
{
struct device *dev = &chip->client->dev;
@@ -324,6 +412,7 @@ static int st1202_dt_init(struct st1202_chip *chip)
led->led_cdev.pattern_set = st1202_led_pattern_set;
led->led_cdev.pattern_clear = st1202_led_pattern_clear;
led->led_cdev.default_trigger = "pattern";
+ led->led_cdev.blink_set = st1202_blink_set;
led->led_cdev.brightness_set = st1202_brightness_set;
led->led_cdev.brightness_get = st1202_brightness_get;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0594/2151] leds: st1202: Spell out the phase-shift configuration bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (592 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0593/2151] leds: st1202: Add hardware-accelerated blink support Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0595/2151] leds: st1202: Program the channel current for hardware patterns Greg Kroah-Hartman
` (288 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 7520fc78c52ea55c2c83d0ecc11ab2355a753b7f ]
ST1202_CONFIG_REG_SHFT is abbreviated to the point of being unreadable
and, unlike the neighbouring PATS and PATSR bits, carries no comment
explaining what it controls.
Rename it to ST1202_CONFIG_REG_PHASE_SHIFT and document it in the same
style as the other configuration bits, retaining the datasheet name in
the comment so it remains searchable.
The longer name no longer fits the existing layout in
st1202_led_pattern_set(), where the continuation line was already 106
columns wide. Re-wrap that register write to match the layout
st1202_blink_set() uses for the same operation and drop the redundant
parentheses around the bit mask.
No functional change.
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB849716E21E082D3B93B5B683C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Stable-dep-of: 878eec1475e7 ("leds: st1202: Program the channel current for hardware patterns")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index f1abb37520188..135fe0b0f3a5e 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -25,7 +25,8 @@
#define ST1202_CONFIG_REG_PATS BIT(7)
/* PATSR: Pattern sequence runs (self-clear when sequence is finished) */
#define ST1202_CONFIG_REG_PATSR BIT(6)
-#define ST1202_CONFIG_REG_SHFT BIT(3)
+/* SHFT: Phase-shift delay enable */
+#define ST1202_CONFIG_REG_PHASE_SHIFT BIT(3)
#define ST1202_DEV_ENABLE 0x01
#define ST1202_DEV_ENABLE_ON BIT(0)
#define ST1202_DEV_ENABLE_RESET BIT(7)
@@ -221,7 +222,7 @@ static int st1202_led_pattern_clear(struct led_classdev *ldev)
guard(mutex)(&chip->lock);
- ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_SHFT);
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret != 0)
return ret;
@@ -261,7 +262,7 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
guard(mutex)(&chip->lock);
- ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_SHFT);
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret != 0)
return ret;
@@ -291,8 +292,9 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
if (ret != 0)
return ret;
- ret = st1202_write_reg(chip, ST1202_CONFIG_REG, (ST1202_CONFIG_REG_PATSR |
- ST1202_CONFIG_REG_PATS | ST1202_CONFIG_REG_SHFT));
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG,
+ ST1202_CONFIG_REG_PATSR | ST1202_CONFIG_REG_PATS |
+ ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret != 0)
return ret;
@@ -322,7 +324,7 @@ static int st1202_blink_set(struct led_classdev *led_cdev,
guard(mutex)(&chip->lock);
- ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_SHFT);
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret)
return ret;
@@ -376,7 +378,7 @@ static int st1202_blink_set(struct led_classdev *led_cdev,
ret = st1202_write_reg(chip, ST1202_CONFIG_REG,
ST1202_CONFIG_REG_PATSR | ST1202_CONFIG_REG_PATS |
- ST1202_CONFIG_REG_SHFT);
+ ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret)
return ret;
@@ -442,7 +444,7 @@ static int st1202_setup(struct st1202_chip *chip)
return ret;
/* Enable phase-shift delay feature */
- ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_SHFT);
+ ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret < 0)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0595/2151] leds: st1202: Program the channel current for hardware patterns
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (593 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0594/2151] leds: st1202: Spell out the phase-shift configuration bit Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0596/2151] leds: st1202: Take a reference on the LED firmware node Greg Kroah-Hartman
` (287 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 878eec1475e77ad22059584bc617b6e671a536d9 ]
A channel's output is ILED x Pattern_PWM / 4095, so a pattern is only
visible while the analog current register holds a non-zero value.
st1202_led_pattern_set() programs the PWM slots and starts the sequencer
but never writes ILED, so a channel whose current is zero stays dark
while pattern_set() reports success.
Zero is reached by ordinary use. Writing 0 to brightness sets it, and so
does switching away from the pattern trigger, because
pattern_trig_deactivate() ends with led_set_brightness(LED_OFF). A
sequence as simple as
echo none > trigger
echo pattern > trigger
echo "255 500 0 500" > hw_pattern
therefore programs a pattern that never lights up.
Program the current in pattern_set() and release it in pattern_clear(),
so the pattern path owns ILED for as long as a pattern is loaded.
Releasing it matters because the trigger calls pattern_clear() before it
parses a new pattern: without that, a rejected or empty hw_pattern write
would leave the channel at full current with every PWM slot at full
scale, latching the LED on. Clearing before the slots are raised also
avoids a brief full-brightness flash on every reprogram.
A current of zero is not enough to release the channel, though: the
datasheet notes that it does not switch the channel off but leaves a
small uncontrolled current, which shows as a faint glow. pattern_clear()
therefore also disables the channel, and pattern_set() enables it again.
Both are done before the sequencer is stopped, so an I2C error partway
through a clear cannot leave the channel lit.
Probe clears every channel, so the LEDs now reach user space switched
off. Until now they came up lit at the chip's power-on current, because
pattern_clear() fills every slot at full scale. Probe no longer enables
the channels itself either: st1202_setup() has already disabled them
all, and each path that lights a channel enables it when needed.
The current is programmed to the same max_brightness the PWM values are
scaled against, so a pattern step of N produces the same output as
writing N to brightness, and a board declaring a lower ceiling through
the max-brightness property keeps it on both paths.
Note that this makes a hardware pattern take the channel to its maximum
current, so brightness reads back as max_brightness once a pattern is
loaded and as zero once it is cleared. The pattern's own values, not the
last brightness written, decide what the channel shows while a pattern
is running.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB84978D7C1CC0367D1818093DC5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 135fe0b0f3a5e..25e548b023364 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -222,6 +222,14 @@ static int st1202_led_pattern_clear(struct led_classdev *ldev)
guard(mutex)(&chip->lock);
+ ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, LED_OFF);
+ if (ret != 0)
+ return ret;
+
+ ret = __st1202_channel_set(chip, led->led_num, false);
+ if (ret != 0)
+ return ret;
+
ret = st1202_write_reg(chip, ST1202_CONFIG_REG, ST1202_CONFIG_REG_PHASE_SHIFT);
if (ret != 0)
return ret;
@@ -288,6 +296,10 @@ static int st1202_led_pattern_set(struct led_classdev *ldev,
if (ret != 0)
return ret;
+ ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, max_brightness);
+ if (ret != 0)
+ return ret;
+
ret = __st1202_channel_set(chip, led->led_num, true);
if (ret != 0)
return ret;
@@ -456,7 +468,7 @@ static int st1202_setup(struct st1202_chip *chip)
/* Duration of initialization */
usleep_range(6500, 10000);
- /* Deactivate all LEDS (channels) and activate only the ones found in Device Tree */
+ /* Deactivate all LEDs (channels); each is enabled when it is lit */
ret = st1202_write_reg(chip, ST1202_CHAN_ENABLE_LOW, ST1202_CHAN_DISABLE_ALL);
if (ret < 0)
return ret;
@@ -503,11 +515,6 @@ static int st1202_probe(struct i2c_client *client)
if (!led->is_active)
continue;
- ret = st1202_channel_set(led->chip, led->led_num, true);
- if (ret < 0)
- return dev_err_probe(&client->dev, ret,
- "Failed to activate LED channel\n");
-
ret = st1202_led_pattern_clear(&led->led_cdev);
if (ret < 0)
return dev_err_probe(&client->dev, ret,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0596/2151] leds: st1202: Take a reference on the LED firmware node
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (594 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0595/2151] leds: st1202: Program the channel current for hardware patterns Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0597/2151] leds: st1202: Do not set brightness from atomic context Greg Kroah-Hartman
` (286 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 5882de94edf7a53812a76a882a95e1e86d7105d9 ]
st1202_dt_init() stores each LED's firmware node while walking the
device tree with for_each_available_child_of_node_scoped(), which drops
its reference to the node at the end of every iteration. The LED class
stores the pointer with device_set_node() and does not take a reference
of its own, so nothing keeps the node alive for as long as the LED
device uses it. That has been the case since the driver was added, when
the LED class devices were registered inside that same loop.
Commit c72e455b89f2 ("leds: leds-st1202: Fix NULL pointer access on race
condition") moved the registration into a separate loop in
st1202_probe(), which also leaves the stored pointer unreferenced
between the two loops.
With CONFIG_OF_DYNAMIC the node can be freed while it is still in use,
leaving led->fwnode and the LED device's firmware node dangling.
Take a reference when the node is stored and release it through a devm
action. The action is registered before the LED class devices are, so it
runs after they have been unregistered.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB849710C564F23C21BDA3EA41C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 25e548b023364..46228ecb52cac 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -13,6 +13,7 @@
#include <linux/i2c.h>
#include <linux/leds.h>
#include <linux/module.h>
+#include <linux/property.h>
#include <linux/slab.h>
#include <linux/string.h>
@@ -400,6 +401,11 @@ static int st1202_blink_set(struct led_classdev *led_cdev,
return 0;
}
+static void st1202_fwnode_put(void *data)
+{
+ fwnode_handle_put(data);
+}
+
static int st1202_dt_init(struct st1202_chip *chip)
{
struct device *dev = &chip->client->dev;
@@ -419,7 +425,11 @@ static int st1202_dt_init(struct st1202_chip *chip)
led = &chip->leds[reg];
led->is_active = true;
- led->fwnode = of_fwnode_handle(child);
+ led->fwnode = fwnode_handle_get(of_fwnode_handle(child));
+
+ err = devm_add_action_or_reset(dev, st1202_fwnode_put, led->fwnode);
+ if (err)
+ return err;
led->led_cdev.max_brightness = U8_MAX;
led->led_cdev.brightness_set_blocking = st1202_led_set;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0597/2151] leds: st1202: Do not set brightness from atomic context
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (595 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0596/2151] leds: st1202: Take a reference on the LED firmware node Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0598/2151] leds: st1202: Clear unused pattern slots in blink_set() Greg Kroah-Hartman
` (285 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 1ec35fa181981b4b9581b3dae967bac7ed82c89c ]
st1202_brightness_set() takes the chip mutex and performs I2C transfers,
both of which can sleep, but it is installed as the brightness_set
callback. led_set_brightness_nopm() calls that op directly on the
assumption that it never sleeps, including from softirq context, so the
driver can sleep in atomic context.
The driver also installs brightness_set_blocking, but the core only
falls back to it when brightness_set is absent, so st1202_led_set() was
never reached. It merely turned the channel on or off and ignored the
requested brightness, so dropping brightness_set on its own would have
lost brightness control entirely.
Move the register programming into st1202_led_set() so the blocking
callback honours the brightness value, and drop brightness_set. The core
now defers the update to a work queue, where sleeping is allowed. Errors
from the register writes are propagated rather than discarded.
st1202_led_set() was the last user of the locking st1202_channel_set()
wrapper, which is removed.
Programming every PWM slot to full scale is kept: it is what makes the
brightness visible while the global sequencer is running, without having
to stop the sequencer and disturb the other channels.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497CF8FB57A272EB671F0C6C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 45 +++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 46228ecb52cac..23fffee873b9e 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -174,27 +174,6 @@ static int __st1202_channel_set(struct st1202_chip *chip, int led_num, bool acti
return 0;
}
-static int st1202_channel_set(struct st1202_chip *chip, int led_num, bool active)
-{
- guard(mutex)(&chip->lock);
-
- return __st1202_channel_set(chip, led_num, active);
-}
-
-static void st1202_brightness_set(struct led_classdev *led_cdev,
- enum led_brightness value)
-{
- struct st1202_led *led = cdev_to_st1202_led(led_cdev);
- struct st1202_chip *chip = led->chip;
-
- guard(mutex)(&chip->lock);
-
- for (int pattern = 0; pattern < ST1202_MAX_PATTERNS; pattern++)
- st1202_pwm_pattern_write(chip, led->led_num, pattern, ST1202_PATTERN_PWM_FULL);
- st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, value);
- __st1202_channel_set(chip, led->led_num, !!value);
-}
-
static enum led_brightness st1202_brightness_get(struct led_classdev *led_cdev)
{
struct st1202_led *led = cdev_to_st1202_led(led_cdev);
@@ -211,8 +190,29 @@ static enum led_brightness st1202_brightness_get(struct led_classdev *led_cdev)
static int st1202_led_set(struct led_classdev *ldev, enum led_brightness value)
{
struct st1202_led *led = cdev_to_st1202_led(ldev);
+ struct st1202_chip *chip = led->chip;
+ int ret;
+
+ guard(mutex)(&chip->lock);
+
+ /*
+ * The output of a channel is ILED x Pattern_PWM / 4095. Setting every
+ * PWM slot to full scale makes it equal ILED whatever the state of the
+ * sequencer, so the brightness takes effect without stopping the
+ * sequencer, which is global and would disturb the other channels.
+ */
+ for (int pattern = 0; pattern < ST1202_MAX_PATTERNS; pattern++) {
+ ret = st1202_pwm_pattern_write(chip, led->led_num, pattern,
+ ST1202_PATTERN_PWM_FULL);
+ if (ret)
+ return ret;
+ }
+
+ ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, value);
+ if (ret)
+ return ret;
- return st1202_channel_set(led->chip, led->led_num, !!value);
+ return __st1202_channel_set(chip, led->led_num, !!value);
}
static int st1202_led_pattern_clear(struct led_classdev *ldev)
@@ -437,7 +437,6 @@ static int st1202_dt_init(struct st1202_chip *chip)
led->led_cdev.pattern_clear = st1202_led_pattern_clear;
led->led_cdev.default_trigger = "pattern";
led->led_cdev.blink_set = st1202_blink_set;
- led->led_cdev.brightness_set = st1202_brightness_set;
led->led_cdev.brightness_get = st1202_brightness_get;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0598/2151] leds: st1202: Clear unused pattern slots in blink_set()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (596 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0597/2151] leds: st1202: Do not set brightness from atomic context Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0599/2151] leds: st1202: Honour max_brightness when blinking Greg Kroah-Hartman
` (284 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 3268b9e91db16f240ffe07ff6caf963ba8191ce8 ]
st1202_blink_set() programs slots 0 and 1 of its own channel and leaves
slots 2 to 7 at ST1202_PATTERN_PWM_FULL, the value both st1202_led_set()
and st1202_led_pattern_clear() leave behind. Nothing keeps those slots
out of the output except the duration registers being zero, and those
are shared by all twelve channels.
Another channel programming a hardware pattern longer than two steps
writes those durations again and re-arms the sequencer, so the blinking
channel drives full scale for the extra steps. With two LEDs on one
device, blinking one and giving the other a four step pattern, the
blinking channel lights during the two steps it never programmed.
Zero the channel's own unused slots, the same invariant
st1202_led_pattern_set() applies to the slots beyond its pattern length.
blink_set() already zeroes durations 2 to 7 when it runs; the slots are
exposed only when another channel sets those shared durations again.
A channel whose blink is shorter than the active timeline still loses
its own timing, because the sequencer has one set of duration registers.
This only stops it emitting output it never asked for.
Fixes: 35cbd34a6a05 ("leds: st1202: Add hardware-accelerated blink support")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB849770CF6D41F3DFF56B1AC3C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 23fffee873b9e..98e8a43b5ed7b 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -359,9 +359,11 @@ static int st1202_blink_set(struct led_classdev *led_cdev,
if (ret)
return ret;
- ret = st1202_pwm_pattern_write(chip, led->led_num, 1, LED_OFF);
- if (ret)
- return ret;
+ for (int pattern = 1; pattern < ST1202_MAX_PATTERNS; pattern++) {
+ ret = st1202_pwm_pattern_write(chip, led->led_num, pattern, LED_OFF);
+ if (ret)
+ return ret;
+ }
ret = st1202_duration_pattern_write(chip, 0, on);
if (ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0599/2151] leds: st1202: Honour max_brightness when blinking
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (597 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0598/2151] leds: st1202: Clear unused pattern slots in blink_set() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0600/2151] leds: st1202: Cap the channel current in st1202_led_set() Greg Kroah-Hartman
` (283 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit 865d81a98602c828515fa6ac3c530efc4205f9f6 ]
st1202_blink_set() drives the channel current register to U8_MAX, the
full scale of the part, regardless of the ceiling the board declared.
led_classdev_register_ext() takes max_brightness from the device tree
max-brightness property. The driver does not implement led-max-microamp,
so that is the only way a board can ask for less than 20 mA.
The brightness and pattern paths both respect it. Blinking is the one
that does not, so a board that declares a lower ceiling holds it until
something enables the timer trigger.
Program the same value the other paths use, capped at the width of the
current register so an out of range property cannot wrap it to zero.
Fixes: 35cbd34a6a05 ("leds: st1202: Add hardware-accelerated blink support")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB84979A5D536C71D319A06808C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index 98e8a43b5ed7b..aa334a7b2013b 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -383,7 +383,8 @@ static int st1202_blink_set(struct led_classdev *led_cdev,
if (ret)
return ret;
- ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, U8_MAX);
+ ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num,
+ min_t(unsigned int, led_cdev->max_brightness, U8_MAX));
if (ret)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0600/2151] leds: st1202: Cap the channel current in st1202_led_set()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (598 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0599/2151] leds: st1202: Honour max_brightness when blinking Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0601/2151] leds: flash: Prevent using uninitialized variable in flash_fault_show() Greg Kroah-Hartman
` (282 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Manuel Fombuena, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manuel Fombuena <fombuena@outlook.com>
[ Upstream commit ca81ea108502817e3841e98f0d3651398d9e1bd9 ]
st1202_led_set() writes the requested brightness straight into the 8-bit
channel current register. The LED core limits brightness to
max_brightness, which comes from the device tree max-brightness property
and has no upper bound, so on a board declaring more than 255 a
brightness of 256 reaches the register as 0 and turns the LED off, and
larger values wrap around.
Cap the value at U8_MAX, the width of the register, so anything above it
drives the channel at full current. The pattern and blink paths already
cap the current they program the same way.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: LLM
Link: https://patch.msgid.link/GV1PR08MB8497C60D1D2921DD0384926FC5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/leds-st1202.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c
index aa334a7b2013b..b679c26780f0e 100644
--- a/drivers/leds/leds-st1202.c
+++ b/drivers/leds/leds-st1202.c
@@ -208,7 +208,8 @@ static int st1202_led_set(struct led_classdev *ldev, enum led_brightness value)
return ret;
}
- ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num, value);
+ ret = st1202_write_reg(chip, ST1202_ILED_REG0 + led->led_num,
+ min_t(unsigned int, value, U8_MAX));
if (ret)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0601/2151] leds: flash: Prevent using uninitialized variable in flash_fault_show()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (599 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0600/2151] leds: st1202: Cap the channel current in st1202_led_set() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0602/2151] regulator: mp886x: check get_voltage_sel() return value Greg Kroah-Hartman
` (281 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Dmitry Antipov,
Lee Jones, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <dmantipov@yandex.ru>
[ Upstream commit d229695f2162a41bfa614f175798fa56a5f1c969 ]
In flash_fault_show(), address of uninitialized 'fault' variable is
passed to device-specific .fault_get callbacks. This is not a problem
if such a callback directly assigns the value like rt4505_fault_get(),
but results in an undefined behavior if callback just performs bitwise
ORs like as3645a_get_fault(). So just initialize 'fault' with zero.
Reported-by: sashiko-bot@kernel.org
Closes: https://sashiko.dev/#/patchset/20260904054437.461706-1-dmantipov@yandex.ru?part=1
Fixes: 7aea8389a77ab ("leds: Add LED Flash class extension to the LED subsystem")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://patch.msgid.link/20260916161607.90106-1-dmantipov@yandex.ru
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/leds/led-class-flash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/leds/led-class-flash.c b/drivers/leds/led-class-flash.c
index 165035a8826ca..3bb90823de1a8 100644
--- a/drivers/leds/led-class-flash.c
+++ b/drivers/leds/led-class-flash.c
@@ -187,7 +187,7 @@ static ssize_t flash_fault_show(struct device *dev,
{
struct led_classdev *led_cdev = dev_get_drvdata(dev);
struct led_classdev_flash *fled_cdev = lcdev_to_flcdev(led_cdev);
- u32 fault, mask = 0x1;
+ u32 fault = 0, mask = 0x1;
char *pbuf = buf;
int i, ret, buf_len;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0602/2151] regulator: mp886x: check get_voltage_sel() return value
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (600 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0601/2151] leds: flash: Prevent using uninitialized variable in flash_fault_show() Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0603/2151] regulator: mp886x: fix pontential division by zero Greg Kroah-Hartman
` (280 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jisheng Zhang, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jisheng Zhang <jszhang@kernel.org>
[ Upstream commit 87121c42fadc7683469aee96ad833bc560197a55 ]
The get_voltage_sel() can fail, resulting in negative error codes
stored in unsigned integers and corrupted state logic.
Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260901043123.5401-1-jszhang@kernel.org?part=1
Link: https://patch.msgid.link/20260909143957.9284-2-jszhang@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/mp886x.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c
index bbad6207ad7bd..6bad7ff40aa9d 100644
--- a/drivers/regulator/mp886x.c
+++ b/drivers/regulator/mp886x.c
@@ -256,6 +256,7 @@ static int mp886x_regulator_register(struct mp886x_device_info *di,
{
struct regulator_desc *rdesc = &di->desc;
struct regulator_dev *rdev;
+ int sel;
rdesc->name = "mp886x-reg";
rdesc->supply_name = "vin";
@@ -277,7 +278,12 @@ static int mp886x_regulator_register(struct mp886x_device_info *di,
rdev = devm_regulator_register(di->dev, &di->desc, config);
if (IS_ERR(rdev))
return PTR_ERR(rdev);
- di->sel = rdesc->ops->get_voltage_sel(rdev);
+
+ sel = rdesc->ops->get_voltage_sel(rdev);
+ if (sel < 0)
+ return sel;
+ di->sel = sel;
+
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0603/2151] regulator: mp886x: fix pontential division by zero
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (601 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0602/2151] regulator: mp886x: check get_voltage_sel() return value Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0604/2151] arm64: dts: ti: k3-am62-verdin: fix main_gpio0/main_gpio1 line names size Greg Kroah-Hartman
` (279 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jisheng Zhang, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jisheng Zhang <jszhang@kernel.org>
[ Upstream commit d16ef5debccc4289c1f25309a2cccfbbe879601a ]
If the "mps,fb-voltage-divider" 2nd var is 0, there will be division
by zero bug.
Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260901043123.5401-1-jszhang@kernel.org?part=1
Link: https://patch.msgid.link/20260909143957.9284-3-jszhang@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/mp886x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/regulator/mp886x.c b/drivers/regulator/mp886x.c
index 6bad7ff40aa9d..99450398c19ff 100644
--- a/drivers/regulator/mp886x.c
+++ b/drivers/regulator/mp886x.c
@@ -317,6 +317,9 @@ static int mp886x_i2c_probe(struct i2c_client *client)
if (ret)
return ret;
+ if (di->r[1] == 0)
+ return -EINVAL;
+
di->en_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
if (IS_ERR(di->en_gpio))
return PTR_ERR(di->en_gpio);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0604/2151] arm64: dts: ti: k3-am62-verdin: fix main_gpio0/main_gpio1 line names size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (602 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0603/2151] regulator: mp886x: fix pontential division by zero Greg Kroah-Hartman
@ 2026-11-18 14:38 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0605/2151] RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation Greg Kroah-Hartman
` (278 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:38 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Francesco Dolcini, Nishanth Menon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Dolcini <francesco.dolcini@toradex.com>
[ Upstream commit 11a51e82e1f997975a28358a1dcffec190ea7282 ]
gpio-line-names sized main_gpio0/main_gpio1 for 87/88 lines, the SoC's
ti,ngpio values before they were corrected to 92/52 in commit
28c8f2189d80 ("arm64: dts: ti: k3-am62-main: Fix GPIO numbers in DT"),
four months before this file was written. Resize both arrays to match,
keeping every existing label at its original index.
Fixes: 316b80246b16 ("arm64: dts: ti: add verdin am62")
Assisted-by: LLM
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260914190943.50843-1-francesco@dolcini.it
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 41 +++-------------------
1 file changed, 5 insertions(+), 36 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
index 5e8830fffb949..4a9017dc189d2 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
@@ -1000,6 +1000,11 @@ &main_gpio0 {
"",
"",
"",
+ "",
+ "",
+ "",
+ "",
+ "", /* 90 */
"";
};
@@ -1056,42 +1061,6 @@ &main_gpio1 {
"",
"SODIMM_17",
"SODIMM_155", /* 50 */
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", /* 60 */
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", /* 70 */
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", /* 80 */
- "",
- "",
- "",
- "",
- "",
- "",
"";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0605/2151] RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (603 preceding siblings ...)
2026-11-18 14:38 ` [PATCH 6.18 0604/2151] arm64: dts: ti: k3-am62-verdin: fix main_gpio0/main_gpio1 line names size Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0606/2151] ata: pata_parport: fix parport attach idr_alloc for Greg Kroah-Hartman
` (277 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jeremy Bongio, Jacob Moroni,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeremy Bongio <jbongio@google.com>
[ Upstream commit 9c40f13a63a4b87177de3e8c318af25068fc6ab4 ]
During VM live migration or when registering large memory regions
(e.g., guest memory >= 256 GB backed by 4 KiB pages), get_lvl2_pble()
calculates total leaves exceeding ~131,072. The memory required for
lvl2->leafmem.va exceeds 4 MiB (sizeof(*leaf) * total > 5.24 MiB).
Because kzalloc() requires physically contiguous pages, requests larger
than MAX_PAGE_ORDER (4 MiB on x86_64) fail and trigger a warning:
WARNING: CPU: 123 PID: 119906 at mm/page_alloc.c:5997 __alloc_frozen_pages_noprof+0x50c/0x1050
Call Trace:
<TASK>
alloc_frozen_pages_noprof+0xc0/0x240
___kmalloc_large_node+0x3d/0xd0
__kmalloc_large_node_noprof+0x1b/0x90
__kmalloc_noprof+0x254/0x660
get_lvl1_lvl2_pble+0xbc/0x270 [irdma]
irdma_get_pble+0x44/0xc0 [irdma]
irdma_setup_pbles+0x46/0x1d0 [irdma]
irdma_reg_user_mr_type_mem+0x41/0x230 [irdma]
irdma_reg_user_mr+0x194/0x1c0 [irdma]
ib_uverbs_reg_mr+0x1b0/0x2c0 [ib_uverbs]
The leafmem array is purely host software tracking structures (struct
irdma_pble_info) and does not require physically contiguous memory.
Switch the allocation from kzalloc() to kvzalloc() and free it with
kvfree() so that requests exceeding MAX_PAGE_ORDER fall back to
virtually contiguous memory via vmalloc.
Fixes: e8c4dbc2fcac ("RDMA/irdma: Add PBLE resource manager")
Assisted-by: LLM
Signed-off-by: Jeremy Bongio <jbongio@google.com>
Link: https://patch.msgid.link/20260916173203.2555458-1-jbongio@google.com
Tested-by: Jacob Moroni <jmoroni@google.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/irdma/pble.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/pble.c b/drivers/infiniband/hw/irdma/pble.c
index 14318af97d581..0c2c5e96a05a4 100644
--- a/drivers/infiniband/hw/irdma/pble.c
+++ b/drivers/infiniband/hw/irdma/pble.c
@@ -330,7 +330,7 @@ static void free_lvl2(struct irdma_hmc_pble_rsrc *pble_rsrc,
if (root->addr)
irdma_prm_return_pbles(&pble_rsrc->pinfo, &root->chunkinfo);
- kfree(lvl2->leafmem.va);
+ kvfree(lvl2->leafmem.va);
lvl2->leaf = NULL;
}
@@ -358,7 +358,7 @@ static int get_lvl2_pble(struct irdma_hmc_pble_rsrc *pble_rsrc,
lvl2->leaf_cnt = total;
lvl2->leafmem.size = (sizeof(*leaf) * total);
- lvl2->leafmem.va = kzalloc(lvl2->leafmem.size, GFP_KERNEL);
+ lvl2->leafmem.va = kvzalloc(lvl2->leafmem.size, GFP_KERNEL);
if (!lvl2->leafmem.va)
return -ENOMEM;
@@ -367,7 +367,7 @@ static int get_lvl2_pble(struct irdma_hmc_pble_rsrc *pble_rsrc,
ret_code = irdma_prm_get_pbles(&pble_rsrc->pinfo, &root->chunkinfo,
total << 3, &root->addr, &fpm_addr);
if (ret_code) {
- kfree(lvl2->leafmem.va);
+ kvfree(lvl2->leafmem.va);
lvl2->leaf = NULL;
return -ENOMEM;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0606/2151] ata: pata_parport: fix parport attach idr_alloc for
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (604 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0605/2151] RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0607/2151] ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() Greg Kroah-Hartman
` (276 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pei Xiao, Niklas Cassel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pei Xiao <xiaopei01@kylinos.cn>
[ Upstream commit 193f5b84a95c02456f51fe5067750ecf73d213d5 ]
idr_alloc() expects an inclusive start and an exclusive end, so passing
port->number as both arguments produces an empty range. Because
idr_alloc() only falls back to INT_MAX when end <= 0, the allocation
succeeds solely for parport0 and returns -ENOSPC for every other port,
which pata_parport_attach() silently ignores. As a result only
parport0 gets probed and any higher-numbered parports are never
attached.
Use port->number + 1 as the end so the range [port->number,
port->number + 1) contains exactly the desired ID.
Fixes: 246a1c4c6b7f ("ata: pata_parport: add driver (PARIDE replacement)")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Link: https://lore.kernel.org/r/cee1a15d98cd0d55f41fd65ca9d222b68a74e7d3.1790047457.git.xiaopei01@kylinos.cn
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/ata/pata_parport/pata_parport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c
index 5c6651621dfbe..2096a38cb6c87 100644
--- a/drivers/ata/pata_parport/pata_parport.c
+++ b/drivers/ata/pata_parport/pata_parport.c
@@ -731,7 +731,7 @@ static void pata_parport_attach(struct parport *port)
int pr_num, id;
mutex_lock(&pi_mutex);
- id = idr_alloc(&parport_list, port, port->number, port->number,
+ id = idr_alloc(&parport_list, port, port->number, port->number + 1,
GFP_KERNEL);
if (id < 0) {
mutex_unlock(&pi_mutex);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0607/2151] ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (605 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0606/2151] ata: pata_parport: fix parport attach idr_alloc for Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0608/2151] ASoC: amd: acp3x-es83xx: " Greg Kroah-Hartman
` (275 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit 6f50ab7ab1f93e874fa75d18bf98bbca4ce0204f ]
Replace acpi_get_first_physical_node() that is slated for removal
with acpi_bus_get_primary_device() that takes a reference to the
device it is about to return.
This addresses a potential use-after-free that may occur if the
device returned by acpi_get_first_physical_node() is removed right
after dropping its ACPI companion's physical_node_lock in that
function.
It also fixes a device reference counting issue that may lead to
a premature device release if gpiod_get_optional() fails in
st_es8336_late_probe().
Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mark Brown <broonie@kerenl.org>
Link: https://patch.msgid.link/2063881.yKVeVyVuyW@rafael.j.wysocki
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/acp-es8336.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index b16dde0e29871..7593eaef5859a 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -199,7 +199,7 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
if (!adev)
return -ENODEV;
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev) {
dev_err(card->dev, "can not find codec dev\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0608/2151] ASoC: amd: acp3x-es83xx: Switch to use acpi_bus_get_primary_device()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (606 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0607/2151] ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0609/2151] x86/boot: Remove redundant "cc" clobber in memcmp() and document it Greg Kroah-Hartman
` (274 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rafael J. Wysocki, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Upstream commit aae5bd00ced5b7e42ef3b3aa46923ad72388c60b ]
Replace acpi_get_first_physical_node() that is slated for removal
with acpi_bus_get_primary_device() that takes a reference to the
device it is about to return.
This addresses a potential use-after-free that may occur if the
device returned by acpi_get_first_physical_node() is removed right
after dropping its ACPI companion's physical_node_lock in that
function.
It also fixes a device reference counting issue that may lead to a
premature device release if devm_kzalloc() fails in acp3x_es83xx_probe().
Fixes: 54fcd9dd44b2 ("ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/2310746.NgBsaNRSFp@rafael.j.wysocki
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
index b18a8971aec94..7197c1d21d955 100644
--- a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
+++ b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
@@ -425,7 +425,7 @@ static int acp3x_es83xx_probe(struct snd_soc_card *card)
return -ENXIO;
}
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev) {
dev_warn(dev, "Error cannot find codec device, will defer probe\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0609/2151] x86/boot: Remove redundant "cc" clobber in memcmp() and document it
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (607 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0608/2151] ASoC: amd: acp3x-es83xx: " Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0610/2151] x86/asm: Introduce inline memcpy and memset Greg Kroah-Hartman
` (273 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, H. Peter Anvin,
Mauricio Faria de Oliveira, Borislav Petkov (AMD), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauricio Faria de Oliveira <mfo@igalia.com>
[ Upstream commit 94509668fccfa098e0a3d57e7093a9afd88aea9f ]
The "cc" clobber remains recognized for source compatibility, but it has
no meaning anymore; it is automatically generated without condition-code
constraints:
https://lore.kernel.org/all/57b0d188-b256-bde4-43e6-99dae4f59d60@suse.de
Comment out the redundant "cc" clobber for documentation purposes.
[ bp: Massage commit message. ]
Fixes: a8c171c107c0 ("x86/boot: Add volatile, clobbers and zero-length test in memcmp()")
Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-1-08da47943d8e@igalia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/boot/string.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
index 3a2bba7c25e9d..fa9623988826b 100644
--- a/arch/x86/boot/string.c
+++ b/arch/x86/boot/string.c
@@ -36,11 +36,15 @@ int memcmp(const void *s1, const void *s2, size_t len)
/*
* Make sure ZF is properly set in the len==0 case because in it,
* RCX==0 and the REPE; CMPSB won't get executed.
+ *
+ * The "cc" clobber has no meaning anymore, just source compatibility.
+ * On x86 the flag status bits are automatically added to the clobber
+ * set when there are no =@ccXY constraints. Keep it as documentation.
*/
asm volatile("test %3, %3\n\t"
"repe cmpsb"
: "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len)
- : : "cc", "memory");
+ : : /* "cc", */ "memory");
return diff;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0610/2151] x86/asm: Introduce inline memcpy and memset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (608 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0609/2151] x86/boot: Remove redundant "cc" clobber in memcmp() and document it Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0611/2151] x86/asm, x86/boot: Carve out inline memcmp() into a separate header Greg Kroah-Hartman
` (272 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Peter Zijlstra (Intel), Sohil Mehta,
Dave Hansen, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra (Intel) <peterz@infradead.org>
[ Upstream commit d9a96cc18bec65c39822ee0a1672d7dc3fda150a ]
Provide inline memcpy and memset functions that can be used instead of
the GCC builtins when necessary. The immediate use case is for the text
poking functions to avoid the standard memcpy()/memset() calls because
objtool complains about such dynamic calls within an AC=1 region. See
tools/objtool/Documentation/objtool.txt, warning #9, regarding function
calls with UACCESS enabled.
Some user copy functions such as copy_user_generic() and __clear_user()
have similar rep_{movs,stos} usages. But, those are highly specialized
and hard to combine or reuse for other things. Define these new helpers
for all other usages that need a completely unoptimized, strictly inline
version of memcpy() or memset().
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/20251118182911.2983253-4-sohil.mehta%40intel.com
Stable-dep-of: b24bc9dec9c8 ("x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/include/asm/string.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h
index c3c2c1914d657..9cb5aae7fba9f 100644
--- a/arch/x86/include/asm/string.h
+++ b/arch/x86/include/asm/string.h
@@ -1,6 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_STRING_H
+#define _ASM_X86_STRING_H
+
#ifdef CONFIG_X86_32
# include <asm/string_32.h>
#else
# include <asm/string_64.h>
#endif
+
+static __always_inline void *__inline_memcpy(void *to, const void *from, size_t len)
+{
+ void *ret = to;
+
+ asm volatile("rep movsb"
+ : "+D" (to), "+S" (from), "+c" (len)
+ : : "memory");
+ return ret;
+}
+
+static __always_inline void *__inline_memset(void *s, int v, size_t n)
+{
+ void *ret = s;
+
+ asm volatile("rep stosb"
+ : "+D" (s), "+c" (n)
+ : "a" ((uint8_t)v)
+ : "memory");
+ return ret;
+}
+
+#endif /* _ASM_X86_STRING_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0611/2151] x86/asm, x86/boot: Carve out inline memcmp() into a separate header
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (609 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0610/2151] x86/asm: Introduce inline memcpy and memset Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0612/2151] x86/asm: Group inline string functions Greg Kroah-Hartman
` (271 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mauricio Faria de Oliveira,
Borislav Petkov (AMD), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauricio Faria de Oliveira <mfo@igalia.com>
[ Upstream commit 5b6fe00406ce967c556d544a7fc80233341c67c8 ]
Move the inline memcmp() function currently only available in boot/string.c
into the shared string function header <asm/shared/string.h> to be reused.
This is not done through <asm/string.h> to avoid pulling unnecessary code
in boot/string.c that causes build errors in boot/compressed/string.c
and purgatory/purgatory.ro.
No functional changes.
[ bp: Massage commit message. ]
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-2-08da47943d8e@igalia.com
Stable-dep-of: b24bc9dec9c8 ("x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/boot/string.c | 17 ++-------------
arch/x86/include/asm/shared/string.h | 31 ++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 15 deletions(-)
create mode 100644 arch/x86/include/asm/shared/string.h
diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
index fa9623988826b..ab37cf5fcc78a 100644
--- a/arch/x86/boot/string.c
+++ b/arch/x86/boot/string.c
@@ -15,6 +15,7 @@
#include <linux/errno.h>
#include <linux/limits.h>
#include <asm/asm.h>
+#include <asm/shared/string.h>
#include "ctype.h"
#include "string.h"
@@ -31,21 +32,7 @@
int memcmp(const void *s1, const void *s2, size_t len)
{
- bool diff;
-
- /*
- * Make sure ZF is properly set in the len==0 case because in it,
- * RCX==0 and the REPE; CMPSB won't get executed.
- *
- * The "cc" clobber has no meaning anymore, just source compatibility.
- * On x86 the flag status bits are automatically added to the clobber
- * set when there are no =@ccXY constraints. Keep it as documentation.
- */
- asm volatile("test %3, %3\n\t"
- "repe cmpsb"
- : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len)
- : : /* "cc", */ "memory");
- return diff;
+ return __inline_memcmp(s1, s2, len);
}
/*
diff --git a/arch/x86/include/asm/shared/string.h b/arch/x86/include/asm/shared/string.h
new file mode 100644
index 0000000000000..6291653fe629b
--- /dev/null
+++ b/arch/x86/include/asm/shared/string.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_SHARED_STRING_H
+#define _ASM_X86_SHARED_STRING_H
+
+/*
+ * Returns: 0 (equal)
+ * 1 (not equal)
+ *
+ * In contrast, the regular memcmp() follows glibc return value semantics.
+ */
+static __always_inline int __inline_memcmp(const void *s1, const void *s2, size_t len)
+{
+ bool diff;
+
+ /*
+ * Make sure ZF is properly set in the len==0 case because in it,
+ * RCX==0 and the REPE; CMPSB won't get executed.
+ *
+ * The "cc" clobber has no meaning anymore, just source compatibility.
+ * On x86 the flag status bits are automatically added to the clobber
+ * set when there are no =@ccXY constraints. Keep it as documentation.
+ */
+ asm volatile("test %3, %3\n\t"
+ "repe cmpsb"
+ : "=@ccnz" (diff), "+D" (s1), "+S" (s2), "+c" (len)
+ : : /* "cc", */ "memory");
+
+ return diff;
+}
+
+#endif /* _ASM_X86_SHARED_STRING_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0612/2151] x86/asm: Group inline string functions
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (610 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0611/2151] x86/asm, x86/boot: Carve out inline memcmp() into a separate header Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0613/2151] x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs Greg Kroah-Hartman
` (270 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mauricio Faria de Oliveira,
Borislav Petkov (AMD), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauricio Faria de Oliveira <mfo@igalia.com>
[ Upstream commit 85f11c17b261772cddc4606f98f6c604aded4607 ]
Group the __inline string functions in the same header.
Use <asm/shared/string.h> since __inline_memcmp() must remain there for use
by arch/x86/boot/string.c.
No functional changes.
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-3-08da47943d8e@igalia.com
Stable-dep-of: b24bc9dec9c8 ("x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/include/asm/shared/string.h | 21 +++++++++++++++++++++
arch/x86/include/asm/string.h | 21 +--------------------
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/arch/x86/include/asm/shared/string.h b/arch/x86/include/asm/shared/string.h
index 6291653fe629b..6bef90d62a211 100644
--- a/arch/x86/include/asm/shared/string.h
+++ b/arch/x86/include/asm/shared/string.h
@@ -2,6 +2,27 @@
#ifndef _ASM_X86_SHARED_STRING_H
#define _ASM_X86_SHARED_STRING_H
+static __always_inline void *__inline_memcpy(void *to, const void *from, size_t len)
+{
+ void *ret = to;
+
+ asm volatile("rep movsb"
+ : "+D" (to), "+S" (from), "+c" (len)
+ : : "memory");
+ return ret;
+}
+
+static __always_inline void *__inline_memset(void *s, int v, size_t n)
+{
+ void *ret = s;
+
+ asm volatile("rep stosb"
+ : "+D" (s), "+c" (n)
+ : "a" ((uint8_t)v)
+ : "memory");
+ return ret;
+}
+
/*
* Returns: 0 (equal)
* 1 (not equal)
diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h
index 9cb5aae7fba9f..dbf59f0d4cca7 100644
--- a/arch/x86/include/asm/string.h
+++ b/arch/x86/include/asm/string.h
@@ -8,25 +8,6 @@
# include <asm/string_64.h>
#endif
-static __always_inline void *__inline_memcpy(void *to, const void *from, size_t len)
-{
- void *ret = to;
-
- asm volatile("rep movsb"
- : "+D" (to), "+S" (from), "+c" (len)
- : : "memory");
- return ret;
-}
-
-static __always_inline void *__inline_memset(void *s, int v, size_t n)
-{
- void *ret = s;
-
- asm volatile("rep stosb"
- : "+D" (s), "+c" (n)
- : "a" ((uint8_t)v)
- : "memory");
- return ret;
-}
+#include <asm/shared/string.h>
#endif /* _ASM_X86_STRING_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0613/2151] x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (611 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0612/2151] x86/asm: Group inline string functions Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0614/2151] wifi: rtl8xxxu: free RX skb when URB submission fails Greg Kroah-Hartman
` (269 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mauricio Faria de Oliveira,
Borislav Petkov (AMD), Juergen Gross, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauricio Faria de Oliveira <mfo@igalia.com>
[ Upstream commit b24bc9dec9c89d01ccb675a55cda6831dc048ce9 ]
Even with __builtin the compiler may decide to use the out of line function
instead of the inline implementation.
The existing code is broken with gcc-14/15 but not gcc-12/13 (Ubuntu 25.10)
and vmlinux no longer boots with CONFIG_PVH if CONFIG_KASAN_GENERIC is set.
The instrumented out of line function performs a memory access to a region not
yet initialized by KASAN, as it is still in the PVH kernel entry point.
For testing purposes, if the size argument in cpuid_base_hypervisor() is
reduced from 12 to 8 the compiler decides to use the inline implementation.
In xen_prepare_pvh(), it (still) decides to use the inline implementation
(at least in these compiler versions), but it is not guaranteed to remain.
Switch the builtin to the inline implementation to address this.
[ bp: Massage commit message. ]
Fixes: 416a33c9afce ("x86/cpu: fix unbootable VMs by inlining memcmp() in hypervisor_cpuid_base()")
Fixes: fbe5a6dfe492 ("xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh()")
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-4-08da47943d8e@igalia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/include/asm/cpuid/api.h | 2 +-
arch/x86/platform/pvh/enlighten.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/cpuid/api.h b/arch/x86/include/asm/cpuid/api.h
index ea1d9fe438a4f..b9a86643cbafa 100644
--- a/arch/x86/include/asm/cpuid/api.h
+++ b/arch/x86/include/asm/cpuid/api.h
@@ -204,7 +204,7 @@ static inline u32 cpuid_base_hypervisor(const char *sig, u32 leaves)
* from PVH early boot code before instrumentation is set up
* and memcmp() itself may be instrumented.
*/
- if (!__builtin_memcmp(sig, signature, 12) &&
+ if (!__inline_memcmp(sig, signature, 12) &&
(leaves == 0 || ((eax - base) >= leaves)))
return base;
}
diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c
index 2263885d16bad..b7dcc9c992f32 100644
--- a/arch/x86/platform/pvh/enlighten.c
+++ b/arch/x86/platform/pvh/enlighten.c
@@ -8,6 +8,7 @@
#include <asm/hypervisor.h>
#include <asm/e820/api.h>
#include <asm/x86_init.h>
+#include <asm/string.h>
#include <asm/xen/interface.h>
@@ -134,7 +135,7 @@ void __init xen_prepare_pvh(void)
* This must not compile to "call memset" because memset() may be
* instrumented.
*/
- __builtin_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
+ __inline_memset(&pvh_bootparams, 0, sizeof(pvh_bootparams));
hypervisor_specific_init(xen_guest);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0614/2151] wifi: rtl8xxxu: free RX skb when URB submission fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (612 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0613/2151] x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0615/2151] RDMA/irdma: check vport device allocation Greg Kroah-Hartman
` (268 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ping-Ke Shih, Kim Wooseok,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kim Wooseok <5mghybrid@khu.ac.kr>
[ Upstream commit 9f7edf4e8584c87e3c478c6dd87c08d51b5157c2 ]
When usb_submit_urb() fails, rtl8xxxu_submit_rx_urb() unanchors the URB
but leaves the newly allocated skb in urb.context. For ENOMEM/EAGAIN,
the RX worker puts the request back on the pending list. The next
submission allocates another skb and overwrites that pointer, leaking
the previous buffer. Stopping before the retry also leaks it, because
pending-list cleanup frees only the URB.
Free the skb and clear urb.context in rtl8xxxu_submit_rx_urb() when
submission fails. This keeps buffer allocation and failure cleanup in
the same function, so a request returned for retry or teardown no longer
owns an skb. Remove the corresponding cleanup from start and the RX
worker; they only need to decide whether to retry or free the URB.
Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)")
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Assisted-by: GPT-6 Astra
Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260921-codex-rtl-rx-v3-submit-v4-1-eeb09fe8f791@khu.ac.kr
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/realtek/rtl8xxxu/core.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c
index f8bd9bfe74ba3..0f3f10dbfc541 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c
@@ -5912,7 +5912,6 @@ static void rtl8xxxu_rx_urb_work(struct work_struct *work)
struct rtl8xxxu_priv *priv;
struct rtl8xxxu_rx_urb *rx_urb, *tmp;
struct list_head local;
- struct sk_buff *skb;
unsigned long flags;
int ret;
@@ -5944,8 +5943,6 @@ static void rtl8xxxu_rx_urb_work(struct work_struct *work)
default:
dev_warn(&priv->udev->dev,
"failed to requeue urb with error %i\n", ret);
- skb = (struct sk_buff *)rx_urb->urb.context;
- dev_kfree_skb(skb);
usb_free_urb(&rx_urb->urb);
}
}
@@ -6640,8 +6637,11 @@ static int rtl8xxxu_submit_rx_urb(struct rtl8xxxu_priv *priv,
skb_size, rtl8xxxu_rx_complete, skb);
usb_anchor_urb(&rx_urb->urb, &priv->rx_anchor);
ret = usb_submit_urb(&rx_urb->urb, GFP_ATOMIC);
- if (ret)
+ if (ret) {
usb_unanchor_urb(&rx_urb->urb);
+ dev_kfree_skb(skb);
+ rx_urb->urb.context = NULL;
+ }
return ret;
}
@@ -7454,7 +7454,6 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)
struct rtl8xxxu_priv *priv = hw->priv;
struct rtl8xxxu_rx_urb *rx_urb;
struct rtl8xxxu_tx_urb *tx_urb;
- struct sk_buff *skb;
unsigned long flags;
int ret, i;
@@ -7505,13 +7504,8 @@ static int rtl8xxxu_start(struct ieee80211_hw *hw)
rx_urb->hw = hw;
ret = rtl8xxxu_submit_rx_urb(priv, rx_urb);
- if (ret) {
- if (ret != -ENOMEM) {
- skb = (struct sk_buff *)rx_urb->urb.context;
- dev_kfree_skb(skb);
- }
+ if (ret)
rtl8xxxu_queue_rx_urb(priv, rx_urb);
- }
}
schedule_delayed_work(&priv->ra_watchdog, 2 * HZ);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0615/2151] RDMA/irdma: check vport device allocation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (613 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0614/2151] wifi: rtl8xxxu: free RX skb when URB submission fails Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0616/2151] RDMA/cxgb4: Fix neigh reference leak in rx_pkt() Greg Kroah-Hartman
` (267 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Slavin Liu, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Slavin Liu <bolin.liu@seu.edu.cn>
[ Upstream commit 2a770e6a64d66fc3a7317669ecca9773d8339ead ]
An existing RDMA function does not guarantee allocation of the new
vport device. Return -ENOMEM before initializing a NULL iwdev.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: 2ad49ae7330b ("RDMA/irdma: Introduce GEN3 vPort driver support")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
Link: https://patch.msgid.link/20260911060909.94219-1-bolin.liu@seu.edu.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/irdma/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/hw/irdma/main.c b/drivers/infiniband/hw/irdma/main.c
index 95957d52883dd..106915b51e7cb 100644
--- a/drivers/infiniband/hw/irdma/main.c
+++ b/drivers/infiniband/hw/irdma/main.c
@@ -80,6 +80,8 @@ static int ig3rdma_vport_probe(struct auxiliary_device *aux_dev,
return -ENOMEM;
}
iwdev = ib_alloc_device(irdma_device, ibdev);
+ if (!iwdev)
+ return -ENOMEM;
/* Fill iwdev info */
iwdev->is_vport = true;
iwdev->rf = rf;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0616/2151] RDMA/cxgb4: Fix neigh reference leak in rx_pkt()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (614 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0615/2151] RDMA/irdma: check vport device allocation Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0617/2151] RDMA/cxgb4: Fix skb " Greg Kroah-Hartman
` (266 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wentao Liang, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <vulab@iscas.ac.cn>
[ Upstream commit 5fb3051aa4611ae18e304814fb1b74a30065fd85 ]
If ip_dev_find() fails on the loopback path the code jumps to
free_dst without releasing the neighbour reference taken by
dst_neigh_lookup_skb(), leaking one neigh reference.
Release the neighbour before jumping to free_dst.
Fixes: ef42520240aa ("RDMA/cxgb4: add null-ptr-check after ip_dev_find()")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260916183530.2092534-1-vulab@iscas.ac.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/cxgb4/cm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index b3b45c49077d5..f57a31cf4fc78 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -4156,6 +4156,7 @@ static int rx_pkt(struct c4iw_dev *dev, struct sk_buff *skb)
pdev = ip_dev_find(&init_net, iph->daddr);
if (!pdev) {
pr_err("%s - failed to find device!\n", __func__);
+ neigh_release(neigh);
goto free_dst;
}
e = cxgb4_l2t_get(dev->rdev.lldi.l2t, neigh,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0617/2151] RDMA/cxgb4: Fix skb reference leak in rx_pkt()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (615 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0616/2151] RDMA/cxgb4: Fix neigh reference leak in rx_pkt() Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0618/2151] RDMA/mlx5: Fix RQ resource reference leak in mlx5_ib_wq_event() Greg Kroah-Hartman
` (265 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wentao Liang, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <vulab@iscas.ac.cn>
[ Upstream commit 5eb6ecb612841927b5ede554a0e9d88240934282 ]
rx_pkt() takes an extra reference on the received skb so it can be
handed to the firmware completion path via req->cookie. When the
work request skb allocation in send_fw_pass_open_req() fails the
function returns without releasing that extra reference, leaking
one skb reference.
Free the packet skb before returning when the allocation fails,
matching the cxgb4_ofld_send() failure path.
Fixes: 1cab775c3e75 ("RDMA/cxgb4: Fix LE hash collision bug for passive open connection")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260916183715.2092663-1-vulab@iscas.ac.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/cxgb4/cm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index f57a31cf4fc78..a6f520f49d592 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -4006,8 +4006,10 @@ static void send_fw_pass_open_req(struct c4iw_dev *dev, struct sk_buff *skb,
int ret;
req_skb = alloc_skb(sizeof(struct fw_ofld_connection_wr), GFP_KERNEL);
- if (!req_skb)
+ if (!req_skb) {
+ kfree_skb(skb);
return;
+ }
req = __skb_put_zero(req_skb, sizeof(*req));
req->op_compl = htonl(WR_OP_V(FW_OFLD_CONNECTION_WR) | FW_WR_COMPL_F);
req->len16_pkd = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*req), 16)));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0618/2151] RDMA/mlx5: Fix RQ resource reference leak in mlx5_ib_wq_event()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (616 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0617/2151] RDMA/cxgb4: Fix skb " Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0619/2151] RDMA/siw: Fix qp use-after-free in siw_get_base_qp() Greg Kroah-Hartman
` (264 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wentao Liang, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <vulab@iscas.ac.cn>
[ Upstream commit 65f3eab431944415bbe5e3af1bbb2736d4bb1523 ]
Since commit 312b8f79eb05 ("RDMA/mlx: Calling qp event handler in
workqueue context") rsc_event_notifier() expects the event handler to
drop the resource reference taken by mlx5_get_rsc(). mlx5_ib_wq_event()
was missed by that conversion, so every RQ event leaks one reference,
which keeps destroy_resource_common() waiting on the completion.
Put the resource reference on all exits of the handler.
Fixes: 312b8f79eb05 ("RDMA/mlx: Calling qp event handler in workqueue context")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260916183921.2092821-1-vulab@iscas.ac.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/qp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 50b20264c4bdd..3168d70315c78 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -5212,11 +5212,14 @@ static void mlx5_ib_wq_event(struct mlx5_core_qp *core_qp, int type)
break;
default:
mlx5_ib_warn(dev, "Unexpected event type %d on WQ %06x\n", type, core_qp->qpn);
- return;
+ goto out;
}
rwq->ibwq.event_handler(&event, rwq->ibwq.wq_context);
}
+
+out:
+ mlx5_core_res_put(&core_qp->common);
}
static int set_delay_drop(struct mlx5_ib_dev *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0619/2151] RDMA/siw: Fix qp use-after-free in siw_get_base_qp()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (617 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0618/2151] RDMA/mlx5: Fix RQ resource reference leak in mlx5_ib_wq_event() Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0620/2151] hwrng: starfive - propagate clock and reset errors Greg Kroah-Hartman
` (263 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wentao Liang, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <vulab@iscas.ac.cn>
[ Upstream commit ef15197f81ffedf29560edf2221199d92fd83dc2 ]
The reference taken by siw_qp_id2obj() is dropped before the address
of the embedded ib_qp is taken from the QP. If that reference was
the last one the QP is freed and the pointer returned to the iwarp
core is dangling; the core only pins the QP with iw_add_ref() after
the call has returned.
Copy the pointer while the reference is still held.
Fixes: 6c52fdc244b5 ("rdma/siw: connection management")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260916184400.2093106-1-vulab@iscas.ac.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/sw/siw/siw_main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c
index 5168307229a9e..87de6c127aba4 100644
--- a/drivers/infiniband/sw/siw/siw_main.c
+++ b/drivers/infiniband/sw/siw/siw_main.c
@@ -217,8 +217,11 @@ static struct ib_qp *siw_get_base_qp(struct ib_device *base_dev, int id)
/*
* siw_qp_id2obj() increments object reference count
*/
+ struct ib_qp *base_qp = &qp->base_qp;
+
siw_qp_put(qp);
- return &qp->base_qp;
+
+ return base_qp;
}
return NULL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0620/2151] hwrng: starfive - propagate clock and reset errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (618 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0619/2151] RDMA/siw: Fix qp use-after-free in siw_get_base_qp() Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0621/2151] crypto: starfive - handle clock enable failures Greg Kroah-Hartman
` (262 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit ace145efdd80cd2eb95e84b1087d0f1fc55bdc0d ]
The StarFive TRNG probe and resume paths ignore failures from their clock
and reset operations. That lets the driver register or resume while its
hardware access prerequisites were not established.
Check each transition, unwind only the previously enabled clock on failure,
and propagate the error to the probe or PM core.
Fixes: c388f458bc34 ("hwrng: starfive - Add TRNG driver for StarFive SoC")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/char/hw_random/jh7110-trng.c | 39 +++++++++++++++++++++-------
1 file changed, 29 insertions(+), 10 deletions(-)
diff --git a/drivers/char/hw_random/jh7110-trng.c b/drivers/char/hw_random/jh7110-trng.c
index 4712c3c530e42..6bfd52f5d1b1e 100644
--- a/drivers/char/hw_random/jh7110-trng.c
+++ b/drivers/char/hw_random/jh7110-trng.c
@@ -321,9 +321,17 @@ static int starfive_trng_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, PTR_ERR(trng->rst),
"Error getting hardware reset line\n");
- clk_prepare_enable(trng->hclk);
- clk_prepare_enable(trng->ahb);
- reset_control_deassert(trng->rst);
+ ret = clk_prepare_enable(trng->hclk);
+ if (ret)
+ return ret;
+
+ ret = clk_prepare_enable(trng->ahb);
+ if (ret)
+ goto disable_hclk;
+
+ ret = reset_control_deassert(trng->rst);
+ if (ret)
+ goto disable_ahb;
trng->rng.name = dev_driver_string(&pdev->dev);
trng->rng.init = starfive_trng_init;
@@ -343,13 +351,18 @@ static int starfive_trng_probe(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
reset_control_assert(trng->rst);
- clk_disable_unprepare(trng->ahb);
- clk_disable_unprepare(trng->hclk);
-
- return dev_err_probe(&pdev->dev, ret, "Failed to register hwrng\n");
+ ret = dev_err_probe(&pdev->dev, ret, "Failed to register hwrng\n");
+ goto disable_ahb;
}
return 0;
+
+disable_ahb:
+ clk_disable_unprepare(trng->ahb);
+disable_hclk:
+ clk_disable_unprepare(trng->hclk);
+
+ return ret;
}
static int __maybe_unused starfive_trng_suspend(struct device *dev)
@@ -365,11 +378,17 @@ static int __maybe_unused starfive_trng_suspend(struct device *dev)
static int __maybe_unused starfive_trng_resume(struct device *dev)
{
struct starfive_trng *trng = dev_get_drvdata(dev);
+ int ret;
- clk_prepare_enable(trng->hclk);
- clk_prepare_enable(trng->ahb);
+ ret = clk_prepare_enable(trng->hclk);
+ if (ret)
+ return ret;
- return 0;
+ ret = clk_prepare_enable(trng->ahb);
+ if (ret)
+ clk_disable_unprepare(trng->hclk);
+
+ return ret;
}
static const struct dev_pm_ops starfive_trng_pm_ops = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0621/2151] crypto: starfive - handle clock enable failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (619 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0620/2151] hwrng: starfive - propagate clock and reset errors Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0622/2151] crypto: starfive - propagate clock and reset errors Greg Kroah-Hartman
` (261 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiawen Liu, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiawen Liu <1298662399@qq.com>
[ Upstream commit 5358248961ae23f7253d010ddfde1cfd2556ce22 ]
Return error from failed clock enable.
starfive_cryp_probe ignores clk_prepare_enable return for hclk/ahb, then
remove/error paths unconditionally clk_disable_unprepare both clocks.
Check consecutive clk_prepare_enable(cryp->hclk)/cryp->ahb returns in
starfive_cryp_probe.
Signed-off-by: Jiawen Liu <1298662399@qq.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: c8acdd77a623 ("crypto: starfive - propagate clock and reset errors")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/starfive/jh7110-cryp.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/starfive/jh7110-cryp.c b/drivers/crypto/starfive/jh7110-cryp.c
index 42114e9364f0d..a976de668abe2 100644
--- a/drivers/crypto/starfive/jh7110-cryp.c
+++ b/drivers/crypto/starfive/jh7110-cryp.c
@@ -126,8 +126,15 @@ static int starfive_cryp_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, PTR_ERR(cryp->rst),
"Error getting hardware reset line\n");
- clk_prepare_enable(cryp->hclk);
- clk_prepare_enable(cryp->ahb);
+ ret = clk_prepare_enable(cryp->hclk);
+ if (ret)
+ return ret;
+
+ ret = clk_prepare_enable(cryp->ahb);
+ if (ret) {
+ clk_disable_unprepare(cryp->hclk);
+ return ret;
+ }
reset_control_deassert(cryp->rst);
spin_lock(&dev_list.lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0622/2151] crypto: starfive - propagate clock and reset errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (620 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0621/2151] crypto: starfive - handle clock enable failures Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0623/2151] crypto: api - Fix DUP_FIRST crash on unregister Greg Kroah-Hartman
` (260 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit c8acdd77a62374507ed8e70d59e124269d999b75 ]
starfive_cryp_probe() publishes the crypto device after enabling its clocks
and deasserting its reset without checking whether those operations
succeeded.
Check each hardware activation step and unwind only the resources that were
actually enabled before returning the error.
Fixes: 42ef0e944b01 ("crypto: starfive - Add crypto engine support")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/starfive/jh7110-cryp.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/starfive/jh7110-cryp.c b/drivers/crypto/starfive/jh7110-cryp.c
index a976de668abe2..462dee2f0819a 100644
--- a/drivers/crypto/starfive/jh7110-cryp.c
+++ b/drivers/crypto/starfive/jh7110-cryp.c
@@ -131,11 +131,12 @@ static int starfive_cryp_probe(struct platform_device *pdev)
return ret;
ret = clk_prepare_enable(cryp->ahb);
- if (ret) {
- clk_disable_unprepare(cryp->hclk);
- return ret;
- }
- reset_control_deassert(cryp->rst);
+ if (ret)
+ goto disable_hclk;
+
+ ret = reset_control_deassert(cryp->rst);
+ if (ret)
+ goto disable_ahb;
spin_lock(&dev_list.lock);
list_add(&cryp->list, &dev_list.dev_list);
@@ -183,9 +184,11 @@ static int starfive_cryp_probe(struct platform_device *pdev)
list_del(&cryp->list);
spin_unlock(&dev_list.lock);
- clk_disable_unprepare(cryp->hclk);
- clk_disable_unprepare(cryp->ahb);
reset_control_assert(cryp->rst);
+disable_ahb:
+ clk_disable_unprepare(cryp->ahb);
+disable_hclk:
+ clk_disable_unprepare(cryp->hclk);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0623/2151] crypto: api - Fix DUP_FIRST crash on unregister
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (621 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0622/2151] crypto: starfive - propagate clock and reset errors Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0624/2151] crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH Greg Kroah-Hartman
` (259 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Chenghai Huang, Herbert Xu,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
[ Upstream commit 1dfb35de0800967c972eee35e19f3dfc8d50e512 ]
The flag CRYPTO_ALG_DUP_FIRST is buggy because upon unregistration
it tries to unregister the original algorithm rather than the
duplicate which was allocated during registration.
Fix this by locating the duplicated algorithm and unregistering
that instead of the original.
Also remove the duplicate crypto_destroy_alg call.
Reported-by: Chenghai Huang <huangchenghai2@huawei.com>
Fixes: f1440a90465b ("crypto: api - Add support for duplicating algorithms before registration")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
crypto/algapi.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/crypto/algapi.c b/crypto/algapi.c
index e604d0d8b7b41..b981959ddb474 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -422,7 +422,6 @@ static void crypto_free_alg(struct crypto_alg *alg)
unsigned int algsize = alg->cra_type->algsize;
u8 *p = (u8 *)alg - algsize;
- crypto_destroy_alg(alg);
kfree(p);
}
@@ -492,9 +491,31 @@ void crypto_unregister_alg(struct crypto_alg *alg)
LIST_HEAD(list);
down_write(&crypto_alg_sem);
+ if (alg->cra_flags & CRYPTO_ALG_DUP_FIRST) {
+ struct crypto_alg *q, *r = NULL;
+
+ list_for_each_entry(q, &crypto_alg_list, cra_list) {
+ if (crypto_is_larval(q))
+ continue;
+ if (strcmp(q->cra_driver_name, alg->cra_driver_name))
+ continue;
+ r = q;
+ break;
+ }
+
+ if (!r) {
+ up_write(&crypto_alg_sem);
+ ret = -ENOENT;
+ goto not_found;
+ }
+
+ alg = r;
+ }
+
ret = crypto_remove_alg(alg, &list);
up_write(&crypto_alg_sem);
+not_found:
if (WARN(ret, "Algorithm %s is not registered", alg->cra_driver_name))
return;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0624/2151] crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (622 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0623/2151] crypto: api - Fix DUP_FIRST crash on unregister Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0625/2151] crypto: ccp - fix SFS ioctl race against device teardown Greg Kroah-Hartman
` (258 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Weili Qian, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Weili Qian <qianweili@huawei.com>
[ Upstream commit 5b87f619cc5c0a55dcd85ce97974e3f5b9333b7b ]
In hpre_ecdh_hw_data_clr_all(), req->dst is always NULL because
hpre_ecdh_dst_data_init() sets hpre_req->dst = NULL before mapping
the user buffer with dma_map_single(). The dma_free_coherent() call
on req->dst is therefore dead code. Remove it.
Fixes: 05e7b906aa7c ("crypto: hisilicon/hpre - add 'ECDH' algorithm")
Signed-off-by: Weili Qian <qianweili@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/crypto/hisilicon/hpre/hpre_crypto.c b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
index af5d10add106c..7d478f45ebb80 100644
--- a/drivers/crypto/hisilicon/hpre/hpre_crypto.c
+++ b/drivers/crypto/hisilicon/hpre/hpre_crypto.c
@@ -1419,8 +1419,6 @@ static void hpre_ecdh_hw_data_clr_all(struct hpre_ctx *ctx,
if (unlikely(dma_mapping_error(dev, dma)))
return;
- if (req->dst)
- dma_free_coherent(dev, ctx->key_sz << 1, req->dst, dma);
if (dst)
dma_unmap_single(dev, dma, ctx->key_sz << 1, DMA_FROM_DEVICE);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0625/2151] crypto: ccp - fix SFS ioctl race against device teardown
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (623 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0624/2151] crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0626/2151] crypto: ccp - kill v3 IRQ tasklet during teardown Greg Kroah-Hartman
` (257 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Muhammad Bilal, Ashish Kalra,
Thomas Huth, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muhammad Bilal <meatuni001@gmail.com>
[ Upstream commit de4929b47683ed22d8c05f68d2d0f0cfd95b90a1 ]
sfs_ioctl() reads psp_master->sfs_data and caches it in sfs_dev before
taking sfs_ioctl_mutex, while sfs_dev_destroy() frees sfs_dev->page
and sfs_dev->command_buf with no locking at all and only clears
psp->sfs_data afterwards. A call to sfs_ioctl() that reads sfs_data
just before sfs_dev_destroy() runs will still acquire the mutex and
go on to use the now-freed command buffer in send_sfs_cmd().
Have both functions take sfs_ioctl_mutex before touching
psp->sfs_data, so a call that is already using sfs_dev completes
before teardown can free it, and a call arriving after teardown sees
sfs_data cleared and returns -ENODEV instead of racing it.
Fixes: 648dbccc03a0 ("crypto: ccp - Add AMD Seamless Firmware Servicing (SFS) driver")
Signed-off-by: Muhammad Bilal <meatuni001@gmail.com>
Reviewed-by: Ashish Kalra <ashish.kalra@amd.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/ccp/sfs.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/ccp/sfs.c b/drivers/crypto/ccp/sfs.c
index 2f4beaafe7ec6..bc962009ba175 100644
--- a/drivers/crypto/ccp/sfs.c
+++ b/drivers/crypto/ccp/sfs.c
@@ -111,13 +111,13 @@ static long sfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
struct sfs_device *sfs_dev;
int ret = 0;
+ guard(mutex)(&sfs_ioctl_mutex);
+
if (!psp_master || !psp_master->sfs_data)
return -ENODEV;
sfs_dev = psp_master->sfs_data;
- guard(mutex)(&sfs_ioctl_mutex);
-
switch (cmd) {
case SFSIOCFWVERS:
dev_dbg(sfs_dev->dev, "in SFSIOCFWVERS\n");
@@ -191,8 +191,11 @@ static void sfs_exit(struct kref *ref)
void sfs_dev_destroy(struct psp_device *psp)
{
- struct sfs_device *sfs_dev = psp->sfs_data;
+ struct sfs_device *sfs_dev;
+
+ guard(mutex)(&sfs_ioctl_mutex);
+ sfs_dev = psp->sfs_data;
if (!sfs_dev)
return;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0626/2151] crypto: ccp - kill v3 IRQ tasklet during teardown
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (624 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0625/2151] crypto: ccp - fix SFS ioctl race against device teardown Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0627/2151] crypto: ccp - kill v5 " Greg Kroah-Hartman
` (256 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiale Yao, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiale Yao <yaojiale02@163.com>
[ Upstream commit b72a639bdee6e07d8091718ac3e451d9c5cba1b5 ]
On PCI devices using MSI-X, ccp_irq_handler() schedules irq_tasklet. The
teardown paths release the IRQ but do not drain a tasklet that was
already queued, so it can access ccp after the device-managed allocation
has been released.
Kill the tasklet after releasing the IRQ in both the initialization
error path and ccp_destroy().
Fixes: 7b537b24e76a ("crypto: ccp - Change ISR handler method for a v3 CCP")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/ccp/ccp-dev-v3.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
index fe69053b2394d..e85b4ded417aa 100644
--- a/drivers/crypto/ccp/ccp-dev-v3.c
+++ b/drivers/crypto/ccp/ccp-dev-v3.c
@@ -506,6 +506,8 @@ static int ccp_init(struct ccp_device *ccp)
kthread_stop(ccp->cmd_q[i].kthread);
sp_free_ccp_irq(ccp->sp, ccp);
+ if (ccp->use_tasklet)
+ tasklet_kill(&ccp->irq_tasklet);
e_pool:
for (i = 0; i < ccp->cmd_q_count; i++)
@@ -545,6 +547,8 @@ static void ccp_destroy(struct ccp_device *ccp)
kthread_stop(ccp->cmd_q[i].kthread);
sp_free_ccp_irq(ccp->sp, ccp);
+ if (ccp->use_tasklet)
+ tasklet_kill(&ccp->irq_tasklet);
for (i = 0; i < ccp->cmd_q_count; i++)
dma_pool_destroy(ccp->cmd_q[i].dma_pool);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0627/2151] crypto: ccp - kill v5 IRQ tasklet during teardown
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (625 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0626/2151] crypto: ccp - kill v3 IRQ tasklet during teardown Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0628/2151] RDMA/mlx5: Guard steering anchor resource destruction on create error Greg Kroah-Hartman
` (255 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiale Yao, Herbert Xu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiale Yao <yaojiale02@163.com>
[ Upstream commit 67aefeccc4101a93627f36abbd049f191b54f903 ]
On PCI devices using MSI-X, ccp5_irq_handler() schedules irq_tasklet.
The teardown paths release the IRQ but do not drain a tasklet that was
already queued, so it can access ccp after the device-managed allocation
has been released.
Kill the tasklet after releasing the IRQ in both the initialization
error path and ccp5_destroy().
Fixes: 6263b51eb319 ("crypto: ccp - Change ISR handler method for a v5 CCP")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/crypto/ccp/ccp-dev-v5.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index 7b73332d6aa1a..4235be5df546a 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -995,6 +995,8 @@ static int ccp5_init(struct ccp_device *ccp)
e_irq:
sp_free_ccp_irq(ccp->sp, ccp);
+ if (ccp->use_tasklet)
+ tasklet_kill(&ccp->irq_tasklet);
e_pool:
for (i = 0; i < ccp->cmd_q_count; i++)
@@ -1046,6 +1048,8 @@ static void ccp5_destroy(struct ccp_device *ccp)
kthread_stop(ccp->cmd_q[i].kthread);
sp_free_ccp_irq(ccp->sp, ccp);
+ if (ccp->use_tasklet)
+ tasklet_kill(&ccp->irq_tasklet);
/* Flush the cmd and backlog queue */
while (!list_empty(&ccp->cmd)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0628/2151] RDMA/mlx5: Guard steering anchor resource destruction on create error
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (626 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0627/2151] crypto: ccp - kill v5 " Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0629/2151] swim: Assert strobe with stable outputs Greg Kroah-Hartman
` (254 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit 193aaf5b57f05d9f0403cfdaff3eda3b8d11ec13 ]
The steering anchor resources are shared between anchors with the same
priority and are protected by rule_goto_table_ref.
When steering anchor creation succeeds but uverbs_copy_to() fails, the
error path drops the reference acquired for the new anchor. However, it
unconditionally calls mlx5_steering_anchor_destroy_res(), even when
other anchors are still using the shared resources.
This can destroy the shared flow table, flow groups, and rules while
existing anchors still hold references to them, resulting in a
use-after-free when those anchors are subsequently cleaned up.
Only destroy the shared resources when dropping the reference makes
rule_goto_table_ref zero, consistent with the existing cleanup path.
Fixes: e1f4a52ac171 ("RDMA/mlx5: Create an indirect flow table for steering anchor")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260917085419.1792-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/fs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index b0f7663c24c1e..5739d763029bd 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -3041,8 +3041,8 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_STEERING_ANCHOR_CREATE)(
return 0;
destroy_res:
- --ft_prio->anchor.rule_goto_table_ref;
- mlx5_steering_anchor_destroy_res(ft_prio);
+ if (!--ft_prio->anchor.rule_goto_table_ref)
+ mlx5_steering_anchor_destroy_res(ft_prio);
put_flow_table:
put_flow_table(dev, ft_prio, true);
free_obj:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0629/2151] swim: Assert strobe with stable outputs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (627 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0628/2151] RDMA/mlx5: Guard steering anchor resource destruction on create error Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0630/2151] swim: Select appropriate drive once only Greg Kroah-Hartman
` (253 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Finn Thain, Stan Johnson, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit adcc410bfb41715fef198a0975db4ed594a49bb7 ]
Inside Macintosh says, "Be sure that you don't change CA0-CA2 or SEL
while LSTRB is high". Unfortunately, those bits do change. The CA0-CA2
outputs become inputs when (LSTRB << 4) | LSTRB gets written to the
phase register. Then LSTRB is driven low (with CA0-CA2 bits set).
This is a problem because the drive interprets a STEP command as an
EJECT command when these pins float high. This occurs intermittently,
perhaps because interrupts are disabled and the race condition happens
to end well. However, when I add code to step the heads with interrupts
enabled, the disk always ejects.
Keep the four phase pin directions set to output and hold their levels
constant during LSTRB signalling. Introduce the PHASE_PIN_DIRECTION
macro to separate the pin configuration from the logic level changes.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/6da86b9bfd1335fac3ebc8c435fb613d5de4a70c.1788513996.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 62 ++++++++++++++++++++++----------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 416015947ae63..f487e9dfcb544 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -87,37 +87,37 @@ struct iwm {
#define iwm_write(base, reg, v) out_8(&(base)->reg, (v))
#define iwm_read(base, reg) in_8(&(base)->reg)
-/* bits in phase register */
+/* Bits in phase register */
-#define SEEK_POSITIVE 0x070
-#define SEEK_NEGATIVE 0x074
-#define STEP 0x071
-#define MOTOR_ON 0x072
-#define MOTOR_OFF 0x076
-#define INDEX 0x073
-#define EJECT 0x077
-#define SETMFM 0x171
-#define SETGCR 0x175
-
-#define RELAX 0x033
-#define LSTRB 0x008
-
-#define CA_MASK 0x077
+#define RELAX 0x03
+#define LSTRB 0x08
+#define CA_MASK 0x07
+#define PHASE_PIN_DIR 0xF0
/* Select values for swim_select and swim_readbit */
-#define READ_DATA_0 0x074
-#define ONEMEG_DRIVE 0x075
-#define SINGLE_SIDED 0x076
-#define DRIVE_PRESENT 0x077
-#define DISK_IN 0x170
-#define WRITE_PROT 0x171
-#define TRACK_ZERO 0x172
-#define TACHO 0x173
-#define READ_DATA_1 0x174
-#define GCR_MODE 0x175
-#define SEEK_COMPLETE 0x176
-#define TWOMEG_MEDIA 0x177
+#define SEEK_POSITIVE 0x000
+#define SEEK_NEGATIVE 0x004
+#define STEP 0x001
+#define MOTOR_ON 0x002
+#define MOTOR_OFF 0x006
+#define INDEX 0x003
+#define EJECT 0x007
+#define SETMFM 0x101
+#define SETGCR 0x105
+
+#define READ_DATA_0 0x004
+#define ONEMEG_DRIVE 0x005
+#define SINGLE_SIDED 0x006
+#define DRIVE_PRESENT 0x007
+#define DISK_IN 0x100
+#define WRITE_PROT 0x101
+#define TRACK_ZERO 0x102
+#define TACHO 0x103
+#define READ_DATA_1 0x104
+#define GCR_MODE 0x105
+#define SEEK_COMPLETE 0x106
+#define TWOMEG_MEDIA 0x107
/* Bits in handshake register */
@@ -269,11 +269,11 @@ static inline int get_swim_mode(struct swim __iomem *base)
static inline void swim_select(struct swim __iomem *base, int sel)
{
- swim_write(base, phase, RELAX);
+ swim_write(base, phase, RELAX | PHASE_PIN_DIR);
via1_set_head(sel & 0x100);
- swim_write(base, phase, sel & CA_MASK);
+ swim_write(base, phase, (sel & CA_MASK) | PHASE_PIN_DIR);
}
static inline void swim_action(struct swim __iomem *base, int action)
@@ -284,9 +284,9 @@ static inline void swim_action(struct swim __iomem *base, int action)
swim_select(base, action);
udelay(1);
- swim_write(base, phase, (LSTRB<<4) | LSTRB);
+ swim_write(base, phase, LSTRB | action | PHASE_PIN_DIR);
udelay(1);
- swim_write(base, phase, (LSTRB<<4) | ((~LSTRB) & 0x0F));
+ swim_write(base, phase, action | PHASE_PIN_DIR);
udelay(1);
local_irq_restore(flags);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0630/2151] swim: Select appropriate drive once only
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (628 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0629/2151] swim: Assert strobe with stable outputs Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0631/2151] swim: Enable the drive when probing Greg Kroah-Hartman
` (252 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit a2d22b3f25c388f9fbce7bf36a45a8900dce4aa3 ]
Before turning off the spindle motor, call swim_drive() to select the
appropriate drive. Remove the swim_drive() call from swim_add_floppy()
because it was already called by swim_floppy_init().
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/370f73fcceb53ce4860904ce6cf4f06ade0e43d5.1788513996.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index f487e9dfcb544..143e104c7dfaf 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -679,8 +679,10 @@ static void floppy_release(struct gendisk *disk)
else if (fs->ref_count > 0)
--fs->ref_count;
- if (fs->ref_count == 0)
+ if (fs->ref_count == 0) {
+ swim_drive(base, fs->location);
swim_motor(base, OFF);
+ }
mutex_unlock(&swim_mutex);
}
@@ -752,8 +754,6 @@ static int swim_add_floppy(struct swim_priv *swd, enum drive_location location)
fs->location = location;
- swim_drive(base, location);
-
swim_motor(base, OFF);
fs->type = HD_MEDIA;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0631/2151] swim: Enable the drive when probing
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (629 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0630/2151] swim: Select appropriate drive once only Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0632/2151] swim: Dont disable drive after every sector Greg Kroah-Hartman
` (251 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 57d88c8f4ea34a4dd7c5351bd026e225c7283f3f ]
According to the ISM spec, the MOTON bit "causes the Enable 1 and Enable 2
signals to be turned on to the drive." It doesn't actually turn on the
motor. When selecting a drive, enable MOTON. Disable it upon eject or
release. This fixes detection of the Sony FDHD drive.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/f5bf5b596a33a801faaaaa6dc2844c30d3ee82b2.1788513996.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 143e104c7dfaf..1a67b458d2512 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -154,8 +154,9 @@ struct iwm {
/*----------------------------------------------------------------------------*/
enum drive_location {
- INTERNAL_DRIVE = 0x02,
- EXTERNAL_DRIVE = 0x04,
+ NO_DRIVE = 0,
+ INTERNAL_DRIVE = BIT(1),
+ EXTERNAL_DRIVE = BIT(2),
};
enum media_type {
@@ -311,9 +312,15 @@ static inline void swim_drive(struct swim __iomem *base,
if (location == INTERNAL_DRIVE) {
swim_write(base, mode0, EXTERNAL_DRIVE); /* clear drive 1 bit */
swim_write(base, mode1, INTERNAL_DRIVE); /* set drive 0 bit */
+ swim_write(base, mode1, MOTON);
} else if (location == EXTERNAL_DRIVE) {
swim_write(base, mode0, INTERNAL_DRIVE); /* clear drive 0 bit */
swim_write(base, mode1, EXTERNAL_DRIVE); /* set drive 1 bit */
+ swim_write(base, mode1, MOTON);
+ } else {
+ swim_write(base, mode0, INTERNAL_DRIVE);
+ swim_write(base, mode0, EXTERNAL_DRIVE);
+ swim_write(base, mode0, MOTON);
}
}
@@ -447,6 +454,7 @@ static int floppy_eject(struct floppy_state *fs)
swim_drive(base, fs->location);
swim_motor(base, OFF);
swim_eject(base);
+ swim_drive(base, NO_DRIVE);
fs->disk_in = 0;
fs->ejected = 1;
@@ -652,8 +660,10 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
else if (fs->ref_count > 0)
--fs->ref_count;
- if (fs->ref_count == 0)
+ if (fs->ref_count == 0) {
swim_motor(base, OFF);
+ swim_drive(base, NO_DRIVE);
+ }
return err;
}
@@ -682,6 +692,7 @@ static void floppy_release(struct gendisk *disk)
if (fs->ref_count == 0) {
swim_drive(base, fs->location);
swim_motor(base, OFF);
+ swim_drive(base, NO_DRIVE);
}
mutex_unlock(&swim_mutex);
}
@@ -804,6 +815,7 @@ static int swim_floppy_init(struct swim_priv *swd)
if (swim_readbit(base, DRIVE_PRESENT) &&
!swim_readbit(base, ONEMEG_DRIVE))
swim_add_floppy(swd, EXTERNAL_DRIVE);
+ swim_drive(base, NO_DRIVE);
/* register floppy drives */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0632/2151] swim: Dont disable drive after every sector
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (630 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0631/2151] swim: Enable the drive when probing Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0633/2151] swim: Perform ISM/IWM mode switching according to specs Greg Kroah-Hartman
` (250 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 05a7c4b197279cfb3ec3df26146ce085a2438aec ]
This fixes multi-sector reads on a Sony drive. The Mitsubishi drive
doesn't seem to care either way.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/fc511e72753ae18b6f021701aa00d480335b0caf.1788513996.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 1a67b458d2512..4fe5a1d775a6c 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -473,8 +473,6 @@ static inline int swim_read_sector(struct floppy_state *fs,
short i;
swim_track(fs, track);
-
- swim_write(base, mode1, MOTON);
swim_head(base, side);
swim_write(base, mode0, side);
@@ -490,8 +488,6 @@ static inline int swim_read_sector(struct floppy_state *fs,
}
local_irq_restore(flags);
- swim_write(base, mode0, MOTON);
-
if ((header.side != side) || (header.track != track) ||
(header.sector != sector))
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0633/2151] swim: Perform ISM/IWM mode switching according to specs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (631 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0632/2151] swim: Dont disable drive after every sector Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0634/2151] swim: Configure parameter memory Greg Kroah-Hartman
` (249 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 52981bb358d1b5c38040b00f81e2cf973f9148ad ]
The SWIM spec says, "MOTOREN must be low to switch modes" and "after
switching from ISM to IWM, the very first command must be a clear L7".
The ISM spec says, MOTOREN "must not be cleared until after the Action
bit is cleared". Perform those operations in the correct sequence.
When switching to ISM mode, the Mode register has to be selected with a
particular sequence of bit flips. Set q7 low then q6 low then mtrOff.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/75714ecc9a12d59511967dc9e24163dc8f3bbdd8.1788513996.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 4fe5a1d775a6c..b83404d29994d 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -149,6 +149,7 @@ struct iwm {
#define ACTION 0x08
#define WRITE_MODE 0x10
#define HEDSEL 0x20
+#define ISM_SELECT 0x40
#define MOTON 0x80
/*----------------------------------------------------------------------------*/
@@ -223,18 +224,21 @@ extern int swim_read_sector_data(struct swim __iomem *base,
static DEFINE_MUTEX(swim_mutex);
static inline void set_swim_mode(struct swim __iomem *base, int enable)
{
- struct iwm __iomem *iwm_base;
+ struct iwm __iomem *iwm_base = (struct iwm __iomem *)base;
unsigned long flags;
if (!enable) {
- swim_write(base, mode0, 0xf8);
+ swim_write(base, mode0, ACTION);
+ swim_write(base, mode0, ENBL1 | ENBL2 | MOTON);
+ swim_write(base, mode0, ISM_SELECT);
+ iwm_read(iwm_base, q7L);
return;
}
- iwm_base = (struct iwm __iomem *)base;
local_irq_save(flags);
iwm_read(iwm_base, q7L);
+ iwm_read(iwm_base, q6L);
iwm_read(iwm_base, mtrOff);
iwm_read(iwm_base, q6H);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0634/2151] swim: Configure parameter memory
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (632 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0633/2151] swim: Perform ISM/IWM mode switching according to specs Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0635/2151] swim: Refactor SWIM setup Greg Kroah-Hartman
` (248 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 994a778d966592d0e211deaf6e436fcb21413935 ]
The original SWIM chip has a 16 byte memory to store parameters which
control read/write timing. The SWIM 2 chip retains the last 4 parameters
which control write pre-compensation, but omits the first 12. Hence
SWIM 2 can perform reads without any parameter memory setup but SWIM 1
cannot.
Configure the SWIM parameter memory with the appropriate values so that
SWIM 1 can read too. The parameters used here were observed in SWIM chip
memory, using Macsbug, while MacOS was reading from an MFM floppy disk.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/eccb76911fd255330b05eb3174ac15c29bb41a23.1788513996.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index b83404d29994d..ac5475a987b74 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -796,6 +796,17 @@ static void swim_cleanup_floppy_disk(struct floppy_state *fs)
blk_mq_free_tag_set(&fs->tag_set);
}
+static void swim_set_parameters(struct swim __iomem *base)
+{
+ unsigned int i;
+ static const u8 mem[] = { 0x18, 0x41, 0x2e, 0x2e, 0x18, 0x18, 0x1b, 0x1b,
+ 0x2f, 0x2f, 0x19, 0x19, 0x97, 0x1b, 0x57, 0x3b, };
+
+ swim_write(base, mode0, 0); /* reset parameter memory index */
+ for (i = 0; i < 16; ++i)
+ swim_write(base, parameter, mem[i]);
+}
+
static int swim_floppy_init(struct swim_priv *swd)
{
struct queue_limits lim = {
@@ -805,6 +816,8 @@ static int swim_floppy_init(struct swim_priv *swd)
int drive;
struct swim __iomem *base = swd->base;
+ swim_set_parameters(base);
+
/* scan floppy drives */
swim_drive(base, INTERNAL_DRIVE);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0635/2151] swim: Refactor SWIM setup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (633 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0634/2151] swim: Configure parameter memory Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0636/2151] swim: Enable clock divider only where appropriate Greg Kroah-Hartman
` (247 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Joshua Thompson, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 62977e8ea98e99dbf86609e65930e6607398e1c5 ]
The write to the setup register is really chip initialization, so do it in
swim_floppy_init() rather than floppy_open(). Drop the udelay(), which was
apparently copied and pasted from swim3.c where it presumably relates to
interrupts, of which this chip has none. (See also mkLinux SWIM 3 driver.)
Cc: Joshua Thompson <funaho@jurai.org>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/e9facb07b20436a6941ec067288e84d8dd9311c0.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: 3c02a14c8996 ("swim: Enable clock divider only where appropriate")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index ac5475a987b74..7e567e7219ba1 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -628,8 +628,7 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
fs->ref_count = -1;
else
fs->ref_count++;
- swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2);
- udelay(10);
+
swim_drive(base, fs->location);
swim_motor(base, ON);
swim_action(base, SETMFM);
@@ -816,6 +815,8 @@ static int swim_floppy_init(struct swim_priv *swd)
int drive;
struct swim __iomem *base = swd->base;
+ swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2);
+
swim_set_parameters(base);
/* scan floppy drives */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0636/2151] swim: Enable clock divider only where appropriate
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (634 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0635/2151] swim: Refactor SWIM setup Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0637/2151] swim: Dont start motor until medium is present Greg Kroah-Hartman
` (246 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Joshua Thompson, Geert Uytterhoeven,
Laurent Vivier, Finn Thain, Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 3c02a14c89962c88ed0abb3cce4101021c63149c ]
Some models have a 16 MHz FCLK oscillator and others 32 MHz. Put this
information into the swim device platform_data so that the driver can
correctly enable the clock divider. When this is enabled incorrectly,
nothing can be read and failures from the Error Correction Machine are
flagged in the error register.
Cc: Joshua Thompson <funaho@jurai.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/483efa2f8ac6beb2a2d4fa2d8b431cb1a8b560c7.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/m68k/mac/config.c | 31 ++++++++++++++++++++++++++++++-
drivers/block/swim.c | 9 ++++++---
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index c0033f885ed4f..b745cf20a71f9 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -984,8 +984,37 @@ static int __init mac_platform_init(void)
.start = swim_base,
.end = swim_base + 0x1FFF,
};
+ bool fast_fclk = false;
+
+ /* Models in this list are supposed to run FCLK at 32 MHz */
+ switch (macintosh_config->ident) {
+ case MAC_MODEL_CCL:
+ case MAC_MODEL_CCLII:
+ case MAC_MODEL_LCIII:
+ case MAC_MODEL_Q605:
+ case MAC_MODEL_Q605_ACC:
+ case MAC_MODEL_Q610:
+ case MAC_MODEL_Q630:
+ case MAC_MODEL_Q650:
+ case MAC_MODEL_Q800:
+ case MAC_MODEL_P460:
+ case MAC_MODEL_P475:
+ case MAC_MODEL_P475F:
+ case MAC_MODEL_P520:
+ case MAC_MODEL_P550:
+ case MAC_MODEL_P575:
+ case MAC_MODEL_P588:
+ case MAC_MODEL_TV:
+ case MAC_MODEL_C610:
+ case MAC_MODEL_C650:
+ case MAC_MODEL_PB190:
+ case MAC_MODEL_PB520:
+ fast_fclk = true;
+ break;
+ }
- platform_device_register_simple("swim", -1, &swim_rsrc, 1);
+ platform_device_register_resndata(NULL, "swim", -1, &swim_rsrc, 1,
+ &fast_fclk, sizeof(fast_fclk));
}
/*
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 7e567e7219ba1..a2303e2e24ff0 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -806,8 +806,11 @@ static void swim_set_parameters(struct swim __iomem *base)
swim_write(base, parameter, mem[i]);
}
-static int swim_floppy_init(struct swim_priv *swd)
+static int swim_floppy_init(struct platform_device *pdev)
{
+ struct swim_priv *swd = platform_get_drvdata(pdev);
+ bool *data = pdev->dev.platform_data;
+ bool fast_fclk = data && *data;
struct queue_limits lim = {
.features = BLK_FEAT_ROTATIONAL,
};
@@ -815,7 +818,7 @@ static int swim_floppy_init(struct swim_priv *swd)
int drive;
struct swim __iomem *base = swd->base;
- swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2);
+ swim_write(base, setup, S_IBM_DRIVE | (fast_fclk ? S_FCLK_DIV2 : 0));
swim_set_parameters(base);
@@ -931,7 +934,7 @@ static int swim_probe(struct platform_device *dev)
swd->base = swim_base;
- ret = swim_floppy_init(swd);
+ ret = swim_floppy_init(dev);
if (ret)
goto out_kfree;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0637/2151] swim: Dont start motor until medium is present
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (635 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0636/2151] swim: Enable clock divider only where appropriate Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0638/2151] swim: Recalibrate when drive is probed Greg Kroah-Hartman
` (245 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit dbbaaae83cb277d76e70426c0f0ce289e867ed77 ]
The spindle motor should not be running when a disk is to be inserted.
Don't start the motor while the drive is empty.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/7ea60e0bf6135b9bcd4be0991a257d4c5de22bb3.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index a2303e2e24ff0..4b8d5268c900c 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -630,8 +630,7 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
fs->ref_count++;
swim_drive(base, fs->location);
- swim_motor(base, ON);
- swim_action(base, SETMFM);
+
if (fs->ejected)
setup_medium(fs);
if (!fs->disk_in) {
@@ -639,6 +638,9 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
goto out;
}
+ swim_motor(base, ON);
+ swim_action(base, SETMFM);
+
set_capacity(fs->disk, fs->total_secs);
if (mode & BLK_OPEN_NDELAY)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0638/2151] swim: Recalibrate when drive is probed
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (636 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0637/2151] swim: Dont start motor until medium is present Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0639/2151] swim: Add track zero recalibration delay Greg Kroah-Hartman
` (244 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Finn Thain, Stan Johnson, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit ba087774a1493ade524f8a783461fa8be9c75039 ]
Track zero recalibration can be slow and is normally done only once i.e.
during system POST or boot-up. Recalibrate once after the drive is probed
rather than every time the device is opened. Don't register the drive if
recalibration fails. Park the heads before ejecting.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/119e799afcc00d6bd4a479c31e0c960cb1a1d71b.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 37 +++++++++++++++++--------------------
1 file changed, 17 insertions(+), 20 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 4b8d5268c900c..4915b5e1ceaec 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -412,6 +412,7 @@ static inline int swim_track00(struct swim __iomem *base)
if (swim_readbit(base, TRACK_ZERO))
return 0;
+ pr_err("swim: track zero recalibration failed\n");
return -1;
}
@@ -456,6 +457,7 @@ static int floppy_eject(struct floppy_state *fs)
struct swim __iomem *base = fs->swd->base;
swim_drive(base, fs->location);
+ swim_track(fs, 40);
swim_motor(base, OFF);
swim_eject(base);
swim_drive(base, NO_DRIVE);
@@ -596,13 +598,6 @@ static void setup_medium(struct floppy_state *fs)
struct floppy_struct *g;
fs->disk_in = 1;
fs->write_protected = swim_readbit(base, WRITE_PROT);
-
- if (swim_track00(base))
- printk(KERN_ERR
- "SWIM: cannot move floppy head to track 0\n");
-
- swim_track00(base);
-
fs->type = swim_readbit(base, TWOMEG_MEDIA) ?
HD_MEDIA : DD_MEDIA;
fs->head_number = swim_readbit(base, SINGLE_SIDED) ? 1 : 2;
@@ -610,7 +605,6 @@ static void setup_medium(struct floppy_state *fs)
fs->total_secs = g->size;
fs->secpercyl = g->head * g->sect;
fs->secpertrack = g->sect;
- fs->track = 0;
} else {
fs->disk_in = 0;
}
@@ -759,24 +753,33 @@ static const struct block_device_operations floppy_fops = {
.check_events = floppy_check_events,
};
-static int swim_add_floppy(struct swim_priv *swd, enum drive_location location)
+static void swim_add_floppy(struct swim_priv *swd, enum drive_location location)
{
struct floppy_state *fs = &swd->unit[swd->floppy_count];
struct swim __iomem *base = swd->base;
- fs->location = location;
+ swim_drive(base, location);
+ if (!swim_readbit(base, DRIVE_PRESENT) ||
+ swim_readbit(base, ONEMEG_DRIVE))
+ goto out;
+ if (swim_readbit(base, DISK_IN))
+ swim_motor(base, ON);
+ if (swim_track00(base))
+ goto out;
- swim_motor(base, OFF);
+ fs->location = location;
fs->type = HD_MEDIA;
fs->head_number = 2;
fs->ref_count = 0;
fs->ejected = 1;
+ fs->track = 0;
swd->floppy_count++;
- return 0;
+out:
+ swim_motor(base, OFF);
}
static const struct blk_mq_ops swim_mq_ops = {
@@ -826,14 +829,8 @@ static int swim_floppy_init(struct platform_device *pdev)
/* scan floppy drives */
- swim_drive(base, INTERNAL_DRIVE);
- if (swim_readbit(base, DRIVE_PRESENT) &&
- !swim_readbit(base, ONEMEG_DRIVE))
- swim_add_floppy(swd, INTERNAL_DRIVE);
- swim_drive(base, EXTERNAL_DRIVE);
- if (swim_readbit(base, DRIVE_PRESENT) &&
- !swim_readbit(base, ONEMEG_DRIVE))
- swim_add_floppy(swd, EXTERNAL_DRIVE);
+ swim_add_floppy(swd, INTERNAL_DRIVE);
+ swim_add_floppy(swd, EXTERNAL_DRIVE);
swim_drive(base, NO_DRIVE);
/* register floppy drives */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0639/2151] swim: Add track zero recalibration delay
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (637 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0638/2151] swim: Recalibrate when drive is probed Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0640/2151] swim: Handle FIFO timeout error Greg Kroah-Hartman
` (243 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit b9c1095048537cc9563f12d0a24f2f0df129e4d5 ]
The UPD72070 spec indicates that the track zero sensor can take 3 ms
to stabilize following a STEP command so add a call to msleep().
Remove the duplicate swim_readbit() call as there's no need for that
once the sensor signal has stabilized.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/6d17ca20a7286c1d74833b29510c506a66d96e6f.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 4915b5e1ceaec..178f270ef24e7 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -402,16 +402,15 @@ static inline int swim_track00(struct swim __iomem *base)
for (try = 0; try < 100; try++) {
swim_select(base, RELAX);
+ msleep(3);
+
if (swim_readbit(base, TRACK_ZERO))
- break;
+ return 0;
if (swim_step(base))
- return -1;
+ break;
}
- if (swim_readbit(base, TRACK_ZERO))
- return 0;
-
pr_err("swim: track zero recalibration failed\n");
return -1;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0640/2151] swim: Handle FIFO timeout error
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (638 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0639/2151] swim: Add track zero recalibration delay Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0641/2151] swim: Check for CRC errors Greg Kroah-Hartman
` (242 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 2e9bcbecee68431b689d16b23bc5529db686f8d4 ]
When polling the FIFO for a mark byte in the sector header, don't
return zero if the timeout counter has expired, return an error code.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/aadb674d27d6e6d346d9b525597bf2e339c57e04.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim_asm.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index 3d7a2d87595a5..208622ac4aeb9 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -79,7 +79,7 @@ wait_addr_mark_byte:
tstb %a2@
dbmi %d2, wait_addr_mark_byte
- bpl header_exit
+ bpl signal_nonyb
moveb %a3@, %d3
cmpb %a0@+, %d3
@@ -136,7 +136,6 @@ crc1: tstb %a2@
tstb %a3@(read_error - read_mark)
-header_exit:
moveq #0, %d0
moveb #0x18, %a3@(write_mode0 - read_mark)
rts
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0641/2151] swim: Check for CRC errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (639 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0640/2151] swim: Handle FIFO timeout error Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0642/2151] swim: Simplify return value initialization Greg Kroah-Hartman
` (241 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Finn Thain, Stan Johnson, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 01bff87152e6748fbac9ccd645d3d5f490d75ddc ]
After reading either the sector header or sector data, examine that flag
in the handshake register which holds the result of the CRC calculation.
CRC validation has to take place with the last byte still in the FIFO.
This flag can't be checked by the caller because by then all bytes will
have been retrieved from the FIFO. Return an error code when appropriate.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/9bfcd0414192d1b95803c16701d62732ff6e8f3f.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim_asm.S | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index 208622ac4aeb9..250e408060e8b 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -42,6 +42,8 @@
.equ max_retry, 40
.equ sector_size, 512
+ .equ .Lhr_crc_error, 0x02
+
.global swim_read_sector_header
swim_read_sector_header:
link %a6, #0
@@ -134,6 +136,10 @@ crc1: tstb %a2@
moveb %a3@, %a4@(o_crc1)
+ moveb %a2@, %d5
+ andb #.Lhr_crc_error, %d5
+ bne signal_nonyb
+
tstb %a3@(read_error - read_mark)
moveq #0, %d0
@@ -226,6 +232,10 @@ data_crc1:
moveb %a3@, %d5
+ moveb %a2@, %d5
+ andb #.Lhr_crc_error, %d5
+ bne data_exit
+
tstb %a3@(read_error - read_mark)
moveb #0x18, %a3@(write_mode0 - read_mark)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0642/2151] swim: Simplify return value initialization
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (640 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0641/2151] swim: Check for CRC errors Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0643/2151] swim: Check error register during sector read Greg Kroah-Hartman
` (240 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 385a44e78702762e2fce796cf37b6f465d86a87f ]
Initialize the error result once only. Update the result only after a
successful read.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/28322f0cbefd865bdfb679bab4352c111996795b.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: d66bdef0a308 ("swim: Check error register during sector read")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim_asm.S | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index 250e408060e8b..81c824923336c 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -49,6 +49,7 @@ swim_read_sector_header:
link %a6, #0
moveml %d1-%d5/%a0-%a4,%sp@-
movel %a6@(0x0c), %a4
+ moveq #-1, %d0
bsr mfm_read_addrmark
moveml %sp@+, %d1-%d5/%a0-%a4
unlk %a6
@@ -63,7 +64,6 @@ mfm_read_addrmark:
movel %a6@(0x08), %a3
lea %a3@(read_handshake), %a2
lea %a3@(read_mark), %a3
- moveq #-1, %d0
movew #seek_time, %d2
wait_header_init:
@@ -143,10 +143,7 @@ crc1: tstb %a2@
tstb %a3@(read_error - read_mark)
moveq #0, %d0
- moveb #0x18, %a3@(write_mode0 - read_mark)
- rts
signal_nonyb:
- moveq #-1, %d0
moveb #0x18, %a3@(write_mode0 - read_mark)
rts
@@ -155,6 +152,7 @@ swim_read_sector_data:
link %a6, #0
moveml %d1-%d5/%a0-%a5,%sp@-
movel %a6@(0x0c), %a4
+ moveq #-1, %d0
bsr mfm_read_data
moveml %sp@+, %d1-%d5/%a0-%a5
unlk %a6
@@ -238,15 +236,12 @@ data_crc1:
tstb %a3@(read_error - read_mark)
- moveb #0x18, %a3@(write_mode0 - read_mark)
-
/* return number of bytes read */
movel #sector_size, %d0
addw #1, %d4
subl %d4, %d0
- rts
+
data_exit:
moveb #0x18, %a3@(write_mode0 - read_mark)
- moveq #-1, %d0
rts
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0643/2151] swim: Check error register during sector read
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (641 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0642/2151] swim: Simplify return value initialization Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0644/2151] swim: Dont use the mark register to read data Greg Kroah-Hartman
` (239 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit d66bdef0a3083fed1a0fc4f0ee1c85b26476b21c ]
Clear the error register only once before a sector read operation. Don't
clear it afterwards -- the caller needs it. Check the error register in
swim_read_sector() and return the appropriate error when necessary. Fully
validate the sector header. Don't terminate the search loop early just
because an erroneous sector header showed up.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/efabd807f4ecf5cbc05b60e91ed69aa4c10691a8.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 13 +++++++------
drivers/block/swim_asm.S | 8 --------
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 178f270ef24e7..ebba9506e78d0 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -483,20 +483,21 @@ static inline int swim_read_sector(struct floppy_state *fs,
local_irq_save(flags);
for (i = 0; i < 36; i++) {
- ret = swim_read_sector_header(base, &header);
- if (!ret && (header.sector == sector)) {
+ if (swim_read_sector_header(base, &header) ||
+ swim_read(base, error) || header.track != track ||
+ header.side != side || header.size != 2)
+ continue;
+ if (header.sector == sector) {
/* found */
ret = swim_read_sector_data(base, buffer);
+ if (swim_read(base, error))
+ ret = -EIO;
break;
}
}
local_irq_restore(flags);
- if ((header.side != side) || (header.track != track) ||
- (header.sector != sector))
- return 0;
-
return ret;
}
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index 81c824923336c..fcf574ced85ec 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -67,7 +67,6 @@ mfm_read_addrmark:
movew #seek_time, %d2
wait_header_init:
- tstb %a3@(read_error - read_mark)
moveb #0x18, %a3@(write_mode0 - read_mark)
moveb #0x01, %a3@(write_mode1 - read_mark)
moveb #0x01, %a3@(write_mode0 - read_mark)
@@ -140,8 +139,6 @@ crc1: tstb %a2@
andb #.Lhr_crc_error, %d5
bne signal_nonyb
- tstb %a3@(read_error - read_mark)
-
moveq #0, %d0
signal_nonyb:
moveb #0x18, %a3@(write_mode0 - read_mark)
@@ -166,7 +163,6 @@ mfm_read_data:
movew #seek_time, %d2
wait_data_init:
- tstb %a3@(read_error - read_mark)
moveb #0x18, %a3@(write_mode0 - read_mark)
moveb #0x01, %a3@(write_mode1 - read_mark)
moveb #0x01, %a3@(write_mode0 - read_mark)
@@ -191,8 +187,6 @@ wait_data_mark_byte:
/* read data */
- tstb %a3@(read_error - read_mark)
-
movel #sector_size-1, %d4 /* sector size */
read_new_data:
movew #max_retry, %d2
@@ -234,8 +228,6 @@ data_crc1:
andb #.Lhr_crc_error, %d5
bne data_exit
- tstb %a3@(read_error - read_mark)
-
/* return number of bytes read */
movel #sector_size, %d0
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0644/2151] swim: Dont use the mark register to read data
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (642 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0643/2151] swim: Check error register during sector read Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0645/2151] swim: Fix buffer overflow Greg Kroah-Hartman
` (238 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit cb7923133ec18e67e2d6718e29426a4423af6b73 ]
If an unexpected mark byte were to be read from the data register, an
error would be flagged. But no error gets flagged when such a byte is
read from the mark register, which is misleading. Always use the data
register except when a mark byte is expected.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/fecd77b141bdd8a59ebae5f9efffccb155afdc4c.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim_asm.S | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index fcf574ced85ec..699f7c90dd1c0 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -47,11 +47,11 @@
.global swim_read_sector_header
swim_read_sector_header:
link %a6, #0
- moveml %d1-%d5/%a0-%a4,%sp@-
+ moveml %d1-%d5/%a0-%a5,%sp@-
movel %a6@(0x0c), %a4
moveq #-1, %d0
bsr mfm_read_addrmark
- moveml %sp@+, %d1-%d5/%a0-%a4
+ moveml %sp@+, %d1-%d5/%a0-%a5
unlk %a6
rts
@@ -63,6 +63,7 @@ sector_data_mark:
mfm_read_addrmark:
movel %a6@(0x08), %a3
lea %a3@(read_handshake), %a2
+ lea %a3@(read_data), %a5
lea %a3@(read_mark), %a3
movew #seek_time, %d2
@@ -93,7 +94,7 @@ amark0: tstb %a2@
dbmi %d2, amark0
bpl signal_nonyb
- moveb %a3@, %a4@(o_track)
+ moveb %a5@, %a4@(o_track)
moveq #max_retry, %d2
@@ -101,7 +102,7 @@ amark1: tstb %a2@
dbmi %d2, amark1
bpl signal_nonyb
- moveb %a3@, %a4@(o_side)
+ moveb %a5@, %a4@(o_side)
moveq #max_retry, %d2
@@ -109,7 +110,7 @@ amark2: tstb %a2@
dbmi %d2, amark2
bpl signal_nonyb
- moveb %a3@, %a4@(o_sector)
+ moveb %a5@, %a4@(o_sector)
moveq #max_retry, %d2
@@ -117,7 +118,7 @@ amark3: tstb %a2@
dbmi %d2, amark3
bpl signal_nonyb
- moveb %a3@, %a4@(o_size)
+ moveb %a5@, %a4@(o_size)
moveq #max_retry, %d2
@@ -125,7 +126,7 @@ crc0: tstb %a2@
dbmi %d2, crc0
bpl signal_nonyb
- moveb %a3@, %a4@(o_crc0)
+ moveb %a5@, %a4@(o_crc0)
moveq #max_retry, %d2
@@ -133,7 +134,7 @@ crc1: tstb %a2@
dbmi %d2, crc1
bpl signal_nonyb
- moveb %a3@, %a4@(o_crc1)
+ moveb %a5@, %a4@(o_crc1)
moveb %a2@, %d5
andb #.Lhr_crc_error, %d5
@@ -212,7 +213,7 @@ data_crc0:
dbmi %d2, data_crc0
bpl data_exit
- moveb %a3@, %d5
+ moveb %a5@, %d5
moveq #max_retry, %d2
@@ -222,7 +223,7 @@ data_crc1:
dbmi %d2, data_crc1
bpl data_exit
- moveb %a3@, %d5
+ moveb %a5@, %d5
moveb %a2@, %d5
andb #.Lhr_crc_error, %d5
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0645/2151] swim: Fix buffer overflow
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (643 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0644/2151] swim: Dont use the mark register to read data Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0646/2151] swim: Convert to blocking queue Greg Kroah-Hartman
` (237 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Finn Thain, Stan Johnson, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit a54870a4ae4962acf341eb6ca010cae02af1a6ea ]
The effect of this bug can be observed as swim_read_sector_data()
inexplicably returning -5, or an error flag indicating that a mark byte
was read from the data register, or other odd behviour.
When copying bytes from the chip FIFO to the read buffer, the driver
keeps count of the remaining buffer space using register %d4. A counter
in register %d2 serves as a timeout. The driver polls (%a2), the handshake
register, until flags indicate that byte(s) have arrived in the FIFO.
movel #sector_size-1, %d4
read_new_data:
movew #max_retry, %d2
read_data_loop:
moveb %a2@, %d5
andb #0xc0, %d5
dbne %d2, read_data_loop
beq data_exit
moveb %a5@, %a4@+
andb #0x40, %d5
dbne %d4, read_new_data
beq exit_loop
Note that the exit_loop branch depends upon a flag in the handshake
register and not on the remaining buffer space. Hence there may be no
branch to exit_loop after %d4 is decremented to -1 (i.e. full buffer).
moveb %a5@, %a4@+
dbra %d4, read_new_data
exit_loop:
Here is a second decrement of %d4 which can now reach -2. But the buffer
bounds check is a comparison with -1, which is now ineffective. Hence the
loop will continue copying until %d2 eventually reaches -1.
Fix this bug by terminating the loop as soon as %d4 or %d2 reach -1.
Reset the timeout whenever a byte is copied.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/d8fceda197b840f892d9b511175e824ca2549f01.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim_asm.S | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index 699f7c90dd1c0..e06aadb411a14 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -43,6 +43,8 @@
.equ sector_size, 512
.equ .Lhr_crc_error, 0x02
+ .equ .Lhr_fifo_2bytes, 0x40
+ .equ .Lhr_fifo_1byte, 0x80
.global swim_read_sector_header
swim_read_sector_header:
@@ -189,20 +191,20 @@ wait_data_mark_byte:
/* read data */
movel #sector_size-1, %d4 /* sector size */
-read_new_data:
movew #max_retry, %d2
read_data_loop:
moveb %a2@, %d5
- andb #0xc0, %d5
+ andb #(.Lhr_fifo_1byte + .Lhr_fifo_2bytes), %d5
dbne %d2, read_data_loop
beq data_exit
+ moveq #max_retry, %d2
moveb %a5@, %a4@+
- andb #0x40, %d5
- dbne %d4, read_new_data
- beq exit_loop
+ dbra %d4, 1f
+ bra data_crc0
+1: andb #.Lhr_fifo_2bytes, %d5
+ beq read_data_loop
moveb %a5@, %a4@+
- dbra %d4, read_new_data
-exit_loop:
+ dbra %d4, read_data_loop
/* read CRC */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0646/2151] swim: Convert to blocking queue
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (644 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0645/2151] swim: Fix buffer overflow Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0647/2151] swim: Remove redundant RELAX actions Greg Kroah-Hartman
` (236 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Omar Sandoval, Laurent Vivier,
Finn Thain, Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 92353a04763726f70fea6be90957c50fc18215e0 ]
These drives are slow: completing a request can take hundreds of
milliseconds. Delays are managed by disabling interrupts judiciously and
sleeping opportunistically.
As of commit e3896d77b702 ("swim: convert to blk-mq"), a spinlock is
taken in irq mode as soon as a request is issued. That lock is held for
the duration of the request. Hence the driver sleeps while holding the
lock which is forbidden.
Adopt BLK_MQ_F_BLOCKING and remove the spinlock. Use a mutex to serialize
requests from the two request queues. (The chip cannot simultaneously
process requests on both internal and external drive.)
Cc: Omar Sandoval <osandov@fb.com>
Fixes: e3896d77b702 ("swim: convert to blk-mq")
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/d06b19132ec678d6168d158e10cd63e10da45607.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index ebba9506e78d0..cbf564dc23323 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -211,7 +211,6 @@ enum head {
struct swim_priv {
struct swim __iomem *base;
- spinlock_t lock;
int floppy_count;
struct floppy_state unit[FD_MAX_UNIT];
};
@@ -537,12 +536,10 @@ static blk_status_t swim_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
struct floppy_state *fs = hctx->queue->queuedata;
- struct swim_priv *swd = fs->swd;
struct request *req = bd->rq;
blk_status_t err;
- if (!spin_trylock_irq(&swd->lock))
- return BLK_STS_DEV_RESOURCE;
+ mutex_lock(&swim_mutex);
blk_mq_start_request(req);
@@ -560,7 +557,7 @@ static blk_status_t swim_queue_rq(struct blk_mq_hw_ctx *hctx,
err = BLK_STS_OK;
out:
- spin_unlock_irq(&swd->lock);
+ mutex_unlock(&swim_mutex);
return err;
}
@@ -842,11 +839,9 @@ static int swim_floppy_init(struct platform_device *pdev)
return -EBUSY;
}
- spin_lock_init(&swd->lock);
-
for (drive = 0; drive < swd->floppy_count; drive++) {
err = blk_mq_alloc_sq_tag_set(&swd->unit[drive].tag_set,
- &swim_mq_ops, 2, 0);
+ &swim_mq_ops, 2, BLK_MQ_F_BLOCKING);
if (err)
goto exit_put_disks;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0647/2151] swim: Remove redundant RELAX actions
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (645 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0646/2151] swim: Convert to blocking queue Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0648/2151] swim: Deduplicate polling loops Greg Kroah-Hartman
` (235 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 04cb277e6841b55b950b42063fe11501b5d1676a ]
Wherever we have a swim_select() or swim_readbit() call there is an
implicit RELAX. That means the caller doesn't have to do it. Remove the
redundant code.
BTW, Inside Macintosh says, "Be sure [...] that CA0 and CA1 are set high
before changing SEL." Hence the RELAX found in swim_select(). The SwimIII
driver in mkLinux also has that. But the swim3.c driver in Linux is odd:
it scatters RELAX actions around as though SEL was not actually under its
control... In anycase, swim.c really does control SEL so there's no need
for that here.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/08ab67c2780c9107b87a1ece8b5f9cb54a8cea70.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: b736189c93c9 ("swim: Deduplicate polling loops")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index cbf564dc23323..237ed93fb0af4 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -336,7 +336,6 @@ static inline void swim_motor(struct swim __iomem *base,
swim_action(base, MOTOR_ON);
for (i = 0; i < 2*HZ; i++) {
- swim_select(base, RELAX);
if (swim_readbit(base, MOTOR_ON))
break;
set_current_state(TASK_INTERRUPTIBLE);
@@ -344,7 +343,7 @@ static inline void swim_motor(struct swim __iomem *base,
}
} else if (action == OFF) {
swim_action(base, MOTOR_OFF);
- swim_select(base, RELAX);
+ swim_write(base, phase, RELAX | PHASE_PIN_DIR);
}
}
@@ -355,13 +354,11 @@ static inline void swim_eject(struct swim __iomem *base)
swim_action(base, EJECT);
for (i = 0; i < 2*HZ; i++) {
- swim_select(base, RELAX);
if (!swim_readbit(base, DISK_IN))
break;
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
- swim_select(base, RELAX);
}
static inline void swim_head(struct swim __iomem *base, enum head head)
@@ -385,7 +382,6 @@ static inline int swim_step(struct swim __iomem *base)
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
- swim_select(base, RELAX);
if (!swim_readbit(base, STEP))
return 0;
}
@@ -399,8 +395,6 @@ static inline int swim_track00(struct swim __iomem *base)
swim_action(base, SEEK_NEGATIVE);
for (try = 0; try < 100; try++) {
-
- swim_select(base, RELAX);
msleep(3);
if (swim_readbit(base, TRACK_ZERO))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0648/2151] swim: Deduplicate polling loops
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (646 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0647/2151] swim: Remove redundant RELAX actions Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0649/2151] swim: Check drive ready bit Greg Kroah-Hartman
` (234 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit b736189c93c9ad1056521a4229ec2f252b714b5a ]
Replace duplicated polling loops with poll_timeout_us(). Change the
interruptible sleep to uninterruptible because signal delivery shouldn't
be allowed to shorten delays required by the drive hardware.
Change the timeout for the !STEP transition to 20 ms in accordance with
the maximum interval required by the UPD72070 spec. The existing 1 second
timeout is impractical considering the number of steps in a typical seek.
Change the return type of swim_readbit() to bool because that way the
bit names make sense i.e. the reader doesn't have to remember to invert
the active-low logic used for drive signals.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/0ea2d3313dea26f8b4c2abc4d29055ac95aeb74b.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 39 ++++++++-------------------------------
1 file changed, 8 insertions(+), 31 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 237ed93fb0af4..474b343452ea5 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -19,6 +19,7 @@
#include <linux/major.h>
#include <linux/mutex.h>
#include <linux/hdreg.h>
+#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
@@ -296,7 +297,7 @@ static inline void swim_action(struct swim __iomem *base, int action)
local_irq_restore(flags);
}
-static inline int swim_readbit(struct swim __iomem *base, int bit)
+static inline bool swim_readbit(struct swim __iomem *base, int bit)
{
int stat;
@@ -309,6 +310,9 @@ static inline int swim_readbit(struct swim __iomem *base, int bit)
return (stat & SENSE) == 0;
}
+#define swim_readbit_timeout(base, bit, val, timeout_us) \
+ poll_timeout_us(, swim_readbit(base, bit) == val, 1000, timeout_us, false)
+
static inline void swim_drive(struct swim __iomem *base,
enum drive_location location)
{
@@ -331,16 +335,8 @@ static inline void swim_motor(struct swim __iomem *base,
enum motor_action action)
{
if (action == ON) {
- int i;
-
swim_action(base, MOTOR_ON);
-
- for (i = 0; i < 2*HZ; i++) {
- if (swim_readbit(base, MOTOR_ON))
- break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ swim_readbit_timeout(base, MOTOR_ON, true, 2000 * 1000);
} else if (action == OFF) {
swim_action(base, MOTOR_OFF);
swim_write(base, phase, RELAX | PHASE_PIN_DIR);
@@ -349,16 +345,8 @@ static inline void swim_motor(struct swim __iomem *base,
static inline void swim_eject(struct swim __iomem *base)
{
- int i;
-
swim_action(base, EJECT);
-
- for (i = 0; i < 2*HZ; i++) {
- if (!swim_readbit(base, DISK_IN))
- break;
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
- }
+ swim_readbit_timeout(base, DISK_IN, false, 2000 * 1000);
}
static inline void swim_head(struct swim __iomem *base, enum head head)
@@ -373,19 +361,8 @@ static inline void swim_head(struct swim __iomem *base, enum head head)
static inline int swim_step(struct swim __iomem *base)
{
- int wait;
-
swim_action(base, STEP);
-
- for (wait = 0; wait < HZ; wait++) {
-
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(1);
-
- if (!swim_readbit(base, STEP))
- return 0;
- }
- return -1;
+ return swim_readbit_timeout(base, STEP, false, 20 * 1000);
}
static inline int swim_track00(struct swim __iomem *base)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0649/2151] swim: Check drive ready bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (647 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0648/2151] swim: Deduplicate polling loops Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0650/2151] swim: Revisit delays Greg Kroah-Hartman
` (233 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit abae04f5bed924590e98fe1519566a6e0144e6b5 ]
The drive provides a readiness signal that has to be tested before
certain commands are issued to the drive. Rename the SEEK_COMPLETE flag
as READY because that's how it's known in the documentation as well as
the mkLinux source code.
Poll for that signal after stepping the heads and also after switching
to MFM mode, as that's what mkLinux does. Check for readiness when
stepping because testing shows that some drives require this.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/8d6fc833c719de2248b64ee521418b1032b1e509.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 474b343452ea5..2e343766f4535 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -117,7 +117,7 @@ struct iwm {
#define TACHO 0x103
#define READ_DATA_1 0x104
#define GCR_MODE 0x105
-#define SEEK_COMPLETE 0x106
+#define READY 0x106
#define TWOMEG_MEDIA 0x107
/* Bits in handshake register */
@@ -313,6 +313,14 @@ static inline bool swim_readbit(struct swim __iomem *base, int bit)
#define swim_readbit_timeout(base, bit, val, timeout_us) \
poll_timeout_us(, swim_readbit(base, bit) == val, 1000, timeout_us, false)
+#define swim_READY_timeout(base) \
+({ \
+ int ret = swim_readbit_timeout(base, READY, true, 1000 * 1000); \
+ if (ret) \
+ printk(KERN_DEBUG "%s: drive not ready\n", __func__); \
+ ret; \
+})
+
static inline void swim_drive(struct swim __iomem *base,
enum drive_location location)
{
@@ -351,8 +359,6 @@ static inline void swim_eject(struct swim __iomem *base)
static inline void swim_head(struct swim __iomem *base, enum head head)
{
- /* wait drive is ready */
-
if (head == UPPER_HEAD)
swim_select(base, READ_DATA_1);
else if (head == LOWER_HEAD)
@@ -387,20 +393,25 @@ static inline int swim_track00(struct swim __iomem *base)
static inline int swim_seek(struct swim __iomem *base, int step)
{
- if (step == 0)
- return 0;
-
if (step < 0) {
swim_action(base, SEEK_NEGATIVE);
step = -step;
- } else
+ } else if (step > 0)
swim_action(base, SEEK_POSITIVE);
+ swim_READY_timeout(base);
+
+ if (step == 0)
+ return 0;
+
for ( ; step > 0; step--) {
if (swim_step(base))
return -1;
}
+ msleep(30);
+ swim_READY_timeout(base);
+
return 0;
}
@@ -482,6 +493,8 @@ static blk_status_t floppy_read_sectors(struct floppy_state *fs,
swim_drive(base, fs->location);
+ swim_READY_timeout(base);
+
for (i = req_sector; i < req_sector + sectors_nb; i++) {
int x;
track = i / fs->secpercyl;
@@ -602,6 +615,8 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
swim_motor(base, ON);
swim_action(base, SETMFM);
+ msleep(30);
+ swim_READY_timeout(base);
set_capacity(fs->disk, fs->total_secs);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0650/2151] swim: Revisit delays
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (648 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0649/2151] swim: Check drive ready bit Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0651/2151] swim: Dont search beyond the first data mark Greg Kroah-Hartman
` (232 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Laurent Vivier, Finn Thain,
Stan Johnson, Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit bbcd3e38a4f355d6b0320f3f6916df96c109f2ad ]
AFAIK, timing requirements for the various FDHD drive mechanisms aren't
well documented. But we do have the UPD72070 spec and secondary sources
like swim3.c and mkLinux source code. This patch is needed to satisfy
the requirements in the UPD72070 spec and follows mkLinux.
Change the LSTRB pulse to 2 microseconds, because this is what mkLinux
does. Inside Macintosh says, "Hold LSTRB high for at least one usec but
not more than one msec".
When a disk is ejected, pause before de-asserting /ENBL. Wait 150 us after
the STEP command for valid signalling. Pause for 1 us after setting the
step direction before sending the STEP command.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/af356248a1e6a4fd956f71acf17feead27ba4918.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 2e343766f4535..2fdf36868155e 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -290,7 +290,7 @@ static inline void swim_action(struct swim __iomem *base, int action)
swim_select(base, action);
udelay(1);
swim_write(base, phase, LSTRB | action | PHASE_PIN_DIR);
- udelay(1);
+ udelay(2);
swim_write(base, phase, action | PHASE_PIN_DIR);
udelay(1);
@@ -337,6 +337,7 @@ static inline void swim_drive(struct swim __iomem *base,
swim_write(base, mode0, EXTERNAL_DRIVE);
swim_write(base, mode0, MOTON);
}
+ udelay(1);
}
static inline void swim_motor(struct swim __iomem *base,
@@ -355,6 +356,7 @@ static inline void swim_eject(struct swim __iomem *base)
{
swim_action(base, EJECT);
swim_readbit_timeout(base, DISK_IN, false, 2000 * 1000);
+ msleep(1);
}
static inline void swim_head(struct swim __iomem *base, enum head head)
@@ -368,6 +370,7 @@ static inline void swim_head(struct swim __iomem *base, enum head head)
static inline int swim_step(struct swim __iomem *base)
{
swim_action(base, STEP);
+ udelay(150);
return swim_readbit_timeout(base, STEP, false, 20 * 1000);
}
@@ -398,6 +401,7 @@ static inline int swim_seek(struct swim __iomem *base, int step)
step = -step;
} else if (step > 0)
swim_action(base, SEEK_POSITIVE);
+ udelay(1);
swim_READY_timeout(base);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0651/2151] swim: Dont search beyond the first data mark
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (649 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0650/2151] swim: Revisit delays Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0652/2151] media: i2c: ov5648: Fix a data race on state->streaming Greg Kroah-Hartman
` (231 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Finn Thain, Stan Johnson, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit 79eafa4ccb74be023fd2cae87d75425d6eb903bb ]
The ISM chip does an automatic MFM gap/sync search when the Action bit
is first set. That search may stop at any of a) post-index gap, b) address
field gap or c) data field gap. To find the next sector header, the
driver need not search at all. It only has to validate the mark bytes.
Once the sector address mark has been validated, swim_read_sector_data()
is called to read the sector contents. Between the sector address and
data fields lies an intra-sector gap followed by a data field mark.
After this mark is validated, the 512-byte data area is read into the
IO request buffer.
Problem is, if any byte in the data field mark is mis-read, the driver
searches the whole sector and then reaches the data field mark in the
following sector. The wrong sector is then read into the buffer, and
swim_read_sector_data() returns success. The request is silently
corrupted.
The existing limit on polling loop iterations does constrain the search
distance but is inherently tied to CPU speed. This is probably the reason
why corruption was only observed on a 68030 system.
Discontinue the mark search when the mark bytes fail validation.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Link: https://patch.msgid.link/f6c97153faa0aceceffd3a61d85c0a82903a6b3e.1788513997.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim_asm.S | 73 ++++++++++++++++++++++------------------
1 file changed, 40 insertions(+), 33 deletions(-)
diff --git a/drivers/block/swim_asm.S b/drivers/block/swim_asm.S
index e06aadb411a14..4d6404234bf09 100644
--- a/drivers/block/swim_asm.S
+++ b/drivers/block/swim_asm.S
@@ -41,18 +41,45 @@
.equ seek_time, 30000
.equ max_retry, 40
.equ sector_size, 512
+ .equ .Lmark_sequence_len, 4
.equ .Lhr_crc_error, 0x02
.equ .Lhr_fifo_2bytes, 0x40
.equ .Lhr_fifo_1byte, 0x80
+.Lmfm_mark_check:
+ /*
+ * This subroutine reads and validates a mark byte sequence.
+ * On entry, %a1 and %d4 shall hold the location and length (resp.)
+ * of the mark byte array.
+ * %a2 and %a3 shall hold the locations of the handshake and mark
+ * registers.
+ * Returns zero in %d1 for success.
+ */
+
+ moveq #-1, %d1
+ subq #1, %d4
+ movew #seek_time, %d2
+
+5: tstb %a2@
+ dbmi %d2, 5b
+ bpl 6f
+
+ moveb %a3@, %d3
+ cmpb %a1@+, %d3
+ dbne %d4, 5b
+ bne 6f
+
+ moveq #0, %d1
+6: rts
+
.global swim_read_sector_header
swim_read_sector_header:
link %a6, #0
moveml %d1-%d5/%a0-%a5,%sp@-
movel %a6@(0x0c), %a4
moveq #-1, %d0
- bsr mfm_read_addrmark
+ bsr .Lmfm_read_header
moveml %sp@+, %d1-%d5/%a0-%a5
unlk %a6
rts
@@ -62,33 +89,25 @@ sector_address_mark:
sector_data_mark:
.byte 0xa1, 0xa1, 0xa1, 0xfb
-mfm_read_addrmark:
+.Lmfm_read_header:
movel %a6@(0x08), %a3
lea %a3@(read_handshake), %a2
lea %a3@(read_data), %a5
lea %a3@(read_mark), %a3
- movew #seek_time, %d2
-wait_header_init:
moveb #0x18, %a3@(write_mode0 - read_mark)
moveb #0x01, %a3@(write_mode1 - read_mark)
moveb #0x01, %a3@(write_mode0 - read_mark)
tstb %a3@(read_error - read_mark)
moveb #0x08, %a3@(write_mode1 - read_mark)
- lea sector_address_mark, %a0
- moveq #3, %d1
-
-wait_addr_mark_byte:
-
- tstb %a2@
- dbmi %d2, wait_addr_mark_byte
- bpl signal_nonyb
+ lea sector_address_mark, %a1
+ moveq #.Lmark_sequence_len, %d4
+ bsr .Lmfm_mark_check
+ tstl %d1
+ bne signal_nonyb
- moveb %a3@, %d3
- cmpb %a0@+, %d3
- dbne %d1, wait_addr_mark_byte
- bne wait_header_init
+ /* read header */
moveq #max_retry, %d2
@@ -163,30 +182,18 @@ mfm_read_data:
lea %a3@(read_handshake), %a2
lea %a3@(read_data), %a5
lea %a3@(read_mark), %a3
- movew #seek_time, %d2
-wait_data_init:
moveb #0x18, %a3@(write_mode0 - read_mark)
moveb #0x01, %a3@(write_mode1 - read_mark)
moveb #0x01, %a3@(write_mode0 - read_mark)
tstb %a3@(read_error - read_mark)
moveb #0x08, %a3@(write_mode1 - read_mark)
- lea sector_data_mark, %a0
- moveq #3, %d1
-
- /* wait data address mark */
-
-wait_data_mark_byte:
-
- tstb %a2@
- dbmi %d2, wait_data_mark_byte
- bpl data_exit
-
- moveb %a3@, %d3
- cmpb %a0@+, %d3
- dbne %d1, wait_data_mark_byte
- bne wait_data_init
+ lea sector_data_mark, %a1
+ moveq #.Lmark_sequence_len, %d4
+ bsr .Lmfm_mark_check
+ tstl %d1
+ bne data_exit
/* read data */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0652/2151] media: i2c: ov5648: Fix a data race on state->streaming
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (650 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0651/2151] swim: Dont search beyond the first data mark Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0653/2151] media: staging/ipu7: release ISYS firmware resources on remove Greg Kroah-Hartman
` (230 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ginger Li, Kieran Bingham,
Sakari Ailus, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ginger Li <ginger.jzllee@gmail.com>
[ Upstream commit 76c8ffbe1b9bc0ee4c977180e3f498352de0d01e ]
ov5648_s_stream() updates state->streaming after it has released
sensor->mutex, while ov5648_resume() reads that field with sensor->mutex
held. A concurrent resume can therefore observe a stale streaming state
and leave the sensor in standby while the software believes that it is
streaming, or the other way around.
Keep the update inside the sensor->mutex protected section that already
programs the standby mode.
Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor")
Signed-off-by: Ginger Li <ginger.jzllee@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/i2c/ov5648.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index f0b839cd65f11..006aeb93482b2 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -2145,13 +2145,13 @@ static int ov5648_s_stream(struct v4l2_subdev *subdev, int enable)
mutex_lock(&sensor->mutex);
ret = ov5648_sw_standby(sensor, !enable);
+ if (!ret)
+ state->streaming = !!enable;
mutex_unlock(&sensor->mutex);
if (ret)
return ret;
- state->streaming = !!enable;
-
if (!enable)
pm_runtime_put(sensor->dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0653/2151] media: staging/ipu7: release ISYS firmware resources on remove
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (651 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0652/2151] media: i2c: ov5648: Fix a data race on state->streaming Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0654/2151] serial: msm: select PM_OPP Greg Kroah-Hartman
` (229 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Guangshuo Li, Sakari Ailus,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guangshuo Li <lgs201920130244@gmail.com>
[ Upstream commit 628a575c99e767d6fac81215fca1190b61867148 ]
isys_remove() tears down the registered ISYS devices but does not call
ipu7_fw_isys_release() after a successful probe. The probe error path
already uses this helper after ipu7_fw_isys_init() succeeds.
Without the matching release, resources initialized by
ipu7_fw_isys_init() remain allocated on normal device removal.
Call ipu7_fw_isys_release() after unregistering the ISYS devices to match
the cleanup performed by the probe error path.
Fixes: a516d36bdc3d ("media: staging/ipu7: add IPU7 input system device driver")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/media/ipu7/ipu7-isys.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/ipu7/ipu7-isys.c b/drivers/staging/media/ipu7/ipu7-isys.c
index 601e5a79ef8ec..a54393fbb9db6 100644
--- a/drivers/staging/media/ipu7/ipu7-isys.c
+++ b/drivers/staging/media/ipu7/ipu7-isys.c
@@ -590,6 +590,7 @@ static void isys_remove(struct auxiliary_device *auxdev)
isys_notifier_cleanup(isys);
isys_unregister_devices(isys);
+ ipu7_fw_isys_release(isys);
cpu_latency_qos_remove_request(&isys->pm_qos);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0654/2151] serial: msm: select PM_OPP
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (652 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0653/2151] media: staging/ipu7: release ISYS firmware resources on remove Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0655/2151] serial: txx9: Drop noop probe function and dangerous remove callback Greg Kroah-Hartman
` (228 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Dmitry Sinyavin, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Sinyavin <sinyavin@gmail.com>
[ Upstream commit 6a8352bb4e4bfcf67fa23c49d2e0d14684ffe2e6 ]
Commit 173ebdedcd84 ("serial: msm: Use OPP table for DVFS support")
made the MSM serial driver unconditionally configure the core clock
through the OPP framework during probe.
When CONFIG_PM_OPP is disabled, devm_pm_opp_set_clkname() is a stub that
returns -EOPNOTSUPP, so every MSM serial port fails to probe. Select
PM_OPP to keep minimal configurations functional.
Fixes: 173ebdedcd84 ("serial: msm: Use OPP table for DVFS support")
Signed-off-by: Dmitry Sinyavin <sinyavin@gmail.com>
Link: https://patch.msgid.link/20260830085340.2542624-1-sinyavin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 2b9c8b39d68f5..b75c7b9157b16 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -905,6 +905,7 @@ config SERIAL_JSM
config SERIAL_MSM
tristate "MSM on-chip serial port support"
depends on ARCH_QCOM || COMPILE_TEST
+ select PM_OPP
select SERIAL_CORE
config SERIAL_MSM_CONSOLE
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0655/2151] serial: txx9: Drop noop probe function and dangerous remove callback
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (653 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0654/2151] serial: msm: select PM_OPP Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0656/2151] serial: 8250_hub6: add hub6_match_port() Greg Kroah-Hartman
` (227 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Atsushi Nemoto, Geert Uytterhoeven,
Andy Shevchenko, Uwe Kleine-König , Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
[ Upstream commit 22c6a6ac74c2434735638e7ef1101597ae263aec ]
The only platform device that can be bound to the driver is allocated by
the driver itself. That device doesn't have platdata, so the probe
function only consists of a loop that is never run and thus can be
dropped without loss of functionality.
The remove function then should better not undo things that were not
done in the first place. That happens because serial_txx9_init() calls
serial_txx9_register_ports() with the created platform device and so
up->dev == &dev->dev evaluates to true and uart_remove_one_port() is
called twice for each port.
So let serial_txx9_exit() undo exactly what serial_txx9_init() does and
remove the useless respectively wrong functions.
Fixes: 0970769aceb9 ("[SERIAL] serial_txx9 driver update")
Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/cd4fce2cef14907ebe4713c147f8896924380e44.1786697789.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/serial_txx9.c | 55 ++------------------------------
1 file changed, 3 insertions(+), 52 deletions(-)
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index 4ae9a45c8e3a3..ef56979321b9e 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -1009,7 +1009,8 @@ static void serial_txx9_unregister_port(int line)
struct uart_port *uart = &serial_txx9_ports[line];
mutex_lock(&serial_txx9_mutex);
- uart_remove_one_port(&serial_txx9_reg, uart);
+ if (uart->iobase || uart->mapbase)
+ uart_remove_one_port(&serial_txx9_reg, uart);
uart->flags = 0;
uart->type = PORT_UNKNOWN;
uart->iobase = 0;
@@ -1019,52 +1020,6 @@ static void serial_txx9_unregister_port(int line)
mutex_unlock(&serial_txx9_mutex);
}
-/*
- * Register a set of serial devices attached to a platform device.
- */
-static int serial_txx9_probe(struct platform_device *dev)
-{
- struct uart_port *p = dev_get_platdata(&dev->dev);
- struct uart_port port;
- int ret, i;
-
- memset(&port, 0, sizeof(struct uart_port));
- for (i = 0; p && p->uartclk != 0; p++, i++) {
- port.iobase = p->iobase;
- port.membase = p->membase;
- port.irq = p->irq;
- port.uartclk = p->uartclk;
- port.iotype = p->iotype;
- port.flags = p->flags;
- port.mapbase = p->mapbase;
- port.dev = &dev->dev;
- port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_TXX9_CONSOLE);
- ret = serial_txx9_register_port(&port);
- if (ret < 0) {
- dev_err(&dev->dev, "unable to register port at index %d "
- "(IO%lx MEM%llx IRQ%d): %d\n", i,
- p->iobase, (unsigned long long)p->mapbase,
- p->irq, ret);
- }
- }
- return 0;
-}
-
-/*
- * Remove serial ports registered against a platform device.
- */
-static void serial_txx9_remove(struct platform_device *dev)
-{
- int i;
-
- for (i = 0; i < UART_NR; i++) {
- struct uart_port *up = &serial_txx9_ports[i];
-
- if (up->dev == &dev->dev)
- serial_txx9_unregister_port(i);
- }
-}
-
#ifdef CONFIG_PM
static int serial_txx9_suspend(struct platform_device *dev, pm_message_t state)
{
@@ -1096,8 +1051,6 @@ static int serial_txx9_resume(struct platform_device *dev)
#endif
static struct platform_driver serial_txx9_plat_driver = {
- .probe = serial_txx9_probe,
- .remove = serial_txx9_remove,
#ifdef CONFIG_PM
.suspend = serial_txx9_suspend,
.resume = serial_txx9_resume,
@@ -1251,9 +1204,7 @@ static void __exit serial_txx9_exit(void)
platform_driver_unregister(&serial_txx9_plat_driver);
platform_device_unregister(serial_txx9_plat_devs);
for (i = 0; i < UART_NR; i++) {
- struct uart_port *up = &serial_txx9_ports[i];
- if (up->iobase || up->mapbase)
- uart_remove_one_port(&serial_txx9_reg, up);
+ serial_txx9_unregister_port(i);
}
uart_unregister_driver(&serial_txx9_reg);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0656/2151] serial: 8250_hub6: add hub6_match_port()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (654 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0655/2151] serial: txx9: Drop noop probe function and dangerous remove callback Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0657/2151] serial: 8250: fix compile error with hub6_match_port() when compiled as a module Greg Kroah-Hartman
` (226 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ilpo Järvinen, Hugo Villeneuve,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
[ Upstream commit 3d406299d8829747fe2e8692f4c29fe3dc1d101f ]
Move the entire hub6 related match port check into its own function in
8250_hub6.c and add a stub for the case when hub6 code is not even built
into kernel.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260521-tty-upio-v3-1-bf74567994a0@dimonoff.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: a300273c458c ("serial: 8250: hub6: Add cleanup code")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/8250/8250.h | 7 +++++++
drivers/tty/serial/8250/8250_hub6.c | 6 ++++++
drivers/tty/serial/serial_core.c | 4 ++--
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 2d4f15df18f7f..417dfe77e96b6 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -343,6 +343,13 @@ int fintek_8250_probe(struct uart_8250_port *uart);
static inline int fintek_8250_probe(struct uart_8250_port *uart) { return 0; }
#endif
+#ifdef CONFIG_SERIAL_8250_HUB6
+bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2);
+#else
+static inline bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2)
+{ return false; }
+#endif
+
#ifdef CONFIG_ARCH_OMAP1
#include <linux/soc/ti/omap1-soc.h>
static inline int is_omap1_8250(struct uart_8250_port *pt)
diff --git a/drivers/tty/serial/8250/8250_hub6.c b/drivers/tty/serial/8250/8250_hub6.c
index 273f59b9bca55..eae32c924e29b 100644
--- a/drivers/tty/serial/8250/8250_hub6.c
+++ b/drivers/tty/serial/8250/8250_hub6.c
@@ -41,6 +41,12 @@ static struct platform_device hub6_device = {
},
};
+bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2)
+{
+ return port1->iobase == port2->iobase && port1->hub6 == port2->hub6;
+}
+EXPORT_SYMBOL_GPL(hub6_match_port);
+
static int __init hub6_init(void)
{
return platform_device_register(&hub6_device);
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 602dfaf20fdf6..71c47736a467d 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -33,6 +33,7 @@
#include <linux/uaccess.h>
#include "serial_base.h"
+#include "8250/8250.h" /* For hub6_match_port() */
/*
* This is used to lock changes in serial line configuration.
@@ -3261,8 +3262,7 @@ bool uart_match_port(const struct uart_port *port1,
case UPIO_PORT:
return port1->iobase == port2->iobase;
case UPIO_HUB6:
- return port1->iobase == port2->iobase &&
- port1->hub6 == port2->hub6;
+ return hub6_match_port(port1, port2);
case UPIO_MEM:
case UPIO_MEM16:
case UPIO_MEM32:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0657/2151] serial: 8250: fix compile error with hub6_match_port() when compiled as a module
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (655 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0656/2151] serial: 8250_hub6: add hub6_match_port() Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0658/2151] serial: 8250: Fix corner case for port matching Greg Kroah-Hartman
` (225 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, kernel test robot, Hugo Villeneuve,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
[ Upstream commit 7ab80d1e72431f5b7acbc55d83a23b76814957cf ]
With CONFIG_SERIAL_8250_HUB6=m, we have the following compile error:
../drivers/tty/serial/8250/8250_hub6.c:46:6: error: redefinition of
'hub6_match_port'
Fix hub6_match_port() prototype definition by using IS_REACHABLE() to
support both built-in and module values, and substitute empty prototype
otherwise.
Fixes: 3d406299d8829 ("serial: 8250_hub6: add hub6_match_port()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202607150717.2YxVdWpX-lkp@intel.com/
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20260715153707.4181828-1-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: a300273c458c ("serial: 8250: hub6: Add cleanup code")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/8250/8250.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 417dfe77e96b6..e1b79fae907ad 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -8,6 +8,7 @@
*/
#include <linux/bits.h>
+#include <linux/kconfig.h>
#include <linux/serial_8250.h>
#include <linux/serial_core.h>
#include <linux/dmaengine.h>
@@ -343,7 +344,7 @@ int fintek_8250_probe(struct uart_8250_port *uart);
static inline int fintek_8250_probe(struct uart_8250_port *uart) { return 0; }
#endif
-#ifdef CONFIG_SERIAL_8250_HUB6
+#if IS_REACHABLE(CONFIG_SERIAL_8250_HUB6)
bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2);
#else
static inline bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0658/2151] serial: 8250: Fix corner case for port matching
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (656 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0657/2151] serial: 8250: fix compile error with hub6_match_port() when compiled as a module Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0659/2151] serial: 8250: hub6: Add cleanup code Greg Kroah-Hartman
` (224 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andy Shevchenko,
Uwe Kleine-König , Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
[ Upstream commit c526404a4a92dd83b2332446d544eac7cfd3d376 ]
In the case CONFIG_SERIAL_8250=y + CONFIG_SERIAL_8250_HUB6=m
hub6_match_port() evaluates statically to false in
serial8250_match_port() which is a bug and a change in behavior compared
to before commit 7ab80d1e7243 ("serial: 8250: fix compile error with
hub6_match_port() when compiled as a module").
To make the comparison correct, the dummy implementation of
hub6_match_port() must only be used if CONFIG_SERIAL_8250_HUB6 is
disabled. Then as there is a bidirectional dependency between
8250_hub6.c and 8250_core.c, put both in the same module.
Fixes: 7ab80d1e7243 ("serial: 8250: fix compile error with hub6_match_port() when compiled as a module")
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/9ad6983ae584ce9d962f2a841f4d5e90c2012ceb.1786697789.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: a300273c458c ("serial: 8250: hub6: Add cleanup code")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/8250/8250.h | 8 +++++++-
drivers/tty/serial/8250/8250_hub6.c | 8 +-------
drivers/tty/serial/8250/8250_platform.c | 4 ++++
drivers/tty/serial/8250/Kconfig | 4 ++--
drivers/tty/serial/8250/Makefile | 2 +-
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index e1b79fae907ad..d123bdda71219 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -324,6 +324,12 @@ static inline int serial8250_pnp_init(void) { return 0; }
static inline void serial8250_pnp_exit(void) { }
#endif
+#ifdef CONFIG_SERIAL_8250_HUB6
+int serial8250_hub6_init(void);
+#else
+static inline int serial8250_hub6_init(void) { return 0; }
+#endif
+
#ifdef CONFIG_SERIAL_8250_RSA
void univ8250_rsa_support(struct uart_ops *ops, const struct uart_ops *core_ops);
void rsa_enable(struct uart_8250_port *up);
@@ -344,7 +350,7 @@ int fintek_8250_probe(struct uart_8250_port *uart);
static inline int fintek_8250_probe(struct uart_8250_port *uart) { return 0; }
#endif
-#if IS_REACHABLE(CONFIG_SERIAL_8250_HUB6)
+#if IS_ENABLED(CONFIG_SERIAL_8250_HUB6)
bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2);
#else
static inline bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2)
diff --git a/drivers/tty/serial/8250/8250_hub6.c b/drivers/tty/serial/8250/8250_hub6.c
index eae32c924e29b..3a5c5fe8c9e94 100644
--- a/drivers/tty/serial/8250/8250_hub6.c
+++ b/drivers/tty/serial/8250/8250_hub6.c
@@ -47,13 +47,7 @@ bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port
}
EXPORT_SYMBOL_GPL(hub6_match_port);
-static int __init hub6_init(void)
+int __init serial8250_hub6_init(void)
{
return platform_device_register(&hub6_device);
}
-
-module_init(hub6_init);
-
-MODULE_AUTHOR("Russell King");
-MODULE_DESCRIPTION("8250 serial probe module for Hub6 cards");
-MODULE_LICENSE("GPL");
diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8250/8250_platform.c
index 69d8720fb65bf..d96fcbd313bf7 100644
--- a/drivers/tty/serial/8250/8250_platform.c
+++ b/drivers/tty/serial/8250/8250_platform.c
@@ -322,6 +322,10 @@ static int __init serial8250_init(void)
if (ret)
goto unreg_uart_drv;
+ ret = serial8250_hub6_init();
+ if (ret)
+ goto unreg_pnp;
+
serial8250_isa_devs = platform_device_alloc("serial8250", PLAT8250_DEV_LEGACY);
if (!serial8250_isa_devs) {
ret = -ENOMEM;
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
index f64ef0819cd4e..9d6e7aa1e53c7 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -292,8 +292,8 @@ config SERIAL_8250_EXAR_ST16C554
will be called 8250_exar_st16c554.
config SERIAL_8250_HUB6
- tristate "Support Hub6 cards"
- depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
+ bool "Support Hub6 cards"
+ depends on SERIAL_8250_MANY_PORTS && ISA
help
Say Y here if you have a HUB6 serial board.
diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile
index 9ec4d5fe64de5..30bb7f7dc34f8 100644
--- a/drivers/tty/serial/8250/Makefile
+++ b/drivers/tty/serial/8250/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_SERIAL_8250) += 8250.o
8250-y := 8250_core.o
8250-y += 8250_platform.o
8250-$(CONFIG_SERIAL_8250_PNP) += 8250_pnp.o
+8250-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
obj-$(CONFIG_SERIAL_8250) += 8250_base.o
8250_base-y := 8250_port.o
@@ -35,7 +36,6 @@ obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o
obj-$(CONFIG_SERIAL_8250_FOURPORT) += 8250_fourport.o
obj-$(CONFIG_SERIAL_8250_FSL) += 8250_fsl.o
obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o
-obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
obj-$(CONFIG_SERIAL_8250_INGENIC) += 8250_ingenic.o
obj-$(CONFIG_SERIAL_8250_IOC3) += 8250_ioc3.o
obj-$(CONFIG_SERIAL_8250_LPC18XX) += 8250_lpc18xx.o
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0659/2151] serial: 8250: hub6: Add cleanup code
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (657 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0658/2151] serial: 8250: Fix corner case for port matching Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0660/2151] RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes Greg Kroah-Hartman
` (223 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andy Shevchenko,
Uwe Kleine-König , Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
[ Upstream commit a300273c458ca32666f5bc6c1b3eb3a7cca206ce ]
At module load time a platform device is registered. That should be
undone when the module is unloaded.
Fixes: ec9f47cd6a14 ("[PATCH] Serial: Split 8250 port table")
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/4f1903ff2907f3e8bbabce345f628771e0bbd4e1.1786697789.git.u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/8250/8250.h | 2 ++
drivers/tty/serial/8250/8250_hub6.c | 5 +++++
drivers/tty/serial/8250/8250_platform.c | 5 ++++-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index d123bdda71219..0076eb28661cb 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -326,8 +326,10 @@ static inline void serial8250_pnp_exit(void) { }
#ifdef CONFIG_SERIAL_8250_HUB6
int serial8250_hub6_init(void);
+void serial8250_hub6_exit(void);
#else
static inline int serial8250_hub6_init(void) { return 0; }
+static inline void serial8250_hub6_exit(void) { }
#endif
#ifdef CONFIG_SERIAL_8250_RSA
diff --git a/drivers/tty/serial/8250/8250_hub6.c b/drivers/tty/serial/8250/8250_hub6.c
index 3a5c5fe8c9e94..76c9302e25cbd 100644
--- a/drivers/tty/serial/8250/8250_hub6.c
+++ b/drivers/tty/serial/8250/8250_hub6.c
@@ -51,3 +51,8 @@ int __init serial8250_hub6_init(void)
{
return platform_device_register(&hub6_device);
}
+
+void __init_or_module serial8250_hub6_exit(void)
+{
+ platform_device_unregister(&hub6_device);
+}
diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8250/8250_platform.c
index d96fcbd313bf7..fd9b1f1c1d581 100644
--- a/drivers/tty/serial/8250/8250_platform.c
+++ b/drivers/tty/serial/8250/8250_platform.c
@@ -329,7 +329,7 @@ static int __init serial8250_init(void)
serial8250_isa_devs = platform_device_alloc("serial8250", PLAT8250_DEV_LEGACY);
if (!serial8250_isa_devs) {
ret = -ENOMEM;
- goto unreg_pnp;
+ goto unreg_hub6;
}
ret = platform_device_add(serial8250_isa_devs);
@@ -345,6 +345,8 @@ static int __init serial8250_init(void)
platform_device_del(serial8250_isa_devs);
put_dev:
platform_device_put(serial8250_isa_devs);
+unreg_hub6:
+ serial8250_hub6_exit();
unreg_pnp:
serial8250_pnp_exit();
unreg_uart_drv:
@@ -372,6 +374,7 @@ static void __exit serial8250_exit(void)
platform_driver_unregister(&serial8250_isa_driver);
platform_device_unregister(isa_dev);
+ serial8250_hub6_exit();
serial8250_pnp_exit();
#ifdef CONFIG_SPARC
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0660/2151] RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (658 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0659/2151] serial: 8250: hub6: Add cleanup code Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0661/2151] serial: sh-sci: Drop checking port type for device file{create, remove} Greg Kroah-Hartman
` (222 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit e43913aabd35eef837edef29e93f15e15bdeeacd ]
Commit e91fb8b9d0ed ("RDMA/mlx5: Avoid flexible array warning") split
the leftovers_specs[] array into two separate structs to silence the
sparse "array of flexible structures" warning, but in doing so reversed
the member order: eth_flow was placed before flow_attr.
_create_flow_rule() locates the flow specs with:
ib_flow = (void *)flow_attr + sizeof(*flow_attr);
which expects the spec data to immediately follow the ib_flow_attr.
With the reversed order, flow_attr is the last member, so ib_flow
points past the end of the struct and the num_of_specs = 1 loop reads
out-of-bounds memory (whatever static data follows in the .data
section), producing incorrect flow rules or a crash.
Rebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares
an on-stack struct ib_flow_attr with a properly sized trailing flows[]
array. The ETH spec lives in flows[0].eth at exactly the offset
_create_flow_rule() expects, so no layout-dependent composite struct is
needed. This also avoids embedding a structure that contains a flexible
array member as a non-last member, which would trigger
-Wflex-array-member-not-at-end once the warning is enabled.
Fixes: e91fb8b9d0ed ("RDMA/mlx5: Avoid flexible array warning")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260918092337.2338-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/fs.c | 45 +++++++++++++++------------------
1 file changed, 21 insertions(+), 24 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index 5739d763029bd..b67994df98f2c 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -17,6 +17,7 @@
#include <linux/mlx5/fs.h>
#include <linux/mlx5/fs_helpers.h>
#include <linux/mlx5/eswitch.h>
+#include <linux/overflow.h>
#include <net/inet_ecn.h>
#include "mlx5_ib.h"
#include "counters.h"
@@ -1645,36 +1646,32 @@ static struct mlx5_ib_flow_handler *create_leftovers_rule(struct mlx5_ib_dev *de
struct ib_flow_attr *flow_attr,
struct mlx5_flow_destination *dst)
{
+ DEFINE_RAW_FLEX(struct ib_flow_attr, flow_attr_wc, flows, 1);
+ DEFINE_RAW_FLEX(struct ib_flow_attr, flow_attr_uc, flows, 1);
+
struct mlx5_ib_flow_handler *handler_ucast = NULL;
struct mlx5_ib_flow_handler *handler = NULL;
- static struct {
- struct ib_flow_spec_eth eth_flow;
- struct ib_flow_attr flow_attr;
- } leftovers_wc = { .flow_attr = { .num_of_specs = 1,
- .size = sizeof(leftovers_wc) },
- .eth_flow = {
- .type = IB_FLOW_SPEC_ETH,
- .size = sizeof(struct ib_flow_spec_eth),
- .mask = { .dst_mac = { 0x1 } },
- .val = { .dst_mac = { 0x1 } } } };
-
- static struct {
- struct ib_flow_spec_eth eth_flow;
- struct ib_flow_attr flow_attr;
- } leftovers_uc = { .flow_attr = { .num_of_specs = 1,
- .size = sizeof(leftovers_uc) },
- .eth_flow = {
- .type = IB_FLOW_SPEC_ETH,
- .size = sizeof(struct ib_flow_spec_eth),
- .mask = { .dst_mac = { 0x1 } },
- .val = { .dst_mac = {} } } };
-
- handler = create_flow_rule(dev, ft_prio, &leftovers_wc.flow_attr, dst);
+ flow_attr_wc->num_of_specs = 1;
+ flow_attr_wc->size = sizeof(struct ib_flow_attr) +
+ sizeof(struct ib_flow_spec_eth);
+ flow_attr_wc->flows[0].eth.type = IB_FLOW_SPEC_ETH;
+ flow_attr_wc->flows[0].eth.size = sizeof(struct ib_flow_spec_eth);
+ flow_attr_wc->flows[0].eth.mask.dst_mac[0] = 0x1;
+ flow_attr_wc->flows[0].eth.val.dst_mac[0] = 0x1;
+
+ flow_attr_uc->num_of_specs = 1;
+ flow_attr_uc->size = sizeof(struct ib_flow_attr) +
+ sizeof(struct ib_flow_spec_eth);
+ flow_attr_uc->flows[0].eth.type = IB_FLOW_SPEC_ETH;
+ flow_attr_uc->flows[0].eth.size = sizeof(struct ib_flow_spec_eth);
+ flow_attr_uc->flows[0].eth.mask.dst_mac[0] = 0x1;
+
+ handler = create_flow_rule(dev, ft_prio, flow_attr_wc, dst);
if (!IS_ERR(handler) &&
flow_attr->type == IB_FLOW_ATTR_ALL_DEFAULT) {
handler_ucast = create_flow_rule(dev, ft_prio,
- &leftovers_uc.flow_attr, dst);
+ flow_attr_uc, dst);
if (IS_ERR(handler_ucast)) {
mlx5_del_flow_rules(handler->rule);
ft_prio->refcount--;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0661/2151] serial: sh-sci: Drop checking port type for device file{create, remove}
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (659 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0660/2151] RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0662/2151] serial: sh-sci: Unregister UART on sysfs setup failure Greg Kroah-Hartman
` (221 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Biju Das, Lad Prabhakar, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Biju Das <biju.das.jz@bp.renesas.com>
[ Upstream commit 42f7303c5f668403f06d9b938d3de2bda3736530 ]
Ports that support FIFO has fifosize > 1. Replace checking the port type
with fifosize for device file{create, remove}.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/20251129164325.209213-5-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: c5b33c86d86d ("serial: sh-sci: Unregister UART on sysfs setup failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/sh-sci.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index a64a26fb7ff86..96f70581d6ecf 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3375,16 +3375,14 @@ static struct uart_driver sci_uart_driver = {
static void sci_remove(struct platform_device *dev)
{
struct sci_port *s = platform_get_drvdata(dev);
- unsigned int type = s->type; /* uart_remove_... clears it */
sci_ports_in_use &= ~BIT(s->port.line);
uart_remove_one_port(&sci_uart_driver, &s->port);
- if (s->port.fifosize > 1)
+ if (s->port.fifosize > 1) {
device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger);
- if (type == PORT_SCIFA || type == PORT_SCIFB || type == PORT_HSCIF ||
- type == SCI_PORT_RSCI)
device_remove_file(&dev->dev, &dev_attr_rx_fifo_timeout);
+ }
}
static const struct sci_of_data of_sci_scif_sh2 = {
@@ -3743,15 +3741,10 @@ static int sci_probe(struct platform_device *dev)
ret = device_create_file(&dev->dev, &dev_attr_rx_fifo_trigger);
if (ret)
return ret;
- }
- if (sp->type == PORT_SCIFA || sp->type == PORT_SCIFB ||
- sp->type == PORT_HSCIF || sp->type == SCI_PORT_RSCI) {
+
ret = device_create_file(&dev->dev, &dev_attr_rx_fifo_timeout);
if (ret) {
- if (sp->port.fifosize > 1) {
- device_remove_file(&dev->dev,
- &dev_attr_rx_fifo_trigger);
- }
+ device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger);
return ret;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0662/2151] serial: sh-sci: Unregister UART on sysfs setup failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (660 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0661/2151] serial: sh-sci: Drop checking port type for device file{create, remove} Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0663/2151] serial: 8250_uniphier: Use devm_clk_get_enabled() Greg Kroah-Hartman
` (220 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit c5b33c86d86da3ccff8c05e2a28719e3ec933f70 ]
sci_probe_single() registers the UART port before sci_probe() creates
the RX FIFO tuning attributes. If either device_create_file() call
fails, probe returns an error without removing the port from the serial
core. Device-managed resources are then released while the port remains
registered.
Unregister the UART port before returning either sysfs creation error.
If the second attribute fails, remove the first attribute before
unregistering the port. Keep the existing probe failure policy and leave
the successful initialization path unchanged.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260911031500.5745-1-mhun512@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/sh-sci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 96f70581d6ecf..20a833a80baf4 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3740,12 +3740,12 @@ static int sci_probe(struct platform_device *dev)
if (sp->port.fifosize > 1) {
ret = device_create_file(&dev->dev, &dev_attr_rx_fifo_trigger);
if (ret)
- return ret;
+ goto err_remove_port;
ret = device_create_file(&dev->dev, &dev_attr_rx_fifo_timeout);
if (ret) {
device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger);
- return ret;
+ goto err_remove_port;
}
}
@@ -3755,6 +3755,10 @@ static int sci_probe(struct platform_device *dev)
sci_ports_in_use |= BIT(dev_id);
return 0;
+
+err_remove_port:
+ uart_remove_one_port(&sci_uart_driver, &sp->port);
+ return ret;
}
static int sci_suspend(struct device *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0663/2151] serial: 8250_uniphier: Use devm_clk_get_enabled()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (661 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0662/2151] serial: sh-sci: Unregister UART on sysfs setup failure Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0664/2151] serial: sifive: fix off-by-one in console port bounds check Greg Kroah-Hartman
` (219 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Malathi A, Andy Shevchenko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malathi A <malathi.a2000@gmail.com>
[ Upstream commit 790aacba3fdfd3a227cdd5e4952c596ed66a0ed8 ]
uniphier_uart_probe() enables priv->clk by hand and is then responsible
for disabling it again on every error path. It misses one: when
uart_read_port_properties() fails the function returns directly, leaving
the clock prepared and enabled. The neighbouring path, taken when
serial8250_register_8250_port() fails, does call clk_disable_unprepare(),
which shows the leak is an oversight rather than intent.
Rather than adding another manual unwind, switch to
devm_clk_get_enabled() so the clock is released by devres. That removes
the error path entirely, along with the explicit disables in the
register failure path and in uniphier_uart_remove().
The clock is still disabled and re-enabled by hand across system sleep,
which stays balanced: only SET_SYSTEM_SLEEP_PM_OPS is used, so the
device cannot be unbound while suspended and devres always sees an
enabled clock at detach.
Found by smatch:
drivers/tty/serial/8250/8250_uniphier.c:232 uniphier_uart_probe() warn: 'priv->clk' from clk_prepare_enable() not released on lines: 205.
Fixes: 26e8349c0d76 ("serial: 8250_uniphier: Switch to use uart_read_port_properties()")
Signed-off-by: Malathi A <malathi.a2000@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260917040511.103232-1-malathi.a2000@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/8250/8250_uniphier.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
index e3db60bf50c93..6fffac12277ac 100644
--- a/drivers/tty/serial/8250/8250_uniphier.c
+++ b/drivers/tty/serial/8250/8250_uniphier.c
@@ -180,16 +180,12 @@ static int uniphier_uart_probe(struct platform_device *pdev)
memset(&up, 0, sizeof(up));
- priv->clk = devm_clk_get(dev, NULL);
+ priv->clk = devm_clk_get_enabled(dev, NULL);
if (IS_ERR(priv->clk)) {
- dev_err(dev, "failed to get clock\n");
+ dev_err(dev, "failed to get and enable clock\n");
return PTR_ERR(priv->clk);
}
- ret = clk_prepare_enable(priv->clk);
- if (ret)
- return ret;
-
up.port.uartclk = clk_get_rate(priv->clk);
spin_lock_init(&priv->atomic_write_lock);
@@ -222,7 +218,6 @@ static int uniphier_uart_probe(struct platform_device *pdev)
ret = serial8250_register_8250_port(&up);
if (ret < 0) {
dev_err(dev, "failed to register 8250 port\n");
- clk_disable_unprepare(priv->clk);
return ret;
}
priv->line = ret;
@@ -237,7 +232,6 @@ static void uniphier_uart_remove(struct platform_device *pdev)
struct uniphier8250_priv *priv = platform_get_drvdata(pdev);
serial8250_unregister_port(priv->line);
- clk_disable_unprepare(priv->clk);
}
static int __maybe_unused uniphier_uart_suspend(struct device *dev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0664/2151] serial: sifive: fix off-by-one in console port bounds check
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (662 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0663/2151] serial: 8250_uniphier: Use devm_clk_get_enabled() Greg Kroah-Hartman
@ 2026-11-18 14:39 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0665/2151] HID: Intel-thc-hid: Intel-quicki2c: Use hid_safe_input_report() Greg Kroah-Hartman
` (218 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:39 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Zongmin Zhou, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zongmin Zhou <zhouzongmin@kylinos.cn>
[ Upstream commit bf961847813d9edcb5a9c089714069428d141fa9 ]
sifive_serial_console_ports[] is sized SIFIVE_SERIAL_MAX_PORTS (8), so
valid indices are 0..7. The bounds check in sifive_serial_probe() uses
"id > SIFIVE_SERIAL_MAX_PORTS", which lets id == 8 pass and causes an
out-of-bounds write in __ssp_add_console_port() through
sifive_serial_console_ports[ssp->port.line].
Fix the check to use >= instead, matching the check already used in
sifive_serial_console_setup().
Fixes: 45c054d0815b ("tty: serial: add driver for the SiFive UART")
Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
Link: https://patch.msgid.link/20260827014524.19375-1-min_halo@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/tty/serial/sifive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 110d676131922..5d76f04736260 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -999,7 +999,7 @@ static int sifive_serial_probe(struct platform_device *pdev)
}
#ifdef CONFIG_SERIAL_SIFIVE_CONSOLE
- if (id > SIFIVE_SERIAL_MAX_PORTS) {
+ if (id >= SIFIVE_SERIAL_MAX_PORTS) {
dev_err(&pdev->dev, "too many UARTs (%d)\n", id);
return -EINVAL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0665/2151] HID: Intel-thc-hid: Intel-quicki2c: Use hid_safe_input_report()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (663 preceding siblings ...)
2026-11-18 14:39 ` [PATCH 6.18 0664/2151] serial: sifive: fix off-by-one in console port bounds check Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0666/2151] HID: Intel-thc-hid: Intel-quickspi: " Greg Kroah-Hartman
` (217 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Even Xu, Jiri Kosina, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Even Xu <even.xu@intel.com>
[ Upstream commit 48c72318ef1e9017b6c34cf73eed453d0dc9c2d4 ]
Replace the deprecated hid_input_report() with
hid_safe_input_report(), which takes the allocated size of the input
report buffer and allows hid-core to validate the reported data length
against the actual buffer size.
Track the allocated size of qcdev->input_buf in the new input_len
field and pass it through quicki2c_hid_send_report() to
hid_safe_input_report() to prevent potential out-of-bounds reads.
Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Signed-off-by: Even Xu <even.xu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 4 +++-
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h | 2 ++
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c | 6 ++++--
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.h | 2 +-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
index 4588c55cf255d..85be7f87fad4c 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
@@ -295,7 +295,7 @@ static int handle_input_report(struct quicki2c_device *qcdev)
if (qcdev->state != QUICKI2C_ENABLED)
continue;
- quicki2c_hid_send_report(qcdev, pkt->data,
+ quicki2c_hid_send_report(qcdev, pkt->data, qcdev->input_len,
HIDI2C_DATA_LEN(le16_to_cpu(pkt->len)));
}
@@ -591,6 +591,8 @@ static int quicki2c_alloc_report_buf(struct quicki2c_device *qcdev)
if (!qcdev->input_buf)
return -ENOMEM;
+ qcdev->input_len = max_report_len;
+
if (!le16_to_cpu(qcdev->dev_desc.max_output_len))
qcdev->dev_desc.max_output_len = cpu_to_le16(SZ_4K);
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h
index 2cb5471a81336..f714e202d0d8d 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-dev.h
@@ -179,6 +179,7 @@ struct acpi_device;
* @i2c_clock_lcnt: I2C CLK low period time (unit in cycle count)
* @report_descriptor: Store a copy of device report descriptor
* @input_buf: Store a copy of latest input report data
+ * @input_len: The data size of the input report buffer
* @report_buf: Store a copy of latest input/output report packet from set/get feature
* @report_len: The length of input/output report packet
* @reset_ack_wq: Workqueue for waiting reset response from device
@@ -212,6 +213,7 @@ struct quicki2c_device {
u8 *report_descriptor;
u8 *input_buf;
+ size_t input_len;
u8 *report_buf;
u32 report_len;
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c
index 5c3ec95bb3fdd..47f2f0f283fe0 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.c
@@ -149,16 +149,18 @@ void quicki2c_hid_remove(struct quicki2c_device *qcdev)
*
* @qcdev: point to quicki2c device
* @data: point to input report data buffer
+ * @buf_size: the allocated size of the input report data buffer
* @data_len: the length of input report data
*
* Return: 0 on success, non zero on error.
*/
int quicki2c_hid_send_report(struct quicki2c_device *qcdev,
- void *data, size_t data_len)
+ void *data, size_t buf_size, size_t data_len)
{
int ret;
- ret = hid_input_report(qcdev->hid_dev, HID_INPUT_REPORT, data, data_len, 1);
+ ret = hid_safe_input_report(qcdev->hid_dev, HID_INPUT_REPORT, data,
+ buf_size, data_len, 1);
if (ret)
dev_err(qcdev->dev, "Failed to send HID input report, ret = %d.\n", ret);
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.h b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.h
index e80df5f339fef..4c6757eca18e1 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.h
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-hid.h
@@ -7,7 +7,7 @@
struct quicki2c_device;
int quicki2c_hid_send_report(struct quicki2c_device *qcdev,
- void *data, size_t data_size);
+ void *data, size_t buf_size, size_t data_size);
int quicki2c_hid_probe(struct quicki2c_device *qcdev);
void quicki2c_hid_remove(struct quicki2c_device *qcdev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0666/2151] HID: Intel-thc-hid: Intel-quickspi: Use hid_safe_input_report()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (664 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0665/2151] HID: Intel-thc-hid: Intel-quicki2c: Use hid_safe_input_report() Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0667/2151] ARM: dts: ux500: Convert HREF audio to audio-graph-card2 Greg Kroah-Hartman
` (216 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Even Xu, Jiri Kosina, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Even Xu <even.xu@intel.com>
[ Upstream commit 291f4f310cc18ff8f5addbc3c9fbe33877283ec7 ]
Replace the deprecated hid_input_report() with
hid_safe_input_report(), which takes the allocated size of the input
report buffer and allows hid-core to validate the reported data length
against the actual buffer size.
Track the allocated size of qsdev->input_buf in the new input_len
field and pass it through quickspi_hid_send_report() to
hid_safe_input_report() to prevent potential out-of-bounds reads.
Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Signed-off-by: Even Xu <even.xu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c | 2 ++
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h | 2 ++
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c | 6 ++++--
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.h | 2 +-
.../hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c | 2 +-
5 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
index 48387a7341604..6980f5a72113a 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
@@ -554,6 +554,8 @@ static int quickspi_alloc_report_buf(struct quickspi_device *qsdev)
if (!qsdev->input_buf)
return -ENOMEM;
+ qsdev->input_len = max_input_len;
+
max_report_len = max(le16_to_cpu(qsdev->dev_desc.max_output_len),
le16_to_cpu(qsdev->dev_desc.max_input_len));
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h
index 0ed964bfe3dd2..e6acca6788501 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h
@@ -112,6 +112,7 @@ struct acpi_device;
* @low_power_ltr_val: THC low power LTR value
* @report_descriptor: store a copy of device report descriptor
* @input_buf: store a copy of latest input report data
+ * @input_len: the data size of the input report buffer
* @report_buf: store a copy of latest input/output report packet from set/get feature
* @report_len: the length of input/output report packet
* @reset_ack_wq: workqueue for waiting reset response from device
@@ -156,6 +157,7 @@ struct quickspi_device {
u8 *report_descriptor;
u8 *input_buf;
+ u32 input_len;
u8 *report_buf;
u32 report_buf_size;
u32 report_len;
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c
index 9df948f94d5a3..53cccad7741b8 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.c
@@ -148,16 +148,18 @@ void quickspi_hid_remove(struct quickspi_device *qsdev)
*
* @qsdev: point to quickspi device
* @data: point to input report data buffer
+ * @buf_size: the allocated size of the input report data buffer
* @data_len: the length of input report data
*
* Return: 0 on success, non zero on error.
*/
int quickspi_hid_send_report(struct quickspi_device *qsdev,
- void *data, size_t data_len)
+ void *data, size_t buf_size, size_t data_len)
{
int ret;
- ret = hid_input_report(qsdev->hid_dev, HID_INPUT_REPORT, data, data_len, 1);
+ ret = hid_safe_input_report(qsdev->hid_dev, HID_INPUT_REPORT, data,
+ buf_size, data_len, 1);
if (ret)
dev_err(qsdev->dev, "Failed to send HID input report, ret = %d.\n", ret);
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.h b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.h
index f640fa876a405..61b7c6be6c516 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.h
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-hid.h
@@ -7,7 +7,7 @@
struct quickspi_device;
int quickspi_hid_send_report(struct quickspi_device *qsdev,
- void *data, size_t data_size);
+ void *data, size_t buf_size, size_t data_size);
int quickspi_hid_probe(struct quickspi_device *qsdev);
void quickspi_hid_remove(struct quickspi_device *qsdev);
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c
index 847c5ec55569a..0df33c44fbffe 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c
@@ -240,7 +240,7 @@ void quickspi_handle_input_data(struct quickspi_device *qsdev, u32 buf_len)
input_len = sizeof(body_hdr->content_id) + input_len;
input_report = input_body->content - sizeof(body_hdr->content_id);
- ret = quickspi_hid_send_report(qsdev, input_report, input_len);
+ ret = quickspi_hid_send_report(qsdev, input_report, qsdev->input_len, input_len);
if (ret)
dev_err_once(qsdev->dev, "Failed to send HID input report: %d\n", ret);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0667/2151] ARM: dts: ux500: Convert HREF audio to audio-graph-card2
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (665 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0666/2151] HID: Intel-thc-hid: Intel-quickspi: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0668/2151] rust: clk: document overflow panics in `Hertz` constructors Greg Kroah-Hartman
` (215 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit f9b2262d1edba1b6c0abc12118105f8fa200980a ]
Describe the HREF500 and HREF520 sound hardware with two-link audio
graph cards in their PMIC-specific HREF DTSIs, and name the card
HREF-500. Connect MSP1 to codec DAI 0 for playback and MSP3 to codec
DAI 1 for capture.
Describe the DSP_A format, codec-provided bit and frame clocks,
16-by-16-bit TDM frame and active slots on the graph endpoints. Keep the
clocks running continuously, matching the legacy machine driver's normal
one- and two-channel mode.
Keep each complete card, including its endpoint graph, connector
widgets and routes, in the existing PMIC-specific HREF DTSI. The AB8500
variant exposes six digital microphone endpoints. AB8505 has neither
the digital microphone interface nor its VDMIC regulator, so leave
these endpoints out of HREF520 and remove its stale regulator and pin
configuration nodes.
Select ULPCLK as the fixed parent of the codec audio clock in the
HREF-specific codec DTSIs. This replaces the machine driver clock
control with declarative board policy.
Fixes: 4ecae2ae9535 ("ARM: dts: ux500-href: Switch HREF520 to AB8505")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/st/ste-ab8500.dtsi | 6 --
arch/arm/boot/dts/st/ste-ab8505.dtsi | 6 --
arch/arm/boot/dts/st/ste-dbx5x0.dtsi | 5 -
arch/arm/boot/dts/st/ste-href-ab8500.dtsi | 104 +++++++++++++++++++
arch/arm/boot/dts/st/ste-href-ab8505.dtsi | 118 +++++++++++++++++-----
5 files changed, 196 insertions(+), 43 deletions(-)
diff --git a/arch/arm/boot/dts/st/ste-ab8500.dtsi b/arch/arm/boot/dts/st/ste-ab8500.dtsi
index dd30d08ccb9b9..a55f365ea0200 100644
--- a/arch/arm/boot/dts/st/ste-ab8500.dtsi
+++ b/arch/arm/boot/dts/st/ste-ab8500.dtsi
@@ -364,12 +364,6 @@ ab8500_ldo_ana_reg: ab8500_ldo_ana {
};
};
- sound {
- stericsson,audio-codec = <&codec>;
- clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>;
- clock-names = "sysclk", "ulpclk", "intclk";
- };
-
mcde@a0350000 {
vana-supply = <&ab8500_ldo_ana_reg>;
diff --git a/arch/arm/boot/dts/st/ste-ab8505.dtsi b/arch/arm/boot/dts/st/ste-ab8505.dtsi
index 131c82508e820..24b12f0cf322f 100644
--- a/arch/arm/boot/dts/st/ste-ab8505.dtsi
+++ b/arch/arm/boot/dts/st/ste-ab8505.dtsi
@@ -301,12 +301,6 @@ ab8500_ldo_ana_reg: ab8500_ldo_ana {
};
};
- sound {
- stericsson,audio-codec = <&codec>;
- clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>;
- clock-names = "sysclk", "ulpclk", "intclk";
- };
-
mcde@a0350000 {
vana-supply = <&ab8500_ldo_ana_reg>;
diff --git a/arch/arm/boot/dts/st/ste-dbx5x0.dtsi b/arch/arm/boot/dts/st/ste-dbx5x0.dtsi
index 0f87abeddc335..2ed9d385042f3 100644
--- a/arch/arm/boot/dts/st/ste-dbx5x0.dtsi
+++ b/arch/arm/boot/dts/st/ste-dbx5x0.dtsi
@@ -1071,11 +1071,6 @@ mmc@80008000 {
status = "disabled";
};
- sound {
- compatible = "stericsson,snd-soc-mop500";
- stericsson,cpu-dai = <&msp1 &msp3>;
- };
-
msp0: msp@80123000 {
compatible = "stericsson,ux500-msp-i2s";
reg = <0x80123000 0x1000>;
diff --git a/arch/arm/boot/dts/st/ste-href-ab8500.dtsi b/arch/arm/boot/dts/st/ste-href-ab8500.dtsi
index 5eeb44c5e9323..ff72f5f6d6525 100644
--- a/arch/arm/boot/dts/st/ste-href-ab8500.dtsi
+++ b/arch/arm/boot/dts/st/ste-href-ab8500.dtsi
@@ -6,6 +6,48 @@
#include "ste-ab8500.dtsi"
/ {
+ href_sound: sound {
+ compatible = "audio-graph-card2";
+ label = "HREF-500";
+ widgets =
+ "Headphone", "Headset",
+ "Speaker", "Earpiece Speaker",
+ "Speaker", "Loudspeaker",
+ "Line", "Line Out",
+ "Speaker", "Vibra 1 Motor",
+ "Speaker", "Vibra 2 Motor",
+ "Microphone", "Mic 1 Jack",
+ "Microphone", "Mic 2 Jack",
+ "Line", "Line In",
+ "Microphone", "Digital Mic 1",
+ "Microphone", "Digital Mic 2",
+ "Microphone", "Digital Mic 3",
+ "Microphone", "Digital Mic 4",
+ "Microphone", "Digital Mic 5",
+ "Microphone", "Digital Mic 6";
+ routing =
+ "Headset", "Headset Left",
+ "Headset", "Headset Right",
+ "Earpiece Speaker", "Earpiece",
+ "Loudspeaker", "Speaker Left",
+ "Loudspeaker", "Speaker Right",
+ "Line Out", "LineOut Left",
+ "Line Out", "LineOut Right",
+ "Vibra 1 Motor", "Vibra 1",
+ "Vibra 2 Motor", "Vibra 2",
+ "Mic 1", "Mic 1 Jack",
+ "Mic 2", "Mic 2 Jack",
+ "LineIn Left", "Line In",
+ "LineIn Right", "Line In",
+ "DMic 1", "Digital Mic 1",
+ "DMic 2", "Digital Mic 2",
+ "DMic 3", "Digital Mic 3",
+ "DMic 4", "Digital Mic 4",
+ "DMic 5", "Digital Mic 5",
+ "DMic 6", "Digital Mic 6";
+ links = <&href_msp1_port &href_msp3_port>;
+ };
+
soc {
prcmu@80157000 {
ab8500 {
@@ -488,3 +530,65 @@ ab8500_chargalg {
};
};
};
+
+&codec {
+ assigned-clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
+ assigned-clock-parents = <&ab8500_clock AB8500_SYSCLK_ULP>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ href_codec_playback: endpoint {
+ remote-endpoint = <&href_msp1_endpoint>;
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-tx-mask = <0 1 0 1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ href_codec_capture: endpoint {
+ remote-endpoint = <&href_msp3_endpoint>;
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-rx-mask = <1>;
+ };
+ };
+ };
+};
+
+&msp1 {
+ href_msp1_port: port {
+ href_msp1_endpoint: endpoint {
+ continuous-clock;
+ remote-endpoint = <&href_codec_playback>;
+ dai-format = "dsp_a";
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-tx-mask = <0 1 0 1>;
+ };
+ };
+};
+
+&msp3 {
+ href_msp3_port: port {
+ href_msp3_endpoint: endpoint {
+ continuous-clock;
+ remote-endpoint = <&href_codec_capture>;
+ dai-format = "dsp_a";
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-rx-mask = <1>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/st/ste-href-ab8505.dtsi b/arch/arm/boot/dts/st/ste-href-ab8505.dtsi
index 268db68ccf87b..eba6f674c6911 100644
--- a/arch/arm/boot/dts/st/ste-href-ab8505.dtsi
+++ b/arch/arm/boot/dts/st/ste-href-ab8505.dtsi
@@ -6,6 +6,36 @@
#include "ste-ab8505.dtsi"
/ {
+ href_sound: sound {
+ compatible = "audio-graph-card2";
+ label = "HREF-500";
+ widgets =
+ "Headphone", "Headset",
+ "Speaker", "Earpiece Speaker",
+ "Speaker", "Loudspeaker",
+ "Line", "Line Out",
+ "Speaker", "Vibra 1 Motor",
+ "Speaker", "Vibra 2 Motor",
+ "Microphone", "Mic 1 Jack",
+ "Microphone", "Mic 2 Jack",
+ "Line", "Line In";
+ routing =
+ "Headset", "Headset Left",
+ "Headset", "Headset Right",
+ "Earpiece Speaker", "Earpiece",
+ "Loudspeaker", "Speaker Left",
+ "Loudspeaker", "Speaker Right",
+ "Line Out", "LineOut Left",
+ "Line Out", "LineOut Right",
+ "Vibra 1 Motor", "Vibra 1",
+ "Vibra 2 Motor", "Vibra 2",
+ "Mic 1", "Mic 1 Jack",
+ "Mic 2", "Mic 2 Jack",
+ "LineIn Left", "Line In",
+ "LineIn Right", "Line In";
+ links = <&href_msp1_port &href_msp3_port>;
+ };
+
soc {
prcmu@80157000 {
ab8505 {
@@ -48,10 +78,6 @@ ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
regulator-name = "V-AMIC2";
};
- ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
- regulator-name = "V-DMIC";
- };
-
ab8500_ldo_ana_reg: ab8500_ldo_ana {
regulator-name = "V-CSI/DSI";
};
@@ -80,7 +106,6 @@ gpio {
<&pwm_default_mode>,
<&adi1_default_mode>,
<&usbuicc_default_mode>,
- <&dmic_default_mode>,
<&extcpena_default_mode>,
<&modsclsda_default_mode>;
@@ -365,27 +390,6 @@ default_cfg {
};
};
};
- /* This sets up the microphone pins */
- dmic {
- dmic_default_mode: dmic_default {
- default_mux {
- function = "dmic";
- groups = "dmic12_d_1",
- "dmic34_d_1",
- "dmic56_d_1";
- };
- default_cfg {
- pins = "GPIO27_J6",
- "GPIO28_K6",
- "GPIO29_G6",
- "GPIO30_H6",
- "GPIO31_F5",
- "GPIO32_G5";
- input-enable;
- bias-pull-down;
- };
- };
- };
extcpena {
extcpena_default_mode: extcpena_default {
default_mux {
@@ -488,3 +492,65 @@ ab8500_chargalg {
};
};
};
+
+&codec {
+ assigned-clocks = <&ab8500_clock AB8500_SYSCLK_INT>;
+ assigned-clock-parents = <&ab8500_clock AB8500_SYSCLK_ULP>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ href_codec_playback: endpoint {
+ remote-endpoint = <&href_msp1_endpoint>;
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-tx-mask = <0 1 0 1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ href_codec_capture: endpoint {
+ remote-endpoint = <&href_msp3_endpoint>;
+ bitclock-master;
+ frame-master;
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-rx-mask = <1>;
+ };
+ };
+ };
+};
+
+&msp1 {
+ href_msp1_port: port {
+ href_msp1_endpoint: endpoint {
+ continuous-clock;
+ remote-endpoint = <&href_codec_playback>;
+ dai-format = "dsp_a";
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-tx-mask = <0 1 0 1>;
+ };
+ };
+};
+
+&msp3 {
+ href_msp3_port: port {
+ href_msp3_endpoint: endpoint {
+ continuous-clock;
+ remote-endpoint = <&href_codec_capture>;
+ dai-format = "dsp_a";
+ dai-tdm-slot-num = <16>;
+ dai-tdm-slot-width = <16>;
+ dai-tdm-slot-rx-mask = <1>;
+ };
+ };
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0668/2151] rust: clk: document overflow panics in `Hertz` constructors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (666 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0667/2151] ARM: dts: ux500: Convert HREF audio to audio-graph-card2 Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0669/2151] dt-bindings: vendor-prefixes: add Free Mobile Greg Kroah-Hartman
` (214 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Georgios Androutsopoulos,
Alexandre Courbot, Miguel Ojeda, Brian Masney, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Georgios Androutsopoulos <georgeandrout13@gmail.com>
[ Upstream commit 45a68afbd4b632538a0956ba783fca45b8ceb446 ]
`Hertz::from_khz()`, `from_mhz()` and `from_ghz()` multiply their
argument by 1_000, 1_000_000 and 1_000_000_000 respectively without
checking for overflow. When `CONFIG_RUST_OVERFLOW_CHECKS` is enabled,
each panics once its argument exceeds `c_ulong::MAX` divided by that
factor. None of the three documents this. The panic occurs only at
runtime, when the argument is not a constant expression.
Add the missing `# Panics` sections stating the bound for each unit.
Fixes: d01d70205601 ("rust: clk: Add initial abstractions")
Signed-off-by: Georgios Androutsopoulos <georgeandrout13@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
rust/kernel/clk.rs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
index 1e6c8c42fb3a3..14726ff9c9396 100644
--- a/rust/kernel/clk.rs
+++ b/rust/kernel/clk.rs
@@ -35,16 +35,31 @@ impl Hertz {
const GHZ_TO_HZ: c_ulong = 1_000_000_000;
/// Create a new instance from kilohertz (kHz)
+ ///
+ /// # Panics
+ ///
+ /// Panics if `CONFIG_RUST_OVERFLOW_CHECKS` is enabled and `khz` is greater
+ /// than `c_ulong::MAX / 1_000`.
pub const fn from_khz(khz: c_ulong) -> Self {
Self(khz * Self::KHZ_TO_HZ)
}
/// Create a new instance from megahertz (MHz)
+ ///
+ /// # Panics
+ ///
+ /// Panics if `CONFIG_RUST_OVERFLOW_CHECKS` is enabled and `mhz` is greater
+ /// than `c_ulong::MAX / 1_000_000`.
pub const fn from_mhz(mhz: c_ulong) -> Self {
Self(mhz * Self::MHZ_TO_HZ)
}
/// Create a new instance from gigahertz (GHz)
+ ///
+ /// # Panics
+ ///
+ /// Panics if `CONFIG_RUST_OVERFLOW_CHECKS` is enabled and `ghz` is greater
+ /// than `c_ulong::MAX / 1_000_000_000`.
pub const fn from_ghz(ghz: c_ulong) -> Self {
Self(ghz * Self::GHZ_TO_HZ)
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0669/2151] dt-bindings: vendor-prefixes: add Free Mobile
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (667 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0668/2151] rust: clk: document overflow panics in `Hertz` constructors Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0670/2151] arm64: dts: imx8mp-kontron: Fix LVDS clock frequency for DL device Greg Kroah-Hartman
` (213 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski, Vincent Jardin,
Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Jardin <vjardin@free.fr>
[ Upstream commit aa906abf611c7f37c0fe9171c1d33c40270aa5fe ]
Free Mobile is a French mobile network operator. Add its vendor
prefix, used by the Nodebox v3 CPU Module (freemobile,nbxv3).
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 9066860061f66..e6fa43a510329 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -588,6 +588,8 @@ patternProperties:
description: Freebox SAS
"^freecom,.*":
description: Freecom Gmbh
+ "^freemobile,.*":
+ description: Free Mobile
"^frida,.*":
description: Shenzhen Frida LCD Co., Ltd.
"^friendlyarm,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0670/2151] arm64: dts: imx8mp-kontron: Fix LVDS clock frequency for DL device
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (668 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0669/2151] dt-bindings: vendor-prefixes: add Free Mobile Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0671/2151] clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops Greg Kroah-Hartman
` (212 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Oualid Derouiche, Frieder Schrempf,
Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oualid Derouiche <oualid.derouiche@kontron.de>
[ Upstream commit a5f316e602d3f5852fe2f88226fe64c8a495f479 ]
The panel needs a pixel clock of 50 MHz, which means the LDB
serializer has to run at 50 MHz * 7 = 350 MHz. The LDB rate itself
is set by the fsl-ldb driver, but VIDEO_PLL1 needs to be pinned to
700 MHz, so that both the LDB clock (/2) and the pixel clock (/14)
can be derived from it exactly.
Fixes: 946ab10e3f40 ("arm64: dts: Add support for Kontron OSM-S i.MX8MP SoM and BL carrier board")
Signed-off-by: Oualid Derouiche <oualid.derouiche@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso b/arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso
index 7131e9a499ae1..7a7d7ea21110d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso
+++ b/arch/arm64/boot/dts/freescale/imx8mp-kontron-dl.dtso
@@ -6,6 +6,7 @@
/dts-v1/;
/plugin/;
+#include <dt-bindings/clock/imx8mp-clock.h>
#include <dt-bindings/gpio/gpio.h>
#include "imx8mp-pinfunc.h"
@@ -98,6 +99,16 @@ &ldb_lvds_ch0 {
&lvds_bridge {
status = "okay";
+ /*
+ * The video PLL clock frequency needs to be configured manually.
+ * The panel needs a LVDS clock of 50 MHz * 7 = 350 MHz.
+ * IMX8MP_CLK_MEDIA_LDB = IMX8MP_CLK_MEDIA_DISP2_PIX * 7
+ * IMX8MP_VIDEO_PLL1 = IMX8MP_CLK_MEDIA_LDB * 2
+ */
+ assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>,
+ <&clk IMX8MP_VIDEO_PLL1>;
+ assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
+ assigned-clock-rates = <0>, <700000000>;
};
/* redefine to remove touch controller GPIOs */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0671/2151] clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (669 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0670/2151] arm64: dts: imx8mp-kontron: Fix LVDS clock frequency for DL device Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0672/2151] clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring Greg Kroah-Hartman
` (211 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Konrad Dybcio, Esteban Urrutia,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Esteban Urrutia <esteuwu@proton.me>
[ Upstream commit 8464e2284fec42d9fd05f3109d8b209d65864ece ]
If the clock frequency is changed at registration time, a flicker will be
visible at boot.
Switching to clk_rcg2_shared_no_init_park_ops fixes this.
Fixes: 16fb89f92ec4 ("clk: qcom: Add support for Display Clock Controller on SM8450")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
Link: https://lore.kernel.org/r/20260713-sm8450-qol-dispcc-v3-1-56fd05822270@proton.me
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/qcom/dispcc-sm8450.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/dispcc-sm8450.c b/drivers/clk/qcom/dispcc-sm8450.c
index 2e91332dd92ab..251b53dc08170 100644
--- a/drivers/clk/qcom/dispcc-sm8450.c
+++ b/drivers/clk/qcom/dispcc-sm8450.c
@@ -614,7 +614,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
.parent_data = disp_cc_parent_data_5,
.num_parents = ARRAY_SIZE(disp_cc_parent_data_5),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_shared_ops,
+ .ops = &clk_rcg2_shared_no_init_park_ops,
},
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0672/2151] clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (670 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0671/2151] clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0673/2151] clk: qcom: fix SM6115 lpasscc register offset Greg Kroah-Hartman
` (210 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Esteban Urrutia, Konrad Dybcio,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Esteban Urrutia <esteuwu@proton.me>
[ Upstream commit eb34e2804ce4ea56efb741e23d598469274a2f94 ]
On some platforms such as SM8475, not doing this may result in graphical
glitches when the mdss driver takes over.
This fixes the aforementioned issue.
Fixes: 3132a9a11e57 ("clk: qcom: clk-alpha-pll: Add support for lucid ole pll configure")
Signed-off-by: Esteban Urrutia <esteuwu@proton.me>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260713-sm8450-qol-dispcc-v3-3-56fd05822270@proton.me
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/qcom/clk-alpha-pll.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index a84e8bee65346..05a54f3894669 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -2356,6 +2356,15 @@ void clk_lucid_ole_pll_configure(struct clk_alpha_pll *pll, struct regmap *regma
{
u32 lval = config->l;
+ /*
+ * If the bootloader left the PLL enabled it's likely that there are
+ * RCGs that will lock up if we disable the PLL below.
+ */
+ if (trion_pll_is_enabled(pll, regmap)) {
+ pr_debug("Lucid Ole PLL is already enabled, skipping configuration\n");
+ return;
+ }
+
lval |= TRION_PLL_CAL_VAL << LUCID_EVO_PLL_CAL_L_VAL_SHIFT;
lval |= TRION_PLL_CAL_VAL << LUCID_OLE_PLL_RINGOSC_CAL_L_VAL_SHIFT;
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), lval);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0673/2151] clk: qcom: fix SM6115 lpasscc register offset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (671 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0672/2151] clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0674/2151] tools/nolibc: fix WIFSIGNALED() for status 0 Greg Kroah-Hartman
` (209 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Konrad Dybcio, Srinivas Kandagatla,
Alexey Klimov, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
[ Upstream commit 689364ac19e4680e09d100c743f8797da127609a ]
For some reason we ended with incorrect register offset for soundwire tx
controller reset and the regmap register max was also incorrect it was
0x1000 instead of 0x12000 which is full register range for this IP.
This was somehow compenseated in DT reg property which got it working so
far.
Fix this by correcting the actual offset and max registers as per SoC
documentation.
Fixes: b076b995e225 ("clk: qcom: Add SM6115 LPASSCC")
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Alexey Klimov <alexey.klimov@linaro.org>
Link: https://patch.msgid.link/3a4e8d1115a46c45cb34193b6ceeb02891fdf716.1790114902.git.srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/qcom/lpasscc-sm6115.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/lpasscc-sm6115.c b/drivers/clk/qcom/lpasscc-sm6115.c
index ac6d219233b4c..47adf4de2cca7 100644
--- a/drivers/clk/qcom/lpasscc-sm6115.c
+++ b/drivers/clk/qcom/lpasscc-sm6115.c
@@ -35,7 +35,7 @@ static const struct qcom_cc_desc lpass_audiocc_sm6115_reset_desc = {
};
static const struct qcom_reset_map lpasscc_sm6115_resets[] = {
- [LPASS_SWR_TX_CONFIG_CGCR] = { .reg = 0x100, .bit = 1, .udelay = 500 },
+ [LPASS_SWR_TX_CONFIG_CGCR] = { .reg = 0xc100, .bit = 1, .udelay = 500 },
};
static struct regmap_config lpasscc_sm6115_regmap_config = {
@@ -43,7 +43,7 @@ static struct regmap_config lpasscc_sm6115_regmap_config = {
.reg_stride = 4,
.val_bits = 32,
.name = "lpass-tcsr",
- .max_register = 0x1000,
+ .max_register = 0x12000,
};
static const struct qcom_cc_desc lpasscc_sm6115_reset_desc = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0674/2151] tools/nolibc: fix WIFSIGNALED() for status 0
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (672 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0673/2151] clk: qcom: fix SM6115 lpasscc register offset Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0675/2151] bpftool: Fix CPU IDs in per-CPU map output Greg Kroah-Hartman
` (208 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Danish Khateeb,
Thomas Weißschuh, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danish Khateeb <danishkhateeb03@gmail.com>
[ Upstream commit 368fae47c6cae28a312c5dc86e5bdb8f9369fd26 ]
WIFSIGNALED() needs the subtraction to wrap around for status 0, so that
only 1 to 0xff, a terminating signal with or without the core dump flag,
pass the check. But status is an int, and 0 - 1 is -1, which is less
than 0xff. A child that exits with 0 is therefore reported as both
exited and killed, and a caller that tests WIFSIGNALED() first sees
"killed by signal 0".
Make the subtraction unsigned, as musl does in the same macro.
Fixes: 8c934d4822c7 ("tools/nolibc: add helpers for wait() signal exits")
Assisted-by: LLM
Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com>
Link: https://patch.msgid.link/20260923205622.1123270-2-danishkhateeb03@gmail.com
[Thomas: Drop stable@ Cc]
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/include/nolibc/types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h
index 16c6e9ec9451f..8fd3e81514da2 100644
--- a/tools/include/nolibc/types.h
+++ b/tools/include/nolibc/types.h
@@ -109,7 +109,7 @@
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
#define WIFEXITED(status) (((status) & 0x7f) == 0)
#define WTERMSIG(status) ((status) & 0x7f)
-#define WIFSIGNALED(status) ((status) - 1 < 0xff)
+#define WIFSIGNALED(status) ((status) - 1U < 0xff)
/* standard exit() codes */
#define EXIT_SUCCESS 0
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0675/2151] bpftool: Fix CPU IDs in per-CPU map output
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (673 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0674/2151] tools/nolibc: fix WIFSIGNALED() for status 0 Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0676/2151] bpftool: Accept zero perf counter snapshots Greg Kroah-Hartman
` (207 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hui Su, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hui Su <sh_def@163.com>
[ Upstream commit dbf8cef936c7783ca909c38097a69f73173a19a7 ]
bpftool uses dense per-CPU value-buffer slots when printing per-CPU map
values. It also uses the slot index as the CPU ID, which produces
incorrect labels when the possible CPU mask is sparse, such as 0,2-3.
Parse the possible CPU mask and use the corresponding logical CPU ID in
plain, JSON, and BTF-formatted output. Keep the dense slot index for
accessing the per-CPU value buffer.
Pass the parsed CPU count together with the CPU ID array so that the
printed CPU IDs and loop bounds come from the same possible-CPU mask.
Propagate CPU-ID lookup and map output errors through the shared output
path to its callers.
Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool")
Signed-off-by: Hui Su <sh_def@163.com>
Link: https://lore.kernel.org/bpf/20260813155131.1022745-3-sh_def@163.com/
Link: https://lore.kernel.org/bpf/20260923004243.969919-2-sh_def@163.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/common.c | 40 ++++++++++++++++
tools/bpf/bpftool/main.h | 1 +
tools/bpf/bpftool/map.c | 95 +++++++++++++++++++++++++-------------
3 files changed, 103 insertions(+), 33 deletions(-)
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index e8daf963ecef4..8f68d36830e5a 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -31,6 +31,7 @@
#include <bpf/bpf.h>
#include <bpf/hashmap.h>
#include <bpf/libbpf.h> /* libbpf_num_possible_cpus */
+#include <bpf/libbpf_internal.h>
#include <bpf/btf.h>
#include <zlib.h>
@@ -655,6 +656,45 @@ unsigned int get_possible_cpus(void)
return cpus;
}
+int get_possible_cpu_ids(int **cpu_ids)
+{
+ const char *possible_cpus_file = "/sys/devices/system/cpu/possible";
+ bool *mask = NULL;
+ int mask_sz, nr_cpus = 0;
+ int *ids = NULL;
+ int i, res;
+
+ *cpu_ids = NULL;
+
+ res = parse_cpu_mask_file(possible_cpus_file, &mask, &mask_sz);
+ if (res) {
+ p_err("failed to parse possible CPU mask: %s", strerror(-res));
+ return res;
+ }
+
+ for (i = 0; i < mask_sz; i++)
+ nr_cpus += mask[i];
+
+ ids = calloc(nr_cpus, sizeof(*ids));
+ if (!ids) {
+ p_err("mem alloc failed");
+ res = -ENOMEM;
+ goto out;
+ }
+
+ for (i = 0, nr_cpus = 0; i < mask_sz; i++) {
+ if (mask[i])
+ ids[nr_cpus++] = i;
+ }
+ *cpu_ids = ids;
+ ids = NULL;
+ res = nr_cpus;
+out:
+ free(ids);
+ free(mask);
+ return res;
+}
+
static char *
ifindex_to_name_ns(__u32 ifindex, __u32 ns_dev, __u32 ns_ino, char *buf)
{
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool/main.h
index 1130299cede0b..c320f24592a11 100644
--- a/tools/bpf/bpftool/main.h
+++ b/tools/bpf/bpftool/main.h
@@ -216,6 +216,7 @@ void print_hex_data_json(uint8_t *data, size_t len);
unsigned int get_page_size(void);
unsigned int get_possible_cpus(void);
+int get_possible_cpu_ids(int **cpu_ids);
const char *
ifindex_to_arch(__u32 ifindex, __u64 ns_dev, __u64 ns_ino, const char **opt);
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index 941d73b737de3..7cedd96729688 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
@@ -70,7 +70,7 @@ static void *alloc_value(struct bpf_map_info *info)
static int do_dump_btf(const struct btf_dumper *d,
struct bpf_map_info *map_info, void *key,
- void *value)
+ void *value, const int *cpu_ids, int cpu_cnt)
{
__u32 value_id;
int ret = 0;
@@ -93,15 +93,15 @@ static int do_dump_btf(const struct btf_dumper *d,
jsonw_name(d->jw, "value");
ret = btf_dumper_type(d, value_id, value);
} else {
- unsigned int i, n, step;
+ unsigned int step;
+ int i;
jsonw_name(d->jw, "values");
jsonw_start_array(d->jw);
- n = get_possible_cpus();
step = round_up(map_info->value_size, 8);
- for (i = 0; i < n; i++) {
+ for (i = 0; i < cpu_cnt; i++) {
jsonw_start_object(d->jw);
- jsonw_int_field(d->jw, "cpu", i);
+ jsonw_int_field(d->jw, "cpu", cpu_ids[i]);
jsonw_name(d->jw, "value");
ret = btf_dumper_type(d, value_id, value + i * step);
jsonw_end_object(d->jw);
@@ -130,7 +130,8 @@ static json_writer_t *get_btf_writer(void)
}
static void print_entry_json(struct bpf_map_info *info, unsigned char *key,
- unsigned char *value, struct btf *btf)
+ unsigned char *value, struct btf *btf,
+ const int *cpu_ids, int cpu_cnt)
{
jsonw_start_object(json_wtr);
@@ -150,12 +151,12 @@ static void print_entry_json(struct bpf_map_info *info, unsigned char *key,
};
jsonw_name(json_wtr, "formatted");
- do_dump_btf(&d, info, key, value);
+ do_dump_btf(&d, info, key, value, cpu_ids, cpu_cnt);
}
} else {
- unsigned int i, n, step;
+ unsigned int step;
+ int i;
- n = get_possible_cpus();
step = round_up(info->value_size, 8);
jsonw_name(json_wtr, "key");
@@ -163,10 +164,10 @@ static void print_entry_json(struct bpf_map_info *info, unsigned char *key,
jsonw_name(json_wtr, "values");
jsonw_start_array(json_wtr);
- for (i = 0; i < n; i++) {
+ for (i = 0; i < cpu_cnt; i++) {
jsonw_start_object(json_wtr);
- jsonw_int_field(json_wtr, "cpu", i);
+ jsonw_int_field(json_wtr, "cpu", cpu_ids[i]);
jsonw_name(json_wtr, "value");
print_hex_data_json(value + i * step,
@@ -183,7 +184,7 @@ static void print_entry_json(struct bpf_map_info *info, unsigned char *key,
};
jsonw_name(json_wtr, "formatted");
- do_dump_btf(&d, info, key, value);
+ do_dump_btf(&d, info, key, value, cpu_ids, cpu_cnt);
}
}
@@ -245,7 +246,7 @@ print_entry_error(struct bpf_map_info *map_info, void *key, int lookup_errno)
}
static void print_entry_plain(struct bpf_map_info *info, unsigned char *key,
- unsigned char *value)
+ unsigned char *value, const int *cpu_ids, int cpu_cnt)
{
if (!map_is_per_cpu(info->type)) {
bool single_line, break_names;
@@ -273,9 +274,9 @@ static void print_entry_plain(struct bpf_map_info *info, unsigned char *key,
printf("\n");
} else {
- unsigned int i, n, step;
+ unsigned int step;
+ int i;
- n = get_possible_cpus();
step = round_up(info->value_size, 8);
if (info->key_size) {
@@ -284,9 +285,9 @@ static void print_entry_plain(struct bpf_map_info *info, unsigned char *key,
printf("\n");
}
if (info->value_size) {
- for (i = 0; i < n; i++) {
- printf("value (CPU %02u):%c",
- i, info->value_size > 16 ? '\n' : ' ');
+ for (i = 0; i < cpu_cnt; i++) {
+ printf("value (CPU %02d):%c",
+ cpu_ids[i], info->value_size > 16 ? '\n' : ' ');
fprint_hex(stdout, value + i * step,
info->value_size, " ");
printf("\n");
@@ -742,7 +743,7 @@ static int do_show(int argc, char **argv)
static int dump_map_elem(int fd, void *key, void *value,
struct bpf_map_info *map_info, struct btf *btf,
- json_writer_t *btf_wtr)
+ json_writer_t *btf_wtr, const int *cpu_ids, int cpu_cnt)
{
if (bpf_map_lookup_elem(fd, key, value)) {
print_entry_error(map_info, key, errno);
@@ -750,7 +751,7 @@ static int dump_map_elem(int fd, void *key, void *value,
}
if (json_output) {
- print_entry_json(map_info, key, value, btf);
+ print_entry_json(map_info, key, value, btf, cpu_ids, cpu_cnt);
} else if (btf) {
struct btf_dumper d = {
.btf = btf,
@@ -758,9 +759,9 @@ static int dump_map_elem(int fd, void *key, void *value,
.is_plain_text = true,
};
- do_dump_btf(&d, map_info, key, value);
+ do_dump_btf(&d, map_info, key, value, cpu_ids, cpu_cnt);
} else {
- print_entry_plain(map_info, key, value);
+ print_entry_plain(map_info, key, value, cpu_ids, cpu_cnt);
}
return 0;
@@ -833,6 +834,8 @@ map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr,
void *key, *value, *prev_key;
unsigned int num_elems = 0;
struct btf *btf = NULL;
+ int *cpu_ids = NULL;
+ int cpu_cnt = 0;
int err;
key = malloc(info->key_size);
@@ -845,6 +848,14 @@ map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr,
prev_key = NULL;
+ if (map_is_per_cpu(info->type)) {
+ cpu_cnt = get_possible_cpu_ids(&cpu_ids);
+ if (cpu_cnt < 0) {
+ err = cpu_cnt;
+ goto exit_free;
+ }
+ }
+
if (wtr) {
err = get_map_kv_btf(info, &btf);
if (err) {
@@ -876,7 +887,8 @@ map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr,
err = 0;
break;
}
- if (!dump_map_elem(fd, key, value, info, btf, wtr))
+ if (!dump_map_elem(fd, key, value, info, btf, wtr,
+ cpu_ids, cpu_cnt))
num_elems++;
prev_key = key;
}
@@ -893,6 +905,7 @@ map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr,
exit_free:
free(key);
free(value);
+ free(cpu_ids);
free_map_kv_btf(btf);
return err;
@@ -1035,17 +1048,30 @@ static int do_update(int argc, char **argv)
return err;
}
-static void print_key_value(struct bpf_map_info *info, void *key,
- void *value)
+static int print_key_value(struct bpf_map_info *info, void *key,
+ void *value)
{
json_writer_t *btf_wtr;
struct btf *btf;
+ int *cpu_ids = NULL;
+ int cpu_cnt = 0;
+ int err = 0;
- if (get_map_kv_btf(info, &btf))
- return;
+ if (map_is_per_cpu(info->type)) {
+ cpu_cnt = get_possible_cpu_ids(&cpu_ids);
+
+ if (cpu_cnt < 0) {
+ err = cpu_cnt;
+ goto out;
+ }
+ }
+
+ err = get_map_kv_btf(info, &btf);
+ if (err)
+ goto out;
if (json_output) {
- print_entry_json(info, key, value, btf);
+ print_entry_json(info, key, value, btf, cpu_ids, cpu_cnt);
} else if (btf) {
/* if here json_wtr wouldn't have been initialised,
* so let's create separate writer for btf
@@ -1055,7 +1081,7 @@ static void print_key_value(struct bpf_map_info *info, void *key,
p_info("failed to create json writer for btf. falling back to plain output");
free_map_kv_btf(btf);
btf = NULL;
- print_entry_plain(info, key, value);
+ print_entry_plain(info, key, value, cpu_ids, cpu_cnt);
} else {
struct btf_dumper d = {
.btf = btf,
@@ -1063,13 +1089,16 @@ static void print_key_value(struct bpf_map_info *info, void *key,
.is_plain_text = true,
};
- do_dump_btf(&d, info, key, value);
+ do_dump_btf(&d, info, key, value, cpu_ids, cpu_cnt);
jsonw_destroy(&btf_wtr);
}
} else {
- print_entry_plain(info, key, value);
+ print_entry_plain(info, key, value, cpu_ids, cpu_cnt);
}
free_map_kv_btf(btf);
+out:
+ free(cpu_ids);
+ return err;
}
static int do_lookup(int argc, char **argv)
@@ -1114,7 +1143,7 @@ static int do_lookup(int argc, char **argv)
}
/* here means bpf_map_lookup_elem() succeeded */
- print_key_value(&info, key, value);
+ err = print_key_value(&info, key, value);
exit_free:
free(key);
@@ -1404,7 +1433,7 @@ static int do_pop_dequeue(int argc, char **argv)
goto exit_free;
}
- print_key_value(&info, key, value);
+ err = print_key_value(&info, key, value);
exit_free:
free(key);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0676/2151] bpftool: Accept zero perf counter snapshots
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (674 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0675/2151] bpftool: Fix CPU IDs in per-CPU map output Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0677/2151] bpftool: Group profile events by CPU Greg Kroah-Hartman
` (206 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mykyta Yatsenko, Andrii Nakryiko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mykyta Yatsenko <yatsenko@meta.com>
[ Upstream commit b2cf39f53478fd4b04d2f04585c21b3d91d7042f ]
A perf counter can be zero at fentry when PMU multiplexing has
not scheduled the event. Do not reject that sample.
Use enabled time to distinguish a successful snapshot. Read
directly into the per-CPU map value.
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260916-bpftool_cyles_per_run-v4-1-f2de02c480d5@meta.com
Stable-dep-of: edc071d7b3aa ("bpftool: Fix sparse CPU IDs in prog profile")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/skeleton/profiler.bpf.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/tools/bpf/bpftool/skeleton/profiler.bpf.c b/tools/bpf/bpftool/skeleton/profiler.bpf.c
index f48c783cb9f7f..6685e7252fb52 100644
--- a/tools/bpf/bpftool/skeleton/profiler.bpf.c
+++ b/tools/bpf/bpftool/skeleton/profiler.bpf.c
@@ -45,28 +45,21 @@ const volatile __u32 num_metric = 1;
SEC("fentry/XXX")
int BPF_PROG(fentry_XXX)
{
- struct bpf_perf_event_value___local *ptrs[MAX_NUM_METRICS];
u32 key = bpf_get_smp_processor_id();
u32 i;
- /* look up before reading, to reduce error */
for (i = 0; i < num_metric && i < MAX_NUM_METRICS; i++) {
+ struct bpf_perf_event_value___local *reading;
u32 flag = i;
-
- ptrs[i] = bpf_map_lookup_elem(&fentry_readings, &flag);
- if (!ptrs[i])
- return 0;
- }
-
- for (i = 0; i < num_metric && i < MAX_NUM_METRICS; i++) {
- struct bpf_perf_event_value___local reading;
int err;
- err = bpf_perf_event_read_value(&events, key, (void *)&reading,
- sizeof(reading));
+ reading = bpf_map_lookup_elem(&fentry_readings, &flag);
+ if (!reading)
+ return 0;
+ err = bpf_perf_event_read_value(&events, key, (void *)reading,
+ sizeof(*reading));
if (err)
return 0;
- *(ptrs[i]) = reading;
key += num_cpu;
}
@@ -80,7 +73,7 @@ fexit_update_maps(u32 id, struct bpf_perf_event_value___local *after)
before = bpf_map_lookup_elem(&fentry_readings, &id);
/* only account samples with a valid fentry_reading */
- if (before && before->counter) {
+ if (before && before->enabled) {
struct bpf_perf_event_value___local *accum;
diff.counter = after->counter - before->counter;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0677/2151] bpftool: Group profile events by CPU
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (675 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0676/2151] bpftool: Accept zero perf counter snapshots Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0678/2151] bpftool: Scale counters and report cycles per run Greg Kroah-Hartman
` (205 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mykyta Yatsenko, Andrii Nakryiko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mykyta Yatsenko <yatsenko@meta.com>
[ Upstream commit 6b5fe4b6d5ae5fac328416b061e5416d68aec762 ]
Independently scheduled perf events can cover different intervals,
making derived ratios inconsistent.
Open one event group per CPU and enable it only after all selected
metrics have joined.
Fail the profile setup when a selected event cannot join its group.
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260916-bpftool_cyles_per_run-v4-2-f2de02c480d5@meta.com
Stable-dep-of: edc071d7b3aa ("bpftool: Fix sparse CPU IDs in prog profile")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/prog.c | 87 ++++++++++++++++++++++++----------------
1 file changed, 52 insertions(+), 35 deletions(-)
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 86ea90cd45408..f8a93c02d0e01 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -2350,7 +2350,7 @@ static char *profile_tgt_name;
static int *profile_perf_events;
static int profile_perf_event_cnt;
-static void profile_close_perf_events(struct profiler_bpf *obj)
+static void profile_close_perf_events(void)
{
int i;
@@ -2361,61 +2361,78 @@ static void profile_close_perf_events(struct profiler_bpf *obj)
profile_perf_event_cnt = 0;
}
-static int profile_open_perf_event(int mid, int cpu, int map_fd)
+static int profile_open_perf_event(int mid, int cpu,
+ int map_fd, int group_fd, __u32 map_key)
{
+ struct perf_event_attr attr = metrics[mid].attr;
+ bool group_leader = group_fd < 0;
int pmu_fd;
+ int err;
- pmu_fd = syscall(__NR_perf_event_open, &metrics[mid].attr,
- -1 /*pid*/, cpu, -1 /*group_fd*/, 0);
+ attr.disabled = group_leader;
+ pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, cpu,
+ group_fd, 0);
if (pmu_fd < 0) {
- if (errno == ENODEV) {
- p_info("cpu %d may be offline, skip %s profiling.",
- cpu, metrics[mid].name);
- profile_perf_event_cnt++;
- return 0;
- }
- return -1;
+ err = -errno;
+ if (errno == ENODEV && group_leader)
+ p_info("cpu %d may be offline, skip profiling.", cpu);
+ return err;
}
- if (bpf_map_update_elem(map_fd,
- &profile_perf_event_cnt,
- &pmu_fd, BPF_ANY) ||
- ioctl(pmu_fd, PERF_EVENT_IOC_ENABLE, 0)) {
+ if (bpf_map_update_elem(map_fd, &map_key, &pmu_fd, BPF_ANY)) {
+ err = -errno;
close(pmu_fd);
- return -1;
+ return err;
}
profile_perf_events[profile_perf_event_cnt++] = pmu_fd;
- return 0;
+ return pmu_fd;
}
static int profile_open_perf_events(struct profiler_bpf *obj)
{
+ __u32 num_cpu = obj->rodata->num_cpu;
+ __u32 map_key;
unsigned int cpu, m;
- int map_fd;
+ int group_fd, map_fd, pmu_fd;
+ int err;
- profile_perf_events = calloc(
- obj->rodata->num_cpu * obj->rodata->num_metric, sizeof(int));
+ profile_perf_events = calloc(num_cpu * obj->rodata->num_metric,
+ sizeof(*profile_perf_events));
if (!profile_perf_events) {
p_err("failed to allocate memory for perf_event array: %s",
strerror(errno));
- return -1;
+ return -ENOMEM;
}
+
map_fd = bpf_map__fd(obj->maps.events);
- if (map_fd < 0) {
- p_err("failed to get fd for events map");
- return -1;
- }
+ for (cpu = 0; cpu < num_cpu; cpu++) {
+ group_fd = -1;
+ map_key = cpu;
+ for (m = 0; m < ARRAY_SIZE(metrics); m++) {
+ if (!metrics[m].selected)
+ continue;
- for (m = 0; m < ARRAY_SIZE(metrics); m++) {
- if (!metrics[m].selected)
- continue;
- for (cpu = 0; cpu < obj->rodata->num_cpu; cpu++) {
- if (profile_open_perf_event(m, cpu, map_fd)) {
- p_err("failed to create event %s on cpu %u",
- metrics[m].name, cpu);
- return -1;
+ pmu_fd = profile_open_perf_event(m, cpu, map_fd, group_fd,
+ map_key);
+ if (pmu_fd == -ENODEV && group_fd < 0)
+ break;
+ if (pmu_fd < 0) {
+ p_err("failed to add event %s to group on CPU %u: %s",
+ metrics[m].name, cpu, strerror(-pmu_fd));
+ return pmu_fd;
}
+ if (group_fd < 0)
+ group_fd = pmu_fd;
+ map_key += num_cpu;
+ }
+ if (group_fd < 0)
+ continue;
+ if (ioctl(group_fd, PERF_EVENT_IOC_ENABLE, PERF_IOC_FLAG_GROUP)) {
+ err = -errno;
+ p_err("failed to enable perf event group on CPU %u: %s",
+ cpu, strerror(-err));
+ return err;
}
}
return 0;
@@ -2423,7 +2440,7 @@ static int profile_open_perf_events(struct profiler_bpf *obj)
static void profile_print_and_cleanup(void)
{
- profile_close_perf_events(profile_obj);
+ profile_close_perf_events();
profile_read_values(profile_obj);
profile_print_readings();
profiler_bpf__destroy(profile_obj);
@@ -2529,7 +2546,7 @@ static int do_profile(int argc, char **argv)
return 0;
out:
- profile_close_perf_events(profile_obj);
+ profile_close_perf_events();
if (profile_obj)
profiler_bpf__destroy(profile_obj);
close(profile_tgt_fd);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0678/2151] bpftool: Scale counters and report cycles per run
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (676 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0677/2151] bpftool: Group profile events by CPU Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0679/2151] bpftool: Fix sparse CPU IDs in prog profile Greg Kroah-Hartman
` (204 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mykyta Yatsenko, Andrii Nakryiko,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mykyta Yatsenko <yatsenko@meta.com>
[ Upstream commit c2c8bd265627364a8257c413e697fee8f2605197 ]
Perf counters undercount when the PMU multiplexes them. Scale each
per-CPU value before aggregation. Per-CPU event groups make PMU ratios
use matching scheduling intervals.
Keep run_cnt as the total number of program executions, independent of
counter scheduling.
Keep JSON value raw, report the scaled value in value_scaled, and
document the output.
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260916-bpftool_cyles_per_run-v4-3-f2de02c480d5@meta.com
Stable-dep-of: edc071d7b3aa ("bpftool: Fix sparse CPU IDs in prog profile")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../bpftool/Documentation/bpftool-prog.rst | 11 +-
tools/bpf/bpftool/prog.c | 122 ++++++++++++------
2 files changed, 89 insertions(+), 44 deletions(-)
diff --git a/tools/bpf/bpftool/Documentation/bpftool-prog.rst b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
index 35aeeaf5f7116..14f263caabc6f 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-prog.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-prog.rst
@@ -217,7 +217,14 @@ bpftool prog run *PROG* data_in *FILE* [data_out *FILE* [data_size_out *L*]] [ct
bpftool prog profile *PROG* [duration *DURATION*] *METRICs*
Profile *METRICs* for bpf program *PROG* for *DURATION* seconds or until
user hits <Ctrl+C>. *DURATION* is optional. If *DURATION* is not specified,
- the profiling will run up to **UINT_MAX** seconds.
+ the profiling will run up to **UINT_MAX** seconds. Selected metrics form a
+ perf event group on each CPU so that ratios use counters scheduled over the
+ same intervals. Plain output scales each per-CPU metric value to correct
+ for perf event multiplexing. When **cycles** is selected, it also reports
+ cycles per program run.
+
+ In JSON output, **value** is raw, **value_scaled** is scaled, and
+ **run_cnt** is the total number of program runs.
bpftool prog help
Print short help message.
@@ -360,7 +367,7 @@ EXAMPLES
::
51397 run_cnt
- 40176203 cycles (83.05%)
+ 40176203 cycles # 781.68 cycles per run (83.05%)
42518139 instructions # 1.06 insns per cycle (83.39%)
123 llc_misses # 2.89 LLC misses per million insns (83.15%)
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index f8a93c02d0e01..00c161f9ee61e 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -2062,37 +2062,52 @@ static int do_profile(int argc, char **argv)
#include "profiler.skel.h"
+enum ratio_metric {
+ METRIC_NONE = -2,
+ METRIC_RUN_CNT = -1,
+ METRIC_CYCLES = 0,
+ METRIC_INSTRUCTIONS = 1,
+ METRIC_L1D_LOADS = 2,
+ METRIC_LLC_MISSES = 3,
+ METRIC_ITLB_MISSES = 4,
+ METRIC_DTLB_MISSES = 5,
+};
+
struct profile_metric {
const char *name;
struct bpf_perf_event_value val;
+ __u64 scaled_val;
struct perf_event_attr attr;
bool selected;
/* calculate ratios like instructions per cycle */
- const int ratio_metric; /* 0 for N/A, 1 for index 0 (cycles) */
+ const enum ratio_metric ratio_metric;
const char *ratio_desc;
const float ratio_mul;
} metrics[] = {
- {
+ [METRIC_CYCLES] = {
.name = "cycles",
.attr = {
.type = PERF_TYPE_HARDWARE,
.config = PERF_COUNT_HW_CPU_CYCLES,
.exclude_user = 1,
},
+ .ratio_metric = METRIC_RUN_CNT,
+ .ratio_desc = "cycles per run",
+ .ratio_mul = 1.0,
},
- {
+ [METRIC_INSTRUCTIONS] = {
.name = "instructions",
.attr = {
.type = PERF_TYPE_HARDWARE,
.config = PERF_COUNT_HW_INSTRUCTIONS,
.exclude_user = 1,
},
- .ratio_metric = 1,
+ .ratio_metric = METRIC_CYCLES,
.ratio_desc = "insns per cycle",
.ratio_mul = 1.0,
},
- {
+ [METRIC_L1D_LOADS] = {
.name = "l1d_loads",
.attr = {
.type = PERF_TYPE_HW_CACHE,
@@ -2102,8 +2117,9 @@ struct profile_metric {
(PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16),
.exclude_user = 1,
},
+ .ratio_metric = METRIC_NONE,
},
- {
+ [METRIC_LLC_MISSES] = {
.name = "llc_misses",
.attr = {
.type = PERF_TYPE_HW_CACHE,
@@ -2113,11 +2129,11 @@ struct profile_metric {
(PERF_COUNT_HW_CACHE_RESULT_MISS << 16),
.exclude_user = 1
},
- .ratio_metric = 2,
+ .ratio_metric = METRIC_INSTRUCTIONS,
.ratio_desc = "LLC misses per million insns",
.ratio_mul = 1e6,
},
- {
+ [METRIC_ITLB_MISSES] = {
.name = "itlb_misses",
.attr = {
.type = PERF_TYPE_HW_CACHE,
@@ -2127,11 +2143,11 @@ struct profile_metric {
(PERF_COUNT_HW_CACHE_RESULT_MISS << 16),
.exclude_user = 1
},
- .ratio_metric = 2,
+ .ratio_metric = METRIC_INSTRUCTIONS,
.ratio_desc = "itlb misses per million insns",
.ratio_mul = 1e6,
},
- {
+ [METRIC_DTLB_MISSES] = {
.name = "dtlb_misses",
.attr = {
.type = PERF_TYPE_HW_CACHE,
@@ -2141,7 +2157,7 @@ struct profile_metric {
(PERF_COUNT_HW_CACHE_RESULT_MISS << 16),
.exclude_user = 1
},
- .ratio_metric = 2,
+ .ratio_metric = METRIC_INSTRUCTIONS,
.ratio_desc = "dtlb misses per million insns",
.ratio_mul = 1e6,
},
@@ -2182,7 +2198,7 @@ static int profile_parse_metrics(int argc, char **argv)
return selected_cnt;
}
-static void profile_read_values(struct profiler_bpf *obj)
+static int profile_read_values(struct profiler_bpf *obj)
{
__u32 m, cpu, num_cpu = obj->rodata->num_cpu;
int reading_map_fd, count_map_fd;
@@ -2192,15 +2208,11 @@ static void profile_read_values(struct profiler_bpf *obj)
reading_map_fd = bpf_map__fd(obj->maps.accum_readings);
count_map_fd = bpf_map__fd(obj->maps.counts);
- if (reading_map_fd < 0 || count_map_fd < 0) {
- p_err("failed to get fd for map");
- return;
- }
err = bpf_map_lookup_elem(count_map_fd, &key, counts);
if (err) {
p_err("failed to read count_map: %s", strerror(errno));
- return;
+ return err;
}
profile_total_count = 0;
@@ -2208,24 +2220,37 @@ static void profile_read_values(struct profiler_bpf *obj)
profile_total_count += counts[cpu];
for (m = 0; m < ARRAY_SIZE(metrics); m++) {
- struct bpf_perf_event_value values[num_cpu];
+ struct bpf_perf_event_value values[num_cpu], *val;
+ double scale;
if (!metrics[m].selected)
continue;
err = bpf_map_lookup_elem(reading_map_fd, &key, values);
if (err) {
- p_err("failed to read reading_map: %s",
- strerror(errno));
- return;
+ p_err("failed to read reading_map: %s", strerror(errno));
+ return err;
}
+
for (cpu = 0; cpu < num_cpu; cpu++) {
- metrics[m].val.counter += values[cpu].counter;
- metrics[m].val.enabled += values[cpu].enabled;
- metrics[m].val.running += values[cpu].running;
+ val = &values[cpu];
+ if (counts[cpu] && !val->running) {
+ p_err("perf event %s was not counted on CPU %u",
+ metrics[m].name, cpu);
+ return -EAGAIN;
+ }
+ metrics[m].val.enabled += val->enabled;
+ metrics[m].val.running += val->running;
+ metrics[m].val.counter += val->counter;
+ if (val->running) {
+ /* Scale values to account for perf event multiplexing. */
+ scale = (double)val->enabled / val->running;
+ metrics[m].scaled_val += val->counter * scale;
+ }
}
key++;
}
+ return 0;
}
static void profile_print_readings_json(void)
@@ -2242,6 +2267,7 @@ static void profile_print_readings_json(void)
jsonw_lluint_field(json_wtr, "value", metrics[m].val.counter);
jsonw_lluint_field(json_wtr, "enabled", metrics[m].val.enabled);
jsonw_lluint_field(json_wtr, "running", metrics[m].val.running);
+ jsonw_lluint_field(json_wtr, "value_scaled", metrics[m].scaled_val);
jsonw_end_object(json_wtr);
}
@@ -2250,24 +2276,34 @@ static void profile_print_readings_json(void)
static void profile_print_readings_plain(void)
{
- __u32 m;
+ __u32 i;
printf("\n%18llu %-20s\n", profile_total_count, "run_cnt");
- for (m = 0; m < ARRAY_SIZE(metrics); m++) {
- struct bpf_perf_event_value *val = &metrics[m].val;
+ for (i = 0; i < ARRAY_SIZE(metrics); i++) {
+ struct profile_metric *m = &metrics[i];
+ struct bpf_perf_event_value *val = &m->val;
int r;
+ __u64 ratio;
- if (!metrics[m].selected)
+ if (!m->selected)
continue;
- printf("%18llu %-20s", val->counter, metrics[m].name);
+ printf("%18llu %-20s", m->scaled_val, m->name);
- r = metrics[m].ratio_metric - 1;
- if (r >= 0 && metrics[r].selected &&
- metrics[r].val.counter > 0) {
+ r = m->ratio_metric;
+ switch (r) {
+ case METRIC_RUN_CNT:
+ ratio = profile_total_count;
+ break;
+ case METRIC_NONE:
+ ratio = 0;
+ break;
+ default:
+ ratio = metrics[r].scaled_val;
+ }
+ if (ratio) {
printf("# %8.2f %-30s",
- val->counter * metrics[m].ratio_mul /
- metrics[r].val.counter,
- metrics[m].ratio_desc);
+ m->scaled_val * m->ratio_mul / ratio,
+ m->ratio_desc);
} else {
printf("%-41s", "");
}
@@ -2438,21 +2474,24 @@ static int profile_open_perf_events(struct profiler_bpf *obj)
return 0;
}
-static void profile_print_and_cleanup(void)
+static int profile_print_and_cleanup(void)
{
+ int err;
+
profile_close_perf_events();
- profile_read_values(profile_obj);
- profile_print_readings();
+ err = profile_read_values(profile_obj);
+ if (!err)
+ profile_print_readings();
profiler_bpf__destroy(profile_obj);
close(profile_tgt_fd);
free(profile_tgt_name);
+ return err;
}
static void int_exit(int signo)
{
- profile_print_and_cleanup();
- exit(0);
+ exit(!!profile_print_and_cleanup());
}
static int do_profile(int argc, char **argv)
@@ -2542,8 +2581,7 @@ static int do_profile(int argc, char **argv)
signal(SIGINT, int_exit);
sleep(duration);
- profile_print_and_cleanup();
- return 0;
+ return profile_print_and_cleanup();
out:
profile_close_perf_events();
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0679/2151] bpftool: Fix sparse CPU IDs in prog profile
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (677 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0678/2151] bpftool: Scale counters and report cycles per run Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0680/2151] iommufd: Fix iommufd_hw_capabilities reference in kernel-doc Greg Kroah-Hartman
` (203 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hui Su, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hui Su <sh_def@163.com>
[ Upstream commit edc071d7b3aaae8047a12c21b02cc537557aacee ]
bpftool prog profile currently treats the number of possible CPUs as
both the logical CPU ID range and the stride of the perf event array.
That misses valid logical CPUs when the possible CPU mask is sparse,
such as 0,2-3, and can use incorrect PERF_EVENT_ARRAY keys.
Keep the compact possible CPU count for per-CPU result buffers, while
enumerating the actual logical CPU IDs when creating per-CPU perf event
groups. Use the maximum logical CPU ID plus one as the metric stride in
the PERF_EVENT_ARRAY.
This keeps the current per-CPU event grouping intact while separating
the compact per-CPU buffer index from the logical CPU ID and event-array
key. Report the logical CPU ID when a per-CPU event was not counted.
Fixes: 47c09d6a9f67 ("bpftool: Introduce "prog profile" command")
Signed-off-by: Hui Su <sh_def@163.com>
Link: https://lore.kernel.org/bpf/20260813160858.1042834-3-sh_def@163.com/
Link: https://lore.kernel.org/bpf/20260923004243.969919-3-sh_def@163.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/prog.c | 51 +++++++++++++++--------
tools/bpf/bpftool/skeleton/profiler.bpf.c | 8 ++--
2 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index 00c161f9ee61e..5b9c736731085 100644
--- a/tools/bpf/bpftool/prog.c
+++ b/tools/bpf/bpftool/prog.c
@@ -2164,6 +2164,9 @@ struct profile_metric {
};
static __u64 profile_total_count;
+static int profile_cpu_cnt;
+static int *profile_cpu_ids;
+static int profile_cpu_id_span;
#define MAX_NUM_PROFILE_METRICS 4
@@ -2200,7 +2203,7 @@ static int profile_parse_metrics(int argc, char **argv)
static int profile_read_values(struct profiler_bpf *obj)
{
- __u32 m, cpu, num_cpu = obj->rodata->num_cpu;
+ __u32 m, cpu, num_cpu = profile_cpu_cnt;
int reading_map_fd, count_map_fd;
__u64 counts[num_cpu];
__u32 key = 0;
@@ -2235,8 +2238,8 @@ static int profile_read_values(struct profiler_bpf *obj)
for (cpu = 0; cpu < num_cpu; cpu++) {
val = &values[cpu];
if (counts[cpu] && !val->running) {
- p_err("perf event %s was not counted on CPU %u",
- metrics[m].name, cpu);
+ p_err("perf event %s was not counted on CPU %d",
+ metrics[m].name, profile_cpu_ids[cpu]);
return -EAGAIN;
}
metrics[m].val.enabled += val->enabled;
@@ -2394,6 +2397,7 @@ static void profile_close_perf_events(void)
close(profile_perf_events[i]);
free(profile_perf_events);
+ profile_perf_events = NULL;
profile_perf_event_cnt = 0;
}
@@ -2427,13 +2431,12 @@ static int profile_open_perf_event(int mid, int cpu,
static int profile_open_perf_events(struct profiler_bpf *obj)
{
- __u32 num_cpu = obj->rodata->num_cpu;
__u32 map_key;
unsigned int cpu, m;
int group_fd, map_fd, pmu_fd;
int err;
- profile_perf_events = calloc(num_cpu * obj->rodata->num_metric,
+ profile_perf_events = calloc(profile_cpu_cnt * obj->rodata->num_metric,
sizeof(*profile_perf_events));
if (!profile_perf_events) {
p_err("failed to allocate memory for perf_event array: %s",
@@ -2442,32 +2445,34 @@ static int profile_open_perf_events(struct profiler_bpf *obj)
}
map_fd = bpf_map__fd(obj->maps.events);
- for (cpu = 0; cpu < num_cpu; cpu++) {
+ for (cpu = 0; cpu < (unsigned int)profile_cpu_cnt; cpu++) {
+ int cpu_id = profile_cpu_ids[cpu];
+
group_fd = -1;
- map_key = cpu;
+ map_key = cpu_id;
for (m = 0; m < ARRAY_SIZE(metrics); m++) {
if (!metrics[m].selected)
continue;
- pmu_fd = profile_open_perf_event(m, cpu, map_fd, group_fd,
+ pmu_fd = profile_open_perf_event(m, cpu_id, map_fd, group_fd,
map_key);
if (pmu_fd == -ENODEV && group_fd < 0)
break;
if (pmu_fd < 0) {
- p_err("failed to add event %s to group on CPU %u: %s",
- metrics[m].name, cpu, strerror(-pmu_fd));
+ p_err("failed to add event %s to group on CPU %d: %s",
+ metrics[m].name, cpu_id, strerror(-pmu_fd));
return pmu_fd;
}
if (group_fd < 0)
group_fd = pmu_fd;
- map_key += num_cpu;
+ map_key += profile_cpu_id_span;
}
if (group_fd < 0)
continue;
if (ioctl(group_fd, PERF_EVENT_IOC_ENABLE, PERF_IOC_FLAG_GROUP)) {
err = -errno;
- p_err("failed to enable perf event group on CPU %u: %s",
- cpu, strerror(-err));
+ p_err("failed to enable perf event group on CPU %d: %s",
+ cpu_id, strerror(-err));
return err;
}
}
@@ -2486,6 +2491,10 @@ static int profile_print_and_cleanup(void)
close(profile_tgt_fd);
free(profile_tgt_name);
+ free(profile_cpu_ids);
+ profile_cpu_ids = NULL;
+ profile_cpu_cnt = 0;
+ profile_cpu_id_span = 0;
return err;
}
@@ -2496,7 +2505,7 @@ static void int_exit(int signo)
static int do_profile(int argc, char **argv)
{
- int num_metric, num_cpu, err = -1;
+ int num_metric, err = -1;
struct bpf_program *prog;
unsigned long duration;
char *endptr;
@@ -2527,11 +2536,12 @@ static int do_profile(int argc, char **argv)
if (num_metric <= 0)
goto out;
- num_cpu = libbpf_num_possible_cpus();
- if (num_cpu <= 0) {
+ profile_cpu_cnt = get_possible_cpu_ids(&profile_cpu_ids);
+ if (profile_cpu_cnt <= 0) {
p_err("failed to identify number of CPUs");
goto out;
}
+ profile_cpu_id_span = profile_cpu_ids[profile_cpu_cnt - 1] + 1;
profile_obj = profiler_bpf__open();
if (!profile_obj) {
@@ -2539,11 +2549,12 @@ static int do_profile(int argc, char **argv)
goto out;
}
- profile_obj->rodata->num_cpu = num_cpu;
profile_obj->rodata->num_metric = num_metric;
+ profile_obj->rodata->cpu_id_span = profile_cpu_id_span;
/* adjust map sizes */
- bpf_map__set_max_entries(profile_obj->maps.events, num_metric * num_cpu);
+ bpf_map__set_max_entries(profile_obj->maps.events,
+ num_metric * profile_cpu_id_span);
bpf_map__set_max_entries(profile_obj->maps.fentry_readings, num_metric);
bpf_map__set_max_entries(profile_obj->maps.accum_readings, num_metric);
bpf_map__set_max_entries(profile_obj->maps.counts, 1);
@@ -2589,6 +2600,10 @@ static int do_profile(int argc, char **argv)
profiler_bpf__destroy(profile_obj);
close(profile_tgt_fd);
free(profile_tgt_name);
+ free(profile_cpu_ids);
+ profile_cpu_ids = NULL;
+ profile_cpu_cnt = 0;
+ profile_cpu_id_span = 0;
return err;
}
diff --git a/tools/bpf/bpftool/skeleton/profiler.bpf.c b/tools/bpf/bpftool/skeleton/profiler.bpf.c
index 6685e7252fb52..0d47a9bdc5b43 100644
--- a/tools/bpf/bpftool/skeleton/profiler.bpf.c
+++ b/tools/bpf/bpftool/skeleton/profiler.bpf.c
@@ -10,7 +10,7 @@ struct bpf_perf_event_value___local {
__u64 running;
} __attribute__((preserve_access_index));
-/* map of perf event fds, num_cpu * num_metric entries */
+/* map of perf event fds, cpu_id_span * num_metric entries */
struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
@@ -38,8 +38,8 @@ struct {
__uint(value_size, sizeof(u64));
} counts SEC(".maps");
-const volatile __u32 num_cpu = 1;
const volatile __u32 num_metric = 1;
+const volatile __u32 cpu_id_span = 1;
#define MAX_NUM_METRICS 4
SEC("fentry/XXX")
@@ -60,7 +60,7 @@ int BPF_PROG(fentry_XXX)
sizeof(*reading));
if (err)
return 0;
- key += num_cpu;
+ key += cpu_id_span;
}
return 0;
@@ -100,7 +100,7 @@ int BPF_PROG(fexit_XXX)
/* read all events before updating the maps, to reduce error */
for (i = 0; i < num_metric && i < MAX_NUM_METRICS; i++) {
- err = bpf_perf_event_read_value(&events, cpu + i * num_cpu,
+ err = bpf_perf_event_read_value(&events, cpu + i * cpu_id_span,
(void *)(readings + i),
sizeof(*readings));
if (err)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0680/2151] iommufd: Fix iommufd_hw_capabilities reference in kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (678 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0679/2151] bpftool: Fix sparse CPU IDs in prog profile Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0681/2151] ext2: drain in-flight DIO before buffered write fallback Greg Kroah-Hartman
` (202 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Kevin Tian,
Jason Gunthorpe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 54dadb030c7e2350957855d3995de05ae02c2e66 ]
The kernel-doc comment of struct iommu_hw_info refers to
iommu_hw_capabilities, which does not exist. The name is
iommufd_hw_capabilities. Say iommufd_hw_capabilities.
Fixes: 7623683857e5 ("iommufd: Add capabilities to IOMMU_GET_HW_INFO")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260911231850.20737-1-kmehltretter@gmail.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/uapi/linux/iommufd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 65e564965e98a..f958562bb0a13 100644
--- a/include/uapi/linux/iommufd.h
+++ b/include/uapi/linux/iommufd.h
@@ -680,7 +680,7 @@ enum iommufd_hw_info_flags {
* @out_data_type: Output the iommu hardware info type as defined in the enum
* iommu_hw_info_type.
* @out_capabilities: Output the generic iommu capability info type as defined
- * in the enum iommu_hw_capabilities.
+ * in the enum iommufd_hw_capabilities.
* @out_max_pasid_log2: Output the width of PASIDs. 0 means no PASID support.
* PCI devices turn to out_capabilities to check if the
* specific capabilities is supported or not.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0681/2151] ext2: drain in-flight DIO before buffered write fallback
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (679 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0680/2151] iommufd: Fix iommufd_hw_capabilities reference in kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0682/2151] mfd: rk8xx: Register poweroff handler in atomic phase Greg Kroah-Hartman
` (201 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiale Yao, Jan Kara, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiale Yao <yaojiale02@163.com>
[ Upstream commit 1e2ef9f221e142ed19d874a71b2cae7fabbaf138 ]
An asynchronous direct write can remain in flight after the inode lock is
released. If another direct write falls back to buffered I/O while the
first write is still pending, generic_perform_write() can dirty pages
before the first write completes its post-I/O page cache invalidation.
The invalidation then finds dirty pages, reports a page cache invalidation
failure, and records -EIO in the mapping error sequence. A later fsync()
therefore returns -EIO.
Commit 15cdefd0c0522f9d5e12d947fa04f4c11649b699 ("ext4: drain
in-flight DIO before buffered write fallback") fixed the same race in
ext4. Ext2 has an equivalent fallback after iomap_dio_rw() returns
-ENOTBLK or a short write, but does not drain other in-flight DIO before
dirtying the page cache.
Wait for in-flight DIO before calling generic_perform_write() in the
fallback path.
A reproducer using concurrent AIO direct writes and buffered fallback
triggered the following warning and made a subsequent fsync() return
-EIO:
Page cache invalidation failure on direct I/O. Possible data corruption
due to collision with buffered I/O!
Fixes: fb5de4358e1a ("ext2: Move direct-io to use iomap")
Link: https://lore.kernel.org/r/20260629113827.4074335-3-libaokun@linux.alibaba.com
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Link: https://patch.msgid.link/20260924105125.577714-2-yaojiale02@163.com
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext2/file.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index 81f9cf3b884ce..dc261dc913b99 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -253,6 +253,13 @@ static ssize_t ext2_dio_write_iter(struct kiocb *iocb, struct iov_iter *from)
int ret2;
iocb->ki_flags &= ~IOCB_DIRECT;
+
+ /*
+ * Prevent concurrent direct I/O and buffered I/O to the same file
+ * range. Wait for in-flight DIO to finish before dirtying pages.
+ */
+ inode_dio_wait(inode);
+
pos = iocb->ki_pos;
status = generic_perform_write(iocb, from);
if (unlikely(status < 0)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0682/2151] mfd: rk8xx: Register poweroff handler in atomic phase
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (680 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0681/2151] ext2: drain in-flight DIO before buffered write fallback Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0683/2151] mfd: intel_quark_i2c_gpio: Manage the fixed-rate clock Greg Kroah-Hartman
` (200 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Eric Anderson, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Anderson <ejona86@gmail.com>
[ Upstream commit 128115b520c6b61afbffd01809cfc3e8cbb78516 ]
This fixes a regression from v6.1 to v6.6 where Google Veyron devices
(rk3288) would not power off after being shut down.
Prior to commit 4fec8a5a85c4 ("mfd: rk808: Convert to device managed
resources"), pm_power_off was called by legacy_pm_power_off() which
itself was registered using SYS_OFF_MODE_POWER_OFF. But in that commit
the registration of rk808_power_off() moved to
SYS_OFF_MODE_POWER_OFF_PREPARE. At the very least, the code should be
consistent between SYS_OFF_MODE_POWER_OFF and SYS_OFF_MODE_RESTART; both
should be *_PREPARE or both not.
It appears interrupt delivery is already shut down (but not disabled)
when SYS_OFF_MODE_POWER_OFF_PREPARE is triggered, so
regmap_update_bits() in rk808_power_off() does not complete
successfully. Registering rk808_power_off() as SYS_OFF_MODE_POWER_OFF
runs with interrupts disabled which causes polling I/O to be used
instead, and the device to power down.
Fixes: 4fec8a5a85c4 ("mfd: rk808: Convert to device managed resources")
Signed-off-by: Eric Anderson <ejona86@gmail.com>
Assisted-by: Gemini:gemini-3.5-flash
Link: https://patch.msgid.link/20260908-veyron-shutdown-v1-1-066ecb80f5f2@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/mfd/rk8xx-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
index def4587fdfb8b..9b5fb033edbaa 100644
--- a/drivers/mfd/rk8xx-core.c
+++ b/drivers/mfd/rk8xx-core.c
@@ -800,7 +800,7 @@ int rk8xx_probe(struct device *dev, int variant, unsigned int irq, struct regmap
if (device_property_read_bool(dev, "system-power-controller") ||
device_property_read_bool(dev, "rockchip,system-power-controller")) {
ret = devm_register_sys_off_handler(dev,
- SYS_OFF_MODE_POWER_OFF_PREPARE, SYS_OFF_PRIO_HIGH,
+ SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_HIGH,
&rk808_power_off, rk808);
if (ret)
return dev_err_probe(dev, ret,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0683/2151] mfd: intel_quark_i2c_gpio: Manage the fixed-rate clock
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (681 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0682/2151] mfd: rk8xx: Register poweroff handler in atomic phase Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0684/2151] mfd: da9150: Balance IRQ wake on teardown Greg Kroah-Hartman
` (199 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit 14a7cf1a3730c7c2393ef5a226e90baf61aa8a9f ]
The I2C clock is allocated by clk_register_fixed_rate(), but cleanup uses
clk_unregister(), leaving the fixed-rate provider allocation behind.
Manage the provider with devm_clk_hw_register_fixed_rate() and its lookup
with devm_clk_hw_register_clkdev(). Managed resources release the lookup
before the provider, after the MFD children have been removed.
Remove the manual clock cleanup and the private structure that only
stored the clock and lookup pointers.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: 60ae5b9f5cdd ("mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260912191223.46136-1-mhun512@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/mfd/intel_quark_i2c_gpio.c | 52 ++++--------------------------
1 file changed, 6 insertions(+), 46 deletions(-)
diff --git a/drivers/mfd/intel_quark_i2c_gpio.c b/drivers/mfd/intel_quark_i2c_gpio.c
index 9b9c76bd067b8..443a1a0cf7778 100644
--- a/drivers/mfd/intel_quark_i2c_gpio.c
+++ b/drivers/mfd/intel_quark_i2c_gpio.c
@@ -35,11 +35,6 @@
/* The Quark I2C controller source clock */
#define INTEL_QUARK_I2C_CLK_HZ 33000000
-struct intel_quark_mfd {
- struct clk *i2c_clk;
- struct clk_lookup *i2c_clk_lookup;
-};
-
static const struct property_entry intel_quark_i2c_controller_standard_properties[] = {
PROPERTY_ENTRY_U32("clock-frequency", I2C_MAX_STANDARD_MODE_FREQ),
{ }
@@ -160,37 +155,12 @@ MODULE_DEVICE_TABLE(pci, intel_quark_mfd_ids);
static int intel_quark_register_i2c_clk(struct device *dev)
{
- struct intel_quark_mfd *quark_mfd = dev_get_drvdata(dev);
- struct clk *i2c_clk;
-
- i2c_clk = clk_register_fixed_rate(dev,
- INTEL_QUARK_I2C_CONTROLLER_CLK, NULL,
- 0, INTEL_QUARK_I2C_CLK_HZ);
- if (IS_ERR(i2c_clk))
- return PTR_ERR(i2c_clk);
-
- quark_mfd->i2c_clk = i2c_clk;
- quark_mfd->i2c_clk_lookup = clkdev_create(i2c_clk, NULL,
- INTEL_QUARK_I2C_CONTROLLER_CLK);
-
- if (!quark_mfd->i2c_clk_lookup) {
- clk_unregister(quark_mfd->i2c_clk);
- dev_err(dev, "Fixed clk register failed\n");
- return -ENOMEM;
- }
-
- return 0;
-}
-
-static void intel_quark_unregister_i2c_clk(struct device *dev)
-{
- struct intel_quark_mfd *quark_mfd = dev_get_drvdata(dev);
-
- if (!quark_mfd->i2c_clk_lookup)
- return;
+ struct clk_hw *hw;
- clkdev_drop(quark_mfd->i2c_clk_lookup);
- clk_unregister(quark_mfd->i2c_clk);
+ hw = devm_clk_hw_register_fixed_rate(dev, INTEL_QUARK_I2C_CONTROLLER_CLK,
+ NULL, 0, INTEL_QUARK_I2C_CLK_HZ);
+ return devm_clk_hw_register_clkdev(dev, hw, NULL,
+ INTEL_QUARK_I2C_CONTROLLER_CLK);
}
static int intel_quark_i2c_setup(struct pci_dev *pdev)
@@ -238,19 +208,12 @@ static int intel_quark_gpio_setup(struct pci_dev *pdev)
static int intel_quark_mfd_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
- struct intel_quark_mfd *quark_mfd;
int ret;
ret = pcim_enable_device(pdev);
if (ret)
return ret;
- quark_mfd = devm_kzalloc(&pdev->dev, sizeof(*quark_mfd), GFP_KERNEL);
- if (!quark_mfd)
- return -ENOMEM;
-
- dev_set_drvdata(&pdev->dev, quark_mfd);
-
ret = intel_quark_register_i2c_clk(&pdev->dev);
if (ret)
return ret;
@@ -260,7 +223,7 @@ static int intel_quark_mfd_probe(struct pci_dev *pdev,
/* This driver only requires 1 IRQ vector */
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
if (ret < 0)
- goto err_unregister_i2c_clk;
+ return ret;
ret = intel_quark_i2c_setup(pdev);
if (ret)
@@ -282,8 +245,6 @@ static int intel_quark_mfd_probe(struct pci_dev *pdev,
software_node_unregister_node_group(intel_quark_gpio_node_group);
err_free_irq_vectors:
pci_free_irq_vectors(pdev);
-err_unregister_i2c_clk:
- intel_quark_unregister_i2c_clk(&pdev->dev);
return ret;
}
@@ -292,7 +253,6 @@ static void intel_quark_mfd_remove(struct pci_dev *pdev)
mfd_remove_devices(&pdev->dev);
software_node_unregister_node_group(intel_quark_gpio_node_group);
pci_free_irq_vectors(pdev);
- intel_quark_unregister_i2c_clk(&pdev->dev);
}
static struct pci_driver intel_quark_mfd_driver = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0684/2151] mfd: da9150: Balance IRQ wake on teardown
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (682 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0683/2151] mfd: intel_quark_i2c_gpio: Manage the fixed-rate clock Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0685/2151] um: Add definition of __NR_close_range for older host OSs Greg Kroah-Hartman
` (198 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak, Lee Jones,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit ef464f82f3aecad4071af71074b2ceb77ffbb609 ]
DA9150 enables IRQ wake after registering its regmap IRQ chip, but does not
disable it on a later probe failure or driver removal. This leaves the wake
depth elevated after the handler is removed, and repeated bind attempts can
accumulate the imbalance.
Remember whether enabling IRQ wake succeeded and balance only a successful
call. Remove MFD children first so their nested IRQ users are gone, then
disable wake before removing the regmap IRQ chip. Preserve the existing
non-fatal behavior when IRQ wake cannot be enabled.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Fixes: b8fce55c09d3 ("mfd: Add support for DA9150 combined charger & fuel-gauge device")
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260923021936.957065-1-mhun512@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/mfd/da9150-core.c | 8 ++++++--
include/linux/mfd/da9150/core.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/da9150-core.c b/drivers/mfd/da9150-core.c
index 5c59cc869fb3e..19325d72a27e7 100644
--- a/drivers/mfd/da9150-core.c
+++ b/drivers/mfd/da9150-core.c
@@ -450,7 +450,7 @@ static int da9150_probe(struct i2c_client *client)
da9150->irq_base = regmap_irq_chip_get_base(da9150->regmap_irq_data);
- enable_irq_wake(da9150->irq);
+ da9150->irq_wake_enabled = !enable_irq_wake(da9150->irq);
ret = mfd_add_devices(da9150->dev, -1, da9150_devs,
ARRAY_SIZE(da9150_devs), NULL,
@@ -463,6 +463,8 @@ static int da9150_probe(struct i2c_client *client)
return 0;
mfd_fail:
+ if (da9150->irq_wake_enabled)
+ disable_irq_wake(da9150->irq);
regmap_del_irq_chip(da9150->irq, da9150->regmap_irq_data);
regmap_irq_fail:
i2c_unregister_device(da9150->core_qif);
@@ -474,8 +476,10 @@ static void da9150_remove(struct i2c_client *client)
{
struct da9150 *da9150 = i2c_get_clientdata(client);
- regmap_del_irq_chip(da9150->irq, da9150->regmap_irq_data);
mfd_remove_devices(da9150->dev);
+ if (da9150->irq_wake_enabled)
+ disable_irq_wake(da9150->irq);
+ regmap_del_irq_chip(da9150->irq, da9150->regmap_irq_data);
i2c_unregister_device(da9150->core_qif);
}
diff --git a/include/linux/mfd/da9150/core.h b/include/linux/mfd/da9150/core.h
index d116d5f3ef561..369698036d1aa 100644
--- a/include/linux/mfd/da9150/core.h
+++ b/include/linux/mfd/da9150/core.h
@@ -65,6 +65,7 @@ struct da9150 {
struct regmap_irq_chip_data *regmap_irq_data;
int irq;
int irq_base;
+ bool irq_wake_enabled;
};
/* Device I/O - Query Interface for FG and standard register access */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0685/2151] um: Add definition of __NR_close_range for older host OSs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (683 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0684/2151] mfd: da9150: Balance IRQ wake on teardown Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0686/2151] rust: dma: allow drivers to tune max segment size Greg Kroah-Hartman
` (197 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Florian Fainelli, Johannes Berg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Fainelli <florian.fainelli@broadcom.com>
[ Upstream commit 03dcf7bd302c9bae0c75a21a3004a44b4940317e ]
__NR_close_range was introduced with
278a5fbaed89dacd04e9d052f4594ffd0e0585de ("open: add close_range()")
which is present in Linux >= 5.9. Older hosts running a kernel version
prior to that range currently fail to build due to that missing system
call number definition.
Fixes: f82a9e7b9fa9 ("um: fix execve stub execution on old host OSs")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260812173249.98435-1-florian.fainelli@broadcom.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/um/include/shared/skas/stub-data.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/um/include/shared/skas/stub-data.h b/arch/um/include/shared/skas/stub-data.h
index 27db38e95df91..1230a325debcd 100644
--- a/arch/um/include/shared/skas/stub-data.h
+++ b/arch/um/include/shared/skas/stub-data.h
@@ -9,11 +9,20 @@
#define __STUB_DATA_H
#include <linux/compiler_types.h>
+#include <asm/unistd.h>
#include <as-layout.h>
#include <sysdep/tls.h>
#include <sysdep/stub-data.h>
#include <mm_id.h>
+#ifndef __NR_close_range
+# if defined(__alpha__)
+# define __NR_close_range 546
+# else
+# define __NR_close_range 436
+# endif
+#endif
+
#define FUTEX_IN_CHILD 0
#define FUTEX_IN_KERN 1
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0686/2151] rust: dma: allow drivers to tune max segment size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (684 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0685/2151] um: Add definition of __NR_close_range for older host OSs Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0687/2151] rust: scatterlist: honor the devices maximum " Greg Kroah-Hartman
` (196 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Beata Michalska, Robin Murphy,
Alice Ryhl, Danilo Krummrich, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Beata Michalska <beata.michalska@arm.com>
[ Upstream commit c71257394bc9c59ea727803f6e55e83fe63db74e ]
Make dma_set_max_seg_size() available to Rust so drivers can perform
standard DMA setup steps.
Signed-off-by: Beata Michalska <beata.michalska@arm.com>
Acked-by: Robin Murphy <robvin.murphy@arm.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260128135320.689046-1-beata.michalska@arm.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Stable-dep-of: c15c5befd6d6 ("rust: scatterlist: honor the device's maximum segment size")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
rust/helpers/dma.c | 6 ++++++
rust/kernel/dma.rs | 17 +++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/rust/helpers/dma.c b/rust/helpers/dma.c
index 2afa32c21c946..20413428a4960 100644
--- a/rust/helpers/dma.c
+++ b/rust/helpers/dma.c
@@ -40,3 +40,9 @@ size_t rust_helper_dma_max_mapping_size(struct device *dev)
{
return dma_max_mapping_size(dev);
}
+
+__rust_helper void rust_helper_dma_set_max_seg_size(struct device *dev,
+ unsigned int size)
+{
+ dma_set_max_seg_size(dev, size);
+}
diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs
index b6c73db358ced..6a9497bc69a7d 100644
--- a/rust/kernel/dma.rs
+++ b/rust/kernel/dma.rs
@@ -84,6 +84,23 @@ unsafe fn dma_set_mask_and_coherent(&self, mask: DmaMask) -> Result {
bindings::dma_set_mask_and_coherent(self.as_ref().as_raw(), mask.value())
})
}
+
+ /// Set the maximum size of a single DMA segment the device may request.
+ ///
+ /// This method is usually called once from `probe()` as soon as the device capabilities are
+ /// known.
+ ///
+ /// # Safety
+ ///
+ /// This method must not be called concurrently with any DMA allocation or mapping primitives,
+ /// such as [`CoherentAllocation::alloc_attrs`].
+ unsafe fn dma_set_max_seg_size(&self, size: u32) {
+ // SAFETY:
+ // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid.
+ // - The safety requirement of this function guarantees that there are no concurrent calls
+ // to DMA allocation and mapping primitives using this parameter.
+ unsafe { bindings::dma_set_max_seg_size(self.as_ref().as_raw(), size) }
+ }
}
/// A DMA mask that holds a bitmask with the lowest `n` bits set.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0687/2151] rust: scatterlist: honor the devices maximum segment size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (685 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0686/2151] rust: dma: allow drivers to tune max segment size Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0688/2151] kconfig: warn about malformed KCONFIG_PROBABILITY values Greg Kroah-Hartman
` (195 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matteo Kloiber, Alexandre Courbot,
Danilo Krummrich, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matteo Kloiber <kernel@matt3o12.de>
[ Upstream commit c15c5befd6d6150e92ab7c6c7fde1088e0f543e6 ]
SGTable::new() caps segment length at dma_max_mapping_size() only, which
limits the DMA mapping path (e.g. swiotlb), not the device itself. The
per-device limit from dma_set_max_seg_size() is ignored, so contiguous
page segments can be longer than the declared max segment size,
potentially causing problems for future drivers that use this
abstraction.
Fixes: 05aa6fb1c21d ("rust: scatterlist: Add abstraction for sg_table")
Signed-off-by: Matteo Kloiber <kernel@matt3o12.de>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260913210828.125655-3-kernel@matt3o12.de
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
rust/helpers/dma.c | 5 +++++
rust/kernel/scatterlist.rs | 12 ++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/rust/helpers/dma.c b/rust/helpers/dma.c
index 20413428a4960..7b73f69a1a093 100644
--- a/rust/helpers/dma.c
+++ b/rust/helpers/dma.c
@@ -46,3 +46,8 @@ __rust_helper void rust_helper_dma_set_max_seg_size(struct device *dev,
{
dma_set_max_seg_size(dev, size);
}
+
+__rust_helper unsigned int rust_helper_dma_get_max_seg_size(struct device *dev)
+{
+ return dma_get_max_seg_size(dev);
+}
diff --git a/rust/kernel/scatterlist.rs b/rust/kernel/scatterlist.rs
index 9709dff60b5a9..2ae0a438ca3a3 100644
--- a/rust/kernel/scatterlist.rs
+++ b/rust/kernel/scatterlist.rs
@@ -349,15 +349,23 @@ fn new(
page_vec.push(page.as_ptr(), flags)?;
}
+ // Cap segments at both the DMA mapping-path limit and the device's declared
+ // max segment size.
+ //
// `dma_max_mapping_size` returns `size_t`, but `sg_alloc_table_from_pages_segment()` takes
// an `unsigned int`.
//
// SAFETY: `dev.as_raw()` is a valid pointer to a `struct device`.
- let max_segment = match unsafe { bindings::dma_max_mapping_size(dev.as_raw()) } {
+ let max_mapping_size = match unsafe { bindings::dma_max_mapping_size(dev.as_raw()) } {
0 => u32::MAX,
- max_segment => u32::try_from(max_segment).unwrap_or(u32::MAX),
+ max_mapping_size => u32::try_from(max_mapping_size).unwrap_or(u32::MAX),
};
+ // SAFETY: `dev.as_raw()` is a valid pointer to a `struct device`.
+ let max_seg_size = unsafe { bindings::dma_get_max_seg_size(dev.as_raw()) };
+
+ let max_segment = max_mapping_size.min(max_seg_size);
+
Ok(try_pin_init!(&this in Self {
// SAFETY:
// - `page_vec` is a `KVec` of valid `struct page *` obtained from `pages`.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0688/2151] kconfig: warn about malformed KCONFIG_PROBABILITY values
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (686 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0687/2151] rust: scatterlist: honor the devices maximum " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0689/2151] ASoC: fsl_asrc: use regmap_write_bits to update clock source registers Greg Kroah-Hartman
` (194 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitrii Tulnov, Julian Braha,
Nathan Chancellor, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitrii Tulnov <tulnov.dl@gmail.com>
[ Upstream commit 9f01cd3a324390b235c67ae4ca3d35085369ebdd ]
randconfig checks the numeric range of each probability but does not
validate where strtol() stops. For example, KCONFIG_PROBABILITY=50% is
accepted as 50:0:0: the '%' is parsed repeatedly as zero. For the
documented value 50, tristate y/m/n probabilities are 25%/25%/50%.
With 50%, both y/m probabilities silently become zero, reducing the
coverage of random configuration builds. Empty fields and extra fields
are also accepted.
Warn when the value does not follow the documented decimal format. For
malformed inputs whose parsed probabilities are in range, preserve the
existing interpretation unless KCONFIG_WERROR is set. In that case, exit
with an error before writing the configuration. Leading whitespace and
signs are accepted by strtol(), but also trigger the warning because they
are outside the documented format.
Keep the strtol() result as long until the range check. This rejects
out-of-range values that narrowing to int previously made valid, such as
4294967296 becoming zero on a 64-bit host, regardless of KCONFIG_WERROR.
Add regression tests for one warning per malformed input, preserved
configurations, KCONFIG_WERROR, out-of-range values, the supported
probability formats, and the documented empty-value default.
Fixes: e43956e60769 ("kconfig: implement KCONFIG_PROBABILITY for randconfig")
Assisted-by: LLM
Signed-off-by: Dmitrii Tulnov <tulnov.dl@gmail.com>
Tested-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Julian Braha <julianbraha@gmail.com>
Link: https://patch.msgid.link/20260918213430.3-1-tulnov.dl@gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
scripts/kconfig/conf.c | 16 ++-
scripts/kconfig/tests/conftest.py | 6 +
.../tests/randconfig_probability/Kconfig | 12 ++
.../tests/randconfig_probability/__init__.py | 130 ++++++++++++++++++
4 files changed, 163 insertions(+), 1 deletion(-)
create mode 100644 scripts/kconfig/tests/randconfig_probability/Kconfig
create mode 100644 scripts/kconfig/tests/randconfig_probability/__init__.py
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index fe8ba09b00391..ca6d9d735922f 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -186,12 +186,23 @@ static void conf_set_all_new_symbols(enum conf_def_mode mode)
if (mode == def_random) {
int n, p[3];
+ bool warned = false;
char *env = getenv("KCONFIG_PROBABILITY");
n = 0;
while (env && *env) {
char *endp;
- int tmp = strtol(env, &endp, 10);
+ long tmp = strtol(env, &endp, 10);
+
+ if (!isdigit((unsigned char)*env) ||
+ (*endp && *endp != ':') ||
+ (*endp == ':' && (!endp[1] || n == 2))) {
+ if (!warned) {
+ fprintf(stderr,
+ "warning: KCONFIG_PROBABILITY has malformed format\n");
+ warned = true;
+ }
+ }
if (tmp >= 0 && tmp <= 100) {
p[n++] = tmp;
@@ -227,6 +238,9 @@ static void conf_set_all_new_symbols(enum conf_def_mode mode)
perror("KCONFIG_PROBABILITY");
exit(1);
}
+
+ if (warned && getenv("KCONFIG_WERROR"))
+ exit(1);
}
menu_for_each_entry(menu) {
diff --git a/scripts/kconfig/tests/conftest.py b/scripts/kconfig/tests/conftest.py
index d94b79e012c04..0d8a8b0efdd67 100644
--- a/scripts/kconfig/tests/conftest.py
+++ b/scripts/kconfig/tests/conftest.py
@@ -308,6 +308,12 @@ class Conf:
return self._matches('stderr', expected)
+@pytest.fixture(autouse=True)
+def clear_werror(monkeypatch):
+ # extra_env can set strict mode, but cannot remove an inherited flag.
+ monkeypatch.delenv('KCONFIG_WERROR', raising=False)
+
+
@pytest.fixture(scope="module")
def conf(request):
"""Create a Conf instance and provide it to test functions."""
diff --git a/scripts/kconfig/tests/randconfig_probability/Kconfig b/scripts/kconfig/tests/randconfig_probability/Kconfig
new file mode 100644
index 0000000000000..84f4e5fcc51e4
--- /dev/null
+++ b/scripts/kconfig/tests/randconfig_probability/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config MODULES
+ bool
+ default y
+ modules
+
+config BOOL
+ bool "Bool"
+
+config TRI
+ tristate "Tristate"
diff --git a/scripts/kconfig/tests/randconfig_probability/__init__.py b/scripts/kconfig/tests/randconfig_probability/__init__.py
new file mode 100644
index 0000000000000..e6e5dda10ad92
--- /dev/null
+++ b/scripts/kconfig/tests/randconfig_probability/__init__.py
@@ -0,0 +1,130 @@
+# SPDX-License-Identifier: GPL-2.0-only
+"""Validate KCONFIG_PROBABILITY without changing the supported distributions."""
+
+
+def test_malformed_warns(conf):
+ probabilities = [
+ 'invalid', ' ', '50%', '50 ', '0x32', '10 20', '10:20x',
+ '10:20:invalid', '10:20:30x',
+ ':50', '50:', '10::20', '10:20:', '10:20:30:', '10:20:30:40',
+ '-0', '+0', '+', '-', '+100:0', ' \t100:0', '0: \t100:0',
+ ]
+ for probability in probabilities:
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': probability,
+ 'KCONFIG_SEED': '0',
+ }) == 0, repr(probability)
+ assert ('warning: KCONFIG_PROBABILITY has malformed format' in
+ conf.stderr), repr(probability)
+ assert conf.stderr.count('warning:') == 1, repr(probability)
+ assert conf.config is not None, repr(probability)
+
+
+def test_malformed_preserves_config(conf):
+ probabilities = [('50%', '50:0:0'), ('-0', '0')]
+ for seed in range(20):
+ for probability, equivalent in probabilities:
+ context = 'probability={!r}, equivalent={!r}, seed={}'.format(
+ probability, equivalent, seed)
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': probability,
+ 'KCONFIG_SEED': hex(seed),
+ }) == 0, context
+ assert ('warning: KCONFIG_PROBABILITY has malformed format' in
+ conf.stderr), context
+ assert conf.stderr.count('warning:') == 1, context
+ malformed = conf.config
+
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': equivalent,
+ 'KCONFIG_SEED': hex(seed),
+ }) == 0, context
+ assert 'warning:' not in conf.stderr, context
+ assert conf.config == malformed, context
+
+
+def test_werror(conf):
+ probabilities = [
+ ('', 0), ('50', 0), ('50%', 1), ('-0', 1), ('10:20:30:40', 1),
+ ]
+ for probability, status in probabilities:
+ for werror in ['', '0', '1']:
+ context = 'probability={!r}, werror={!r}'.format(
+ probability, werror)
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': probability,
+ 'KCONFIG_SEED': '0',
+ 'KCONFIG_WERROR': werror,
+ }) == status, context
+ if status:
+ assert ('warning: KCONFIG_PROBABILITY has malformed format' in
+ conf.stderr), context
+ assert conf.stderr.count('warning:') == 1, context
+ else:
+ assert 'warning:' not in conf.stderr, context
+
+
+def test_out_of_range(conf):
+ probabilities = [
+ '-1', '101', '+101', '0:101', '0:0:101', '60:41', '0:60:41',
+ '4294967296', '-4294967296',
+ '999999999999999999999999', '-999999999999999999999999',
+ ]
+ for probability in probabilities:
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': probability,
+ 'KCONFIG_SEED': '0',
+ }) == 1, repr(probability)
+ assert 'KCONFIG_PROBABILITY:' in conf.stderr, repr(probability)
+
+
+def test_valid(conf):
+ probabilities = [
+ ('0', 'n', 'n'),
+ ('0:0', 'n', 'n'),
+ ('100:0', 'y', 'y'),
+ ('0:100', 'y', 'm'),
+ ('100:0:0', 'y', 'n'),
+ ('0:100:0', 'n', 'y'),
+ ('0:0:100', 'n', 'm'),
+ ('000:000:100', 'n', 'm'),
+ ]
+ for probability, boolean, tristate in probabilities:
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': probability,
+ 'KCONFIG_SEED': '0',
+ }) == 0, repr(probability)
+ assert 'warning:' not in conf.stderr, repr(probability)
+ for symbol, value in [('BOOL', boolean), ('TRI', tristate)]:
+ if value == 'n':
+ expected = '# CONFIG_{} is not set'.format(symbol)
+ else:
+ expected = 'CONFIG_{}={}'.format(symbol, value)
+ assert expected in conf.config.splitlines(), repr(probability)
+
+
+def test_single_probability_matches_tristate_split(conf):
+ for seed in range(20):
+ context = 'seed={}'.format(seed)
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': '50',
+ 'KCONFIG_SEED': hex(seed),
+ }) == 0, context
+ assert 'warning:' not in conf.stderr, context
+ single = conf.config
+
+ # 50% boolean y; 25% tristate y, 25% m, and 50% n.
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': '50:25:25',
+ 'KCONFIG_SEED': hex(seed),
+ }) == 0, context
+ assert 'warning:' not in conf.stderr, context
+ assert conf.config == single, context
+
+
+def test_empty(conf):
+ assert conf._run_conf('--randconfig', extra_env={
+ 'KCONFIG_PROBABILITY': '',
+ 'KCONFIG_SEED': '0',
+ }) == 0
+ assert 'warning:' not in conf.stderr
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0689/2151] ASoC: fsl_asrc: use regmap_write_bits to update clock source registers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (687 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0688/2151] kconfig: warn about malformed KCONFIG_PROBABILITY values Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0690/2151] perf mem: Fix size tracking for mem_lvls in perf_script__meminfo_scnprintf() Greg Kroah-Hartman
` (193 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shengjiu Wang, Chancel Liu,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shengjiu Wang <shengjiu.wang@nxp.com>
[ Upstream commit 92871abc1302b852b88d86114115f8fd6b50b9b9 ]
After a warm reboot the REG_ASRCSR register may not be in its hardware
reset state. regmap caches the register value as 0 (the assumed default),
so when the desired clock source index is also 0, regmap_update_bits()
skips the actual hardware write because it believes the register already
holds the correct value. This leaves a stale clock source in the hardware.
Replace regmap_update_bits() with regmap_write_bits() so that the masked
fields are always written to hardware regardless of the cached value.
Fixes: 3117bb3109dc ("ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260916094043.1496709-1-shengjiu.wang@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/fsl/fsl_asrc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 40279becb8d96..be55182071a28 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -521,10 +521,10 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair, bool use_ideal_rate)
ASRCTR_USR(index));
/* Set the input and output clock sources */
- regmap_update_bits(asrc->regmap, REG_ASRCSR,
- ASRCSR_AICSi_MASK(index) | ASRCSR_AOCSi_MASK(index),
- ASRCSR_AICS(index, clk_index[IN]) |
- ASRCSR_AOCS(index, clk_index[OUT]));
+ regmap_write_bits(asrc->regmap, REG_ASRCSR,
+ ASRCSR_AICSi_MASK(index) | ASRCSR_AOCSi_MASK(index),
+ ASRCSR_AICS(index, clk_index[IN]) |
+ ASRCSR_AOCS(index, clk_index[OUT]));
/* Calculate the input clock divisors */
indiv = fsl_asrc_cal_asrck_divisor(pair, div[IN]);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0690/2151] perf mem: Fix size tracking for mem_lvls in perf_script__meminfo_scnprintf()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (688 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0689/2151] ASoC: fsl_asrc: use regmap_write_bits to update clock source registers Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0691/2151] NFS: use TCP for MOUNT when xprtsec= selects TLS Greg Kroah-Hartman
` (192 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dapeng Mi, Ian Rogers, Namhyung Kim,
Leo Yan, Thomas Falcon, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Falcon <thomas.falcon@intel.com>
[ Upstream commit 06d5ce78e4fea2cf0738da903aa248a81101c155 ]
When printing memory info in perf script, the entire size of the
buffer is passed to perf_mem__lvl_scnprintf() instead of the remaining
size. Pass the remaining buffer size instead.
This issue was detected by sashiko during an internal code review.
Fixes: fdefc3750e847a91 ("perf mem: Print memory operation type")
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Cc: Leo Yan <leo.yan@linux.dev>
Assisted-by: Sashiko:gemini-3.1-pro-preview
Signed-off-by: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/mem-events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
index 80b3069427bc4..ae9c78a75fd89 100644
--- a/tools/perf/util/mem-events.c
+++ b/tools/perf/util/mem-events.c
@@ -607,7 +607,7 @@ int perf_script__meminfo_scnprintf(char *out, size_t sz, const struct mem_info *
i += scnprintf(out, sz, "|OP ");
i += perf_mem__op_scnprintf(out + i, sz - i, mem_info);
i += scnprintf(out + i, sz - i, "|LVL ");
- i += perf_mem__lvl_scnprintf(out + i, sz, mem_info);
+ i += perf_mem__lvl_scnprintf(out + i, sz - i, mem_info);
i += scnprintf(out + i, sz - i, "|SNP ");
i += perf_mem__snp_scnprintf(out + i, sz - i, mem_info);
i += scnprintf(out + i, sz - i, "|TLB ");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0691/2151] NFS: use TCP for MOUNT when xprtsec= selects TLS
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (689 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0690/2151] perf mem: Fix size tracking for mem_lvls in perf_script__meminfo_scnprintf() Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0692/2151] PCI/TPH: Validate the firmware Steering Tag response Greg Kroah-Hartman
` (191 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chuck Lever, Prabhakar Pujeri,
Trond Myklebust, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <cel@kernel.org>
[ Upstream commit 72233aabc78cd0415c850641bc2a6e4fea23173f ]
An NFSv2 or NFSv3 text mount that specifies xprtsec= but no
mountproto= crashes in nfs_init_timeout_values():
RIP: 0010:nfs_init_timeout_values+0x10a/0x110 [nfs]
Call Trace:
nfs_mount+0x1c3/0x330 [nfs]
nfs_try_get_tree+0x1e5/0x460 [nfs]
nfs_get_tree+0x64d/0x6d0 [nfs]
vfs_get_tree+0x2b/0xe0
vfs_cmd_create+0x5f/0xd0
vfs_fsconfig_locked+0x50/0x130
__se_sys_fsconfig+0x2f9/0x3a0
nfs_validate_transport_protocol() sets nfs_server.protocol to
XPRT_TRANSPORT_TCP_TLS when xprtsec= is present, but the switch in
nfs_set_mount_transport_protocol() has no case for that value.
mount_server.protocol stays zero, and nfs_init_timeout_values()
calls BUG() on a transport it does not recognize.
mount.nfs always appends mountproto= after probing the server's
rpcbind, so only a caller that bypasses it, such as "mount -i" or a
program that drives fsconfig() directly, reaches the crash.
Select TCP for MOUNT when the NFS transport is XPRT_TRANSPORT_TCP_TLS.
nfs_mount() requests no transport security, so MOUNT already runs
over plain TCP whenever mount.nfs supplies mountproto=tcp.
Fixes: c8407f2e560c ("NFS: Add an "xprtsec=" NFS mount option")
Signed-off-by: Chuck Lever <cel@kernel.org>
Reviewed-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfs/fs_context.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index 128ebd48b4f4b..912a45d033db8 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -402,6 +402,7 @@ static void nfs_set_mount_transport_protocol(struct nfs_fs_context *ctx)
ctx->mount_server.protocol = XPRT_TRANSPORT_UDP;
break;
case XPRT_TRANSPORT_TCP:
+ case XPRT_TRANSPORT_TCP_TLS:
case XPRT_TRANSPORT_RDMA:
ctx->mount_server.protocol = XPRT_TRANSPORT_TCP;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0692/2151] PCI/TPH: Validate the firmware Steering Tag response
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (690 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0691/2151] NFS: use TCP for MOUNT when xprtsec= selects TLS Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0693/2151] bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv Greg Kroah-Hartman
` (190 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Wei Huang, Bjorn Helgaas,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Huang <wei.huang2@amd.com>
[ Upstream commit 5c382ef425c875bf854d411fb0a45909878a233a ]
TPH _DSM returns an eight-byte Steering Tag information buffer. Checking
only the ACPI object type allows a short firmware response to be read
beyond the end of its buffer.
For safety, require a non-NULL buffer containing the complete value before
copying it. Use memcpy() so that reading the response does not depend on
the alignment of the firmware buffer.
Fixes: d2e8a34876ce ("PCI/TPH: Add Steering Tag support")
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260924190543.3424792-1-wei.huang2@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/tph.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c
index c61456d24f61b..bfcd06675dbae 100644
--- a/drivers/pci/tph.c
+++ b/drivers/pci/tph.c
@@ -119,12 +119,14 @@ static acpi_status tph_invoke_dsm(acpi_handle handle, u32 cpu_uid,
if (!out_obj)
return AE_ERROR;
- if (out_obj->type != ACPI_TYPE_BUFFER) {
+ if (out_obj->type != ACPI_TYPE_BUFFER ||
+ out_obj->buffer.length < sizeof(st_out->value) ||
+ !out_obj->buffer.pointer) {
ACPI_FREE(out_obj);
return AE_ERROR;
}
- st_out->value = *((u64 *)(out_obj->buffer.pointer));
+ memcpy(&st_out->value, out_obj->buffer.pointer, sizeof(st_out->value));
ACPI_FREE(out_obj);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0693/2151] bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (691 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0692/2151] PCI/TPH: Validate the firmware Steering Tag response Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0694/2151] ASoC: fsl_asrc: check the second front-end DMA channel Greg Kroah-Hartman
` (189 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pu Lehui, Alexei Starovoitov,
Björn Töpel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pu Lehui <pulehui@huawei.com>
[ Upstream commit 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c ]
When CFI is enabled, the actual BPF program entry point is shifted
forward by a CFI preamble. During bpf_jit_free(), this shifted pointer
causes the wrong ro_header to be fetched, leading to a potential invalid
memory free.
Fix this by subtracting cfi_get_offset() from prog->bpf_func to
correctly restore the original JITed allocation address before freeing.
Fixes: e63985ecd226 ("bpf, riscv64/cfi: Support kCFI + BPF on riscv64")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://patch.msgid.link/20260923144216.934701-1-pulehui@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/riscv/net/bpf_jit_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/net/bpf_jit_core.c b/arch/riscv/net/bpf_jit_core.c
index 09bd4eaac63e8..034b5204f73b2 100644
--- a/arch/riscv/net/bpf_jit_core.c
+++ b/arch/riscv/net/bpf_jit_core.c
@@ -254,6 +254,7 @@ void bpf_jit_free(struct bpf_prog *prog)
kfree(jit_data->ctx.offset);
kfree(jit_data);
}
+ prog->bpf_func = (void *)prog->bpf_func - cfi_get_offset();
hdr = bpf_jit_binary_pack_hdr(prog);
bpf_jit_binary_pack_free(hdr, NULL);
WARN_ON_ONCE(!bpf_prog_kallsyms_verify_off(prog));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0694/2151] ASoC: fsl_asrc: check the second front-end DMA channel
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (692 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0693/2151] bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0695/2151] ASoC: adau17x1: return cache sync errors from resume Greg Kroah-Hartman
` (188 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Slavin Liu, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Slavin Liu <bolin.liu@seu.edu.cn>
[ Upstream commit b4136c0d69ead737197af741e20edd1c3574f6b4 ]
The temporary Front-End DMA request can fail independently of the
persistent channel acquired earlier in fsl_asrc_dma_hw_params(). The
returned NULL pointer is immediately used to read its private data.
Check the temporary channel and release the previously acquired
persistent Front-End channel on failure. Clear its slot so a later
hw_free cannot release it twice. ASoC marks a component's hw_params
only after success and skips unmarked components during rollback, so
returning an error alone would leak the earlier channel.
Detected by static analysis and reviewed with AI-assisted source auditing.
Fixes: 3117bb3109dc ("ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers")
Assisted-by: LLM
Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
Link: https://patch.msgid.link/20260913125147.109920-1-bolin.liu@seu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/fsl/fsl_asrc_dma.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
index c96369da6aec9..aba20404c7d71 100644
--- a/sound/soc/fsl/fsl_asrc_dma.c
+++ b/sound/soc/fsl/fsl_asrc_dma.c
@@ -246,6 +246,11 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
/* Get DMA request of Front-End */
tmp_chan = asrc->get_dma_channel(pair, dir);
+ if (!tmp_chan) {
+ dma_release_channel(pair->dma_chan[!dir]);
+ pair->dma_chan[!dir] = NULL;
+ return -EINVAL;
+ }
tmp_data = tmp_chan->private;
pair->dma_data.dma_request2 = tmp_data->dma_request;
pair->dma_data.peripheral_type = tmp_data->peripheral_type;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0695/2151] ASoC: adau17x1: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (693 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0694/2151] ASoC: fsl_asrc: check the second front-end DMA channel Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0696/2151] ASoC: ak4642: " Greg Kroah-Hartman
` (187 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 8ca84987c11d11e0ba60f202e3199b3b80c87721 ]
adau17x1_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The optional switch-mode callback remains ordered before the cache
replay.
The issue was found by a tool we developed.
Fixes: 4101866c743a ("ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-2-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/adau17x1.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c
index 0b6b0d2115eb0..002baa7f31635 100644
--- a/sound/soc/codecs/adau17x1.c
+++ b/sound/soc/codecs/adau17x1.c
@@ -989,9 +989,7 @@ int adau17x1_resume(struct snd_soc_component *component)
if (adau->switch_mode)
adau->switch_mode(component->dev);
- regcache_sync(adau->regmap);
-
- return 0;
+ return regcache_sync(adau->regmap);
}
EXPORT_SYMBOL_GPL(adau17x1_resume);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0696/2151] ASoC: ak4642: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (694 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0695/2151] ASoC: adau17x1: return cache sync errors from resume Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0697/2151] ASoC: es8316: " Greg Kroah-Hartman
` (186 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 7142c34ed92fddca7038787b8695d22c661dc6ec ]
ak4642_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: a3a83d9a7cb0 ("ASoC: Add ak4642/ak4643 codec support")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-3-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/ak4642.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index fe035d2fc9131..08846bd7f80a9 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -533,8 +533,7 @@ static int ak4642_resume(struct snd_soc_component *component)
struct regmap *regmap = dev_get_regmap(component->dev, NULL);
regcache_cache_only(regmap, false);
- regcache_sync(regmap);
- return 0;
+ return regcache_sync(regmap);
}
static int ak4642_probe(struct snd_soc_component *component)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0697/2151] ASoC: es8316: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (695 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0696/2151] ASoC: ak4642: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0698/2151] ASoC: es8323: " Greg Kroah-Hartman
` (185 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 243d0c47e57a6af89d95aa451ef5fbf453983b1c ]
es8316_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: 4bac47a7b2f9 ("ASoC: codecs: add suspend and resume for ES8316")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-4-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8316.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index e7bd561a8f40d..61414bebe3d15 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -808,9 +808,7 @@ static int es8316_resume(struct snd_soc_component *component)
struct es8316_priv *es8316 = snd_soc_component_get_drvdata(component);
regcache_cache_only(es8316->regmap, false);
- regcache_sync(es8316->regmap);
-
- return 0;
+ return regcache_sync(es8316->regmap);
}
static int es8316_suspend(struct snd_soc_component *component)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0698/2151] ASoC: es8323: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (696 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0697/2151] ASoC: es8316: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0699/2151] ASoC: nau8540: " Greg Kroah-Hartman
` (184 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit b7c3f95915a9e791fc8721ce1ecc037f7a55d58c ]
es8323_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: b97391a604b9 ("ASoC: codecs: Add support for ES8323")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-5-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8323.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c
index eb85b71e87f39..75c542cd8caff 100644
--- a/sound/soc/codecs/es8323.c
+++ b/sound/soc/codecs/es8323.c
@@ -704,9 +704,7 @@ static int es8323_resume(struct snd_soc_component *component)
struct es8323_priv *es8323 = snd_soc_component_get_drvdata(component);
regcache_cache_only(es8323->regmap, false);
- regcache_sync(es8323->regmap);
-
- return 0;
+ return regcache_sync(es8323->regmap);
}
static const struct snd_soc_component_driver soc_component_dev_es8323 = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0699/2151] ASoC: nau8540: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (697 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0698/2151] ASoC: es8323: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0700/2151] ASoC: rt1011: " Greg Kroah-Hartman
` (183 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 0bf2b3411537e8e4d9c03702646a9fc87198d4b1 ]
nau8540_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: c1644e3de45d ("ASoC: nau8540: new codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-6-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/nau8540.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index caf2edb23088b..2fe45fec54bc9 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -897,9 +897,7 @@ static int __maybe_unused nau8540_resume(struct snd_soc_component *component)
struct nau8540 *nau8540 = snd_soc_component_get_drvdata(component);
regcache_cache_only(nau8540->regmap, false);
- regcache_sync(nau8540->regmap);
-
- return 0;
+ return regcache_sync(nau8540->regmap);
}
static const struct snd_soc_component_driver nau8540_component_driver = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0700/2151] ASoC: rt1011: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (698 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0699/2151] ASoC: nau8540: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0701/2151] ASoC: rt1016: " Greg Kroah-Hartman
` (182 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 432734a00bfae17baeff1a83b61bfc9c2ab20c12 ]
rt1011_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: d6e65bb7ff0d ("ASoC: rt1011: Add RT1011 amplifier driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-7-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1011.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c
index b84dd18ddde95..122462b9f8bf3 100644
--- a/sound/soc/codecs/rt1011.c
+++ b/sound/soc/codecs/rt1011.c
@@ -2099,9 +2099,7 @@ static int rt1011_resume(struct snd_soc_component *component)
struct rt1011_priv *rt1011 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt1011->regmap, false);
- regcache_sync(rt1011->regmap);
-
- return 0;
+ return regcache_sync(rt1011->regmap);
}
#else
#define rt1011_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0701/2151] ASoC: rt1016: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (699 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0700/2151] ASoC: rt1011: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0702/2151] ASoC: rt1305: " Greg Kroah-Hartman
` (181 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 98ace05793c7b80a9f49d92b78fcc88e0970f8e4 ]
rt1016_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: 79a4b670b4b4 ("ASoC: rt1016: Add the rt1016 support")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-8-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1016.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c
index 9f86f071fca82..bdb34dfb597b6 100644
--- a/sound/soc/codecs/rt1016.c
+++ b/sound/soc/codecs/rt1016.c
@@ -570,9 +570,7 @@ static int rt1016_resume(struct snd_soc_component *component)
struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt1016->regmap, false);
- regcache_sync(rt1016->regmap);
-
- return 0;
+ return regcache_sync(rt1016->regmap);
}
#else
#define rt1016_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0702/2151] ASoC: rt1305: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (700 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0701/2151] ASoC: rt1016: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0703/2151] ASoC: rt1308: " Greg Kroah-Hartman
` (180 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 30858325aa90380c6bcdde605214f1ebdbec568c ]
rt1305_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: 29bc643ddd7e ("ASoC: rt1305: Add RT1305/RT1306 amplifier driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-9-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1305.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c
index 26b7382f97ef6..df947e145dafa 100644
--- a/sound/soc/codecs/rt1305.c
+++ b/sound/soc/codecs/rt1305.c
@@ -896,9 +896,7 @@ static int rt1305_resume(struct snd_soc_component *component)
struct rt1305_priv *rt1305 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt1305->regmap, false);
- regcache_sync(rt1305->regmap);
-
- return 0;
+ return regcache_sync(rt1305->regmap);
}
#else
#define rt1305_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0703/2151] ASoC: rt1308: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (701 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0702/2151] ASoC: rt1305: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0704/2151] ASoC: rt1318: " Greg Kroah-Hartman
` (179 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 3db3289178b94056753f7a8c6ee4ab4b232ee6a5 ]
rt1308_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: 2b9def8c0d92 ("ASoC: rt1308: Add RT1308 amplifier driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-10-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1308.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt1308.c b/sound/soc/codecs/rt1308.c
index df50b38c24b97..2408eb66988ba 100644
--- a/sound/soc/codecs/rt1308.c
+++ b/sound/soc/codecs/rt1308.c
@@ -715,9 +715,7 @@ static int rt1308_resume(struct snd_soc_component *component)
struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt1308->regmap, false);
- regcache_sync(rt1308->regmap);
-
- return 0;
+ return regcache_sync(rt1308->regmap);
}
#else
#define rt1308_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0704/2151] ASoC: rt1318: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (702 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0703/2151] ASoC: rt1308: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0705/2151] ASoC: rt5616: " Greg Kroah-Hartman
` (178 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit a5735b341c6e8cff5f5f9480295012a5ceebb665 ]
rt1318_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: fe1ff61487ac ("ASoC: rt1318: Add RT1318 audio amplifier driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-11-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt1318.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt1318.c b/sound/soc/codecs/rt1318.c
index ae01b2ce630b2..202c853a0f77d 100644
--- a/sound/soc/codecs/rt1318.c
+++ b/sound/soc/codecs/rt1318.c
@@ -1076,8 +1076,7 @@ static int rt1318_resume(struct snd_soc_component *component)
struct rt1318_priv *rt1318 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt1318->regmap, false);
- regcache_sync(rt1318->regmap);
- return 0;
+ return regcache_sync(rt1318->regmap);
}
#else
#define rt1318_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0705/2151] ASoC: rt5616: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (703 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0704/2151] ASoC: rt1318: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0706/2151] ASoC: rt5659: " Greg Kroah-Hartman
` (177 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 8fc9d353d5371a946d9a9952278b96c09070374c ]
rt5616_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: b1d15059957d ("ASoC: rt5616: add rt5616 codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-12-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt5616.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index 1ec486707ff94..ab4e70ea89f4e 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -1247,8 +1247,7 @@ static int rt5616_resume(struct snd_soc_component *component)
struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt5616->regmap, false);
- regcache_sync(rt5616->regmap);
- return 0;
+ return regcache_sync(rt5616->regmap);
}
#else
#define rt5616_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0706/2151] ASoC: rt5659: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (704 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0705/2151] ASoC: rt5616: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0707/2151] ASoC: rt5660: " Greg Kroah-Hartman
` (176 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 3a9b5bce85a1baff95463a2bb021efac64bcf83f ]
rt5659_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-13-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt5659.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index 31b47db7b4f77..805898547025d 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -3704,9 +3704,7 @@ static int rt5659_resume(struct snd_soc_component *component)
struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt5659->regmap, false);
- regcache_sync(rt5659->regmap);
-
- return 0;
+ return regcache_sync(rt5659->regmap);
}
#else
#define rt5659_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0707/2151] ASoC: rt5660: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (705 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0706/2151] ASoC: rt5659: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0708/2151] ASoC: rt5665: " Greg Kroah-Hartman
` (175 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 70fe8997b03078ff8253d985a161fef310f7c346 ]
rt5660_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The power-off resume delay remains ordered before the cache replay.
The issue was found by a tool we developed.
Fixes: 2b26dd4c1fc5 ("ASoC: rt5660: add rt5660 codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-14-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt5660.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c
index 44c3a3b92f98f..0111a497b32e4 100644
--- a/sound/soc/codecs/rt5660.c
+++ b/sound/soc/codecs/rt5660.c
@@ -1147,9 +1147,7 @@ static int rt5660_resume(struct snd_soc_component *component)
msleep(350);
regcache_cache_only(rt5660->regmap, false);
- regcache_sync(rt5660->regmap);
-
- return 0;
+ return regcache_sync(rt5660->regmap);
}
#else
#define rt5660_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0708/2151] ASoC: rt5665: return cache sync errors from resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (706 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0707/2151] ASoC: rt5660: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0709/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors Greg Kroah-Hartman
` (174 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <pengpeng@iscas.ac.cn>
[ Upstream commit 9f2933d9a437302d5ae32eb9022efef049d8ab22 ]
rt5665_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: 33ada14a26c8 ("ASoC: add rt5665 codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260902013256.93072-15-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt5665.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index b16b2c66e754a..2940254703b08 100644
--- a/sound/soc/codecs/rt5665.c
+++ b/sound/soc/codecs/rt5665.c
@@ -4389,9 +4389,7 @@ static int rt5665_resume(struct snd_soc_component *component)
struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt5665->regmap, false);
- regcache_sync(rt5665->regmap);
-
- return 0;
+ return regcache_sync(rt5665->regmap);
}
#else
#define rt5665_suspend NULL
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0709/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (707 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0708/2151] ASoC: rt5665: " Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0710/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors Greg Kroah-Hartman
` (173 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, bui duc phuc, Cezary Rojewski,
AngeloGioacchino Del Regno, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit a2c3ee3349a7da91e563b9a21a355a28fa754bc7 ]
Clock enable errors are currently ignored when enabling the APLL
and tuner clocks.
Check the return values and roll back the APLL clock if the tuner
clock fails to enable.
Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260907120310.135693-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
index 7f411b8577823..b41069b752a94 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
@@ -260,15 +260,28 @@ static int mt8188_afe_enable_tuner_clk(struct mtk_base_afe *afe,
unsigned int id)
{
struct mt8188_afe_private *afe_priv = afe->platform_priv;
+ int ret;
switch (id) {
case MT8188_AUD_PLL1:
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL]);
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL1_TUNER]);
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL]);
+ if (ret)
+ return ret;
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL1_TUNER]);
+ if (ret) {
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL]);
+ return ret;
+ }
break;
case MT8188_AUD_PLL2:
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2]);
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2_TUNER]);
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2]);
+ if (ret)
+ return ret;
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2_TUNER]);
+ if (ret) {
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_APLL2]);
+ return ret;
+ }
break;
default:
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0710/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (708 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0709/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0711/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors Greg Kroah-Hartman
` (172 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, bui duc phuc, Cezary Rojewski,
AngeloGioacchino Del Regno, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 60a8112a088aee38d728457a14fa8bfb50f4c87e ]
The return values from regmap_update_bits() are currently ignored
by the clock and AFE control functions.
Propagate the errors to allow callers to handle regmap update
failures.
Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260907120310.135693-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
index b41069b752a94..516b9b4ee0339 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
@@ -574,9 +574,7 @@ static int mt8188_afe_enable_top_cg(struct mtk_base_afe *afe, unsigned int cg_ty
unsigned int mask = get_top_cg_mask(cg_type);
unsigned int val = get_top_cg_on_val(cg_type);
- regmap_update_bits(afe->regmap, reg, mask, val);
-
- return 0;
+ return regmap_update_bits(afe->regmap, reg, mask, val);
}
static int mt8188_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_type)
@@ -585,9 +583,7 @@ static int mt8188_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_t
unsigned int mask = get_top_cg_mask(cg_type);
unsigned int val = get_top_cg_off_val(cg_type);
- regmap_update_bits(afe->regmap, reg, mask, val);
-
- return 0;
+ return regmap_update_bits(afe->regmap, reg, mask, val);
}
int mt8188_afe_enable_reg_rw_clk(struct mtk_base_afe *afe)
@@ -627,14 +623,12 @@ int mt8188_afe_disable_reg_rw_clk(struct mtk_base_afe *afe)
static int mt8188_afe_enable_afe_on(struct mtk_base_afe *afe)
{
- regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x1);
- return 0;
+ return regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x1);
}
static int mt8188_afe_disable_afe_on(struct mtk_base_afe *afe)
{
- regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x0);
- return 0;
+ return regmap_update_bits(afe->regmap, AFE_DAC_CON0, 0x1, 0x0);
}
static int mt8188_afe_enable_a1sys(struct mtk_base_afe *afe)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0711/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (709 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0710/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0712/2151] ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors Greg Kroah-Hartman
` (171 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, bui duc phuc, Cezary Rojewski,
AngeloGioacchino Del Regno, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 1b65c13d1af99170e2a855ca9212a03daa3e7f04 ]
Clock enable errors are currently ignored by several AFE clock
control functions.
Check the return values and roll back previously enabled clocks when
a subsequent clock enable fails.
Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control")
Fixes: 9be0213a6858 ("ASoC: mediatek: mt8188: refine APLL control")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260907120310.135693-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 69 ++++++++++++++++++----
1 file changed, 58 insertions(+), 11 deletions(-)
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
index 516b9b4ee0339..94f21cb15d23e 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
@@ -589,22 +589,47 @@ static int mt8188_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_t
int mt8188_afe_enable_reg_rw_clk(struct mtk_base_afe *afe)
{
struct mt8188_afe_private *afe_priv = afe->platform_priv;
-
+ int ret;
/* bus clock for AFE external access, like DRAM */
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_TOP_AUDIO_LOCAL_BUS_SEL]);
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_TOP_AUDIO_LOCAL_BUS_SEL]);
+ if (ret)
+ goto err_local_bus;
/* bus clock for AFE internal access, like AFE SRAM */
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_TOP_AUD_INTBUS_SEL]);
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_TOP_AUD_INTBUS_SEL]);
+ if (ret)
+ goto err_intbus;
/* audio 26m clock source */
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_ADSP_AUDIO_26M]);
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_ADSP_AUDIO_26M]);
+ if (ret)
+ goto err_26m;
/* AFE hw clock */
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_AFE]);
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A1SYS_HP]);
- mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A1SYS]);
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_AFE]);
+ if (ret)
+ goto err_afe;
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A1SYS_HP]);
+ if (ret)
+ goto err_a1sys_hp;
+ ret = mt8188_afe_enable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A1SYS]);
+ if (ret)
+ goto err_a1sys;
return 0;
+
+err_a1sys:
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A1SYS_HP]);
+err_a1sys_hp:
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_AFE]);
+err_afe:
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_ADSP_AUDIO_26M]);
+err_26m:
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_TOP_AUD_INTBUS_SEL]);
+err_intbus:
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_TOP_AUDIO_LOCAL_BUS_SEL]);
+err_local_bus:
+ return ret;
}
int mt8188_afe_disable_reg_rw_clk(struct mtk_base_afe *afe)
@@ -640,7 +665,13 @@ static int mt8188_afe_enable_a1sys(struct mtk_base_afe *afe)
if (ret)
return ret;
- return mt8188_afe_enable_top_cg(afe, MT8188_TOP_CG_A1SYS_TIMING);
+ ret = mt8188_afe_enable_top_cg(afe, MT8188_TOP_CG_A1SYS_TIMING);
+ if (ret) {
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A1SYS]);
+ return ret;
+ }
+
+ return 0;
}
static int mt8188_afe_disable_a1sys(struct mtk_base_afe *afe)
@@ -661,7 +692,13 @@ static int mt8188_afe_enable_a2sys(struct mtk_base_afe *afe)
if (ret)
return ret;
- return mt8188_afe_enable_top_cg(afe, MT8188_TOP_CG_A2SYS_TIMING);
+ ret = mt8188_afe_enable_top_cg(afe, MT8188_TOP_CG_A2SYS_TIMING);
+ if (ret) {
+ mt8188_afe_disable_clk(afe, afe_priv->clk[MT8188_CLK_AUD_A2SYS]);
+ return ret;
+ }
+
+ return 0;
}
static int mt8188_afe_disable_a2sys(struct mtk_base_afe *afe)
@@ -749,8 +786,18 @@ int mt8188_apll2_disable(struct mtk_base_afe *afe)
int mt8188_afe_enable_main_clock(struct mtk_base_afe *afe)
{
- mt8188_afe_enable_top_cg(afe, MT8188_TOP_CG_26M_TIMING);
- mt8188_afe_enable_afe_on(afe);
+ int ret;
+
+ ret = mt8188_afe_enable_top_cg(afe, MT8188_TOP_CG_26M_TIMING);
+ if (ret)
+ return ret;
+
+ ret = mt8188_afe_enable_afe_on(afe);
+ if (ret) {
+ mt8188_afe_disable_top_cg(afe, MT8188_TOP_CG_26M_TIMING);
+ return ret;
+ }
+
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0712/2151] ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (710 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0711/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0713/2151] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error Greg Kroah-Hartman
` (170 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, bui duc phuc, Cezary Rojewski,
AngeloGioacchino Del Regno, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit f5f6941d92972ba66829a99999fa825e63da5162 ]
Errors from clock enable and regcache synchronization are currently
ignored during runtime resume.
Check the return values from mt8188_afe_enable_reg_rw_clk(),
regcache_sync(), and mt8188_afe_enable_main_clock(), and abort the
runtime resume if any of them fails.
On failure, disable the previously enabled reg_rw clocks and restore
the regmap to cache-only mode.
Fixes: bf106bf09376 ("ASoC: mediatek: mt8188: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260907120310.135693-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
index ac4fdf8ba78fd..4a7baa53f709a 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
@@ -3032,22 +3032,33 @@ static int mt8188_afe_runtime_resume(struct device *dev)
struct mtk_base_afe *afe = dev_get_drvdata(dev);
struct mt8188_afe_private *afe_priv = afe->platform_priv;
struct arm_smccc_res res;
+ int ret;
arm_smccc_smc(MTK_SIP_AUDIO_CONTROL,
MTK_AUDIO_SMC_OP_DOMAIN_SIDEBANDS,
0, 0, 0, 0, 0, 0, &res);
- mt8188_afe_enable_reg_rw_clk(afe);
+ ret = mt8188_afe_enable_reg_rw_clk(afe);
+ if (ret)
+ return ret;
if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl)
- goto skip_regmap;
+ return 0;
regcache_cache_only(afe->regmap, false);
- regcache_sync(afe->regmap);
+ ret = regcache_sync(afe->regmap);
+ if (ret)
+ goto err;
+
+ ret = mt8188_afe_enable_main_clock(afe);
+ if (ret)
+ goto err;
- mt8188_afe_enable_main_clock(afe);
-skip_regmap:
return 0;
+err:
+ mt8188_afe_disable_reg_rw_clk(afe);
+ regcache_cache_only(afe->regmap, true);
+ return ret;
}
static int init_memif_priv_data(struct mtk_base_afe *afe)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0713/2151] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (711 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0712/2151] ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0714/2151] spi: rockchip-sfc: disable runtime PM in remove Greg Kroah-Hartman
` (169 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 5626653a4bdf32812d66b970860677cd9d7a2190 ]
pm_runtime_get_sync() leaves the runtime PM usage counter incremented even
when it fails, but the error path in fsl_asrc_m2m_comp_open() does not
call pm_runtime_put_noidle() to balance it, leaking a reference each
time resume fails.
Use pm_runtime_resume_and_get() instead, which automatically drops the
usage counter on failure, fixing the leak.
Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260917121136.32527-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/fsl/fsl_asrc_m2m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
index f46881f71e430..88cbfb4cae3ad 100644
--- a/sound/soc/fsl/fsl_asrc_m2m.c
+++ b/sound/soc/fsl/fsl_asrc_m2m.c
@@ -314,7 +314,7 @@ static int fsl_asrc_m2m_comp_open(struct snd_compr_stream *stream)
if (ret)
goto error_alloc_out_buf;
- ret = pm_runtime_get_sync(dev);
+ ret = pm_runtime_resume_and_get(dev);
if (ret < 0) {
dev_err(dev, "Failed to power up asrc\n");
goto err_pm_runtime;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0714/2151] spi: rockchip-sfc: disable runtime PM in remove
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (712 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0713/2151] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0715/2151] spi: rockchip-sfc: skip DMA cleanup in PIO mode Greg Kroah-Hartman
` (168 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, jiawen, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiawen Liu <1298662399@qq.com>
[ Upstream commit 34e32e9ade58e32daf933974c9b697d066fc5aaa ]
rockchip_sfc_probe enables runtime PM and leaves the device active with
a usage count held by pm_runtime_get_noresume(). The remove callback
only disables the clocks and does not disable runtime PM, leaving the
device in an inconsistent state and leaking the runtime PM reference.
Add the missing runtime PM teardown in rockchip_sfc_remove to balance
the probe's enable and get_noresume calls.
Signed-off-by: jiawen <1298662399@qq.com>
Link: https://patch.msgid.link/tencent_DD16C0EEDFEF4ACAFAB5A23EC8235D462707@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 926f9c44a76f ("spi: rockchip-sfc: skip DMA cleanup in PIO mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-rockchip-sfc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index 8acf955636977..4ad845cf70670 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -744,6 +744,11 @@ static void rockchip_sfc_remove(struct platform_device *pdev)
struct spi_controller *host = sfc->host;
spi_unregister_controller(host);
+ pm_runtime_get_sync(&pdev->dev);
+ pm_runtime_put_noidle(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+ pm_runtime_set_suspended(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(&pdev->dev);
dma_unmap_single(&pdev->dev, sfc->dma_buffer, sfc->max_iosize,
DMA_BIDIRECTIONAL);
free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0715/2151] spi: rockchip-sfc: skip DMA cleanup in PIO mode
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (713 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0714/2151] spi: rockchip-sfc: disable runtime PM in remove Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0716/2151] iio: accel: bma220: publish the SPI driver ACPI alias Greg Kroah-Hartman
` (167 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit 926f9c44a76fe9e722180d0804c607c6cf1ebbb4 ]
With rockchip,sfc-no-dma, probe skips allocating and mapping the transfer
buffer. However, controller registration failure and driver removal still
call dma_unmap_single() for that nonexistent mapping.
Guard the DMA mapping and buffer cleanup with use_dma. Keep the existing
cleanup for allocation and mapping failures on the DMA path.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: ee795e82e101 ("spi: rockchip-sfc: Fix DMA-API usage")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Link: https://patch.msgid.link/20260912190056.42192-1-mhun512@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-rockchip-sfc.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c
index 4ad845cf70670..6ac0bc2905c24 100644
--- a/drivers/spi/spi-rockchip-sfc.c
+++ b/drivers/spi/spi-rockchip-sfc.c
@@ -720,10 +720,12 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
return 0;
err_register:
- dma_unmap_single(dev, sfc->dma_buffer, sfc->max_iosize,
- DMA_BIDIRECTIONAL);
+ if (sfc->use_dma)
+ dma_unmap_single(dev, sfc->dma_buffer, sfc->max_iosize,
+ DMA_BIDIRECTIONAL);
err_dma_map:
- free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
+ if (sfc->use_dma)
+ free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
err_dma:
pm_runtime_get_sync(dev);
pm_runtime_put_noidle(dev);
@@ -749,9 +751,11 @@ static void rockchip_sfc_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
pm_runtime_set_suspended(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
- dma_unmap_single(&pdev->dev, sfc->dma_buffer, sfc->max_iosize,
- DMA_BIDIRECTIONAL);
- free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
+ if (sfc->use_dma) {
+ dma_unmap_single(&pdev->dev, sfc->dma_buffer, sfc->max_iosize,
+ DMA_BIDIRECTIONAL);
+ free_pages((unsigned long)sfc->buffer, get_order(sfc->max_iosize));
+ }
clk_disable_unprepare(sfc->clk);
clk_disable_unprepare(sfc->hclk);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0716/2151] iio: accel: bma220: publish the SPI driver ACPI alias
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (714 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0715/2151] spi: rockchip-sfc: skip DMA cleanup in PIO mode Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0717/2151] dt-bindings: arm: mediatek: Fix MT6779 audsys compatible Greg Kroah-Hartman
` (166 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pengpeng Hou, Jonathan Cameron,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <hppiscas@163.com>
[ Upstream commit cdc7d3dd101251a6373332726b8d6fad35e83b8a ]
The SPI driver advertises an ACPI match for BMA0220 but does not export
that table. A modular build therefore lacks the ACPI alias used to load
the driver when the device is enumerated through ACPI.
Export the ACPI table. Move the existing SPI export next to its SPI ID
table so each export is adjacent to the table it describes.
The issue was found by our static-analysis tool.
Fixes: bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220")
Assisted-by: LLM
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/accel/bma220_spi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c
index 01592eebf05bb..db85a4aed656c 100644
--- a/drivers/iio/accel/bma220_spi.c
+++ b/drivers/iio/accel/bma220_spi.c
@@ -307,12 +307,13 @@ static const struct spi_device_id bma220_spi_id[] = {
{"bma220", 0},
{ }
};
+MODULE_DEVICE_TABLE(spi, bma220_spi_id);
static const struct acpi_device_id bma220_acpi_id[] = {
{"BMA0220", 0},
{ }
};
-MODULE_DEVICE_TABLE(spi, bma220_spi_id);
+MODULE_DEVICE_TABLE(acpi, bma220_acpi_id);
static struct spi_driver bma220_driver = {
.driver = {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0717/2151] dt-bindings: arm: mediatek: Fix MT6779 audsys compatible
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (715 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0716/2151] iio: accel: bma220: publish the SPI driver ACPI alias Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0718/2151] powerpc/ftrace: Dont restore r13 during ftrace_regs_caller Greg Kroah-Hartman
` (165 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, AngeloGioacchino Del Regno,
Rob Herring (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rob Herring (Arm) <robh@kernel.org>
[ Upstream commit 034b3b1ce25a62222920e2bb3b6a0c7ef160b108 ]
The correct name for the MediaTek MT6779 audsys compatible is
"mediatek,mt6779-audio", not "mediatek,mt6779-audsys". The original .txt
binding was correct.
Fixes: e97c618234d9 ("dt-bindings: arm: mediatek: convert audsys and mt2701-afe-pcm to yaml")
Assisted-by: LLM
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260921232819.3137721-1-robh@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../devicetree/bindings/arm/mediatek/mediatek,audsys.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
index f3a761cbd0fd4..6d060beb2a17b 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.yaml
@@ -19,7 +19,7 @@ properties:
- enum:
- mediatek,mt2701-audsys
- mediatek,mt6765-audsys
- - mediatek,mt6779-audsys
+ - mediatek,mt6779-audio
- mediatek,mt7622-audsys
- mediatek,mt8167-audsys
- mediatek,mt8173-audsys
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0718/2151] powerpc/ftrace: Dont restore r13 during ftrace_regs_caller
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (716 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0717/2151] dt-bindings: arm: mediatek: Fix MT6779 audsys compatible Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0719/2151] perf llvm: Fix memory leak of args->fileloc in symbol__disassemble_llvm() Greg Kroah-Hartman
` (164 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Michal Suchánek,
Christophe Leroy (CS GROUP), Hari Bathini, Shrikanth Hegde,
Samir Mulani, Madhavan Srinivasan, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shrikanth Hegde <sshegde@linux.ibm.com>
[ Upstream commit af5f0870883ae4aea7f668d06cbb7ad0e12824c8 ]
Michal reported a stack-protector failure and subsequent panic when
running kernel builds. This was observed with full/lazy preemption.
Initially it was suspected as KVM, but later turned out to be due
to a bcc tool running in parallel.
Issue was recreated using a bcc tool.
For example, running below in parallel leads to crash.
./funccount sched* -d 100 and make -j 64
The same crash was observed when running kprobe for schedule() function,
while simpler function tracer for schedule() didn't cause the crash.
This helped to narrow it down to ftrace backed kprobes area.
The crash occurs as follows:
ftrace_regs_caller entry on CPU A
|
+-> save r13 = CPU A PACA into pt_regs
|
+-> call kprobe_ftrace_handler()
|
+-> ftrace_test_recursion_unlock()
|
+-> preempt_enable
+-> task can schedule and migrate to CPU B
+-> task resumes with live r13 = CPU B PACA
|
+-> REST_GPRS(2, 31)
|
+-> restore saved r13 = CPU A PACA
|
|-> The task then continues running on CPU B with r13 pointing
| to CPU A's PACA.
The stack-protector canary is accessed through the PACA. After the task
migrates, CPU A may run a different task and update its PACA with that
task's canary. Restoring the saved r13 then causes the migrated task's
saved stack canary to be compared against the canary in CPU A's PACA,
resulting in a stack-protector failure.
Similarly, current is resolved through the PACA. With a stale r13,
preempt_count() can access the state of the task referenced by CPU A's
PACA instead of the task running on CPU B. This results in corrupted
preempt-count warnings and scheduling-while-atomic failures.
This path for example is called when using kprobes and parallel kernel
builds can cause preemptions during ftrace_test_recursion_unlock.
Do not restore r13 from the saved register frame. If the task did not
migrate, the live r13 already has the saved value. If it migrated, the
live r13 contains the correct PACA pointer for the CPU on which the task
resumed.
On PPC32, r13 is regular register. So do this fix only for PPC64
Fixes: 153086644fd1 ("powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI")
Reported-by: Michal Suchánek <msuchanek@suse.de>
Closes: https://lore.kernel.org/all/aqKfsVArHHaIK6M9@kunlun.suse.cz/
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Tested-by: Samir Mulani <samir@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260921072151.35531-1-sshegde@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/powerpc/kernel/trace/ftrace_entry.S | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S b/arch/powerpc/kernel/trace/ftrace_entry.S
index 6599fe3c62347..5eb8eee32549d 100644
--- a/arch/powerpc/kernel/trace/ftrace_entry.S
+++ b/arch/powerpc/kernel/trace/ftrace_entry.S
@@ -220,7 +220,13 @@
/* Restore gprs */
.if \allregs == 1
+#ifdef CONFIG_PPC64
+ REST_GPRS(2, 12, r1)
+ /* Do not restore a stale PACA pointer if the task migrated */
+ REST_GPRS(14, 31, r1)
+#else
REST_GPRS(2, 31, r1)
+#endif
.else
REST_GPRS(3, 10, r1)
#if defined(CONFIG_LIVEPATCH_64) || defined(CONFIG_PPC_FTRACE_OUT_OF_LINE)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0719/2151] perf llvm: Fix memory leak of args->fileloc in symbol__disassemble_llvm()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (717 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0718/2151] powerpc/ftrace: Dont restore r13 during ftrace_regs_caller Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0720/2151] sysctl: unregister tables before freeing bitmap Greg Kroah-Hartman
` (163 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Tengda Wu,
Steinar H. Gunderson, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tengda Wu <wutengda@huaweicloud.com>
[ Upstream commit fe529886843f451ad6da7e65d53325432e0f80fb ]
In symbol__disassemble_llvm(), after calling llvm_addr2line(), if the
subsequent disasm_line__new() fails, the code directly jumps to 'err'
without freeing args->fileloc, leading to a memory leak.
Fix this by explicitly calling free(args->fileloc) before jumping to the
error handling path when disasm_line__new() fails.
Fixes: 04885681788855bb ("perf annotate: LLVM-based disassembler")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Tengda Wu <wutengda@huaweicloud.com>
Cc: Steinar H. Gunderson <sesse@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/llvm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/llvm.c b/tools/perf/util/llvm.c
index 4ada9a10bd93f..789bee98badfe 100644
--- a/tools/perf/util/llvm.c
+++ b/tools/perf/util/llvm.c
@@ -248,8 +248,10 @@ int symbol__disassemble_llvm(const char *filename, struct symbol *sym,
(unsigned int *)&args->line_nr, false, NULL);
dl = disasm_line__new(args);
- if (dl == NULL)
+ if (dl == NULL) {
+ free(args->fileloc);
goto err;
+ }
annotation_line__add(&dl->al, ¬es->src->source);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0720/2151] sysctl: unregister tables before freeing bitmap
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (718 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0719/2151] perf llvm: Fix memory leak of args->fileloc in symbol__disassemble_llvm() Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0721/2151] vfio: Reject a second cdev open before mutating shared device state Greg Kroah-Hartman
` (162 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yibo Tan, Joel Granados, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yibo Tan <lhfff@tju.edu.cn>
[ Upstream commit 238dfe02fb0a9f72d7fd275d74ce80f13923ef31 ]
The table registered for bitmap_0001 retains a pointer to
test_data.bitmap_0001. unregister_sysctl_table() prevents new handlers
from starting and waits for active handlers to finish.
test_sysctl_exit() currently frees the bitmap before unregistering the
table. A concurrent read during module removal can therefore enter
proc_do_large_bitmap() while the bitmap is freed. KASAN reports a
slab-use-after-free in _find_next_bit().
Unregister all tables before freeing the bitmap so the unregister rundown
provides the required lifetime boundary.
The unmodified module reproduced the use-after-free in three KASAN runs.
With this change, three runs each completed 100 load, read and unload race
rounds without a kernel diagnostic.
Fixes: 2ea622b887e7 ("tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case")
Assisted-by: LLM
Signed-off-by: Yibo Tan <lhfff@tju.edu.cn>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
lib/test_sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c
index c02aa9c868f21..74fe01de26766 100644
--- a/lib/test_sysctl.c
+++ b/lib/test_sysctl.c
@@ -321,11 +321,11 @@ module_init(test_sysctl_init);
static void __exit test_sysctl_exit(void)
{
- kfree(test_data.bitmap_0001);
for (int i = 0; i < TEST_H_SIZE; i++) {
if (ctl_headers[i])
unregister_sysctl_table(ctl_headers[i]);
}
+ kfree(test_data.bitmap_0001);
}
module_exit(test_sysctl_exit);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0721/2151] vfio: Reject a second cdev open before mutating shared device state
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (719 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0720/2151] sysctl: unregister tables before freeing bitmap Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0722/2151] arm64: dts: qcom: x1e80100-dell-inspiron-14-plus-7441: fix touchscreen i2c address Greg Kroah-Hartman
` (161 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jason Gunthorpe, Alex Williamson,
Kevin Tian, Alex Williamson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Williamson <alex.williamson@nvidia.com>
[ Upstream commit 258ba46543abdd36844f04bba8b4022a5731d873 ]
The cdev single-open check lives in vfio_df_open(), which runs at the
end of the bind ioctl, after vfio_df_ioctl_bind_iommufd() has already
updated state shared across all opens: vfio_df_check_token() can set
the PF vf_token and vfio_df_get_kvm_safe() records the caller's KVM
pointer in device->kvm and takes a reference.
A second cdev bind of an already-open device runs both, only to be
rejected in vfio_df_open(). The error path clears device->kvm and
drops the reference, tearing down the current opener's KVM association
and potentially resulting in an unbalanced reference on close or
premature release, while the vf_token remains clobbered.
Move the single-open check into vfio_df_ioctl_bind_iommufd() ahead of
both mutations, so a bind that cannot complete leaves the current
opener's state untouched. df->group is NULL on this path, so a
non-zero open_count is exactly what vfio_df_open() rejected. The test
in vfio_df_open() becomes redundant and is removed.
Return -EBUSY rather than -EINVAL here. The arguments are not invalid,
the device is in use, which could be a transient condition due to a
delayed fput if the prior user is terminated. This provides
compatibility with the group path, where a group open returns -EBUSY,
and users may choose bounded polling to detect such a transient
condition.
Fixes: 839e692fa4eb ("vfio: Make vfio_df_open() single open for device cdev path")
Fixes: 5fcc26969a16 ("vfio: Add VFIO_DEVICE_BIND_IOMMUFD")
Fixes: 86624ba3b522 ("vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD")
Assisted-by: LLM
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20260911170429.1642480-2-alex.williamson@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vfio/device_cdev.c | 12 ++++++++++++
drivers/vfio/vfio_main.c | 7 -------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/drivers/vfio/device_cdev.c b/drivers/vfio/device_cdev.c
index 8ceca24ac136c..e5fb416b57093 100644
--- a/drivers/vfio/device_cdev.c
+++ b/drivers/vfio/device_cdev.c
@@ -121,6 +121,18 @@ long vfio_df_ioctl_bind_iommufd(struct vfio_device_file *df,
goto out_unlock;
}
+ /*
+ * The cdev path allows only a single open. Reject a second open here,
+ * before the VF token and device->kvm updates below would clobber the
+ * current opener's state on a bind that cannot complete. Return -EBUSY
+ * rather than -EINVAL since a delayed release of the prior opener can
+ * make this transient.
+ */
+ if (device->open_count) {
+ ret = -EBUSY;
+ goto out_unlock;
+ }
+
ret = vfio_df_check_token(device, &bind);
if (ret)
goto out_unlock;
diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
index 19c40fc596999..e5de3a54d2b2c 100644
--- a/drivers/vfio/vfio_main.c
+++ b/drivers/vfio/vfio_main.c
@@ -567,13 +567,6 @@ int vfio_df_open(struct vfio_device_file *df)
lockdep_assert_held(&device->dev_set->lock);
- /*
- * Only the group path allows the device to be opened multiple
- * times. The device cdev path doesn't have a secure way for it.
- */
- if (device->open_count != 0 && !df->group)
- return -EINVAL;
-
device->open_count++;
if (device->open_count == 1) {
ret = vfio_df_device_first_open(df);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0722/2151] arm64: dts: qcom: x1e80100-dell-inspiron-14-plus-7441: fix touchscreen i2c address
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (720 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0721/2151] vfio: Reject a second cdev open before mutating shared device state Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0723/2151] arm64: dts: qcom: x1-crd: Mark the EC reset gpio as reserved Greg Kroah-Hartman
` (160 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Charlie Garner, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charlie Garner <charlie@akao.au>
[ Upstream commit 52c679ecfd03312c585bfbfe1c7a0d3a9c25cf0e ]
The touchscreen is at i2c address 0x09, not 0x10. Nothing responds at 0x10,
so i2c_hid_of never probes and the panel does not work. tlmm pin 51, the
touchscreen interrupt, is left unclaimed as a result.
Scanning the bus shows only 0x09 responding (0x28 also ACKs but returns
zeros, presumably an alternate address on the same controller). Linux bus
0 here is the GENI I2C controller at 0xa80000, which is i2c8 in the DT:
# i2cdetect -y -r 0
00: -- 09 -- -- -- -- -- --
...
and 0x09 returns a valid HID-over-I2C descriptor:
1e 00 descriptor length 30
00 01 bcdVersion 1.00
6b 03 report descriptor length 875
...
bd 29 vendor 0x29bd
03 11 product 0x1103
whose report descriptor opens as a Windows Precision touchscreen:
05 0d Usage Page (Digitizer)
09 04 Usage (Touch Screen)
a1 01 Collection (Application)
85 10 Report ID (0x10)
05 0d Usage Page (Digitizer)
09 22 Usage (Finger)
a1 02 Collection (Logical)
09 42 Usage (Tip Switch)
... Contact Id, 16-bit X/Y, unit exponent -3
The firmware agrees. The DSDT describes one touchscreen, \_SB.TSC1, on
I2C9 (QUP_1_SE_0 at 0xa80000, i2c8 here) with its interrupt on GPIO 51.
Its _HID, slave address and HID descriptor address are placeholders that
UEFI fills in at boot, and on this machine they read LXST2021, 0x09 and
0x0001. Nothing at 0x28 is described. The Latitude 7455 DT already has the
same LXST2021 touchscreen at 0x09.
The original touchscreen@10 node is identical to the ones in
x1-crd.dtsi, x1e80100-dell-xps13-9345.dts and
x1e78100-lenovo-thinkpad-t14s.dtsi, which the Inspiron DT was based on.
Rename the node to match the corrected unit address.
Fixes: e7733b42111c ("arm64: dts: qcom: Add support for Dell Inspiron 7441 / Latitude 7455")
Signed-off-by: Charlie Garner <charlie@akao.au>
Link: https://lore.kernel.org/r/20260923152506.44989-3-charlie@akao.au
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../boot/dts/qcom/x1e80100-dell-inspiron-14-plus-7441.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-inspiron-14-plus-7441.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-inspiron-14-plus-7441.dts
index 75e10d97c3867..d10ce9f381eaa 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-dell-inspiron-14-plus-7441.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-inspiron-14-plus-7441.dts
@@ -25,9 +25,9 @@ &gpu_zap_shader {
};
&i2c8 {
- touchscreen@10 {
+ touchscreen@9 {
compatible = "hid-over-i2c";
- reg = <0x10>;
+ reg = <0x9>;
hid-descr-addr = <0x1>;
interrupts-extended = <&tlmm 51 IRQ_TYPE_LEVEL_LOW>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0723/2151] arm64: dts: qcom: x1-crd: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (721 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0722/2151] arm64: dts: qcom: x1e80100-dell-inspiron-14-plus-7441: fix touchscreen i2c address Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0724/2151] arm64: dts: qcom: x1e001de-devkit: " Greg Kroah-Hartman
` (159 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 099cd579fa73c142fde2f7e3ea473f334792a249 ]
GPIO 65 from TLMM is connected to the embedded controller's active-high
reset line. Asserting it causes the fans to run at full speed during
reset and leaves the keyboard non-functional afterwards.
Reserve it to prevent Linux from requesting or reconfiguring it.
Fixes: bd50b1f5b6f3 ("arm64: dts: qcom: x1e80100: Add Compute Reference Device")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-1-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1-crd.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1-crd.dtsi b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
index 5e324f35547a4..59f8c1ed98c77 100644
--- a/arch/arm64/boot/dts/qcom/x1-crd.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-crd.dtsi
@@ -1476,6 +1476,7 @@ right_tweeter: speaker@0,1 {
&tlmm {
gpio-reserved-ranges = <34 2>, /* Unused */
<44 4>, /* SPI (TPM) */
+ <65 1>, /* EC reset */
<238 1>; /* UFS Reset */
edp_reg_en: edp-reg-en-state {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0724/2151] arm64: dts: qcom: x1e001de-devkit: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (722 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0723/2151] arm64: dts: qcom: x1-crd: Mark the EC reset gpio as reserved Greg Kroah-Hartman
@ 2026-11-18 14:40 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0725/2151] arm64: dts: qcom: x1e78100-t14s: " Greg Kroah-Hartman
` (158 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:40 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 0297c8e98a054fc2a0afcb96114f57603a02594e ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: 7b8a31e82b87 ("arm64: dts: qcom: Add X1E001DE Snapdragon Devkit for Windows")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-2-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
index 701f35af7d5cd..bc15a988f3011 100644
--- a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
+++ b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
@@ -1188,7 +1188,8 @@ wcd_tx: codec@0,3 {
};
&tlmm {
- gpio-reserved-ranges = <44 4>; /* SPI (TPM) */
+ gpio-reserved-ranges = <44 4>, /* SPI (TPM) */
+ <65 1>; /* EC reset */
eusb3_reset_n: eusb3-reset-n-state {
pins = "gpio6";
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0725/2151] arm64: dts: qcom: x1e78100-t14s: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (723 preceding siblings ...)
2026-11-18 14:40 ` [PATCH 6.18 0724/2151] arm64: dts: qcom: x1e001de-devkit: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0726/2151] arm64: dts: qcom: x1e80100-dell-xps13-9345: " Greg Kroah-Hartman
` (157 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 07321595ce693eea5854120869a8b1560d7b14d6 ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: 7d1cbe2f4985 ("arm64: dts: qcom: Add X1E78100 ThinkPad T14s Gen 6")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-3-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
index 169726984d3b0..8179f571ceba8 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
@@ -1284,6 +1284,7 @@ wcd_tx: codec@0,3 {
&tlmm {
gpio-reserved-ranges = <34 2>, /* Unused */
<44 4>, /* SPI (TPM) */
+ <65 1>, /* EC reset */
<72 2>, /* Secure EC I2C connection (?) */
<238 1>; /* UFS Reset */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0726/2151] arm64: dts: qcom: x1e80100-dell-xps13-9345: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (724 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0725/2151] arm64: dts: qcom: x1e78100-t14s: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0727/2151] arm64: dts: qcom: x1e80100-yoga-slim7x: " Greg Kroah-Hartman
` (156 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 5630150c90db33df906d26cc4b6ff56315471352 ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: f5b788d0e8cd ("arm64: dts: qcom: Add support for X1-based Dell XPS 13 9345")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-4-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
index c1f49cba61fc4..373aec773d732 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
@@ -1070,6 +1070,7 @@ &smb2360_1_eusb2_repeater {
&tlmm {
gpio-reserved-ranges = <44 4>, /* SPI11 (TPM) */
<76 4>, /* SPI19 (TZ Protected) */
+ <65 1>, /* EC reset */
<238 1>; /* UFS Reset */
cam_indicator_en: cam-indicator-en-state {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0727/2151] arm64: dts: qcom: x1e80100-yoga-slim7x: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (725 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0726/2151] arm64: dts: qcom: x1e80100-dell-xps13-9345: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0728/2151] arm64: dts: qcom: x1e80100-qcp: " Greg Kroah-Hartman
` (155 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit a92ac66d35dfd8438b6e40bfb956ff69365798ac ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-6-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index 56e4d13cca111..b621322d248e1 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -1348,6 +1348,7 @@ right_tweeter: speaker@0,1 {
&tlmm {
gpio-reserved-ranges = <34 2>, /* Unused */
<44 4>, /* SPI (TPM) */
+ <65 1>, /* EC reset */
<238 1>; /* UFS Reset */
edp_reg_en: edp-reg-en-state {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0728/2151] arm64: dts: qcom: x1e80100-qcp: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (726 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0727/2151] arm64: dts: qcom: x1e80100-yoga-slim7x: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0729/2151] arm64: dts: qcom: x1-asus-zenbook-a14: " Greg Kroah-Hartman
` (154 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit fd7d7b5d307f3a475e9555dfd89ff80cfae46b3c ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-8-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
index 5a121fc449401..fb2d90ee7d5a6 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
@@ -1177,6 +1177,7 @@ wcd_tx: codec@0,3 {
&tlmm {
gpio-reserved-ranges = <33 3>, /* Unused */
<44 4>, /* SPI (TPM) */
+ <65 1>, /* EC reset */
<238 1>; /* UFS Reset */
edp_reg_en: edp-reg-en-state {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0729/2151] arm64: dts: qcom: x1-asus-zenbook-a14: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (727 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0728/2151] arm64: dts: qcom: x1e80100-qcp: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0730/2151] arm64: dts: qcom: x1-dell-thena: " Greg Kroah-Hartman
` (153 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 48213677c9173680de328785768ea56315bfdd53 ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: 6516961352a1 ("arm64: dts: qcom: Add support for X1-based Asus Zenbook A14")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-10-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi b/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi
index 8e5c5575a5320..6ad2cf5f5ed07 100644
--- a/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi
@@ -1223,6 +1223,7 @@ wcd_tx: codec@0,3 {
&tlmm {
gpio-reserved-ranges = <44 4>, /* SPI11, TZ Protected */
+ <65 1>, /* EC reset */
<90 1>; /* Unknown, TZ Protected */
cam_indicator_en: cam-indicator-en-state {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0730/2151] arm64: dts: qcom: x1-dell-thena: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (728 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0729/2151] arm64: dts: qcom: x1-asus-zenbook-a14: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0731/2151] arm64: dts: qcom: x1-hp-omnibook-x14: " Greg Kroah-Hartman
` (152 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 2c376a1b675075018c77d040ba1595db896a75f6 ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: e7733b42111c ("arm64: dts: qcom: Add support for Dell Inspiron 7441 / Latitude 7455")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-11-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi b/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi
index 58a5fe65ae38b..3bfc152793833 100644
--- a/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi
@@ -1301,6 +1301,7 @@ right_tweeter: speaker@0,1 {
&tlmm {
gpio-reserved-ranges = <44 4>, /* SPI11 (TPM) */
+ <65 1>, /* EC reset */
<76 4>, /* SPI19 (TZ Protected) */
<80 2>, /* I2C20 (Battery SMBus) */
<238 1>; /* UFS Reset */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0731/2151] arm64: dts: qcom: x1-hp-omnibook-x14: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (729 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0730/2151] arm64: dts: qcom: x1-dell-thena: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0732/2151] arm64: dts: qcom: x1p42100-thinkbook-16: " Greg Kroah-Hartman
` (151 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 4ea8c5b790dd884bb5118336dfcb2c648cb40b2d ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: 6f18b8d4142c ("arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-12-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi b/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi
index a4075434162aa..88810fb07ff2c 100644
--- a/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-hp-omnibook-x14.dtsi
@@ -1285,6 +1285,7 @@ wcd_tx: codec@0,3 {
&tlmm {
gpio-reserved-ranges = <34 2>, /* Unused */
<44 4>, /* SPI (TPM) */
+ <65 1>, /* EC reset */
<72 2>, /* Secure EC I2C connection (?) */
<238 1>; /* UFS Reset */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0732/2151] arm64: dts: qcom: x1p42100-thinkbook-16: Mark the EC reset gpio as reserved
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (730 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0731/2151] arm64: dts: qcom: x1-hp-omnibook-x14: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0733/2151] dt-bindings: vendor-prefixes: Add General Mobile Greg Kroah-Hartman
` (150 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Abel Vesa, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit d15d83967b113e43a4811164ada19909d99c93a7 ]
GPIO 65 from TLMM is used by the embedded controller as its reset line.
On some devices, toggling the embedded controller reset line makes the
device not power up at all, unless the battery is unplugged.
So reserve it in order to prevent Linux from requesting or
reconfiguring it.
Fixes: d3f600dc452d ("arm64: dts: qcom: Add Lenovo ThinkBook 16 G7 QOY device tree")
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-13-fde7f8a53382@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
index 3186e79e862de..af0bebb1711b0 100644
--- a/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
+++ b/arch/arm64/boot/dts/qcom/x1p42100-lenovo-thinkbook-16.dts
@@ -1275,6 +1275,7 @@ wcd_tx: codec@0,3 {
&tlmm {
gpio-reserved-ranges = <34 2>, /* Unused */
+ <65 1>, /* EC reset */
<72 2>; /* Secure EC I2C connection (?) */
edp_hpd_default: edp-hpd-default-state {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0733/2151] dt-bindings: vendor-prefixes: Add General Mobile
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (731 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0732/2151] arm64: dts: qcom: x1p42100-thinkbook-16: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0734/2151] perf c2c: Fix documented default coalesce fields Greg Kroah-Hartman
` (149 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski, Muzaffer Kadir,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muzaffer Kadir <muzafferkadir@mainlining.org>
[ Upstream commit 7034bec693b752bcd7ebb4fa00dc3b429b4dc4f7 ]
Add vendor prefix for General Mobile.
Link: https://www.generalmobile.com
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Muzaffer Kadir <muzafferkadir@mainlining.org>
Link: https://patch.msgid.link/20260921-msm8952-initial-support-v3-6-b96fd3fe298b@mainlining.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index e6fa43a510329..8bc95dd4b2592 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -626,6 +626,8 @@ patternProperties:
description: Gemei Digital Technology Co., Ltd.
"^gemtek,.*":
description: Gemtek Technology Co., Ltd.
+ "^generalmobile,.*":
+ description: General Mobile Fzc.
"^genesys,.*":
description: Genesys Logic, Inc.
"^genexis,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0734/2151] perf c2c: Fix documented default coalesce fields
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (732 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0733/2151] dt-bindings: vendor-prefixes: Add General Mobile Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0735/2151] perf pmu: Add PMU kind to simplify differentiating Greg Kroah-Hartman
` (148 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tianyou Li, Wangyang Guo, Jiebin Sun,
Namhyung Kim, Dapeng Mi, Ian Rogers, James Clark, Jiri Olsa,
Thomas Falcon, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiebin Sun <jiebin.sun@intel.com>
[ Upstream commit b36a6f180baad35a962677ae181681ca60dda35b ]
The default coalesce fields dropped pid in favor of iaddr, but the man
page still documents the old pid,iaddr default. Update it to match the
command.
Fixes: 423701a0c8d754d9 ("perf c2c: Change the default coalesce setup")
Reviewed-by: Tianyou Li <tianyou.li@intel.com>
Reviewed-by: Wangyang Guo <wangyang.guo@intel.com>
Signed-off-by: Jiebin Sun <jiebin.sun@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Documentation/perf-c2c.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentation/perf-c2c.txt
index f4af2dd6ab318..246598bc48bde 100644
--- a/tools/perf/Documentation/perf-c2c.txt
+++ b/tools/perf/Documentation/perf-c2c.txt
@@ -311,7 +311,7 @@ output fields set for cacheline offsets output:
Code address, Code symbol, Shared Object, Source line
dso - coalesced by shared object
-By default the coalescing is setup with 'pid,iaddr'.
+By default, coalescing uses `iaddr`.
STDIO OUTPUT
------------
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0735/2151] perf pmu: Add PMU kind to simplify differentiating
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (733 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0734/2151] perf c2c: Fix documented default coalesce fields Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0736/2151] perf evlist: Special map propagation for tool events that read on 1 CPU Greg Kroah-Hartman
` (147 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit f0feb21e0a10c50e3a154e9bdf3fbb8a38480251 ]
Rather than perf_pmu__is_xxx calls, and a notion of kind so that a
single call can be used.
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Stable-dep-of: aa9265d5073c ("perf evlist: Don't restrict uncore events to PMU CPUs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/pmu.h | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index 1ebcf0242af85..cfcaba3e2e753 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -37,6 +37,19 @@ struct perf_pmu_caps {
struct list_head list;
};
+enum pmu_kind {
+ /* A perf event syscall PMU. */
+ PERF_PMU_KIND_PE,
+ /* A perf tool provided DRM PMU. */
+ PERF_PMU_KIND_DRM,
+ /* A perf tool provided HWMON PMU. */
+ PERF_PMU_KIND_HWMON,
+ /* Perf tool provided PMU for tool events like time. */
+ PERF_PMU_KIND_TOOL,
+ /* A testing PMU kind. */
+ PERF_PMU_KIND_FAKE
+};
+
enum {
PERF_PMU_TYPE_PE_START = 0,
PERF_PMU_TYPE_PE_END = 0xFFFDFFFF,
@@ -306,4 +319,25 @@ void perf_pmu__delete(struct perf_pmu *pmu);
const char *perf_pmu__name_from_config(struct perf_pmu *pmu, u64 config);
bool perf_pmu__is_fake(const struct perf_pmu *pmu);
+static inline enum pmu_kind perf_pmu__kind(const struct perf_pmu *pmu)
+{
+ __u32 type;
+
+ if (!pmu)
+ return PERF_PMU_KIND_PE;
+
+ type = pmu->type;
+ if (type <= PERF_PMU_TYPE_PE_END)
+ return PERF_PMU_KIND_PE;
+ if (type <= PERF_PMU_TYPE_DRM_END)
+ return PERF_PMU_KIND_DRM;
+ if (type <= PERF_PMU_TYPE_DRM_END)
+ return PERF_PMU_KIND_DRM;
+ if (type <= PERF_PMU_TYPE_HWMON_END)
+ return PERF_PMU_KIND_HWMON;
+ if (type == PERF_PMU_TYPE_TOOL)
+ return PERF_PMU_KIND_TOOL;
+ return PERF_PMU_KIND_FAKE;
+}
+
#endif /* __PMU_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0736/2151] perf evlist: Special map propagation for tool events that read on 1 CPU
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (734 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0735/2151] perf pmu: Add PMU kind to simplify differentiating Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0737/2151] perf evlist: Dont restrict uncore events to PMU CPUs Greg Kroah-Hartman
` (146 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Adrian Hunter,
Alexander Shishkin, Andi Kleen, Andres Freund, Dapeng Mi,
Dr. David Alan Gilbert, Ingo Molnar, James Clark, Jiri Olsa,
Namhyung Kim, Peter Zijlstra, Thomas Falcon, Thomas Richter,
Yang Li, Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit ff8548172f63288b5c2b0fda5a4a4be294f610f1 ]
Tool events like duration_time don't need a perf_cpu_map that contains
all online CPUs.
Having such a perf_cpu_map causes overheads when iterating between
events for CPU affinity.
During parsing mark events that just read on a single CPU map index as
such, then during map propagation set up the evsel's CPUs and thereby
the evlists accordingly.
The setting cannot be done early in parsing as user CPUs are only fully
known when evlist__create_maps is called.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Dr. David Alan Gilbert <linux@treblig.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Falcon <thomas.falcon@intel.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Stable-dep-of: aa9265d5073c ("perf evlist: Don't restrict uncore events to PMU CPUs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/perf/evlist.c | 36 ++++++++++++++++++++++---
tools/lib/perf/include/internal/evsel.h | 2 ++
tools/perf/util/parse-events.c | 1 +
tools/perf/util/pmu.c | 11 ++++++++
tools/perf/util/pmu.h | 2 ++
5 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index 3ed023f4b1907..1f210dadd666f 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -101,6 +101,28 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
evsel->cpus = perf_cpu_map__get(evlist->user_requested_cpus);
}
+ /*
+ * Tool events may only read on the first CPU index to avoid double
+ * counting things like duration_time. Make the evsel->cpus contain just
+ * that single entry otherwise we may spend time changing affinity to
+ * CPUs that just have tool events, etc.
+ */
+ if (evsel->reads_only_on_cpu_idx0 && perf_cpu_map__nr(evsel->cpus) > 0) {
+ struct perf_cpu_map *srcs[3] = {
+ evlist->all_cpus,
+ evlist->user_requested_cpus,
+ evsel->pmu_cpus,
+ };
+ for (size_t i = 0; i < ARRAY_SIZE(srcs); i++) {
+ if (!srcs[i])
+ continue;
+
+ perf_cpu_map__put(evsel->cpus);
+ evsel->cpus = perf_cpu_map__new_int(perf_cpu_map__cpu(srcs[i], 0).cpu);
+ break;
+ }
+ }
+
/* Sanity check assert before the evsel is potentially removed. */
assert(!evsel->requires_cpu || !perf_cpu_map__has_any_cpu(evsel->cpus));
@@ -133,16 +155,22 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
static void perf_evlist__propagate_maps(struct perf_evlist *evlist)
{
- struct perf_evsel *evsel, *n;
-
evlist->needs_map_propagation = true;
/* Clear the all_cpus set which will be merged into during propagation. */
perf_cpu_map__put(evlist->all_cpus);
evlist->all_cpus = NULL;
- list_for_each_entry_safe(evsel, n, &evlist->entries, node)
- __perf_evlist__propagate_maps(evlist, evsel);
+ /* 2 rounds so that reads_only_on_cpu_idx0 benefit from knowing the other CPU maps. */
+ for (int round = 0; round < 2; round++) {
+ struct perf_evsel *evsel, *n;
+
+ list_for_each_entry_safe(evsel, n, &evlist->entries, node) {
+ if ((!evsel->reads_only_on_cpu_idx0 && round == 0) ||
+ (evsel->reads_only_on_cpu_idx0 && round == 1))
+ __perf_evlist__propagate_maps(evlist, evsel);
+ }
+ }
}
void perf_evlist__add(struct perf_evlist *evlist,
diff --git a/tools/lib/perf/include/internal/evsel.h b/tools/lib/perf/include/internal/evsel.h
index fefe64ba5e265..b988034f13710 100644
--- a/tools/lib/perf/include/internal/evsel.h
+++ b/tools/lib/perf/include/internal/evsel.h
@@ -128,6 +128,8 @@ struct perf_evsel {
bool requires_cpu;
/** Is the PMU for the event a core one? Effects the handling of own_cpus. */
bool is_pmu_core;
+ /** Does the evsel on read on the first CPU index such as tool time events? */
+ bool reads_only_on_cpu_idx0;
int idx;
};
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 4723c2955f22e..413d5bde91147 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -309,6 +309,7 @@ __add_event(struct list_head *list, int *idx,
evsel->core.pmu_cpus = pmu_cpus;
evsel->core.requires_cpu = pmu ? pmu->is_uncore : false;
evsel->core.is_pmu_core = is_pmu_core;
+ evsel->core.reads_only_on_cpu_idx0 = perf_pmu__reads_only_on_cpu_idx0(attr);
evsel->pmu = pmu;
evsel->alternate_hw_config = alternate_hw_config;
evsel->first_wildcard_match = first_wildcard_match;
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index bcdbbaadcbb3a..bc7097d77dba6 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -2604,3 +2604,14 @@ const char *perf_pmu__name_from_config(struct perf_pmu *pmu, u64 config)
}
return NULL;
}
+
+bool perf_pmu__reads_only_on_cpu_idx0(const struct perf_event_attr *attr)
+{
+ enum tool_pmu_event event;
+
+ if (attr->type != PERF_PMU_TYPE_TOOL)
+ return false;
+
+ event = (enum tool_pmu_event)attr->config;
+ return event != TOOL_PMU__EVENT_USER_TIME && event != TOOL_PMU__EVENT_SYSTEM_TIME;
+}
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index cfcaba3e2e753..22a015df40fbe 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -319,6 +319,8 @@ void perf_pmu__delete(struct perf_pmu *pmu);
const char *perf_pmu__name_from_config(struct perf_pmu *pmu, u64 config);
bool perf_pmu__is_fake(const struct perf_pmu *pmu);
+bool perf_pmu__reads_only_on_cpu_idx0(const struct perf_event_attr *attr);
+
static inline enum pmu_kind perf_pmu__kind(const struct perf_pmu *pmu)
{
__u32 type;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0737/2151] perf evlist: Dont restrict uncore events to PMU CPUs
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (735 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0736/2151] perf evlist: Special map propagation for tool events that read on 1 CPU Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0738/2151] mtd: block: prevent reclaim I/O during request processing Greg Kroah-Hartman
` (145 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Nia Su,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nia Su <nia.su@sifive.com>
[ Upstream commit aa9265d5073cb01b89f31ae030442873d4a259d3 ]
The PMU CPU map has different semantics for core and uncore PMUs.
For core PMUs, pmu_cpus contains the CPUs on which the event can be
opened. Intersect the user-requested CPU map with the PMU CPU map to
reject CPUs unsupported by the PMU.
For uncore PMUs, pmu_cpus is read from the PMU's cpumask sysfs attribute,
which lists the default CPU to open the event on per socket/die, not the
set of CPUs it can only be opened on. The user-requested CPU may override
these defaults, and the driver can redirect the event to the appropriate
control CPU.
Currently, __perf_evlist__propagate_maps() intersects the user-requested
CPU map with pmu_cpus for all PMUs. If the user-requested CPU is not in
pmu_cpus, the intersection becomes empty and the evsel is removed before
perf_event_open() is called.
Add evsel->is_pmu_uncore, set once from pmu->is_uncore at parse time,
to skip the intersection for uncore PMUs. Core PMUs, and other
non-core PMUs such as software events, breakpoints, or tracepoints,
continue to be restricted to their PMU CPU map.
Fixes: 811082e4b668db96 ("perf parse-events: Support user CPUs mixed with threads/processes")
Reviewed-by: Ian Rogers <irogers@google.com>
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Nia Su <nia.su@sifive.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/perf/evlist.c | 5 +++--
tools/lib/perf/include/internal/evsel.h | 2 ++
tools/perf/util/evsel.c | 1 +
tools/perf/util/parse-events.c | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index 1f210dadd666f..c1c5b0684eedb 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -79,8 +79,9 @@ static void __perf_evlist__propagate_maps(struct perf_evlist *evlist,
}
}
- /* Ensure cpus only references valid PMU CPUs. */
- if (!perf_cpu_map__has_any_cpu(evsel->cpus) &&
+ /* Ensure cpus only references valid PMU CPUs, except for uncore PMUs. */
+ if (!evsel->is_pmu_uncore &&
+ !perf_cpu_map__has_any_cpu(evsel->cpus) &&
!perf_cpu_map__is_subset(evsel->pmu_cpus, evsel->cpus)) {
struct perf_cpu_map *tmp = perf_cpu_map__intersect(evsel->pmu_cpus, evsel->cpus);
diff --git a/tools/lib/perf/include/internal/evsel.h b/tools/lib/perf/include/internal/evsel.h
index b988034f13710..35447bed0f958 100644
--- a/tools/lib/perf/include/internal/evsel.h
+++ b/tools/lib/perf/include/internal/evsel.h
@@ -128,6 +128,8 @@ struct perf_evsel {
bool requires_cpu;
/** Is the PMU for the event a core one? Effects the handling of own_cpus. */
bool is_pmu_core;
+ /** Is the PMU for the event an uncore one? */
+ bool is_pmu_uncore;
/** Does the evsel on read on the first CPU index such as tool time events? */
bool reads_only_on_cpu_idx0;
int idx;
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a3d3f49d33a45..0da2c56745c10 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -497,6 +497,7 @@ struct evsel *evsel__clone(struct evsel *dest, struct evsel *orig)
evsel->core.system_wide = orig->core.system_wide;
evsel->core.requires_cpu = orig->core.requires_cpu;
evsel->core.is_pmu_core = orig->core.is_pmu_core;
+ evsel->core.is_pmu_uncore = orig->core.is_pmu_uncore;
if (orig->name) {
evsel->name = strdup(orig->name);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 413d5bde91147..3d05d691e8c52 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -309,6 +309,7 @@ __add_event(struct list_head *list, int *idx,
evsel->core.pmu_cpus = pmu_cpus;
evsel->core.requires_cpu = pmu ? pmu->is_uncore : false;
evsel->core.is_pmu_core = is_pmu_core;
+ evsel->core.is_pmu_uncore = pmu ? pmu->is_uncore : false;
evsel->core.reads_only_on_cpu_idx0 = perf_pmu__reads_only_on_cpu_idx0(attr);
evsel->pmu = pmu;
evsel->alternate_hw_config = alternate_hw_config;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0738/2151] mtd: block: prevent reclaim I/O during request processing
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (736 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0737/2151] perf evlist: Dont restrict uncore events to PMU CPUs Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0739/2151] clk: qcom: gcc-qcs615: Fix GCC_CPUSS_GNOC_CBCR offset Greg Kroah-Hartman
` (144 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+e08e0a15269eefa87790,
Qingfang Deng, Miquel Raynal, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qingfang Deng <qingfang.deng@linux.dev>
[ Upstream commit d498b2ddda99eed28cde177b1620dbcea246a1c4 ]
The blktrans request callbacks run under dev->lock and may allocate
memory with GFP_KERNEL. For example, mtdblock_writesect() uses vmalloc()
to allocate its eraseblock cache. Direct reclaim can then recurse into
block I/O and deadlock on resources held by the request being processed.
syzbot reports a circular locking dependency involving the device mutex
and fs_reclaim.
Commit d5ba1c8ffd0b ("mtd: don't use PF_MEMALLOC") removed PF_MEMALLOC
from the MTD request thread. That flag had prevented direct reclaim,
so its removal made allocations during request processing eligible for
reclaim without excluding I/O.
Wrap request processing in mtd_queue_rq() in a NOIO scope. This covers
both the request and background callbacks, including allocations made
by lower MTD drivers, and prevents reclaim from initiating filesystem
or block I/O.
Fixes: d5ba1c8ffd0b ("mtd: don't use PF_MEMALLOC")
Assisted-by: Codex:gpt-6-astra
Reported-by: syzbot+e08e0a15269eefa87790@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e08e0a15269eefa87790
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/mtd/mtd_blkdevs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 28e09d0804405..245c19cb22590 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -18,6 +18,7 @@
#include <linux/spinlock.h>
#include <linux/hdreg.h>
#include <linux/mutex.h>
+#include <linux/sched/mm.h>
#include <linux/uaccess.h>
#include "mtdcore.h"
@@ -167,6 +168,7 @@ static blk_status_t mtd_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
struct mtd_blktrans_dev *dev;
+ unsigned int noio_flags;
dev = hctx->queue->queuedata;
if (!dev) {
@@ -174,10 +176,13 @@ static blk_status_t mtd_queue_rq(struct blk_mq_hw_ctx *hctx,
return BLK_STS_IOERR;
}
+ /* Reclaim must not recurse into I/O while processing requests. */
+ noio_flags = memalloc_noio_save();
spin_lock_irq(&dev->queue_lock);
list_add_tail(&bd->rq->queuelist, &dev->rq_list);
mtd_blktrans_work(dev);
spin_unlock_irq(&dev->queue_lock);
+ memalloc_noio_restore(noio_flags);
return BLK_STS_OK;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0739/2151] clk: qcom: gcc-qcs615: Fix GCC_CPUSS_GNOC_CBCR offset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (737 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0738/2151] mtd: block: prevent reclaim I/O during request processing Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0740/2151] wifi: ath12k: avoid double DMA unmap of held monitor RX buffers Greg Kroah-Hartman
` (143 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Imran Shaik, Konrad Dybcio,
Abel Vesa, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 51ff9ffa18758c465a1a67ca36a78c2a8a5f3b2e ]
According to the documentation, the offset GCC_CPUSS_GNOC_CBCR is 0x48004.
Drop the extra zero, otherwise we land outside of regmap range.
Fixes: 39d6dcf67fe9 ("clk: qcom: gcc: Add support for QCS615 GCC clocks")
Reviewed-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260924-clk-qcom-gcc-qcs615-fix-cpuss-gnoc-offset-v2-1-67275f94aaec@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/clk/qcom/gcc-qcs615.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-qcs615.c b/drivers/clk/qcom/gcc-qcs615.c
index 5b3b8dd4f114b..0f3c326e4769c 100644
--- a/drivers/clk/qcom/gcc-qcs615.c
+++ b/drivers/clk/qcom/gcc-qcs615.c
@@ -3000,7 +3000,7 @@ static int gcc_qcs615_probe(struct platform_device *pdev)
qcom_branch_set_clk_en(regmap, 0x71004); /* GCC_GPU_CFG_AHB_CLK */
qcom_branch_set_clk_en(regmap, 0xb004); /* GCC_VIDEO_AHB_CLK */
qcom_branch_set_clk_en(regmap, 0xb040); /* GCC_VIDEO_XO_CLK */
- qcom_branch_set_clk_en(regmap, 0x480040); /* GCC_CPUSS_GNOC_CLK */
+ qcom_branch_set_clk_en(regmap, 0x48004); /* GCC_CPUSS_GNOC_CLK */
ret = qcom_cc_register_rcg_dfs(regmap, gcc_dfs_clocks,
ARRAY_SIZE(gcc_dfs_clocks));
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0740/2151] wifi: ath12k: avoid double DMA unmap of held monitor RX buffers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (738 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0739/2151] clk: qcom: gcc-qcs615: Fix GCC_CPUSS_GNOC_CBCR offset Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0741/2151] wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event() Greg Kroah-Hartman
` (142 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kang Yang, Baochen Qiang,
Vasanthakumar Thiagarajan, Jeff Johnson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kang Yang <kang.yang@oss.qualcomm.com>
[ Upstream commit febe1f8cbccc3434790bfc4d94d40c9dbd803065 ]
ath12k_dp_cc_cleanup() assumes that every rx_desc_info entry with a
non-NULL skb still has an active DMA mapping and therefore always
calls dma_unmap_single() before freeing the skb.
This assumption is not true for the monitor RX path.
ath12k_wifi7_dp_rx_mon_mpdu_pop() may DMA-unmap a buffer and mark
rxcb->unmapped before returning early to hold the MSDU for later
reprocessing. In that state desc_info->skb remains populated, so
module removal can trigger a second dma_unmap_single() from
ath12k_dp_cc_cleanup().
IOMMU reports the issue as:
dma_unmap_phys()
dma_unmap_page_attrs()
ath12k_dp_cc_cleanup()
ath12k_dp_cmn_device_deinit()
ath12k_core_stop()
Skip dma_unmap_single() when rxcb->unmapped is already set and free
the skb directly.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3
Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring")
Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260916060325.854-7-kang.yang@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath12k/dp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
index 4a54b8c353111..f89dd62a117a0 100644
--- a/drivers/net/wireless/ath/ath12k/dp.c
+++ b/drivers/net/wireless/ath/ath12k/dp.c
@@ -1180,10 +1180,11 @@ static void ath12k_dp_cc_cleanup(struct ath12k_base *ab)
if (!skb)
continue;
- dma_unmap_single(ab->dev,
- ATH12K_SKB_RXCB(skb)->paddr,
- skb->len + skb_tailroom(skb),
- DMA_FROM_DEVICE);
+ if (!ATH12K_SKB_RXCB(skb)->unmapped)
+ dma_unmap_single(ab->dev,
+ ATH12K_SKB_RXCB(skb)->paddr,
+ skb->len + skb_tailroom(skb),
+ DMA_FROM_DEVICE);
dev_kfree_skb_any(skb);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0741/2151] wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (739 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0740/2151] wifi: ath12k: avoid double DMA unmap of held monitor RX buffers Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0742/2151] writeback: size foreign flushes by target wb dirty pages Greg Kroah-Hartman
` (141 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Baochen Qiang, Jeff Johnson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
[ Upstream commit 64828f091c7de5c1324427b140fb545f93ef073f ]
Currently, while processing the WMI Service Ready Ext event, the iterator
in ath11k_service_ready_ext_event() can dispatch the HAL Regulatory
Capabilities handler ath11k_wmi_tlv_ext_soc_hal_reg_caps_parse() which can
allocate ab->reg_info_store.
If a subsequent failure occurs during iteration, the ab->reg_info_store
allocation is leaked.
Directly free and clear the pointer on the error path.
Note that the normal cleanup function ath11k_reg_free() cannot be used
since other regulatory-related fields are not yet populated at this point.
Compile tested only.
Fixes: 7004bdceef60 ("wifi: ath11k: store cur_regulatory_info for each radio")
Assisted-by: Claude:claude-sonnet-4-6
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260817-reg_info_store-leak-v1-1-77025a99b074@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath11k/wmi.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index c6b9e84b169c9..f12c1c380ed2a 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5084,6 +5084,15 @@ static int ath11k_service_ready_ext_event(struct ath11k_base *ab,
err:
kfree(svc_rdy_ext.mac_phy_caps);
+
+ /*
+ * During TLV iteration the WMI_TAG_SOC_HAL_REG_CAPABILITIES
+ * handler may have allocated ab->reg_info_store, so free it
+ * on error to avoid a memory leak
+ */
+ kfree(ab->reg_info_store);
+ ab->reg_info_store = NULL;
+
ath11k_wmi_free_dbring_caps(ab);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0742/2151] writeback: size foreign flushes by target wb dirty pages
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (740 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0741/2151] wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event() Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0743/2151] ACPICA: Fix memory leak in acpi_ds_create_field() Greg Kroah-Hartman
` (140 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jan Kara, Tejun Heo, Xin Yin,
Christian Brauner (Amutable), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xin Yin <yinxin.x@bytedance.com>
[ Upstream commit 168a8c13159c6e3f0f08da6f8fa2f633a91ba9fd ]
Foreign dirty tracking records the bdi and wb memcg IDs of recently
dirtied foreign inodes. When the source memcg needs foreign writeback,
mem_cgroup_flush_foreign() queues WB_REASON_FOREIGN_FLUSH to the
recorded target bdi_writeback.
cgroup_writeback_by_id() currently sizes this best-effort work from the
target memcg's NR_FILE_DIRTY counter. The work is scoped to one target
wb, so a memcg-wide dirty count can over-size a single-bdi flush when
the target memcg has dirty pages on other devices. It can also under-size
the flush when the target wb has dirty pages charged to other memcgs.
Over-sizing keeps the target wb busy longer and can delay later
writeback work. Under-sizing can finish before enough pages are written
back for the source memcg.
Use the target wb's WB_RECLAIMABLE counter and keep the existing 25%
headroom. This keeps the budget aligned with the writeback object being
queued.
Fixes: 97b27821b485 ("writeback, memcg: Implement foreign dirty flushing")
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Link: https://patch.msgid.link/20260924065443.1650126-1-yinxin.x@bytedance.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/fs-writeback.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index e479e310f92c6..a390cb6b14c6f 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1166,7 +1166,7 @@ int cgroup_writeback_by_id(u64 bdi_id, int memcg_id,
struct cgroup_subsys_state *memcg_css;
struct bdi_writeback *wb;
struct wb_writeback_work *work;
- unsigned long dirty;
+ long dirty;
int ret;
/* lookup bdi and memcg */
@@ -1195,16 +1195,13 @@ int cgroup_writeback_by_id(u64 bdi_id, int memcg_id,
}
/*
- * The caller is attempting to write out most of
- * the currently dirty pages. Let's take the current dirty page
- * count and inflate it by 25% which should be large enough to
- * flush out most dirty pages while avoiding getting livelocked by
- * concurrent dirtiers.
- *
- * BTW the memcg stats are flushed periodically and this is best-effort
- * estimation, so some potential error is ok.
+ * The caller is attempting to write out most of the target wb's
+ * currently dirty pages. Size the work from the wb's reclaimable pages
+ * and inflate the count by 25%, which should be large enough to flush
+ * out most dirty pages while avoiding getting livelocked by concurrent
+ * dirtiers.
*/
- dirty = memcg_page_state(mem_cgroup_from_css(memcg_css), NR_FILE_DIRTY);
+ dirty = wb_stat_sum(wb, WB_RECLAIMABLE);
dirty = dirty * 10 / 8;
/* issue the writeback work */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0743/2151] ACPICA: Fix memory leak in acpi_ds_create_field()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (741 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0742/2151] writeback: size foreign flushes by target wb dirty pages Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0744/2151] ACPICA: Fix PCC OperationRegion command offsets Greg Kroah-Hartman
` (139 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Breno Leitao, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <leitao@debian.org>
[ Upstream commit dbb3d99ee95c32711950850ddd33eb22a6042eb2 ]
acpi_ds_create_field() allocates internal_pcc_buffer for operation
regions in the PCC address space.
The function runs once per field, so a second field on the
same region overwrites the pointer and orphans the previous buffer.
The matching ACPI_FREE() in acpi_ut_delete_internal_obj() only ever sees
the last one.
An arm64 platform whose SSDT declares regions with multiple fields each
leaks two buffers at boot, as detected by kmemleak:
unreferenced object 0xffff000051e65400 (size 192):
comm "swapper/0", pid 1, jiffies 4294668436
backtrace (crc 0):
__kmalloc_noprof
acpi_ds_create_field
acpi_ds_load2_end_op
acpi_ds_exec_end_op
acpi_ps_parse_loop
acpi_ps_parse_aml
acpi_ns_load_table
acpi_load_tables
acpi_init
Do not allocate a region if it was previously allocated before,
preserving the current design, but, not leaking memory.
Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter")
Link: https://github.com/open-acpica/acpica/commit/c71849d476bb5f97ca1867849e893368e12a69e6
Signed-off-by: Breno Leitao <leitao@debian.org>
[ rjw: Subject tweak, fixed the Fixes: tag ]
Link: https://patch.msgid.link/20260925-acpica-pcc-field-leak-v2-1-e37008e715af@debian.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpica/dsfield.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index df132c9089c76..a522392ae2ddb 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -522,7 +522,8 @@ acpi_ds_create_field(union acpi_parse_object *op,
}
if (info.region_node->object->region.space_id ==
- ACPI_ADR_SPACE_PLATFORM_COMM) {
+ ACPI_ADR_SPACE_PLATFORM_COMM &&
+ !region_node->object->field.internal_pcc_buffer) {
region_node->object->field.internal_pcc_buffer =
ACPI_ALLOCATE_ZEROED(info.region_node->object->region.
length);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0744/2151] ACPICA: Fix PCC OperationRegion command offsets
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (742 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0743/2151] ACPICA: Fix memory leak in acpi_ds_create_field() Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0745/2151] perf annotate-data: Resolve type DIEs in the debug file they came from Greg Kroah-Hartman
` (138 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sudeep Holla, Rafael J. Wysocki,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudeep Holla <sudeep.holla@kernel.org>
[ Upstream commit 888dab4b04ea8725168c6d50d0bfb8057fccca18 ]
ACPI 6.3, section 5.5.2.4.7.3, states that the PCC Operation
Region is associated with the region of shared memory that follows the
PCC signature.
The generic and extended PCC shared memory layouts include the 4-byte
signature at offset 0, so their raw shared memory COMMAND fields are at
offsets 4 and 12 respectively. Since AML field offsets for the PCC
OperationRegion are relative to the region after that signature, ACPICA
must look for those COMMAND fields at OperationRegion offsets 0 and 8.
Adjust the generic and master subspace command checks to use those
OperationRegion-relative offsets. Otherwise writes to the COMMAND field
can fail to invoke the PCC address space handler at the offset described
by the PCC OperationRegion definition.
Link: https://github.com/open-acpica/acpica/pull/1205
Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter")
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
[ rjw: Fixed the Fixes: tag ]
Link: https://patch.msgid.link/20260922144302.3847593-2-sudeep.holla@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpica/exfield.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index ced3ff9d0a86a..f0c525dedbd81 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -45,12 +45,13 @@ static const u8 acpi_protocol_lengths[] = {
/*
* The following macros determine a given offset is a COMD field.
- * According to the specification, generic subspaces (types 0-2) contains a
- * 2-byte COMD field at offset 4 and master subspaces (type 3) contains a 4-byte
- * COMD field starting at offset 12.
+ * According to the specification, the PCC OperationRegion begins after
+ * the PCC signature. The raw shared memory COMD offsets of 4 for generic
+ * subspaces (types 0-2) and 12 for master subspaces (type 3) therefore
+ * appear at OperationRegion offsets 0 and 8.
*/
-#define GENERIC_SUBSPACE_COMMAND(a) (4 == a || a == 5)
-#define MASTER_SUBSPACE_COMMAND(a) (12 <= a && a <= 15)
+#define GENERIC_SUBSPACE_COMMAND(a) (0 == a || a == 1)
+#define MASTER_SUBSPACE_COMMAND(a) (8 <= a && a <= 11)
/*******************************************************************************
*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0745/2151] perf annotate-data: Resolve type DIEs in the debug file they came from
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (743 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0744/2151] ACPICA: Fix PCC OperationRegion command offsets Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0746/2151] ACPI: PCC: Preserve shared memory signature in OpRegion handler Greg Kroah-Hartman
` (137 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Namhyung Kim,
Arnaldo Carvalho de Melo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <acme@redhat.com>
[ Upstream commit 14ca0a28de37849afdda6ffd4c9047f58d8906c2 ]
'perf report -s type' hangs burning CPU on the dwz compressed debug
info of libz.so.1 (zlib-ng): die_collect_vars() saves the
dwarf_dieoffset() of the type DIE, which is relative to the file it
lives in - the dwz alt file for the types shared by more than one CU -
and update_var_state() resolves that offset in the main debug file,
parsing whatever is at it, here a typedef whose DW_AT_type refers to
itself.
Record whether the type DIE came from the alt file and resolve the
offset with die_get_type_die() in that file, with no fallback.
Fixes: 06b2ce75386df04b ("perf annotate-data: Maintain variable type info")
Fixes: 55ee3d005d62279d ("perf annotate-data: Add a cache for global variable types")
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/annotate-data.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/annotate-data.c b/tools/perf/util/annotate-data.c
index 687f381aeaec2..1023adad3ef82 100644
--- a/tools/perf/util/annotate-data.c
+++ b/tools/perf/util/annotate-data.c
@@ -625,6 +625,8 @@ struct global_var_entry {
u64 start;
u64 end;
u64 die_offset;
+ int die_tag;
+ bool from_alt; /* die_offset is relative to the alt (dwz) file */
};
static int global_var_cmp(const void *_key, const struct rb_node *node)
@@ -662,7 +664,7 @@ static struct global_var_entry *global_var__find(struct data_loc_info *dloc, u64
}
static bool global_var__add(struct data_loc_info *dloc, u64 addr,
- const char *name, Dwarf_Die *type_die)
+ const char *name, Dwarf_Die *type_die, bool from_alt)
{
struct dso *dso = map__dso(dloc->ms->map);
struct global_var_entry *gvar;
@@ -684,6 +686,8 @@ static bool global_var__add(struct data_loc_info *dloc, u64 addr,
gvar->start = addr;
gvar->end = addr + size;
gvar->die_offset = dwarf_dieoffset(type_die);
+ gvar->die_tag = dwarf_tag(type_die);
+ gvar->from_alt = from_alt;
rb_add(&gvar->node, dso__global_vars(dso), global_var_less);
return true;
@@ -758,7 +762,8 @@ static void global_var__collect(struct data_loc_info *dloc)
if (pos->reg != -1)
continue;
- if (!dwarf_offdie(dwarf, pos->die_off, &type_die))
+ if (!die_get_type_die(dwarf, pos->die_off, pos->die_tag,
+ pos->from_alt, &type_die))
continue;
if (!get_global_var_info(dloc, pos->addr, &var_name,
@@ -768,7 +773,8 @@ static void global_var__collect(struct data_loc_info *dloc)
if (var_offset != 0)
continue;
- global_var__add(dloc, pos->addr, var_name, &type_die);
+ global_var__add(dloc, pos->addr, var_name, &type_die,
+ pos->from_alt);
}
delete_var_types(var_types);
@@ -793,7 +799,8 @@ bool get_global_var_type(Dwarf_Die *cu_die, struct data_loc_info *dloc,
gvar = global_var__find(dloc, var_addr);
if (gvar) {
- if (!dwarf_offdie(dloc->di->dbg, gvar->die_offset, type_die))
+ if (!die_get_type_die(dloc->di->dbg, gvar->die_offset,
+ gvar->die_tag, gvar->from_alt, type_die))
return false;
*var_offset = var_addr - gvar->start;
@@ -824,7 +831,8 @@ bool get_global_var_type(Dwarf_Die *cu_die, struct data_loc_info *dloc,
ok:
/* The address should point to the start of the variable */
- global_var__add(dloc, var_addr - *var_offset, var_name, type_die);
+ global_var__add(dloc, var_addr - *var_offset, var_name, type_die,
+ !die_same_file(cu_die, type_die));
return true;
}
@@ -861,7 +869,8 @@ static void update_var_state(struct type_state *state, struct data_loc_info *dlo
if (var->addr != addr)
continue;
/* Get the type DIE using the offset */
- if (!dwarf_offdie(dloc->di->dbg, var->die_off, &mem_die))
+ if (!die_get_type_die(dloc->di->dbg, var->die_off,
+ var->die_tag, var->from_alt, &mem_die))
continue;
if (var->reg == DWARF_REG_FB || var->reg == fbreg || var->reg == state->stack_reg) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0746/2151] ACPI: PCC: Preserve shared memory signature in OpRegion handler
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (744 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0745/2151] perf annotate-data: Resolve type DIEs in the debug file they came from Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0747/2151] ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure Greg Kroah-Hartman
` (136 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Huisong Li, Sudeep Holla,
Rafael J. Wysocki, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudeep Holla <sudeep.holla@kernel.org>
[ Upstream commit 46c263c213876bdc2297ef61aa90f0b210ebac73 ]
ACPI 6.3 introduced PCC OperationRegions. Section 5.5.2.4.7.3,
"Declaring message fields within a PCC OperationRegion", states that,
for all PCC subspace types, the PCC Operation Region pertains to the
region of PCC subspace that succeeds the PCC signature. Its length
therefore excludes the 4-byte signature.
The PCC address space handler currently copies the OperationRegion
buffer to and from the start of the shared memory. This overwrites or
exposes the platform-populated signature and omits the final four bytes
of the OperationRegion.
Offset the copies by the size of the signature and reject an
OperationRegion that does not fit in the remaining shared memory.
The example added by commit 77e2a04745ff ("ACPI: PCC: Implement
OperationRegion handler for the PCC Type 3 subtype") incorrectly
included the signature as an OperationRegion field. A Type 3
OperationRegion containing a 100-byte communication area is declared
as follows:
OperationRegion (PFRM, PCC, 2, 0x70)
Field (PFRM, ByteAcc, NoLock, Preserve)
{
FLGS, 32,
LEN, 32,
CMD, 32,
DATA, 800
}
This contains three 32-bit fields followed by a 100-byte DATA field.
The fields correspond to the Type 3 shared memory layout in ACPI 6.3,
Table 14-372, after excluding its 4-byte signature.
Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype")
Reviewed-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Link: https://patch.msgid.link/20260922144302.3847593-3-sudeep.holla@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/acpi/acpi_pcc.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c
index e3f302b9dee5f..683924a708ba0 100644
--- a/drivers/acpi/acpi_pcc.c
+++ b/drivers/acpi/acpi_pcc.c
@@ -28,6 +28,7 @@
* to PCC commands
*/
#define PCC_CMD_WAIT_RETRIES_NUM 500ULL
+#define PCC_SIGNATURE_SIZE sizeof(u32)
struct pcc_data {
struct pcc_mbox_chan *pcc_chan;
@@ -74,6 +75,14 @@ acpi_pcc_address_space_setup(acpi_handle region_handle, u32 function,
}
pcc_chan = data->pcc_chan;
+ if (pcc_chan->shmem_size < PCC_SIGNATURE_SIZE ||
+ ctx->length > pcc_chan->shmem_size - PCC_SIGNATURE_SIZE) {
+ pr_err("PCC channel-%d shared memory is too small.\n",
+ ctx->subspace_id);
+ ret = AE_AML_REGION_LIMIT;
+ goto err_free_channel;
+ }
+
if (!pcc_chan->mchan->mbox->txdone_irq) {
pr_err("This channel-%d does not support interrupt.\n",
ctx->subspace_id);
@@ -97,14 +106,17 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
u32 bits, acpi_integer *value,
void *handler_context, void *region_context)
{
- int ret;
struct pcc_data *data = region_context;
+ void __iomem *pcc_opregion;
u64 usecs_lat;
+ int ret;
+
+ pcc_opregion = data->pcc_chan->shmem + PCC_SIGNATURE_SIZE;
reinit_completion(&data->done);
- /* Write to Shared Memory */
- memcpy_toio(data->pcc_chan->shmem, (void *)value, data->ctx.length);
+ /* Write to the PCC OperationRegion after the shared memory signature. */
+ memcpy_toio(pcc_opregion, (void *)value, data->ctx.length);
ret = mbox_send_message(data->pcc_chan->mchan, NULL);
if (ret < 0)
@@ -125,7 +137,7 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
mbox_chan_txdone(data->pcc_chan->mchan, ret);
- memcpy_fromio(value, data->pcc_chan->shmem, data->ctx.length);
+ memcpy_fromio(value, pcc_opregion, data->ctx.length);
return AE_OK;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0747/2151] ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (745 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0746/2151] ACPI: PCC: Preserve shared memory signature in OpRegion handler Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0748/2151] ASoC: mediatek: mt8183: Fix clock handling in mux disable path Greg Kroah-Hartman
` (135 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cezary Rojewski, bui duc phuc,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 7f05596bd4047e4623eeb1f3c6921d6f71481c3b ]
In mt8183_afe_enable_clock(), when clk_set_parent() fails, the current
error path incorrectly cleans up the previously enabled clock instead of
the clock used by clk_set_parent().
Fix the error path to clean up the correct clock when clk_set_parent()
fails.
Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903045203.175337-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8183/mt8183-afe-clk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-clk.c b/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
index cc4f8f4d3dab9..6ab0734ad1365 100644
--- a/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
@@ -137,7 +137,7 @@ int mt8183_afe_enable_clock(struct mtk_base_afe *afe)
dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIO],
aud_clks[CLK_CLK26M], ret);
- goto CLK_MUX_AUDIO_ERR;
+ goto CLK_MUX_AUDIO_INTBUS_ERR;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_MUX_AUDIOINTBUS]);
@@ -153,7 +153,7 @@ int mt8183_afe_enable_clock(struct mtk_base_afe *afe)
dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIOINTBUS],
aud_clks[CLK_TOP_SYSPLL_D2_D4], ret);
- goto CLK_MUX_AUDIO_INTBUS_ERR;
+ goto CLK_AFE_ERR;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_AFE]);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0748/2151] ASoC: mediatek: mt8183: Fix clock handling in mux disable path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (746 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0747/2151] ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0749/2151] ASoC: mediatek: mt8183: Fix APLL enable error handling Greg Kroah-Hartman
` (134 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cezary Rojewski, bui duc phuc,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 4a0f9566ae0c3ad32620254342b266f37f4757de ]
In the disable path of the appl*_mux_setting() functions,
clk_disable_unprepare() is called after clk_set_parent().
If clk_set_parent() fails, clk_disable_unprepare() is skipped,
potentially leaving one of the clocks enabled.
Remove the goto exit paths so that all teardown steps are attempted
and any errors are only reported.
Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver")
Suggested-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260903045203.175337-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8183/mt8183-afe-clk.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-clk.c b/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
index 6ab0734ad1365..dd1a5925af96d 100644
--- a/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
@@ -271,7 +271,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
@@ -281,7 +280,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
}
@@ -298,7 +296,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
afe_priv->clk[CLK_CLK26M]);
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
ERR_ENABLE_CLK_TOP_MUX_AUD_1:
-EXIT:
return ret;
}
@@ -345,7 +342,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]);
@@ -355,7 +351,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
}
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
}
@@ -372,7 +367,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
afe_priv->clk[CLK_CLK26M]);
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
ERR_ENABLE_CLK_TOP_MUX_AUD_2:
-EXIT:
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0749/2151] ASoC: mediatek: mt8183: Fix APLL enable error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (747 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0748/2151] ASoC: mediatek: mt8183: Fix clock handling in mux disable path Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0750/2151] dt-bindings: vendor-prefixes: Add Chip Wealth Technology Greg Kroah-Hartman
` (133 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cezary Rojewski, bui duc phuc,
Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 30cf48383006579d7cd35380cc6e766260b72bff ]
Currently, the mt8183_apll*_enable() functions call mux_setting(afe, true)
but do not check its return value to handle failures.
In addition, the cleanup paths of mt8183_apll*_enable() do not call
mux_setting(afe, false) when the enable operation fails, while the
mt8183_apll*_disable() functions do.
Add error handling for apll*_mux_setting() and call mux_setting(afe, false)
in the cleanup paths when mt8183_apll*_enable() fails.
Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260903045203.175337-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8183/mt8183-afe-clk.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-clk.c b/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
index dd1a5925af96d..06556689976db 100644
--- a/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
+++ b/sound/soc/mediatek/mt8183/mt8183-afe-clk.c
@@ -376,7 +376,9 @@ int mt8183_apll1_enable(struct mtk_base_afe *afe)
int ret;
/* setting for APLL */
- apll1_mux_setting(afe, true);
+ ret = apll1_mux_setting(afe, true);
+ if (ret)
+ return ret;
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL22M]);
if (ret) {
@@ -405,6 +407,8 @@ int mt8183_apll1_enable(struct mtk_base_afe *afe)
ERR_CLK_APLL1_TUNER:
clk_disable_unprepare(afe_priv->clk[CLK_APLL22M]);
ERR_CLK_APLL22M:
+ apll1_mux_setting(afe, false);
+
return ret;
}
@@ -430,7 +434,9 @@ int mt8183_apll2_enable(struct mtk_base_afe *afe)
int ret;
/* setting for APLL */
- apll2_mux_setting(afe, true);
+ ret = apll2_mux_setting(afe, true);
+ if (ret)
+ return ret;
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL24M]);
if (ret) {
@@ -459,6 +465,8 @@ int mt8183_apll2_enable(struct mtk_base_afe *afe)
ERR_CLK_APLL2_TUNER:
clk_disable_unprepare(afe_priv->clk[CLK_APLL24M]);
ERR_CLK_APLL24M:
+ apll2_mux_setting(afe, false);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0750/2151] dt-bindings: vendor-prefixes: Add Chip Wealth Technology
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (748 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0749/2151] ASoC: mediatek: mt8183: Fix APLL enable error handling Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0751/2151] arm64: dts: qcom: sdm845-lg: fix sdcard pinctrl nodes Greg Kroah-Hartman
` (132 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aaron Kling, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Kling <webgeek1234@gmail.com>
[ Upstream commit 058ee00216a1356e710446b59a800065d2abbd80 ]
Add an entry for Chip Wealth Technology (https://www.chipwealth.com/)
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Link: https://patch.msgid.link/20260727-ayn-qcs8550-v9-1-e3db456e10e5@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 8bc95dd4b2592..5e80440a22395 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -305,6 +305,8 @@ patternProperties:
description: ChipOne
"^chipspark,.*":
description: ChipSPARK
+ "^chipwealth,.*":
+ description: Chip Wealth Technology
"^chongzhou,.*":
description: Shenzhen Chongzhou Electronic Technology Co., Ltd
"^chrontel,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0751/2151] arm64: dts: qcom: sdm845-lg: fix sdcard pinctrl nodes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (749 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0750/2151] dt-bindings: vendor-prefixes: Add Chip Wealth Technology Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0752/2151] hfs/hfsplus: serialize B-tree close against folio release Greg Kroah-Hartman
` (131 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Paul Sajna, David Heidelberg,
Konrad Dybcio, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Sajna <sajattack@postmarketos.org>
[ Upstream commit e57d572ed779eb53e7eb5b8f9546731eff21bc93 ]
sdcard was previously rather unreliable during boot on sdm845-lg-judyln
Identified and applied correct settings from downstream lineageos kernel.
Verified card was properly detected over 5 reboots with rootfs on sdcard.
Refer to downstream: https://github.com/LineageOS/android_kernel_lge_sdm845/blob/efa8458f79dffeb380d43b38b9403407f87d9f05/arch/arm64/boot/dts/qcom/sdm845-pinctrl.dtsi#L148-L303
Fixes: 28ae8aa3923c ("arm64: dts: qcom: add device tree for LG G7 and LG V35")
Signed-off-by: Paul Sajna <sajattack@postmarketos.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260802-judyln-sdcard-fix-v1-1-b3477cfc42cc@postmarketos.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
index 99dafc6716e76..db05fb2e99cf2 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi
@@ -556,33 +556,26 @@ &tlmm {
sdc2_clk: sdc2-clk-state {
pins = "sdc2_clk";
bias-disable;
-
- /*
- * It seems that mmc_test reports errors if drive
- * strength is not 16 on clk, cmd, and data pins.
- *
- * TODO: copy-pasted from mtp, try other values
- * on these devices.
- */
drive-strength = <16>;
};
sdc2_cmd: sdc2-cmd-state {
pins = "sdc2_cmd";
bias-pull-up;
- drive-strength = <16>;
+ drive-strength = <10>;
};
sdc2_data: sdc2-data-state {
pins = "sdc2_data";
bias-pull-up;
- drive-strength = <16>;
+ drive-strength = <10>;
};
sd_card_det_n: sd-card-det-n-state {
pins = "gpio126";
function = "gpio";
bias-pull-up;
+ drive-strength = <2>;
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0752/2151] hfs/hfsplus: serialize B-tree close against folio release
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (750 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0751/2151] arm64: dts: qcom: sdm845-lg: fix sdcard pinctrl nodes Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0753/2151] x86/fpu: Fix potential underflow in xstate_calculate_size() Greg Kroah-Hartman
` (130 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+d729df28d933979e017a,
syzbot+2eac7d175baf21e6a5d5, syzbot+7155b2fe09e033c91381,
syzbot+adeb387cede15eb11607, syzbot+ae7f2423f3648100506d,
Kyle Zeng, Bruno Produit, Viacheslav Dubeyko, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bruno Produit <bruno.produit@trailofbits.com>
[ Upstream commit dce0e0248205bb3dc5b4c6793cd2ecb453152259 ]
B-tree nodes with a zero reference count remain in the node hash until
folio reclaim or tree teardown frees them. The folio release callbacks
remove nodes while holding hash_lock, but hfs_btree_close() walks and
frees the same hash without that lock. Reclaim can therefore unhash and
free a node after close has loaded its pointer, causing a use-after-free
or double-free.
The following syzkaller crashes seem to be the same UAF in
{hfs,hfsplus}_btree_close() (or {hfs,hfsplus}_bnode_unhash()) and follow
the same pattern, but do not contain a reproducer to confirm.
Detach each node with hfs_bnode_unhash() while holding hash_lock before
inspecting and freeing it. Drop the lock before hfs_bnode_free() so a
large tree is not freed while holding a spinlock. Apply the same fix to
the matching HFS+ implementation.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: syzbot+d729df28d933979e017a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d729df28d933979e017a
Reported-by: syzbot+2eac7d175baf21e6a5d5@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=2eac7d175baf21e6a5d5
Reported-by: syzbot+7155b2fe09e033c91381@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7155b2fe09e033c91381
Reported-by: syzbot+adeb387cede15eb11607@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=adeb387cede15eb11607
Reported-by: syzbot+ae7f2423f3648100506d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=ae7f2423f3648100506d
Assisted-by: Codex:gpt-5.6-sol
Reported-by: Kyle Zeng <kylebot@openai.com>
Signed-off-by: Kyle Zeng <kylebot@openai.com>
Signed-off-by: Bruno Produit <bruno.produit@trailofbits.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Tested-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/20260921153729.600313-1-bruno.produit@trailofbits.com
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/hfs/btree.c | 7 +++++--
fs/hfsplus/btree.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
index b8be01809b631..7c2872f1f6c69 100644
--- a/fs/hfs/btree.c
+++ b/fs/hfs/btree.c
@@ -180,15 +180,18 @@ void hfs_btree_close(struct hfs_btree *tree)
return;
for (i = 0; i < NODE_HASH_SIZE; i++) {
+ spin_lock(&tree->hash_lock);
while ((node = tree->node_hash[i])) {
- tree->node_hash[i] = node->next_hash;
+ hfs_bnode_unhash(node);
+ spin_unlock(&tree->hash_lock);
if (atomic_read(&node->refcnt))
pr_err("node %d:%d still has %d user(s)!\n",
node->tree->cnid, node->this,
atomic_read(&node->refcnt));
hfs_bnode_free(node);
- tree->node_hash_cnt--;
+ spin_lock(&tree->hash_lock);
}
+ spin_unlock(&tree->hash_lock);
}
iput(tree->inode);
kfree(tree);
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index 229f25dc7c49c..28bf3692691dc 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -265,16 +265,19 @@ void hfs_btree_close(struct hfs_btree *tree)
return;
for (i = 0; i < NODE_HASH_SIZE; i++) {
+ spin_lock(&tree->hash_lock);
while ((node = tree->node_hash[i])) {
- tree->node_hash[i] = node->next_hash;
+ hfs_bnode_unhash(node);
+ spin_unlock(&tree->hash_lock);
if (atomic_read(&node->refcnt))
pr_crit("node %d:%d "
"still has %d user(s)!\n",
node->tree->cnid, node->this,
atomic_read(&node->refcnt));
hfs_bnode_free(node);
- tree->node_hash_cnt--;
+ spin_lock(&tree->hash_lock);
}
+ spin_unlock(&tree->hash_lock);
}
iput(tree->inode);
kfree(tree);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0753/2151] x86/fpu: Fix potential underflow in xstate_calculate_size()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (751 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0752/2151] hfs/hfsplus: serialize B-tree close against folio release Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0754/2151] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies Greg Kroah-Hartman
` (129 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrei Vagin, Borislav Petkov (AMD),
Alexander Mikhalitsyn, Chang S. Bae, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrei Vagin <avagin@google.com>
[ Upstream commit f1751b220bc8a9bd2dc38ecf61f5c29f3826ace0 ]
xstate_calculate_size() calculates the size required for a given set of
xfeatures. It determines the topmost feature by finding the most
significant bit in xfeatures using fls64(xfeatures) - 1.
If xfeatures is 0, fls64(0) returns 0, and topmost becomes -1.
Previously, topmost was unsigned int, so -1 underflowed to UINT_MAX.
This caused the subsequent check `topmost <= XFEATURE_SSE` to fail, and
the code proceeded to access xstate arrays using topmost (UINT_MAX) as
an index, leading to an out-of-bounds access.
[ bp: Remove text explaining what the patch does. ]
Fixes: d6d6d50f1e80 ("x86/fpu/xstate: Consolidate size calculations")
Signed-off-by: Andrei Vagin <avagin@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Reviewed-by: Chang S. Bae <chang.seok.bae@intel.com>
Link: https://patch.msgid.link/20260925162454.1403405-6-avagin@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/kernel/fpu/xstate.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index 5f54a207ace46..582f226ca97f5 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -588,12 +588,13 @@ static bool __init check_xstate_against_struct(int nr)
static unsigned int xstate_calculate_size(u64 xfeatures, bool compacted)
{
- unsigned int topmost = fls64(xfeatures) - 1;
- unsigned int offset, i;
+ unsigned int topmost, offset, i;
- if (topmost <= XFEATURE_SSE)
+ if (!(xfeatures & ~XFEATURE_MASK_FPSSE))
return sizeof(struct xregs_state);
+ topmost = fls64(xfeatures) - 1;
+
if (compacted) {
offset = xfeature_get_offset(xfeatures, topmost);
} else {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0754/2151] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (752 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0753/2151] x86/fpu: Fix potential underflow in xstate_calculate_size() Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0755/2151] arm64: dts: qcom: monaco-evk: " Greg Kroah-Hartman
` (128 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mohd Ayaan Anwar,
Bartosz Golaszewski, Manivannan Sadhasivam, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
[ Upstream commit 0d567fb7def9564d15c334ec0fa5f5f6a0114ffa ]
Both SerDes PHY nodes were configured with 'phy-supply = <&vreg_l5a>',
which was incorrect on two counts: vreg_l5a is not a supply the PHY
requires, and only one rail was described where the hardware needs two.
The PHY requires vdda-0p9 (vreg_l4a) and vdda-1p2 (vreg_l1c). Replace
the incorrect phy-supply with these two named properties on both nodes.
Fixes: 5ef26fb8b3ed ("arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-4-c4bc688177dd@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi b/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
index c69aa2f41ce29..37b140dbb7b23 100644
--- a/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/lemans-ride-common.dtsi
@@ -778,12 +778,16 @@ &qup_uart17_rx {
};
&serdes0 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l1c>;
+
status = "okay";
};
&serdes1 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l1c>;
+
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0755/2151] arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (753 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0754/2151] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0756/2151] arm64: dts: qcom: qcs8300-ride: " Greg Kroah-Hartman
` (127 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mohd Ayaan Anwar,
Bartosz Golaszewski, Manivannan Sadhasivam, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
[ Upstream commit de7bc562fc363421902db7bdda8e347cc78a5173 ]
The SerDes PHY node was configured with 'phy-supply = <&vreg_l4a>',
which only described one of the two supplies the hardware requires.
While vreg_l4a is the correct 0.9V rail, the 1.2V rail (vreg_l5a)
was missing entirely.
Replace phy-supply with the two named properties vdda-0p9-supply
(vreg_l4a) and vdda-1p2-supply (vreg_l5a).
Fixes: 117d6bc9326b ("arm64: dts: qcom: qcs8300: Add Monaco EVK board")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-5-c4bc688177dd@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/monaco-evk.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/monaco-evk.dts b/arch/arm64/boot/dts/qcom/monaco-evk.dts
index e72cf6725a52c..cf8af1aa66bb4 100644
--- a/arch/arm64/boot/dts/qcom/monaco-evk.dts
+++ b/arch/arm64/boot/dts/qcom/monaco-evk.dts
@@ -427,7 +427,8 @@ &remoteproc_gpdsp {
};
&serdes0 {
- phy-supply = <&vreg_l4a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l5a>;
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0756/2151] arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (754 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0755/2151] arm64: dts: qcom: monaco-evk: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0757/2151] ARM: dts: qcom: msm8974: Sort header includes alphabetically Greg Kroah-Hartman
` (126 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mohd Ayaan Anwar,
Bartosz Golaszewski, Manivannan Sadhasivam, Bjorn Andersson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
[ Upstream commit e55080f068f3f6b733235fd7618c12e61744244b ]
The SerDes PHY node was configured with 'phy-supply = <&vreg_l5a>',
which only covered the 1.2V rail. The 0.9V rail (vreg_l4a) was missing
entirely.
Replace phy-supply with the two named properties vdda-0p9-supply
(vreg_l4a) and vdda-1p2-supply (vreg_l5a).
Fixes: 787cb3b4c434 ("arm64: dts: qcom: qcs8300-ride: enable ethernet0")
Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-6-c4bc688177dd@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/qcs8300-ride.dts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
index cabb3f508704b..b6d8de57a00e6 100644
--- a/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
+++ b/arch/arm64/boot/dts/qcom/qcs8300-ride.dts
@@ -337,7 +337,9 @@ &remoteproc_gpdsp {
};
&serdes0 {
- phy-supply = <&vreg_l5a>;
+ vdda-0p9-supply = <&vreg_l4a>;
+ vdda-1p2-supply = <&vreg_l5a>;
+
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0757/2151] ARM: dts: qcom: msm8974: Sort header includes alphabetically
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (755 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0756/2151] arm64: dts: qcom: qcs8300-ride: " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0758/2151] ARM: dts: qcom: msm8974: add MDSS reset Greg Kroah-Hartman
` (125 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Luca Weiss, Konrad Dybcio,
Dmitry Baryshkov, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <luca@lucaweiss.eu>
[ Upstream commit 4cf8d541f4716444b61a919e3fe6f04814165782 ]
Before adding more headers in a random order, let's sort the includes
once so that's done.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250621-msm8974-rpmpd-switch-v1-3-0a2cb303c446@lucaweiss.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Stable-dep-of: 542991a1d77e ("ARM: dts: qcom: msm8974: add MDSS reset")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
index 7e119370f3375..8459a840d9ffe 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
-#include <dt-bindings/interconnect/qcom,msm8974.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,dsi-phy-28nm.h>
#include <dt-bindings/clock/qcom,gcc-msm8974.h>
#include <dt-bindings/clock/qcom,mmcc-msm8974.h>
#include <dt-bindings/clock/qcom,rpmcc.h>
-#include <dt-bindings/reset/qcom,gcc-msm8974.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interconnect/qcom,msm8974.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/qcom,gcc-msm8974.h>
/ {
#address-cells = <1>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0758/2151] ARM: dts: qcom: msm8974: add MDSS reset
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (756 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0757/2151] ARM: dts: qcom: msm8974: Sort header includes alphabetically Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0759/2151] dt-bindings: vendor-prefixes: Add LeEco Greg Kroah-Hartman
` (124 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stephan Gerhold, Dmitry Baryshkov,
Konrad Dybcio, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[ Upstream commit 542991a1d77e5fea5263c2406773a0cd09a8ec48 ]
Commit 13a4b7fb6260 ("pmdomain: core: Leave powered-on genpds on until
late_initcall_sync") kept power-domains on longer during boot which is
causing DSI clock to get stuck and fail to acquire its configuration on
DSI bringup. Follow the example of other platforms and add MDSS reset to
the display subsystem node, fixing DSI issues.
Fixes: 5a9fc531f6ec ("ARM: dts: msm8974: add display support")
Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260810-msm8974-mmcc-fix-v2-1-5c787d79c0fa@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
index 8459a840d9ffe..8212eb0513e61 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/interconnect/qcom,msm8974.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/qcom,gcc-msm8974.h>
+#include <dt-bindings/reset/qcom,mmcc-msm8974.h>
/ {
#address-cells = <1>;
@@ -1910,6 +1911,8 @@ mdss: display-subsystem@fd900000 {
interrupt-controller;
#interrupt-cells = <1>;
+ resets = <&mmcc MDSS_RESET>;
+
status = "disabled";
#address-cells = <1>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0759/2151] dt-bindings: vendor-prefixes: Add LeEco
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (757 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0758/2151] ARM: dts: qcom: msm8974: add MDSS reset Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0760/2151] dt-bindings: vendor-prefixes: Add Retroid Pocket Greg Kroah-Hartman
` (123 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Adam Skladowski, Krzysztof Kozlowski,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adam Skladowski <a39.skl@gmail.com>
[ Upstream commit 1658af4d25bd3133d1b3403ccdda6214d40c0ebb ]
Add vendor prefix for now dead ecosystem company LeEco
Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260821-next-patches-v5-1-ec81cee63e09@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 5e80440a22395..a2a3fce5ba004 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -895,6 +895,8 @@ patternProperties:
description: Shenzen LC Technology Co., Ltd.
"^leadtek,.*":
description: Shenzhen Leadtek Technology Co., Ltd.
+ "^leeco,.*":
+ description: Leshi Holding Beijing.
"^leez,.*":
description: Leez
"^lego,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0760/2151] dt-bindings: vendor-prefixes: Add Retroid Pocket
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (758 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0759/2151] dt-bindings: vendor-prefixes: Add LeEco Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0761/2151] bpf: Skip zero-length stream writes Greg Kroah-Hartman
` (122 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Krzysztof Kozlowski, Aaron Kling,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaron Kling <webgeek1234@gmail.com>
[ Upstream commit ea55bba4c68a49fcb527da6c71dd48879b705fd1 ]
Add an entry for Retroid Pocket (https://www.goretroid.com/)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
Link: https://patch.msgid.link/20260829-rp-qcs8550-v3-1-198d5b2fc475@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index a2a3fce5ba004..80cbd78cc21df 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1349,6 +1349,8 @@ patternProperties:
description: Renesas Electronics Corporation
"^rervision,.*":
description: Shenzhen Rervision Technology Co., Ltd.
+ "^retroidpocket,.*":
+ description: Retroid Pocket
"^retronix,.*":
description: Retronix Technology Inc.
"^revotics,.*":
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0761/2151] bpf: Skip zero-length stream writes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (759 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0760/2151] dt-bindings: vendor-prefixes: Add Retroid Pocket Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0762/2151] tools/nolibc: provide the portable sys/select.h Greg Kroah-Hartman
` (121 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Emil Tsalapatis,
Kumar Kartikeya Dwivedi, Alexei Starovoitov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
[ Upstream commit f17bedcd29517739a6491c1c51cc6a593f6a0332 ]
A stream write whose formatted output is empty still allocates a stream
element and links it into the stream log. Capacity accounting only counts
payload bytes, so such elements never count against the stream limit, and a
program that keeps producing empty output allocates elements without bound
until a reader drains them.
Return success without allocating anything when there is nothing to write,
for both bpf_stream_vprintk() and staged writes. Every element in a stream
log then carries at least one byte, which later changes rely on when they
derive read readiness from published byte counts.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Suggested-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20260925045536.1480933-2-memxor@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/stream.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/stream.c b/kernel/bpf/stream.c
index 31ee75cba52df..688b10a79ba69 100644
--- a/kernel/bpf/stream.c
+++ b/kernel/bpf/stream.c
@@ -215,8 +215,13 @@ static void bpf_stream_release_capacity(struct bpf_stream *stream, int len)
static int bpf_stream_push_str(struct bpf_stream *stream, const char *str, int len)
{
- int ret = bpf_stream_consume_capacity(stream, len);
+ int ret;
+
+ /* Nothing to publish; do not allocate an element for it. */
+ if (!len)
+ return 0;
+ ret = bpf_stream_consume_capacity(stream, len);
if (ret)
return ret;
@@ -458,8 +463,8 @@ int bpf_stream_stage_printk(struct bpf_stream_stage *ss, const char *fmt, ...)
va_start(args, fmt);
len = vscnprintf(buf->buf, ARRAY_SIZE(buf->buf), fmt, args);
va_end(args);
- /* Exclude NULL byte during push. */
- ret = __bpf_stream_push_str(&ss->log, buf->buf, len);
+ /* Exclude NULL byte during push; skip empty output entirely. */
+ ret = len ? __bpf_stream_push_str(&ss->log, buf->buf, len) : 0;
if (!ret)
ss->len += len;
bpf_put_buffers();
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0762/2151] tools/nolibc: provide the portable sys/select.h
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (760 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0761/2151] bpf: Skip zero-length stream writes Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0763/2151] tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit Greg Kroah-Hartman
` (120 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Willy Tarreau, Thomas Weißschuh,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willy Tarreau <w@1wt.eu>
[ Upstream commit 10f407c66061524f0da0384de76827e30268f98a ]
Modern programs tend to include sys/select.h to get FD_SET() and
FD_CLR() definitions as well as struct fd_set, but in our case it
didn't exist.
The definitions were moved from types.h to sys/select.h, which is
now included from nolibc.h, and the sys_select() definition moved
there as well from sys.h.
Signed-off-by: Willy Tarreau <w@1wt.eu>
[Thomas: adapt to current -next branch]
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Stable-dep-of: 929ea5b3481f ("tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/include/nolibc/Makefile | 1 +
tools/include/nolibc/nolibc.h | 1 +
tools/include/nolibc/sys.h | 45 -------------
tools/include/nolibc/sys/select.h | 103 ++++++++++++++++++++++++++++++
tools/include/nolibc/types.h | 47 --------------
5 files changed, 105 insertions(+), 92 deletions(-)
create mode 100644 tools/include/nolibc/sys/select.h
diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index 143c2d2c2ba69..9916288e85ce9 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -56,6 +56,7 @@ all_files := \
sys/random.h \
sys/reboot.h \
sys/resource.h \
+ sys/select.h \
sys/stat.h \
sys/syscall.h \
sys/sysmacros.h \
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h
index d2f5aa085f8e3..91e2795ae49cd 100644
--- a/tools/include/nolibc/nolibc.h
+++ b/tools/include/nolibc/nolibc.h
@@ -104,6 +104,7 @@
#include "sys/random.h"
#include "sys/reboot.h"
#include "sys/resource.h"
+#include "sys/select.h"
#include "sys/stat.h"
#include "sys/syscall.h"
#include "sys/sysmacros.h"
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index c5564f57deec8..b88f34b5842ed 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -755,51 +755,6 @@ int sched_yield(void)
}
-/*
- * int select(int nfds, fd_set *read_fds, fd_set *write_fds,
- * fd_set *except_fds, struct timeval *timeout);
- */
-
-static __attribute__((unused))
-int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)
-{
-#if defined(__ARCH_WANT_SYS_OLD_SELECT) && !defined(__NR__newselect)
- struct sel_arg_struct {
- unsigned long n;
- fd_set *r, *w, *e;
- struct timeval *t;
- } arg = { .n = nfds, .r = rfds, .w = wfds, .e = efds, .t = timeout };
- return my_syscall1(__NR_select, &arg);
-#elif defined(__NR__newselect)
- return my_syscall5(__NR__newselect, nfds, rfds, wfds, efds, timeout);
-#elif defined(__NR_select)
- return my_syscall5(__NR_select, nfds, rfds, wfds, efds, timeout);
-#elif defined(__NR_pselect6)
- struct timespec t;
-
- if (timeout) {
- t.tv_sec = timeout->tv_sec;
- t.tv_nsec = timeout->tv_usec * 1000;
- }
- return my_syscall6(__NR_pselect6, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL);
-#else
- struct __kernel_timespec t;
-
- if (timeout) {
- t.tv_sec = timeout->tv_sec;
- t.tv_nsec = timeout->tv_usec * 1000;
- }
- return my_syscall6(__NR_pselect6_time64, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL);
-#endif
-}
-
-static __attribute__((unused))
-int select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)
-{
- return __sysret(sys_select(nfds, rfds, wfds, efds, timeout));
-}
-
-
/*
* int setpgid(pid_t pid, pid_t pgid);
*/
diff --git a/tools/include/nolibc/sys/select.h b/tools/include/nolibc/sys/select.h
new file mode 100644
index 0000000000000..2a5619c012779
--- /dev/null
+++ b/tools/include/nolibc/sys/select.h
@@ -0,0 +1,103 @@
+/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
+
+#include "../nolibc.h"
+
+#ifndef _NOLIBC_SYS_SELECT_H
+#define _NOLIBC_SYS_SELECT_H
+
+#include <linux/time.h>
+#include <linux/unistd.h>
+
+/* commonly an fd_set represents 256 FDs */
+#ifndef FD_SETSIZE
+#define FD_SETSIZE 256
+#endif
+
+#define FD_SETIDXMASK (8 * sizeof(unsigned long))
+#define FD_SETBITMASK (8 * sizeof(unsigned long)-1)
+
+/* for select() */
+typedef struct {
+ unsigned long fds[(FD_SETSIZE + FD_SETBITMASK) / FD_SETIDXMASK];
+} fd_set;
+
+#define FD_CLR(fd, set) do { \
+ fd_set *__set = (set); \
+ int __fd = (fd); \
+ if (__fd >= 0) \
+ __set->fds[__fd / FD_SETIDXMASK] &= \
+ ~(1U << (__fd & FD_SETBITMASK)); \
+ } while (0)
+
+#define FD_SET(fd, set) do { \
+ fd_set *__set = (set); \
+ int __fd = (fd); \
+ if (__fd >= 0) \
+ __set->fds[__fd / FD_SETIDXMASK] |= \
+ 1 << (__fd & FD_SETBITMASK); \
+ } while (0)
+
+#define FD_ISSET(fd, set) ({ \
+ fd_set *__set = (set); \
+ int __fd = (fd); \
+ int __r = 0; \
+ if (__fd >= 0) \
+ __r = !!(__set->fds[__fd / FD_SETIDXMASK] & \
+1U << (__fd & FD_SETBITMASK)); \
+ __r; \
+ })
+
+#define FD_ZERO(set) do { \
+ fd_set *__set = (set); \
+ int __idx; \
+ int __size = (FD_SETSIZE+FD_SETBITMASK) / FD_SETIDXMASK;\
+ for (__idx = 0; __idx < __size; __idx++) \
+ __set->fds[__idx] = 0; \
+ } while (0)
+
+/*
+ * int select(int nfds, fd_set *read_fds, fd_set *write_fds,
+ * fd_set *except_fds, struct timeval *timeout);
+ */
+
+static __attribute__((unused))
+int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)
+{
+#if defined(__ARCH_WANT_SYS_OLD_SELECT) && !defined(__NR__newselect)
+ struct sel_arg_struct {
+ unsigned long n;
+ fd_set *r, *w, *e;
+ struct timeval *t;
+ } arg = { .n = nfds, .r = rfds, .w = wfds, .e = efds, .t = timeout };
+ return my_syscall1(__NR_select, &arg);
+#elif defined(__NR__newselect)
+ return my_syscall5(__NR__newselect, nfds, rfds, wfds, efds, timeout);
+#elif defined(__NR_select)
+ return my_syscall5(__NR_select, nfds, rfds, wfds, efds, timeout);
+#elif defined(__NR_pselect6)
+ struct timespec t;
+
+ if (timeout) {
+ t.tv_sec = timeout->tv_sec;
+ t.tv_nsec = timeout->tv_usec * 1000;
+ }
+ return my_syscall6(__NR_pselect6, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL);
+#else
+ struct __kernel_timespec t;
+
+ if (timeout) {
+ t.tv_sec = timeout->tv_sec;
+ t.tv_nsec = timeout->tv_usec * 1000;
+ }
+ return my_syscall6(__NR_pselect6_time64, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL);
+#endif
+}
+
+static __attribute__((unused))
+int select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)
+{
+ return __sysret(sys_select(nfds, rfds, wfds, efds, timeout));
+}
+
+
+#endif /* _NOLIBC_SYS_SELECT_H */
diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h
index 8fd3e81514da2..24490471c6e55 100644
--- a/tools/include/nolibc/types.h
+++ b/tools/include/nolibc/types.h
@@ -70,11 +70,6 @@
#define DT_LNK 0xa
#define DT_SOCK 0xc
-/* commonly an fd_set represents 256 FDs */
-#ifndef FD_SETSIZE
-#define FD_SETSIZE 256
-#endif
-
/* PATH_MAX and MAXPATHLEN are often used and found with plenty of different
* values.
*/
@@ -115,48 +110,6 @@
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
-#define FD_SETIDXMASK (8 * sizeof(unsigned long))
-#define FD_SETBITMASK (8 * sizeof(unsigned long)-1)
-
-/* for select() */
-typedef struct {
- unsigned long fds[(FD_SETSIZE + FD_SETBITMASK) / FD_SETIDXMASK];
-} fd_set;
-
-#define FD_CLR(fd, set) do { \
- fd_set *__set = (set); \
- int __fd = (fd); \
- if (__fd >= 0) \
- __set->fds[__fd / FD_SETIDXMASK] &= \
- ~(1U << (__fd & FD_SETBITMASK)); \
- } while (0)
-
-#define FD_SET(fd, set) do { \
- fd_set *__set = (set); \
- int __fd = (fd); \
- if (__fd >= 0) \
- __set->fds[__fd / FD_SETIDXMASK] |= \
- 1 << (__fd & FD_SETBITMASK); \
- } while (0)
-
-#define FD_ISSET(fd, set) ({ \
- fd_set *__set = (set); \
- int __fd = (fd); \
- int __r = 0; \
- if (__fd >= 0) \
- __r = !!(__set->fds[__fd / FD_SETIDXMASK] & \
-1U << (__fd & FD_SETBITMASK)); \
- __r; \
- })
-
-#define FD_ZERO(set) do { \
- fd_set *__set = (set); \
- int __idx; \
- int __size = (FD_SETSIZE+FD_SETBITMASK) / FD_SETIDXMASK;\
- for (__idx = 0; __idx < __size; __idx++) \
- __set->fds[__idx] = 0; \
- } while (0)
-
/* for getdents64() */
struct linux_dirent64 {
uint64_t d_ino;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0763/2151] tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (761 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0762/2151] tools/nolibc: provide the portable sys/select.h Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0764/2151] MIPS: Octeon: size the swiotlb for a modular OHCI platform driver Greg Kroah-Hartman
` (119 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Danish Khateeb,
Thomas Weißschuh, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danish Khateeb <danishkhateeb03@gmail.com>
[ Upstream commit 929ea5b3481fdbbb419f3986703280fb2b819504 ]
Since commit feaf75658783 ("nolibc: fix fd_set type"), an fd_set is an
array of unsigned long, but the FD_* macros still build their masks as
an int or an unsigned int: 1 << n in FD_SET(), 1U << n in FD_CLR() and
FD_ISSET(), where n is the fd modulo 64 on 64-bit architectures. So:
- FD_SET() of an fd with n == 31 sets the bits for n = 31-63, as
1 << 31 is negative and gets sign-extended.
- For n >= 32 the shifts are undefined. x86-64, for instance, masks
the shift count, so FD_SET(40) and FD_ISSET(40) use the bit of fd 8.
- FD_CLR() zero-extends ~(1U << n), so it also clears the bits for
n = 32-63, whichever fd it is given.
select() on fd 40, for instance, fails with EBADF, or watches fd 8
instead if that one is open.
Build the masks from 1UL.
Fixes: feaf75658783 ("nolibc: fix fd_set type")
Assisted-by: LLM
Signed-off-by: Danish Khateeb <danishkhateeb03@gmail.com>
Link: https://patch.msgid.link/20260925211600.119116-3-danishkhateeb03@gmail.com
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/include/nolibc/sys/select.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/include/nolibc/sys/select.h b/tools/include/nolibc/sys/select.h
index 2a5619c012779..d442aef54e574 100644
--- a/tools/include/nolibc/sys/select.h
+++ b/tools/include/nolibc/sys/select.h
@@ -26,7 +26,7 @@ typedef struct {
int __fd = (fd); \
if (__fd >= 0) \
__set->fds[__fd / FD_SETIDXMASK] &= \
- ~(1U << (__fd & FD_SETBITMASK)); \
+ ~(1UL << (__fd & FD_SETBITMASK)); \
} while (0)
#define FD_SET(fd, set) do { \
@@ -34,7 +34,7 @@ typedef struct {
int __fd = (fd); \
if (__fd >= 0) \
__set->fds[__fd / FD_SETIDXMASK] |= \
- 1 << (__fd & FD_SETBITMASK); \
+ 1UL << (__fd & FD_SETBITMASK); \
} while (0)
#define FD_ISSET(fd, set) ({ \
@@ -43,7 +43,7 @@ typedef struct {
int __r = 0; \
if (__fd >= 0) \
__r = !!(__set->fds[__fd / FD_SETIDXMASK] & \
-1U << (__fd & FD_SETBITMASK)); \
+1UL << (__fd & FD_SETBITMASK)); \
__r; \
})
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0764/2151] MIPS: Octeon: size the swiotlb for a modular OHCI platform driver
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (762 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0763/2151] tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0765/2151] MIPS: Only check -msym32 when need-compiler Greg Kroah-Hartman
` (118 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Orgad Shaneh, Thomas Bogendoerfer,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Orgad Shaneh <orgads@gmail.com>
[ Upstream commit f1dd1f0c8d595a019be503d40060d25721313b4a ]
plat_swiotlb_setup() raises the swiotlb to 64 MB on OCTEON II with
memory above 4 GB, because that OHCI can only DMA to 32 bits. The test
is "#ifdef CONFIG_USB_OHCI_HCD_PLATFORM", which is false when the driver
is a module - the usual way to build it - so the bump is silently
skipped.
What is left depends on the rest of the function: with PCI enabled the
"memory past the BAR1 hole" branch happens to ask for the same 64 MB,
but with CONFIG_PCI off - which is normal on these SoCs when no PCI
devices are wired - swiotlbsize stays at the PAGE_SIZE it was
initialised to. A full- or low-speed device on an OCTEON II board with
more than 4 GB of RAM then has no bounce buffer to speak of.
Use IS_ENABLED() so a modular OHCI gets the same sizing as a built-in
one. Seen on a CN6635 board with 8 GB of RAM and
CONFIG_USB_OHCI_HCD_PLATFORM=m.
Fixes: a8667d706dfa ("MIPS: OCTEON: dma-octeon: fix OHCI USB config check")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/mips/cavium-octeon/dma-octeon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/dma-octeon.c b/arch/mips/cavium-octeon/dma-octeon.c
index 9fbba6a8fa4c5..c049632fbcc33 100644
--- a/arch/mips/cavium-octeon/dma-octeon.c
+++ b/arch/mips/cavium-octeon/dma-octeon.c
@@ -228,7 +228,7 @@ void __init plat_swiotlb_setup(void)
swiotlbsize = 64 * (1<<20);
}
#endif
-#ifdef CONFIG_USB_OHCI_HCD_PLATFORM
+#if IS_ENABLED(CONFIG_USB_OHCI_HCD_PLATFORM)
/* OCTEON II ohci is only 32-bit. */
if (OCTEON_IS_OCTEON2() && max_addr >= 0x100000000ul)
swiotlbsize = 64 * (1<<20);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0765/2151] MIPS: Only check -msym32 when need-compiler
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (763 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0764/2151] MIPS: Octeon: size the swiotlb for a modular OHCI platform driver Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0766/2151] bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices Greg Kroah-Hartman
` (117 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Maciej W. Rozycki, Chen Linxuan,
WangYuli, Chen Linxuan, Thomas Bogendoerfer, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: WangYuli <wangyuli@uniontech.com>
[ Upstream commit 7a8f286c235f5d308208cfdcb025b2a0e0c84742 ]
During 'make modules_install', the need-compiler variable is null, so
Makefile.compiler isn't included. This results in call cc-option-yn
returning nothing and consequently an error is issued:
*** CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32. Stop.
and the invocation terminated for configurations that set the Kconfig
option named.
Previously commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS
`modules_install' regression") addressed the same issue for GCC versions
now supported for Linux compilation, but caused a build error with Clang
because it doesn't support '-msym32'. Then commit 18ca63a2e23c ("MIPS:
Probe toolchain support of -msym32") fixed the issue with Clang, but
reintroduced the 'make modules_install' error listed above.
Wrap the handling of the '-msym32' option then with ifdef need-compiler,
fixing said error for 'make modules_install'.
For more technical details on why need-compiler is null during 'make
modules_install' and why no compiler invocation is actually needed at
this point, please refer to commit 4fe4a6374c4d ("MIPS: Only fiddle with
CHECKFLAGS if need-compiler") and commit 805b2e1d427a ("kbuild: include
Makefile.compiler only when compiler is needed").
NB leading 8 spaces rather than tabs required due to `make' syntax.
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2502120612000.65342@angie.orcam.me.uk/
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2307180025120.62448@angie.orcam.me.uk/
Fixes: a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression")
Reported-by: Maciej W. Rozycki <macro@orcam.me.uk>
Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@angie.orcam.me.uk/
Co-developed-by: Chen Linxuan <chenlinxuan@uniontech.com>
Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Reviewed-by: Chen Linxuan <me@black-desk.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/mips/Makefile | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d9057e29bc62b..b2968200ee008 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -290,18 +290,20 @@ drivers-$(CONFIG_PCI) += arch/mips/pci/
# We can always force a build with a 64-bits symbol format by
# passing 'KBUILD_SYM32=no' option to the make's command line.
#
-ifdef CONFIG_64BIT
- ifndef KBUILD_SYM32
- ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
- KBUILD_SYM32 = $(call cc-option-yn, -msym32)
+ifdef need-compiler
+ ifdef CONFIG_64BIT
+ ifndef KBUILD_SYM32
+ ifeq ($(shell expr $(load-y) \< 0xffffffff80000000), 0)
+ KBUILD_SYM32 = $(call cc-option-yn, -msym32)
+ endif
endif
- endif
- ifeq ($(KBUILD_SYM32), y)
- cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD_64BIT_SYM32
- else
- ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
- $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+ ifeq ($(KBUILD_SYM32), y)
+ cflags-$(KBUILD_SYM32) += -msym32 -DKBUILD_64BIT_SYM32
+ else
+ ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
+ $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+ endif
endif
endif
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0766/2151] bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (764 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0765/2151] MIPS: Only check -msym32 when need-compiler Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0767/2151] bitmap: bitmap_parse(): reject non-hex character before 8 digits Greg Kroah-Hartman
` (116 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexandra Lu, Manivannan Sadhasivam,
Jeff Hugo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandra Lu <alexandra.lu@nokia.com>
[ Upstream commit 95601e9948b42f82600ff2d9e0c2f699a067d561 ]
mhi_pci_probe() drops the runtime PM reference taken by local_pci_probe()
only when the device supports both PME from D3hot and M3, but
mhi_pci_remove() re-takes it based on PME capability alone, without
checking no_m3.
For a device that is PME capable and has no_m3 set, probe therefore never
drops the reference while remove takes an extra one, leaving the runtime
PM usage count one higher after every bind/unbind cycle. That is benign
for the device being removed, since the PCI core resumes it to D0 on
unbind regardless, but the struct device outlives the binding, so the
count accumulates across repeated cycles and can end up preventing
runtime suspend altogether.
Cache no_m3 in the driver's private data, as is already done for
reset_on_remove, and gate the removal side on it as well. Unlike
reset_on_remove it is cached for virtual functions too, because the probe
side gate tests info->no_m3 for physical and virtual functions alike.
QDU100 is currently the only device that sets no_m3.
Fixes: 0494cf9793b7 ("bus: mhi: host: pci_generic: Disable runtime PM for QDU100")
Assisted-by: LLM
Signed-off-by: Alexandra Lu <alexandra.lu@nokia.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patch.msgid.link/20260807143353.1932381-1-alexandra.lu@nokia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/bus/mhi/host/pci_generic.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
index a5b47728f9aba..a5b7e1f9fcd1e 100644
--- a/drivers/bus/mhi/host/pci_generic.c
+++ b/drivers/bus/mhi/host/pci_generic.c
@@ -1030,6 +1030,7 @@ struct mhi_pci_device {
struct work_struct recovery_work;
struct timer_list health_check_timer;
unsigned long status;
+ bool no_m3;
bool reset_on_remove;
};
@@ -1341,6 +1342,8 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
mhi_cntrl->mru = info->mru_default;
mhi_cntrl->name = info->name;
+ mhi_pdev->no_m3 = info->no_m3;
+
if (!pdev->is_virtfn)
mhi_pdev->reset_on_remove = info->reset_on_remove;
@@ -1428,7 +1431,7 @@ static void mhi_pci_remove(struct pci_dev *pdev)
}
/* balancing probe put_noidle */
- if (pci_pme_capable(pdev, PCI_D3hot))
+ if (pci_pme_capable(pdev, PCI_D3hot) && !mhi_pdev->no_m3)
pm_runtime_get_noresume(&pdev->dev);
if (mhi_pdev->reset_on_remove)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0767/2151] bitmap: bitmap_parse(): reject non-hex character before 8 digits
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (765 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0766/2151] bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0768/2151] bitmap: bitmap_parselist(): reject trailing characters after group size Greg Kroah-Hartman
` (115 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shashank Mohan Jain, Yury Norov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shashank Mohan Jain <jain.sm@gmail.com>
[ Upstream commit 7cee2fb210a198667d3d4200705215e6f315cab0 ]
bitmap_parse() is documented to return -EINVAL for illegal characters,
and it does so everywhere except when the illegal character directly
precedes a chunk of exactly eight hex digits.
bitmap_get_x32_reverse() parses a chunk from right to left. After it
has consumed eight digits it looks at one more character: a hex digit
means the chunk is wider than 32 bits and -EOVERFLOW is returned. Any
other character is silently consumed as if it were a separator, and the
remaining input is parsed as the next chunk. As a result:
"x12345678" -> 0x12345678, returns 0 (expected -EINVAL)
"1g12345678" -> 0x1_12345678, returns 0 (expected -EINVAL)
"0x0000000f" -> 0xf, returns 0, while "0xf" returns -EINVAL
bitmap_parse() backs cpumask_parse() and cpumask_parse_user(), so the
same inconsistency is visible when writing masks such as
/proc/irq/*/smp_affinity or the network queue rps_cpus/xps_cpus files.
__bitmap_parse(), which this function replaced in commit 2d6261583be0
("lib: rework bitmap_parse()"), rejected all three strings with -EINVAL,
and a "0x" prefix is accepted today only when exactly eight digits
follow it, so no reliably working input is lost.
When the loop falls through, *end is known to be a non-separator
character inside the buffer, so return -EOVERFLOW if it is a hex digit
and -EINVAL otherwise.
Fixes: 2d6261583be0 ("lib: rework bitmap_parse()")
Assisted-by: LLM
Signed-off-by: Shashank Mohan Jain <jain.sm@gmail.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
lib/bitmap-str.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/bitmap-str.c b/lib/bitmap-str.c
index be745209507a4..692a150a4d65c 100644
--- a/lib/bitmap-str.c
+++ b/lib/bitmap-str.c
@@ -447,8 +447,12 @@ static const char *bitmap_get_x32_reverse(const char *start,
goto out;
}
- if (hex_to_bin(*end--) >= 0)
- return ERR_PTR(-EOVERFLOW);
+ /*
+ * Eight digits have been consumed and the next character is not a
+ * separator: another hex digit means the chunk does not fit in 32
+ * bits, anything else is an illegal character.
+ */
+ return ERR_PTR(hex_to_bin(*end) >= 0 ? -EOVERFLOW : -EINVAL);
out:
*num = ret;
return end;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0768/2151] bitmap: bitmap_parselist(): reject trailing characters after group size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (766 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0767/2151] bitmap: bitmap_parse(): reject non-hex character before 8 digits Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0769/2151] bitmap: bitmap_parselist(): dont wrap around on a huge " Greg Kroah-Hartman
` (114 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shashank Mohan Jain, Yury Norov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shashank Mohan Jain <jain.sm@gmail.com>
[ Upstream commit c55d102257fa31271c6f11fea595b78c48fd7aa2 ]
bitmap_parse_region() checks that every region ends at a separator
(',', whitespace, '\n' or '\0'), except in the "range:used/group" form:
after parsing the group size it returns the pointer to the following
character without looking at it. The caller then starts a new region
at that character.
Before 'N' and 'all' were accepted as region starts this happened to be
harmless, because any other character would fail to parse as a new
region. Now text directly following the group size is silently parsed
as another region:
"0-7:1/2N" -> bits 0,2,4,6,7 (nbits = 8), returns 0
"0-7:1/2all" -> all bits set, returns 0
while "0-7N", "5N" or "0-7:1/2x" are correctly rejected with -EINVAL.
bitmap_parselist() is documented to return -EINVAL for an invalid
character. It parses cpu lists from sysfs, cgroup cpuset files and
boot parameters such as isolcpus= and nohz_full=, so a typo there is
accepted and yields a different mask than intended.
Check for the end of the region after the group size as well, like the
other forms do.
Fixes: 2c4885d24e64 ("lib: bitmap: support "N" as an alias for size of bitmap")
Assisted-by: LLM
Signed-off-by: Shashank Mohan Jain <jain.sm@gmail.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
lib/bitmap-str.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/bitmap-str.c b/lib/bitmap-str.c
index 692a150a4d65c..65cd6f60d4360 100644
--- a/lib/bitmap-str.c
+++ b/lib/bitmap-str.c
@@ -332,7 +332,14 @@ static const char *bitmap_parse_region(const char *str, struct region *r)
if (*str != '/')
return ERR_PTR(-EINVAL);
- return bitmap_getnum(str + 1, &r->group_len, lastbit);
+ str = bitmap_getnum(str + 1, &r->group_len, lastbit);
+ if (IS_ERR(str))
+ return str;
+
+ if (!end_of_region(*str))
+ return ERR_PTR(-EINVAL);
+
+ return end_of_str(*str) ? NULL : str;
no_end:
r->end = r->start;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0769/2151] bitmap: bitmap_parselist(): dont wrap around on a huge group size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (767 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0768/2151] bitmap: bitmap_parselist(): reject trailing characters after group size Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0770/2151] m68k: apollo: Fix interrupt setup Greg Kroah-Hartman
` (113 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shashank Mohan Jain, Yury Norov,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shashank Mohan Jain <jain.sm@gmail.com>
[ Upstream commit d075c4dc0b3c8ed91a4f67ebdf3384aa59fd4fbb ]
In the "range:used/group" form bitmap_set_region() walks the range with
for (start = r->start; start <= r->end; start += r->group_len)
where all values are unsigned int. bitmap_getnum() accepts any group
size up to UINT_MAX, and bitmap_check_region() only requires it to be
non-zero and at least the used size. If start + group_len exceeds
UINT_MAX, start wraps around to a small value that is still <= end, and
bits below the start of the range get set:
"1-1:1/4294967295" -> bits 0,1 (expected bit 1)
"15-15:1/4294967281" -> bits 0,15 (expected bit 15)
The loop still terminates, because start keeps decreasing until it
wraps past zero again, but the resulting mask contains bits outside
the requested range.
This needs a group size within 'start' of UINT_MAX, so it is unlikely
to be hit by accident; all bits set stay below the end of the range,
so there is no out-of-bounds write.
A group larger than the range simply means that the range contains a
single group, so stop the walk when the next group would start beyond
UINT_MAX.
Fixes: 0a5ce0831d04 ("lib/bitmap.c: make bitmap_parselist() thread-safe and much faster")
Assisted-by: LLM
Signed-off-by: Shashank Mohan Jain <jain.sm@gmail.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
lib/bitmap-str.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/bitmap-str.c b/lib/bitmap-str.c
index 65cd6f60d4360..777c89bc772cd 100644
--- a/lib/bitmap-str.c
+++ b/lib/bitmap-str.c
@@ -8,6 +8,7 @@
#include <linux/hex.h>
#include <linux/kernel.h>
#include <linux/mm.h>
+#include <linux/overflow.h>
#include <linux/string.h>
#include "kstrtox.h"
@@ -219,10 +220,12 @@ struct region {
static void bitmap_set_region(const struct region *r, unsigned long *bitmap)
{
- unsigned int start;
+ unsigned int start = r->start;
- for (start = r->start; start <= r->end; start += r->group_len)
+ do {
bitmap_set(bitmap, start, min(r->end - start + 1, r->off));
+ } while (!check_add_overflow(start, r->group_len, &start) &&
+ start <= r->end);
}
static int bitmap_check_region(const struct region *r)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0770/2151] m68k: apollo: Fix interrupt setup
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (768 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0769/2151] bitmap: bitmap_parselist(): dont wrap around on a huge " Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0771/2151] drm/msm/a6xx: Fix secondary rail vote in ARC votes Greg Kroah-Hartman
` (112 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daniel Palmer, Geert Uytterhoeven,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Palmer <daniel@0x0f.com>
[ Upstream commit 6cdbe63badcb524c88f2c8b3cee08f2ffc099a1b ]
The user interrupt vector needs to be installed before the interrupts
are unmasked otherwise the timer tick isn't handled and boot up gets
stuck in calibrate_delay().
Assisted-by: Claude:claude-fable-5 # Wrote Apollo DN3000 emulator using QEMU
Fixes: 0aa78106c661cf6c ("[PATCH] m68k: convert apollo irq code")
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://patch.msgid.link/20260828094940.3882602-1-daniel@0x0f.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/m68k/apollo/dn_ints.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index ba96a92f8f18f..89bfb5aaad9df 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -2,6 +2,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
+#include <asm/irq.h>
#include <asm/traps.h>
#include <asm/apollohw.h>
@@ -11,10 +12,13 @@ static unsigned int apollo_irq_startup(struct irq_data *data)
{
unsigned int irq = data->irq;
+ m68k_irq_startup(data);
+
if (irq < 8)
*(volatile unsigned char *)(pica+1) &= ~(1 << irq);
else
*(volatile unsigned char *)(picb+1) &= ~(1 << (irq - 8));
+
return 0;
}
@@ -26,6 +30,8 @@ static void apollo_irq_shutdown(struct irq_data *data)
*(volatile unsigned char *)(pica+1) |= (1 << irq);
else
*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
+
+ m68k_irq_shutdown(data);
}
static void apollo_irq_eoi(struct irq_data *data)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0771/2151] drm/msm/a6xx: Fix secondary rail vote in ARC votes
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (769 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0770/2151] m68k: apollo: Fix interrupt setup Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0772/2151] kbuild: Remove alignment on .modinfo section Greg Kroah-Hartman
` (111 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Konrad Dybcio, Akhil P Oommen,
Rob Clark, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Akhil P Oommen <akhilpo@oss.qualcomm.com>
[ Upstream commit 128a0edde50780ed9eb93ab5d2e18ca24c1f1c43 ]
Using the requested level can pick a secondary corner lower than the one
required to support the chosen primary corner, under-voting the
dependent rail. To fix this, match against the selected primary voltage
instead.
Fixes: 4b565ca5a2cb ("drm/msm: Add A6XX device support")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/755592/
Message-ID: <20260923-hawi-gpu-v1-2-0c3c79a1a470@oss.qualcomm.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 3f17cfaca8b47..5e2df5250a50d 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1539,10 +1539,14 @@ static int a6xx_gmu_rpmh_arc_votes_init(struct device *dev, u32 *votes,
/*
* Look for a level in in the secondary list that matches. If
* nothing fits, use the maximum non zero vote
+ *
+ * The secondary rail depends on the primary rail, so match it
+ * against the quantized primary voltage (which is >= the
+ * requested level), not the requested level itself.
*/
for (j = 0; j < sec_count; j++) {
- if (sec[j] >= level) {
+ if (sec[j] >= pri[pindex]) {
sindex = j;
break;
} else if (sec[j]) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0772/2151] kbuild: Remove alignment on .modinfo section
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (770 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0771/2151] drm/msm/a6xx: Fix secondary rail vote in ARC votes Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0773/2151] kbuild: do not allocate .modinfo in vmlinux Greg Kroah-Hartman
` (110 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Nicolas Schier, Nathan Chancellor,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <nathan@kernel.org>
[ Upstream commit 36d4a11b56aa98da4b4652a2e34d229ffcf36070 ]
Commit d50f21091358 ("kbuild: align modinfo section for Secureboot
Authenticode EDK2 compat") aligned .modinfo because it appeared in the
x86_64 compressed kernel image after commit 3e86e4d74c04 ("kbuild: keep
.modinfo section in vmlinux.unstripped"), breaking boot.
Commit 8678591b4746 ("kbuild: Split .modinfo out from ELF_DETAILS")
properly addresses .modinfo appearing in unexpected contexts like
compressed images by moving it out of ELF_DETAILS and explicitly
specifying its location in every architecture's vmlinux linker script or
discarding it where it may appear elsewhere.
Effectively revert commit d50f21091358 ("kbuild: align modinfo section
for Secureboot Authenticode EDK2 compat") and its follow up fix,
commit a26a6c93edfe ("kbuild: Strip trailing padding bytes from
modules.builtin.modinfo"), as they are no longer necessary in the
current tree. This simplifies future cleanups.
Reviewed-by: Nicolas Schier <n.schier@fritz.com>
Link: https://patch.msgid.link/20260918005142.GA1585590@ax162/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Stable-dep-of: a98db7418797 ("kbuild: keep .modinfo when vmlinux is linked with --gc-sections")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/asm-generic/vmlinux.lds.h | 2 +-
scripts/Makefile.vmlinux | 10 ----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 6640e06ef2f13..f60238b0b8918 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -838,7 +838,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
.shstrtab 0 : { *(.shstrtab) }
#define MODINFO \
- .modinfo : { *(.modinfo) . = ALIGN(8); }
+ .modinfo : { *(.modinfo) }
#ifdef CONFIG_GENERIC_BUG
#define BUG_TABLE \
diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
index 276c3134a563a..77b9969842e00 100644
--- a/scripts/Makefile.vmlinux
+++ b/scripts/Makefile.vmlinux
@@ -102,18 +102,8 @@ vmlinux: vmlinux.unstripped FORCE
# modules.builtin.modinfo
# ---------------------------------------------------------------------------
-# .modinfo in vmlinux.unstripped is aligned to 8 bytes for compatibility with
-# tools that expect vmlinux to have sufficiently aligned sections but the
-# additional bytes used for padding .modinfo to satisfy this requirement break
-# certain versions of kmod with
-#
-# depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname prefix
-#
-# Strip the trailing padding bytes after extracting .modinfo to comply with
-# what kmod expects to parse.
quiet_cmd_modules_builtin_modinfo = GEN $@
cmd_modules_builtin_modinfo = $(cmd_objcopy); \
- sed -i 's/\x00\+$$/\x00/g' $@; \
chmod -x $@
OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0773/2151] kbuild: do not allocate .modinfo in vmlinux
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (771 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0772/2151] kbuild: Remove alignment on .modinfo section Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0774/2151] kbuild: keep .modinfo when vmlinux is linked with --gc-sections Greg Kroah-Hartman
` (109 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kees Cook, Lorenzo Stoakes (ARM),
Nicolas Schier, Nathan Chancellor, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Stoakes (ARM) <ljs@kernel.org>
[ Upstream commit 5fe4dd59664105a9ea1a9468aa7391806b80364a ]
Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped")
placed MODULE_INFO() strings in the .modinfo section in vmlinux.unstripped,
however it left the section allocatable, so it gets assigned an address and
on arm64, arm and riscv, the section is tagged as PT_LOAD.
This is useless as the data is ultimately stripped anyway.
Doing this results in a lot of unnecessary work - each pass copies the
whole file, 450 MiB with relocations for an x86 allmodconfig build and 250
MiB for an arm64 allmodconfig build.
This adds ~0.7s on the serial tail of every build for arm64 and ~0.2s for
x86 (the tail is single-threaded work done after parallel work has
finished).
Nothing requires .modinfo to exist at an address, so mark the output
section (INFO) so that it's not allocated and use --dump-section to extract
it as -O only emits allocated sections.
The dump doesn't pick up the arch's OBJCOPYFLAGS any longer as they should
not impact the output of this section.
Image, bzImage, System.map and modules.builtin.modinfo are unchanged and
the stripped vmlinux differs only in its program headers.
The objcopy passes are on the serial tail of every build that links
vmlinux, no-op builds are unchanged.
Whole build, 128-thread Threadripper 9980X, best of N runs:
before after delta
-------------------------------
x86 defconfig, touch mm/vma.c, gcc 11.2s 11.1s -0.15s (-1%)
x86 defconfig, touch mm/vma.c, clang 11.3s 11.1s -0.19s (-2%)
x86 defconfig, clean, gcc 32.5s 32.3s -0.16s (-1%)
x86 defconfig, clean, clang 34.5s 34.2s -0.26s (-1%)
x86 allmodconfig, touch mm/vma.c, gcc 40.1s 39.7s -0.44s (-1%)
Assisted-by: LLM
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@fritz.com>
Link: https://patch.msgid.link/20260923-build-speedup-v4-1-73128809a4a4@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Stable-dep-of: a98db7418797 ("kbuild: keep .modinfo when vmlinux is linked with --gc-sections")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/asm-generic/vmlinux.lds.h | 2 +-
scripts/Makefile.vmlinux | 10 ++--------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f60238b0b8918..3c62b1ef31800 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -838,7 +838,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
.shstrtab 0 : { *(.shstrtab) }
#define MODINFO \
- .modinfo : { *(.modinfo) }
+ .modinfo (INFO) : { *(.modinfo) }
#ifdef CONFIG_GENERIC_BUG
#define BUG_TABLE \
diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
index 77b9969842e00..c9990f6a0d93e 100644
--- a/scripts/Makefile.vmlinux
+++ b/scripts/Makefile.vmlinux
@@ -89,11 +89,8 @@ remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel.*'
remove-symbols := -w --strip-unneeded-symbol='__mod_device_table__*'
-# To avoid warnings: "empty loadable segment detected at ..." from GNU objcopy,
-# it is necessary to remove the PT_LOAD flag from the segment.
quiet_cmd_strip_relocs = OBJCOPY $@
- cmd_strip_relocs = $(OBJCOPY) $(patsubst %,--set-section-flags %=noload,$(remove-section-y)) $< $@; \
- $(OBJCOPY) $(addprefix --remove-section=,$(remove-section-y)) $(remove-symbols) $@
+ cmd_strip_relocs = $(OBJCOPY) $(addprefix --remove-section=,$(remove-section-y)) $(remove-symbols) $< $@
targets += vmlinux
vmlinux: vmlinux.unstripped FORCE
@@ -103,10 +100,7 @@ vmlinux: vmlinux.unstripped FORCE
# ---------------------------------------------------------------------------
quiet_cmd_modules_builtin_modinfo = GEN $@
- cmd_modules_builtin_modinfo = $(cmd_objcopy); \
- chmod -x $@
-
-OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary
+ cmd_modules_builtin_modinfo = $(OBJCOPY) -O binary -j .modinfo --dump-section .modinfo=$@ $< /dev/null
targets += modules.builtin.modinfo
modules.builtin.modinfo: vmlinux.unstripped FORCE
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0774/2151] kbuild: keep .modinfo when vmlinux is linked with --gc-sections
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (772 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0773/2151] kbuild: do not allocate .modinfo in vmlinux Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0775/2151] netfilter: synproxy: fix reset of ct seqadj when reopening a connection Greg Kroah-Hartman
` (108 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sasha Levin, Nathan Chancellor
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit a98db7418797bc27bef53c861b97ac748f598414 ]
Builds with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y, such as arm
allmodconfig, now fail while extracting modules.builtin.modinfo:
arm-linux-gnueabihf-objcopy: vmlinux.unstripped: can't dump section
'.modinfo' - it does not exist: file format not recognized
/bin/sh: 1: cannot open modules.builtin.modinfo: No such file
or, with LLVM:
llvm-objcopy: error: 'vmlinux.unstripped': section '.modinfo' not
found
Nothing references the MODULE_INFO() strings, so --gc-sections
discards every .modinfo input section and vmlinux.unstripped ends up
with no .modinfo data. This is not new: ever since
modules.builtin.modinfo started being extracted from
vmlinux.unstripped, these builds have silently produced an empty
file, losing the modinfo of every built-in module. An arm
multi_v7_defconfig build with LD_DEAD_CODE_DATA_ELIMINATION on current
mainline yields a 0 byte modules.builtin.modinfo. The switch to
--dump-section only turned that into a build error.
Wrap the input section in KEEP() so that the linker retains it. The
output section is still (INFO), so nothing is allocated for it. With
the same arm config, modules.builtin.modinfo now has 14119 entries,
and on x86_64 defconfig, where nothing is garbage collected, it is
byte-identical before and after this change.
Found by KernelCI builds of the linus-next tree.
Fixes: 39cfd5b12160 ("kbuild: extract modules.builtin.modinfo from vmlinux.unstripped")
Fixes: 5fe4dd596641 ("kbuild: do not allocate .modinfo in vmlinux")
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
Link: https://patch.msgid.link/20260927161227.1179863-1-sashal@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/asm-generic/vmlinux.lds.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3c62b1ef31800..52b57b7e133e3 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -838,7 +838,7 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
.shstrtab 0 : { *(.shstrtab) }
#define MODINFO \
- .modinfo (INFO) : { *(.modinfo) }
+ .modinfo (INFO) : { KEEP(*(.modinfo)) }
#ifdef CONFIG_GENERIC_BUG
#define BUG_TABLE \
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0775/2151] netfilter: synproxy: fix reset of ct seqadj when reopening a connection
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (773 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0774/2151] kbuild: keep .modinfo when vmlinux is linked with --gc-sections Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0776/2151] ARM: dts: gemini: Use a level-high interrupt for TVE200 Greg Kroah-Hartman
` (107 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Fernando Fernandez Mancera,
Pablo Neira Ayuso, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <fmancera@suse.de>
[ Upstream commit a8708aa9fe1095ca7859cb3f102b6a3fa0fb98bd ]
SYNPROXY is resetting conntrack seqadj when a closed connection is
re-opened, but it was using nf_ct_seqadj_init() which is a no-op for a
zero offset.
This patch introduces nf_ct_seqadj_reset() which sets the offset values
directly to zero and avoid setting IPS_SEQ_ADJUST_BIT flag, it changes
SYNPROXY code to use it when needed.
Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/netfilter/nf_conntrack_seqadj.h | 1 +
net/netfilter/nf_conntrack_seqadj.c | 17 +++++++++++++++++
net/netfilter/nf_synproxy_core.c | 4 ++--
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/include/net/netfilter/nf_conntrack_seqadj.h b/include/net/netfilter/nf_conntrack_seqadj.h
index 883c414b768ee..0f5bbb14a25aa 100644
--- a/include/net/netfilter/nf_conntrack_seqadj.h
+++ b/include/net/netfilter/nf_conntrack_seqadj.h
@@ -33,6 +33,7 @@ static inline struct nf_conn_seqadj *nfct_seqadj_ext_add(struct nf_conn *ct)
int nf_ct_seqadj_init(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
s32 off);
+void nf_ct_seqadj_reset(struct nf_conn *ct, enum ip_conntrack_info ctinfo);
int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
__be32 seq, s32 off);
void nf_ct_tcp_seqadj_set(struct sk_buff *skb, struct nf_conn *ct,
diff --git a/net/netfilter/nf_conntrack_seqadj.c b/net/netfilter/nf_conntrack_seqadj.c
index b7e99f34dfce8..8dba6a0d5dc21 100644
--- a/net/netfilter/nf_conntrack_seqadj.c
+++ b/net/netfilter/nf_conntrack_seqadj.c
@@ -29,6 +29,23 @@ int nf_ct_seqadj_init(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
}
EXPORT_SYMBOL_GPL(nf_ct_seqadj_init);
+void nf_ct_seqadj_reset(struct nf_conn *ct, enum ip_conntrack_info ctinfo)
+{
+ struct nf_conn_seqadj *seqadj = nfct_seqadj(ct);
+ enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
+ struct nf_ct_seqadj *this_way;
+
+ if (unlikely(!seqadj))
+ return;
+
+ spin_lock_bh(&ct->lock);
+ this_way = &seqadj->seq[dir];
+ this_way->offset_before = 0;
+ this_way->offset_after = 0;
+ spin_unlock_bh(&ct->lock);
+}
+EXPORT_SYMBOL_GPL(nf_ct_seqadj_reset);
+
int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
__be32 seq, s32 off)
{
diff --git a/net/netfilter/nf_synproxy_core.c b/net/netfilter/nf_synproxy_core.c
index 69f84c44801dc..309bee4e1ed65 100644
--- a/net/netfilter/nf_synproxy_core.c
+++ b/net/netfilter/nf_synproxy_core.c
@@ -685,7 +685,7 @@ ipv4_synproxy_hook(void *priv, struct sk_buff *skb,
* adjustments, they will get initialized once the connection is
* reestablished.
*/
- nf_ct_seqadj_init(ct, ctinfo, 0);
+ nf_ct_seqadj_reset(ct, ctinfo);
synproxy->tsoff = 0;
this_cpu_inc(snet->stats->conn_reopened);
fallthrough;
@@ -1115,7 +1115,7 @@ ipv6_synproxy_hook(void *priv, struct sk_buff *skb,
* adjustments, they will get initialized once the connection is
* reestablished.
*/
- nf_ct_seqadj_init(ct, ctinfo, 0);
+ nf_ct_seqadj_reset(ct, ctinfo);
synproxy->tsoff = 0;
this_cpu_inc(snet->stats->conn_reopened);
fallthrough;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0776/2151] ARM: dts: gemini: Use a level-high interrupt for TVE200
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (774 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0775/2151] netfilter: synproxy: fix reset of ct seqadj when reopening a connection Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0777/2151] netfilter: nfnetlink_hook: Dump nat type chains Greg Kroah-Hartman
` (106 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Linus Walleij, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linusw@kernel.org>
[ Upstream commit 5bf1bb010712bba28eda926ed453db3cab91381a ]
TVE200's interrupt is configured as rising-edge. On the D-Link DIR-685,
this can stop interrupt delivery after the first vertical interrupt,
causing vblank and page-flip timeouts and delaying framebuffer console
startup.
The vertical interrupt can remain pending after acknowledgment. Use
level-high triggering so the pending condition is delivered again
without requiring another edge.
Fixes: d2b85241a9f5 ("ARM: dts: Add TVE200 to the Gemini SoC DTSI")
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
Message-ID: <20260921-gemini-tve200-fix-v1-2-8be03ac2a8f7@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/gemini/gemini.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/gemini/gemini.dtsi b/arch/arm/boot/dts/gemini/gemini.dtsi
index befe322bd7de9..c95faa197bcf1 100644
--- a/arch/arm/boot/dts/gemini/gemini.dtsi
+++ b/arch/arm/boot/dts/gemini/gemini.dtsi
@@ -428,7 +428,7 @@ dma-controller@67000000 {
display-controller@6a000000 {
compatible = "cortina,gemini-tvc", "faraday,tve200";
reg = <0x6a000000 0x1000>;
- interrupts = <13 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
resets = <&syscon GEMINI_RESET_TVC>;
clocks = <&syscon GEMINI_CLK_GATE_TVC>,
<&syscon GEMINI_CLK_TVC>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0777/2151] netfilter: nfnetlink_hook: Dump nat type chains
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (775 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0776/2151] ARM: dts: gemini: Use a level-high interrupt for TVE200 Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0778/2151] netfilter: nfnetlink: Fix for interrupted hook dumps Greg Kroah-Hartman
` (105 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Phil Sutter, Florian Westphal,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Phil Sutter <phil@nwl.cc>
[ Upstream commit b010e2a4a9ac2bcd0db2c3a41877d59d827a8a80 ]
These chains are indirectly attached to the hook since they are
not called for packets belonging to an established connection.
Introduce NF_HOOK_OP_NAT to identify the container and dump attached
entries instead of the container itself.
Dump these entries with the dispatcher's priority value since their own
priority merely defines ordering within the dispatcher's list.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Stable-dep-of: d3950004ba90 ("netfilter: nfnetlink: Fix for interrupted hook dumps")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/netfilter.h | 7 +++++++
net/netfilter/nf_nat_core.c | 6 ------
net/netfilter/nf_nat_proto.c | 8 ++++++++
net/netfilter/nfnetlink_hook.c | 37 ++++++++++++++++++++++++++++++----
4 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index efbbfa770d661..e99afc1414cd3 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -93,6 +93,7 @@ enum nf_hook_ops_type {
NF_HOOK_OP_NF_TABLES,
NF_HOOK_OP_BPF,
NF_HOOK_OP_NFT_FT,
+ NF_HOOK_OP_NAT,
};
struct nf_hook_ops {
@@ -140,6 +141,12 @@ struct nf_hook_entries {
*/
};
+struct nf_nat_lookup_hook_priv {
+ struct nf_hook_entries __rcu *entries;
+
+ struct rcu_head rcu_head;
+};
+
#ifdef CONFIG_NETFILTER
static inline struct nf_hook_ops **nf_hook_entries_get_hook_ops(const struct nf_hook_entries *e)
{
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index f628122bf8a82..3a29b1e411907 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -39,12 +39,6 @@ static struct hlist_head *nf_nat_bysource __read_mostly;
static unsigned int nf_nat_htable_size __read_mostly;
static siphash_aligned_key_t nf_nat_hash_rnd;
-struct nf_nat_lookup_hook_priv {
- struct nf_hook_entries __rcu *entries;
-
- struct rcu_head rcu_head;
-};
-
struct nf_nat_hooks_net {
struct nf_hook_ops *nat_hook_ops;
unsigned int users;
diff --git a/net/netfilter/nf_nat_proto.c b/net/netfilter/nf_nat_proto.c
index b14a434b95612..74897e868ca30 100644
--- a/net/netfilter/nf_nat_proto.c
+++ b/net/netfilter/nf_nat_proto.c
@@ -789,6 +789,7 @@ static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
.pf = NFPROTO_IPV4,
.hooknum = NF_INET_PRE_ROUTING,
.priority = NF_IP_PRI_NAT_DST,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
/* After packet filtering, change source */
{
@@ -796,6 +797,7 @@ static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
.pf = NFPROTO_IPV4,
.hooknum = NF_INET_POST_ROUTING,
.priority = NF_IP_PRI_NAT_SRC,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
/* Before packet filtering, change destination */
{
@@ -803,6 +805,7 @@ static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
.pf = NFPROTO_IPV4,
.hooknum = NF_INET_LOCAL_OUT,
.priority = NF_IP_PRI_NAT_DST,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
/* After packet filtering, change source */
{
@@ -810,6 +813,7 @@ static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
.pf = NFPROTO_IPV4,
.hooknum = NF_INET_LOCAL_IN,
.priority = NF_IP_PRI_NAT_SRC,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
};
@@ -1050,6 +1054,7 @@ static const struct nf_hook_ops nf_nat_ipv6_ops[] = {
.pf = NFPROTO_IPV6,
.hooknum = NF_INET_PRE_ROUTING,
.priority = NF_IP6_PRI_NAT_DST,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
/* After packet filtering, change source */
{
@@ -1057,6 +1062,7 @@ static const struct nf_hook_ops nf_nat_ipv6_ops[] = {
.pf = NFPROTO_IPV6,
.hooknum = NF_INET_POST_ROUTING,
.priority = NF_IP6_PRI_NAT_SRC,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
/* Before packet filtering, change destination */
{
@@ -1064,6 +1070,7 @@ static const struct nf_hook_ops nf_nat_ipv6_ops[] = {
.pf = NFPROTO_IPV6,
.hooknum = NF_INET_LOCAL_OUT,
.priority = NF_IP6_PRI_NAT_DST,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
/* After packet filtering, change source */
{
@@ -1071,6 +1078,7 @@ static const struct nf_hook_ops nf_nat_ipv6_ops[] = {
.pf = NFPROTO_IPV6,
.hooknum = NF_INET_LOCAL_IN,
.priority = NF_IP6_PRI_NAT_SRC,
+ .hook_ops_type = NF_HOOK_OP_NAT,
},
};
diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c
index 92d869317cba5..65cf5e1ded858 100644
--- a/net/netfilter/nfnetlink_hook.c
+++ b/net/netfilter/nfnetlink_hook.c
@@ -190,7 +190,7 @@ static int nfnl_hook_put_nft_ft_info(struct sk_buff *nlskb,
static int nfnl_hook_dump_one(struct sk_buff *nlskb,
const struct nfnl_dump_hook_data *ctx,
- const struct nf_hook_ops *ops,
+ const struct nf_hook_ops *ops, int priority,
int family, unsigned int seq)
{
u16 event = nfnl_msg_type(NFNL_SUBSYS_HOOK, NFNL_MSG_HOOK_GET);
@@ -244,7 +244,7 @@ static int nfnl_hook_dump_one(struct sk_buff *nlskb,
if (ret)
goto nla_put_failure;
- ret = nla_put_be32(nlskb, NFNLA_HOOK_PRIORITY, htonl(ops->priority));
+ ret = nla_put_be32(nlskb, NFNLA_HOOK_PRIORITY, htonl(priority));
if (ret)
goto nla_put_failure;
@@ -337,6 +337,30 @@ nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *de
return hook_head;
}
+static int nfnl_hook_dump_nat(struct sk_buff *nlskb,
+ const struct nfnl_dump_hook_data *ctx,
+ const struct nf_hook_ops *ops,
+ int family, unsigned int seq)
+{
+ struct nf_nat_lookup_hook_priv *priv = ops->priv;
+ struct nf_hook_entries *e = rcu_dereference(priv->entries);
+ struct nf_hook_ops **nat_ops;
+ int i, err;
+
+ if (!e)
+ return 0;
+
+ nat_ops = nf_hook_entries_get_hook_ops(e);
+
+ for (i = 0; i < e->num_hook_entries; i++) {
+ err = nfnl_hook_dump_one(nlskb, ctx, nat_ops[i],
+ ops->priority, family, seq);
+ if (err)
+ return err;
+ }
+ return 0;
+}
+
static int nfnl_hook_dump(struct sk_buff *nlskb,
struct netlink_callback *cb)
{
@@ -365,8 +389,13 @@ static int nfnl_hook_dump(struct sk_buff *nlskb,
ops = nf_hook_entries_get_hook_ops(e);
for (; i < e->num_hook_entries; i++) {
- err = nfnl_hook_dump_one(nlskb, ctx, ops[i], family,
- cb->nlh->nlmsg_seq);
+ if (ops[i]->hook_ops_type == NF_HOOK_OP_NAT)
+ err = nfnl_hook_dump_nat(nlskb, ctx, ops[i], family,
+ cb->nlh->nlmsg_seq);
+ else
+ err = nfnl_hook_dump_one(nlskb, ctx, ops[i],
+ ops[i]->priority, family,
+ cb->nlh->nlmsg_seq);
if (err)
break;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0778/2151] netfilter: nfnetlink: Fix for interrupted hook dumps
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (776 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0777/2151] netfilter: nfnetlink_hook: Dump nat type chains Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0779/2151] arm64: dts: qcom: hamoa-iot-evk: Add backlight support for eDP panel Greg Kroah-Hartman
` (104 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Phil Sutter, Pablo Neira Ayuso,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Phil Sutter <phil@nwl.cc>
[ Upstream commit d3950004ba90350bcdf414c5f804da277178564a ]
Handling of concurrent hook changes with a dump in progress was
problematic in nfnl_hook_dump and entirely broken in nfnl_hook_dump_nat.
Address all issues in a single patch to please the review LLM.
Introduce sequence numbers in struct netns_nf to replace pointer
value-based modification detection which may fail due to memory buffer
reuse. This also eliminates the need for most manual cb->seq updates and
excessive array index value checks.
Since nat hook updates are protected by a different mutex than others,
they have to bump their own sequence number. nfnl_hook_dump_nat
therefore open-codes what nl_dump_check_consistent does but bumps
cb->seq instead of setting NLM_F_DUMP_INTR flag.
Dumps of many nat hooks was entirely broken since the array index was
not (re)stored. Use cb->args[1] for that and make sure it is reset upon
completion as the same dump may loop over multiple arrays of nat hooks.
In nfnl_hook_dump, don't signal NLM_F_DUMP_INTR if
nfnl_hook_entries_head returns error: This is a permanent condition
which does not change during a dump. It is already caught by
nfnl_hook_dump_start though, so should not happen anyway.
In general, access ops array pointer values using READ_ONCE since they
are assigned to using WRITE_ONCE.
Avoid setting NLM_F_DUMP_INTR flag in garbage memory by calling
nl_dump_check_consistent only for non-empty skbs. If not a single
netlink message was created, nfnetlink code will take care of setting
the flag.
Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem")
Fixes: b010e2a4a9ac ("netfilter: nfnetlink_hook: Dump nat type chains")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/netns/netfilter.h | 2 +
net/netfilter/core.c | 18 ++++++++-
net/netfilter/nf_nat_core.c | 11 +++++
net/netfilter/nfnetlink_hook.c | 74 ++++++++++++++++++++--------------
4 files changed, 73 insertions(+), 32 deletions(-)
diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h
index a6a0bf4a247e5..7fd78394d1e7b 100644
--- a/include/net/netns/netfilter.h
+++ b/include/net/netns/netfilter.h
@@ -33,5 +33,7 @@ struct netns_nf {
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
unsigned int defrag_ipv6_users;
#endif
+ unsigned int hook_base_seq;
+ unsigned int nat_hook_base_seq;
};
#endif
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 11a702065bab5..f11c980030b1a 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -390,6 +390,15 @@ static void nf_static_key_dec(const struct nf_hook_ops *reg, int pf)
#endif
}
+static void bump_hook_base_seq(struct net *net)
+{
+ unsigned int base_seq = READ_ONCE(net->nf.hook_base_seq);
+
+ while (++base_seq == 0)
+ ;
+ smp_store_release(&net->nf.hook_base_seq, base_seq);
+}
+
static int __nf_register_net_hook(struct net *net, int pf,
const struct nf_hook_ops *reg)
{
@@ -434,6 +443,7 @@ static int __nf_register_net_hook(struct net *net, int pf,
if (!IS_ERR(new_hooks)) {
hooks_validate(new_hooks);
rcu_assign_pointer(*pp, new_hooks);
+ bump_hook_base_seq(net);
}
mutex_unlock(&nf_hook_mutex);
@@ -487,6 +497,7 @@ static void __nf_unregister_net_hook(struct net *net, int pf,
{
struct nf_hook_entries __rcu **pp;
struct nf_hook_entries *p;
+ bool found;
pp = nf_hook_entry_head(net, pf, reg->hooknum, reg->dev);
if (!pp)
@@ -500,7 +511,8 @@ static void __nf_unregister_net_hook(struct net *net, int pf,
return;
}
- if (nf_remove_net_hook(p, reg)) {
+ found = nf_remove_net_hook(p, reg);
+ if (found) {
#ifdef CONFIG_NETFILTER_INGRESS
if (nf_ingress_hook(reg, pf))
net_dec_ingress_queue();
@@ -515,6 +527,8 @@ static void __nf_unregister_net_hook(struct net *net, int pf,
}
p = __nf_hook_entries_try_shrink(p, pp);
+ if (found)
+ bump_hook_base_seq(net);
mutex_unlock(&nf_hook_mutex);
if (!p)
return;
@@ -788,6 +802,8 @@ static int __net_init netfilter_net_init(struct net *net)
return -ENOMEM;
}
#endif
+ net->nf.hook_base_seq = 1;
+ net->nf.nat_hook_base_seq = 1;
return 0;
}
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index 3a29b1e411907..114ae7e8e5272 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -1167,6 +1167,15 @@ nfnetlink_parse_nat_setup(struct nf_conn *ct,
}
#endif
+static void bump_nat_hook_base_seq(struct net *net)
+{
+ unsigned int base_seq = READ_ONCE(net->nf.nat_hook_base_seq);
+
+ while (++base_seq == 0)
+ ;
+ smp_store_release(&net->nf.nat_hook_base_seq, base_seq);
+}
+
static struct nf_ct_helper_expectfn follow_master_nat = {
.name = "nat-follow-master",
.expectfn = nf_nat_follow_master,
@@ -1251,6 +1260,7 @@ int nf_nat_register_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops,
nat_proto_net->nat_hook_ops = nat_ops;
nat_proto_net->users++;
+ bump_nat_hook_base_seq(net);
mutex_unlock(&nf_nat_proto_mutex);
@@ -1305,6 +1315,7 @@ void nf_nat_unregister_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops,
goto unlock;
priv = nat_ops[hooknum].priv;
nf_hook_entries_delete_raw(&priv->entries, ops);
+ bump_nat_hook_base_seq(net);
if (nat_proto_net->users == 0) {
nf_unregister_net_hooks(net, nat_ops, ops_count);
diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c
index 65cf5e1ded858..4567468277950 100644
--- a/net/netfilter/nfnetlink_hook.c
+++ b/net/netfilter/nfnetlink_hook.c
@@ -54,7 +54,6 @@ static int nf_netlink_dump_start_rcu(struct sock *nlsk, struct sk_buff *skb,
struct nfnl_dump_hook_data {
char devname[IFNAMSIZ];
- unsigned long headv;
u8 hook;
};
@@ -338,27 +337,47 @@ nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *de
}
static int nfnl_hook_dump_nat(struct sk_buff *nlskb,
- const struct nfnl_dump_hook_data *ctx,
- const struct nf_hook_ops *ops,
- int family, unsigned int seq)
+ struct netlink_callback *cb,
+ const struct nf_hook_ops *ops, int family)
{
struct nf_nat_lookup_hook_priv *priv = ops->priv;
- struct nf_hook_entries *e = rcu_dereference(priv->entries);
+ struct nfnl_dump_hook_data *ctx = cb->data;
+ struct net *net = sock_net(nlskb->sk);
struct nf_hook_ops **nat_ops;
- int i, err;
+ unsigned int i = cb->args[1];
+ struct nf_hook_entries *e;
+ unsigned int base_seq;
+ int err = 0;
+ base_seq = smp_load_acquire(&net->nf.nat_hook_base_seq);
+
+ e = rcu_dereference(priv->entries);
if (!e)
- return 0;
+ goto out;
nat_ops = nf_hook_entries_get_hook_ops(e);
- for (i = 0; i < e->num_hook_entries; i++) {
- err = nfnl_hook_dump_one(nlskb, ctx, nat_ops[i],
- ops->priority, family, seq);
+ for (; i < e->num_hook_entries; i++) {
+ err = nfnl_hook_dump_one(nlskb, ctx,
+ READ_ONCE(nat_ops[i]),
+ ops->priority, family,
+ cb->nlh->nlmsg_seq);
if (err)
- return err;
+ break;
+
}
- return 0;
+out:
+ if (!err)
+ i = 0;
+ cb->args[1] = i;
+
+ if (cb->args[2] && base_seq != cb->args[2]) {
+ cb->seq++;
+ err = -EINTR;
+ }
+ cb->args[2] = base_seq;
+
+ return err;
}
static int nfnl_hook_dump(struct sk_buff *nlskb,
@@ -373,35 +392,31 @@ static int nfnl_hook_dump(struct sk_buff *nlskb,
unsigned int i = cb->args[0];
rcu_read_lock();
+ cb->seq = smp_load_acquire(&net->nf.hook_base_seq);
e = nfnl_hook_entries_head(family, ctx->hook, net, ctx->devname);
- if (!e)
+ if (!e || IS_ERR(e))
goto done;
- if (IS_ERR(e)) {
- cb->seq++;
- goto done;
- }
-
- if ((unsigned long)e != ctx->headv || i >= e->num_hook_entries)
- cb->seq++;
-
ops = nf_hook_entries_get_hook_ops(e);
for (; i < e->num_hook_entries; i++) {
- if (ops[i]->hook_ops_type == NF_HOOK_OP_NAT)
- err = nfnl_hook_dump_nat(nlskb, ctx, ops[i], family,
- cb->nlh->nlmsg_seq);
- else
- err = nfnl_hook_dump_one(nlskb, ctx, ops[i],
- ops[i]->priority, family,
+ const struct nf_hook_ops *cur = READ_ONCE(ops[i]);
+
+ if (cur->hook_ops_type == NF_HOOK_OP_NAT) {
+ err = nfnl_hook_dump_nat(nlskb, cb, cur, family);
+ } else {
+ err = nfnl_hook_dump_one(nlskb, ctx, cur,
+ cur->priority, family,
cb->nlh->nlmsg_seq);
+ }
if (err)
break;
}
done:
- nl_dump_check_consistent(cb, nlmsg_hdr(nlskb));
+ if (nlskb->len > 0)
+ nl_dump_check_consistent(cb, nlmsg_hdr(nlskb));
rcu_read_unlock();
cb->args[0] = i;
return nlskb->len;
@@ -442,10 +457,7 @@ static int nfnl_hook_dump_start(struct netlink_callback *cb)
return -ENOMEM;
strscpy(ctx->devname, name, sizeof(ctx->devname));
- ctx->headv = (unsigned long)head;
ctx->hook = hooknum;
-
- cb->seq = 1;
cb->data = ctx;
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0779/2151] arm64: dts: qcom: hamoa-iot-evk: Add backlight support for eDP panel
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (777 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0778/2151] netfilter: nfnetlink: Fix for interrupted hook dumps Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0780/2151] arm64: dts: qcom: hamoa-iot-evk: Enable TPM (ST33) on SPI11 Greg Kroah-Hartman
` (103 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abel Vesa, Yongxing Mou,
Dmitry Baryshkov, Konrad Dybcio, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
[ Upstream commit 512716f69610d81db958b781132370731c69e874 ]
The backlight on the Hamoa IoT EVK is controlled through a PWM signal.
Aligned with other x1e80100-based platforms: the PWM signal is controlled
by PMK8550, and the backlight enable signal is handled by PMC8380.
Describe the backlight device and connect it to the eDP panel to allow
for brightness control.
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251112-hamoa_dvt_backlight-v3-1-f35b44af7fc4@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Stable-dep-of: 723ce02feb13 ("arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 54 ++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index df8d6e5c1f45e..1cb4a51f5d508 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -17,6 +17,16 @@ aliases {
serial1 = &uart14;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pmk8550_pwm 0 5000000>;
+ enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
+ power-supply = <&vreg_edp_bl>;
+
+ pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
+ pinctrl-names = "default";
+ };
+
wcd938x: audio-codec {
compatible = "qcom,wcd9385-codec";
@@ -183,6 +193,22 @@ vreg_edp_3p3: regulator-edp-3p3 {
regulator-boot-on;
};
+ vreg_edp_bl: regulator-edp-bl {
+ compatible = "regulator-fixed";
+
+ regulator-name = "VBL9";
+ regulator-min-microvolt = <3600000>;
+ regulator-max-microvolt = <3600000>;
+
+ gpio = <&pmc8380_3_gpios 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+
+ pinctrl-0 = <&edp_bl_reg_en>;
+ pinctrl-names = "default";
+
+ regulator-boot-on;
+ };
+
vreg_nvme: regulator-nvme {
compatible = "regulator-fixed";
@@ -807,6 +833,8 @@ &mdss_dp3 {
aux-bus {
panel {
compatible = "edp-panel";
+
+ backlight = <&backlight>;
power-supply = <&vreg_edp_3p3>;
port {
@@ -867,6 +895,21 @@ usb0_1p8_reg_en: usb0-1p8-reg-en-state {
};
};
+&pmc8380_3_gpios {
+ edp_bl_en: edp-bl-en-state {
+ pins = "gpio4";
+ function = "normal";
+ power-source = <1>;
+ input-disable;
+ output-enable;
+ };
+
+ edp_bl_reg_en: edp-bl-reg-en-state {
+ pins = "gpio10";
+ function = "normal";
+ };
+};
+
&pmc8380_5_gpios {
usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state {
pins = "gpio8";
@@ -878,6 +921,17 @@ usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state {
};
};
+&pmk8550_gpios {
+ edp_bl_pwm: edp-bl-pwm-state {
+ pins = "gpio5";
+ function = "func3";
+ };
+};
+
+&pmk8550_pwm {
+ status = "okay";
+};
+
&smb2360_0 {
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0780/2151] arm64: dts: qcom: hamoa-iot-evk: Enable TPM (ST33) on SPI11
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (778 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0779/2151] arm64: dts: qcom: hamoa-iot-evk: Add backlight support for eDP panel Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0781/2151] arm64: dts: qcom: hamoa-iot-evk: add MCP2518FD CAN on spi18 Greg Kroah-Hartman
` (102 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Khalid Faisal Ansari, Konrad Dybcio,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Khalid Faisal Ansari <khalid.ansari@oss.qualcomm.com>
[ Upstream commit 54b5415739300c89cdd6b1db152bb5acf047ce40 ]
Enable ST33HTPM TPM over SPI11 on the Hamoa IoT EVK by adding the
required SPI and TPM nodes.
Signed-off-by: Khalid Faisal Ansari <khalid.ansari@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251112-arm64-dts-qcom-hamoa-iot-evk-enable-st33-tpm-on-spi11-v3-1-39b19eb55cc3@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Stable-dep-of: 723ce02feb13 ("arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index 1cb4a51f5d508..6d69f239928ce 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -959,6 +959,16 @@ &smb2360_2_eusb2_repeater {
vdd3-supply = <&vreg_l8b_3p0>;
};
+&spi11 {
+ status = "okay";
+
+ tpm@0 {
+ compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ };
+};
+
&swr0 {
status = "okay";
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0781/2151] arm64: dts: qcom: hamoa-iot-evk: add MCP2518FD CAN on spi18
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (779 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0780/2151] arm64: dts: qcom: hamoa-iot-evk: Enable TPM (ST33) on SPI11 Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0782/2151] arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers Greg Kroah-Hartman
` (101 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Viken Dadhaniya, Konrad Dybcio,
Dmitry Baryshkov, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
[ Upstream commit 181bef739979466b6ede95b34d6c94d0250b1c0e ]
Enable the Microchip MCP2518FD CAN-FD controller on hamoa. The controller
is connected via SPI18 and uses a 40 MHz oscillator.
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260515-hamoa-spi-can-devicetree-v2-1-d0e922608065@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Stable-dep-of: 723ce02feb13 ("arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index 6d69f239928ce..368781045d0db 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -27,6 +27,14 @@ backlight: backlight {
pinctrl-names = "default";
};
+ clocks {
+ mcp2518fd_osc: clock-40000000 {
+ compatible = "fixed-clock";
+ clock-frequency = <40000000>;
+ #clock-cells = <0>;
+ };
+ };
+
wcd938x: audio-codec {
compatible = "qcom,wcd9385-codec";
@@ -969,6 +977,19 @@ tpm@0 {
};
};
+&spi18 {
+ status = "okay";
+
+ can@0 {
+ compatible = "microchip,mcp2518fd";
+ reg = <0>;
+ interrupts-extended = <&tlmm 68 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&mcp2518fd_osc>;
+ spi-max-frequency = <14000000>;
+ microchip,xstbyen;
+ };
+};
+
&swr0 {
status = "okay";
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0782/2151] arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (780 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0781/2151] arm64: dts: qcom: hamoa-iot-evk: add MCP2518FD CAN on spi18 Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0783/2151] PCI: aardvark: Disable PHY on probe failures Greg Kroah-Hartman
` (100 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xin Liu, Konrad Dybcio, Abel Vesa,
Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xin Liu <xin.liu@oss.qualcomm.com>
[ Upstream commit 723ce02feb131a81224a281872028d584b69b0ca ]
On the Hamoa IoT EVK, each of the two existing PS8830 retimers has its
own 25 MHz crystal wired to the retimer's XI/XO pins. The reference
clock does not come from the PMIC, so the RPMH_RF_CLK4/5 references in
the retimer nodes are wrong: they keep those RF clocks enabled for
nothing and describe a connection that does not exist on the board.
Fixes: c11645afb0e2 ("arm64: dts: qcom: Add base HAMOA-IOT-EVK board")
Signed-off-by: Xin Liu <xin.liu@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://patch.msgid.link/20260914101233.981643-3-xin.liu@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
index 368781045d0db..1118f0e44573a 100644
--- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
+++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
@@ -33,6 +33,18 @@ mcp2518fd_osc: clock-40000000 {
clock-frequency = <40000000>;
#clock-cells = <0>;
};
+
+ clk_rtmr1_xo: clock-rtmr1-xo {
+ compatible = "fixed-clock";
+ clock-frequency = <25000000>;
+ #clock-cells = <0>;
+ };
+
+ clk_rtmr2_xo: clock-rtmr2-xo {
+ compatible = "fixed-clock";
+ clock-frequency = <25000000>;
+ #clock-cells = <0>;
+ };
};
wcd938x: audio-codec {
@@ -623,7 +635,7 @@ typec-mux@8 {
compatible = "parade,ps8830";
reg = <0x08>;
- clocks = <&rpmhcc RPMH_RF_CLK5>;
+ clocks = <&clk_rtmr2_xo>;
vdd-supply = <&vreg_rtmr2_1p15>;
vdd33-supply = <&vreg_rtmr2_3p3>;
@@ -728,7 +740,7 @@ typec-mux@8 {
compatible = "parade,ps8830";
reg = <0x8>;
- clocks = <&rpmhcc RPMH_RF_CLK4>;
+ clocks = <&clk_rtmr1_xo>;
vdd-supply = <&vreg_rtmr1_1p15>;
vdd33-supply = <&vreg_rtmr1_3p3>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0783/2151] PCI: aardvark: Disable PHY on probe failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (781 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0782/2151] arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0784/2151] arm64: dts: qcom: sm8150: Use SM8150_CX for the SDHC power domain Greg Kroah-Hartman
` (99 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ijae Kim, Myeonghun Pak,
Manivannan Sadhasivam, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <mhun512@gmail.com>
[ Upstream commit 28cc5bc5a6c6cffbe7ba27c0acbfbe06747fa173 ]
advk_pcie_setup_phy() initializes and powers on the PHY before the
emulated bridge and IRQ domains are created. If any of those later
initialization steps or pci_host_probe() fails, probe returns without
powering off or exiting the PHY.
Replace the direct returns with staged cleanup labels. Remove IRQ
domains in reverse order, release the emulated bridge allocation only
after successful initialization, and disable the PHY on every failure
after advk_pcie_setup_phy() succeeds. A setup_phy() failure still
returns directly, so its partial internal cleanup is not repeated.
Fixes: 366697018c9a ("PCI: aardvark: Add PHY support")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260910221725.91980-1-mhun512@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/controller/pci-aardvark.c | 31 ++++++++++++++++-----------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index e34bea1ff0ac6..bf116c957e383 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -1864,28 +1864,25 @@ static int advk_pcie_probe(struct platform_device *pdev)
ret = advk_sw_pci_bridge_init(pcie);
if (ret) {
dev_err(dev, "Failed to register emulated root PCI bridge\n");
- return ret;
+ goto err_disable_phy;
}
ret = advk_pcie_init_irq_domain(pcie);
if (ret) {
dev_err(dev, "Failed to initialize irq\n");
- return ret;
+ goto err_cleanup_bridge;
}
ret = advk_pcie_init_msi_irq_domain(pcie);
if (ret) {
dev_err(dev, "Failed to initialize irq\n");
- advk_pcie_remove_irq_domain(pcie);
- return ret;
+ goto err_remove_irq_domain;
}
ret = advk_pcie_init_rp_irq_domain(pcie);
if (ret) {
dev_err(dev, "Failed to initialize irq\n");
- advk_pcie_remove_msi_irq_domain(pcie);
- advk_pcie_remove_irq_domain(pcie);
- return ret;
+ goto err_remove_msi_irq_domain;
}
bridge->sysdata = pcie;
@@ -1893,14 +1890,22 @@ static int advk_pcie_probe(struct platform_device *pdev)
bridge->map_irq = advk_pcie_map_irq;
ret = pci_host_probe(bridge);
- if (ret < 0) {
- advk_pcie_remove_rp_irq_domain(pcie);
- advk_pcie_remove_msi_irq_domain(pcie);
- advk_pcie_remove_irq_domain(pcie);
- return ret;
- }
+ if (ret < 0)
+ goto err_remove_rp_irq_domain;
return 0;
+
+err_remove_rp_irq_domain:
+ advk_pcie_remove_rp_irq_domain(pcie);
+err_remove_msi_irq_domain:
+ advk_pcie_remove_msi_irq_domain(pcie);
+err_remove_irq_domain:
+ advk_pcie_remove_irq_domain(pcie);
+err_cleanup_bridge:
+ pci_bridge_emul_cleanup(&pcie->bridge);
+err_disable_phy:
+ advk_pcie_disable_phy(pcie);
+ return ret;
}
static void advk_pcie_remove(struct platform_device *pdev)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0784/2151] arm64: dts: qcom: sm8150: Use SM8150_CX for the SDHC power domain
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (782 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0783/2151] PCI: aardvark: Disable PHY on probe failures Greg Kroah-Hartman
@ 2026-11-18 14:41 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0785/2151] um: time-travel: fix sched_yield() behaviour Greg Kroah-Hartman
` (98 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:41 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, sashiko-bot, Abel Vesa,
Konrad Dybcio, Bjorn Andersson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@oss.qualcomm.com>
[ Upstream commit 475aab59d9870d250f521e202d191899c50a3ded ]
Replace the raw power-domain index of SDHC2 with the SM8150_CX binding
constant, which is the correct power domain in this case.
Fixes: 876644c76034 ("arm64: dts: qcom: sm8150: Add support for SDC2")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Link: https://sashiko.dev/#/patchset/20260914-qcom-tie-cx-to-gcc-v4-0-9d5a606ada33@oss.qualcomm.com?part=45
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260915-dts-qcom-sm8150-sdhc-use-mss-for-pd-index-v2-1-a8610199483d@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index e1f480e3ed0b7..f3b67175777db 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -3559,7 +3559,7 @@ sdhc_2: mmc@8804000 {
iommus = <&apps_smmu 0x6a0 0x0>;
qcom,dll-config = <0x0007642c>;
qcom,ddr-config = <0x80040868>;
- power-domains = <&rpmhpd 0>;
+ power-domains = <&rpmhpd SM8150_CX>;
operating-points-v2 = <&sdhc2_opp_table>;
status = "disabled";
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0785/2151] um: time-travel: fix sched_yield() behaviour
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (783 preceding siblings ...)
2026-11-18 14:41 ` [PATCH 6.18 0784/2151] arm64: dts: qcom: sm8150: Use SM8150_CX for the SDHC power domain Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0786/2151] iommu/vt-d: Fix copied_tables bitmap leak on error in copy_translation_tables Greg Kroah-Hartman
` (97 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Johannes Berg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit 0e70b1de88ef1973cf752ae27930683eb2acd338 ]
Just incrementing tt_extra_sched_jiffies can make this
drift enough to hit the softlockup detector, e.g. with
ping using sched_yield() in a loop to measure short
intervals. Make the simulation actually pass time, this
requires going to the external scheduler but actually
makes this sort of thing behave much better and avoids
the soft lockup.
Fixes: 887c5c12e80c ("um: work around sched_yield not yielding in time-travel mode")
Link: https://patch.msgid.link/20260924134223.1672004-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/um/kernel/skas/syscall.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c
index ba7494f9bfe41..8914ca587ce98 100644
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -35,12 +35,13 @@ void handle_syscall(struct uml_pt_regs *r)
/*
* If no time passes, then sched_yield may not actually yield, causing
* broken spinlock implementations in userspace (ASAN) to hang for long
- * periods of time.
+ * periods of time. Advance the time-travel clock a bit so sched_yield()
+ * in a loop (like ping does for small intervals) also works correctly.
*/
if ((time_travel_mode == TT_MODE_INFCPU ||
time_travel_mode == TT_MODE_EXTERNAL) &&
syscall == __NR_sched_yield)
- tt_extra_sched_jiffies += 1;
+ time_travel_ndelay(1000);
if (syscall >= 0 && syscall < __NR_syscalls) {
unsigned long ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0786/2151] iommu/vt-d: Fix copied_tables bitmap leak on error in copy_translation_tables
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (784 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0785/2151] um: time-travel: fix sched_yield() behaviour Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0787/2151] iommu/vt-d: Do not ignore context table copy failures Greg Kroah-Hartman
` (96 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, ZhaoJinming, Lu Baolu, Joerg Roedel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: ZhaoJinming <zhaojinming@uniontech.com>
[ Upstream commit d9ef887fb26c8a73c904b5aed93e82dca64fe109 ]
The iommu->copied_tables bitmap was introduced by the IOMMU live
update series to track which context entries have been copied from
the previous kernel. The allocation via bitmap_zalloc() was added
inside copy_translation_tables(), but the error paths were not
updated to free it:
1. When old_rt_phys is 0 (invalid root table address)
2. When memremap(old_rt_phys) fails
3. When kcalloc for ctxt_tbls fails (goto out_unmap, which only
unmaps old_rt without releasing the bitmap)
The bitmap is only cleaned up by free_dmar_iommu(), which is
called from the free_iommu error label in init_dmars(). However,
when copy_translation_tables() fails, init_dmars() does not jump
to free_iommu -- it logs the error, falls through, and continues
with the next IOMMU. As a result, copied_tables is leaked.
Fix this by converting the two early returns to goto a new
err_free_bitmap label, and by making out_unmap fall through to
it so that the bitmap is always freed on any error path. The
success path performs memunmap(old_rt) inline and returns 0
directly, since copied_tables must remain allocated for
subsequent use.
Signed-off-by: ZhaoJinming <zhaojinming@uniontech.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Stable-dep-of: 53e15f28829f ("iommu/vt-d: Do not ignore context table copy failures")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/iommu.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 94781f6206803..5c07ddd931b20 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2038,12 +2038,16 @@ static int copy_translation_tables(struct intel_iommu *iommu)
return -ENOMEM;
old_rt_phys = rtaddr_reg & VTD_PAGE_MASK;
- if (!old_rt_phys)
- return -EINVAL;
+ if (!old_rt_phys) {
+ ret = -EINVAL;
+ goto err_free_bitmap;
+ }
old_rt = memremap(old_rt_phys, PAGE_SIZE, MEMREMAP_WB);
- if (!old_rt)
- return -ENOMEM;
+ if (!old_rt) {
+ ret = -ENOMEM;
+ goto err_free_bitmap;
+ }
/* This is too big for the stack - allocate it from slab */
ctxt_table_entries = ext ? 512 : 256;
@@ -2087,11 +2091,14 @@ static int copy_translation_tables(struct intel_iommu *iommu)
__iommu_flush_cache(iommu, iommu->root_entry, PAGE_SIZE);
- ret = 0;
+ memunmap(old_rt);
+ return 0;
out_unmap:
memunmap(old_rt);
-
+err_free_bitmap:
+ bitmap_free(iommu->copied_tables);
+ iommu->copied_tables = NULL;
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0787/2151] iommu/vt-d: Do not ignore context table copy failures
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (785 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0786/2151] iommu/vt-d: Fix copied_tables bitmap leak on error in copy_translation_tables Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0788/2151] iommu/vt-d: Cache max domain ID to avoid redundant calculation Greg Kroah-Hartman
` (95 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lu Baolu, Kevin Tian, Joerg Roedel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
[ Upstream commit 53e15f28829ff304f94883e8f3f1f5074aa2a0a2 ]
copy_translation_tables() currently logs copy_context_table() failures
but still returns success, so partial copy failures are silently ignored.
That means Intel IOMMU may run with only part of the old tables copied.
Then some old domain IDs may not be reserved, and later may be reused by
new domains. With stale hardware cache entries still around, this can
cause bad DMA translations, DMA faults, or domain aliasing.
Fix by aborting on the first context-table copy failure, freeing temporary
context-table pages, and returning an error so caller falls back to a
clean root table path.
Fixes: f93b4ac5929a ("iommu/vt-d: Use ida to manage domain id")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/iommu.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 5c07ddd931b20..135a268e2f2ca 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2062,7 +2062,7 @@ static int copy_translation_tables(struct intel_iommu *iommu)
if (ret) {
pr_err("%s: Failed to copy context table for bus %d\n",
iommu->name, bus);
- continue;
+ goto err_free_ctxt_tbls;
}
}
@@ -2094,11 +2094,27 @@ static int copy_translation_tables(struct intel_iommu *iommu)
memunmap(old_rt);
return 0;
+err_free_ctxt_tbls:
+ /*
+ * None of these tables have been linked into iommu->root_entry yet,
+ * so they are unreachable and must be freed here.
+ */
+ for (bus = 0; bus < ctxt_table_entries; bus++)
+ iommu_free_pages(ctxt_tbls[bus]);
+ kfree(ctxt_tbls);
out_unmap:
memunmap(old_rt);
err_free_bitmap:
bitmap_free(iommu->copied_tables);
iommu->copied_tables = NULL;
+
+ /*
+ * Only reservations taken from the old context entries can be in the
+ * ida at this point; no domain has been allocated on this IOMMU yet.
+ * ida_destroy() empties it and leaves it ready for reuse.
+ */
+ ida_destroy(&iommu->domain_ida);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0788/2151] iommu/vt-d: Cache max domain ID to avoid redundant calculation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (786 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0787/2151] iommu/vt-d: Do not ignore context table copy failures Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0789/2151] iommu/vt-d: Handle DID reservation errors when copying context tables Greg Kroah-Hartman
` (94 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lu Baolu, Xu Yilun, Kevin Tian,
Joerg Roedel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
[ Upstream commit 5b3ba0a002672d189fd55eaafdd4f55e5c6c522b ]
The cap_ndoms() helper calculates the maximum available domain ID from
the value of capability register, which can be inefficient if called
repeatedly. Cache the maximum supported domain ID in max_domain_id field
during initialization to avoid redundant calls to cap_ndoms() throughout
the IOMMU driver.
No functionality change.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Stable-dep-of: 12a2ea2d91be ("iommu/vt-d: Handle DID reservation errors when copying context tables")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/dmar.c | 1 +
drivers/iommu/intel/iommu.c | 10 +++++-----
drivers/iommu/intel/iommu.h | 1 +
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index f4bdc5ffa9d9b..2a99df386560e 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -1110,6 +1110,7 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
spin_lock_init(&iommu->lock);
ida_init(&iommu->domain_ida);
mutex_init(&iommu->did_lock);
+ iommu->max_domain_id = cap_ndoms(iommu->cap);
ver = readl(iommu->reg + DMAR_VER_REG);
pr_info("%s: reg_base_addr %llx ver %d:%d cap %llx ecap %llx\n",
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 135a268e2f2ca..b13fe38edf490 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1359,7 +1359,7 @@ int domain_attach_iommu(struct dmar_domain *domain, struct intel_iommu *iommu)
}
num = ida_alloc_range(&iommu->domain_ida, IDA_START_DID,
- cap_ndoms(iommu->cap) - 1, GFP_KERNEL);
+ iommu->max_domain_id - 1, GFP_KERNEL);
if (num < 0) {
pr_err("%s: No free domain ids\n", iommu->name);
goto err_unlock;
@@ -1424,7 +1424,7 @@ static void copied_context_tear_down(struct intel_iommu *iommu,
context_clear_present(context);
__iommu_flush_cache(iommu, context, sizeof(*context));
- if (did_old < cap_ndoms(iommu->cap)) {
+ if (did_old < iommu->max_domain_id) {
iommu->flush.flush_context(iommu, did_old,
PCI_DEVID(bus, devfn),
DMA_CCMD_MASK_NOBIT,
@@ -1992,7 +1992,7 @@ static int copy_context_table(struct intel_iommu *iommu,
continue;
did = context_domain_id(&ce);
- if (did >= 0 && did < cap_ndoms(iommu->cap))
+ if (did >= 0 && did < iommu->max_domain_id)
ida_alloc_range(&iommu->domain_ida, did, did, GFP_KERNEL);
set_context_copied(iommu, bus, devfn);
@@ -2935,7 +2935,7 @@ static ssize_t domains_supported_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct intel_iommu *iommu = dev_to_intel_iommu(dev);
- return sysfs_emit(buf, "%ld\n", cap_ndoms(iommu->cap));
+ return sysfs_emit(buf, "%ld\n", iommu->max_domain_id);
}
static DEVICE_ATTR_RO(domains_supported);
@@ -2946,7 +2946,7 @@ static ssize_t domains_used_show(struct device *dev,
unsigned int count = 0;
int id;
- for (id = 0; id < cap_ndoms(iommu->cap); id++)
+ for (id = 0; id < iommu->max_domain_id; id++)
if (ida_exists(&iommu->domain_ida, id))
count++;
diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h
index 33c9e06df63f9..9551ea19f7778 100644
--- a/drivers/iommu/intel/iommu.h
+++ b/drivers/iommu/intel/iommu.h
@@ -724,6 +724,7 @@ struct intel_iommu {
/* mutex to protect domain_ida */
struct mutex did_lock;
struct ida domain_ida; /* domain id allocator */
+ unsigned long max_domain_id;
unsigned long *copied_tables; /* bitmap of copied tables */
spinlock_t lock; /* protect context, domain ids */
struct root_entry *root_entry; /* virtual address */
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0789/2151] iommu/vt-d: Handle DID reservation errors when copying context tables
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (787 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0788/2151] iommu/vt-d: Cache max domain ID to avoid redundant calculation Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0790/2151] iommu/vt-d: Reserve scalable-mode DIDs from PASID entries during copy Greg Kroah-Hartman
` (93 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lu Baolu, Kevin Tian, Joerg Roedel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
[ Upstream commit 12a2ea2d91bea9b1f8f0a6608433210d0abd1291 ]
When kdump reuses old translation tables, all old domain IDs (DIDs) must
be reserved in the new kernel before new domains are created. Today
copy_context_table() ignores ida_alloc_range() return values, so a real
-ENOMEM can be missed and an ID may stay unreserved.
That can allow DID reuse while stale hardware cache entries still exist,
risking domain aliasing.
Fix this by moving DID reservation into a helper that:
- treats duplicate reservations (-ENOSPC) as expected success,
- skips out-of-range IDs as success,
- propagates real allocation failures (like -ENOMEM), and
- normalize successful return values.
On failure, unwind as in existing copy-allocation failure paths.
Fixes: f93b4ac5929a ("iommu/vt-d: Use ida to manage domain id")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/iommu.c | 39 +++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index b13fe38edf490..df3d28abcaeda 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1923,12 +1923,39 @@ static void intel_iommu_init_qi(struct intel_iommu *iommu)
}
}
+/*
+ * Reserve a domain ID inherited from the previous kernel so that it is not
+ * handed out again while the copied translation structures are still live.
+ *
+ * Returns 0 when the ID is reserved, was already reserved, or cannot be
+ * re-assigned, and a negative errno for a genuine allocation failure.
+ */
+static int reserve_domain_id(struct intel_iommu *iommu, int did)
+{
+ int ret;
+
+ if (did < 0 || did >= iommu->max_domain_id)
+ return 0;
+
+ ret = ida_alloc_range(&iommu->domain_ida, did, did, GFP_KERNEL);
+ /*
+ * Devices sharing a domain share its ID, so the same ID is seen in
+ * more than one context entry; -ENOSPC merely reports that it is
+ * already reserved. On success the allocated ID is returned, which
+ * is not an error either.
+ */
+ if (ret == -ENOSPC || ret >= 0)
+ return 0;
+
+ return ret;
+}
+
static int copy_context_table(struct intel_iommu *iommu,
struct root_entry *old_re,
struct context_entry **tbl,
int bus, bool ext)
{
- int tbl_idx, tbl_slot = 0, idx, devfn, ret = 0, did;
+ int tbl_idx, tbl_slot = 0, idx, devfn, ret = 0;
struct context_entry *new_ce = NULL, ce;
struct context_entry *old_ce = NULL;
struct root_entry re;
@@ -1991,9 +2018,13 @@ static int copy_context_table(struct intel_iommu *iommu,
if (!context_present(&ce))
continue;
- did = context_domain_id(&ce);
- if (did >= 0 && did < iommu->max_domain_id)
- ida_alloc_range(&iommu->domain_ida, did, did, GFP_KERNEL);
+ ret = reserve_domain_id(iommu, context_domain_id(&ce));
+ if (ret) {
+ /* Not yet published through @tbl, so free it here. */
+ iommu_free_pages(new_ce);
+ new_ce = NULL;
+ goto out_unmap;
+ }
set_context_copied(iommu, bus, devfn);
new_ce[idx] = ce;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0790/2151] iommu/vt-d: Reserve scalable-mode DIDs from PASID entries during copy
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (788 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0789/2151] iommu/vt-d: Handle DID reservation errors when copying context tables Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0791/2151] iommu/vt-d: Fix iopf refcount leak in nested attach Greg Kroah-Hartman
` (92 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lu Baolu, Kevin Tian, Joerg Roedel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
[ Upstream commit 07a64cbe15c4b0bf1d55208f3e945ba8a53075a0 ]
copy_context_table() reserves old domain IDs (DIDs) from context entries.
That works for legacy mode, but not for scalable mode: scalable context
entries do not carry DID, so this path ends up reserving the wrong value
(often DID 0) repeatedly.
In scalable mode, real DIDs are stored in PASID table entries. If they
are not reserved during kdump table copy, new domains may reuse old DIDs
while stale PASID/IOTLB cache state still exists, causing translation
conflicts and DMA faults.
Fix this by walking PASID tables in scalable mode, and reserving DIDs
from present PASID entries. If PASID structures cannot be remapped, return
error so caller can fall back safely instead of continuing with an unsafe
DID space.
Fixes: 0c5f6c0d8201 ("iommu/vt-d: Fix kdump kernels boot failure with scalable mode")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/iommu.c | 74 ++++++++++++++++++++++++++++++++++++-
1 file changed, 72 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index df3d28abcaeda..19ea73dad7f35 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1950,6 +1950,70 @@ static int reserve_domain_id(struct intel_iommu *iommu, int did)
return ret;
}
+/*
+ * Reserve the domain IDs used by a scalable mode context entry copied from
+ * the previous kernel.
+ */
+static int copy_pasid_table_dids(struct intel_iommu *iommu, struct context_entry *ce)
+{
+ struct pasid_dir_entry *dir;
+ unsigned long dir_size;
+ phys_addr_t dir_phys;
+ int ret = 0;
+ int i, j;
+
+ dir_phys = ce->lo & VTD_PAGE_MASK;
+ if (!dir_phys)
+ return 0;
+
+ dir_size = get_pasid_dir_size(ce);
+ dir = memremap(dir_phys, dir_size * sizeof(*dir), MEMREMAP_WB);
+ if (!dir)
+ return -ENOMEM;
+
+ for (i = 0; i < dir_size; i++) {
+ struct pasid_entry *table;
+ phys_addr_t table_phys;
+
+ if (!pasid_pde_is_present(&dir[i]))
+ continue;
+
+ /*
+ * Do not use get_pasid_table_from_pde(); that returns a
+ * phys_to_virt() pointer, which is not valid for memory
+ * owned by the previous kernel.
+ */
+ table_phys = READ_ONCE(dir[i].val) & PDE_PFN_MASK;
+ if (!table_phys)
+ continue;
+
+ /* A PASID table is one page: PASID_TBL_ENTRIES * 64 bytes. */
+ table = memremap(table_phys, PAGE_SIZE, MEMREMAP_WB);
+ if (!table) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ for (j = 0; j < PASID_TBL_ENTRIES; j++) {
+ if (!pasid_pte_is_present(&table[j]))
+ continue;
+
+ ret = reserve_domain_id(iommu, pasid_get_domain_id(&table[j]));
+ if (ret) {
+ memunmap(table);
+ goto out;
+ }
+ }
+
+ memunmap(table);
+ }
+
+out:
+ memunmap(dir);
+
+ return ret;
+}
+
static int copy_context_table(struct intel_iommu *iommu,
struct root_entry *old_re,
struct context_entry **tbl,
@@ -2017,8 +2081,14 @@ static int copy_context_table(struct intel_iommu *iommu,
if (!context_present(&ce))
continue;
-
- ret = reserve_domain_id(iommu, context_domain_id(&ce));
+ /*
+ * The context entry only holds a domain ID in legacy mode.
+ * In scalable mode the IDs are in the PASID table entries.
+ */
+ if (ext)
+ ret = copy_pasid_table_dids(iommu, &ce);
+ else
+ ret = reserve_domain_id(iommu, context_domain_id(&ce));
if (ret) {
/* Not yet published through @tbl, so free it here. */
iommu_free_pages(new_ce);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0791/2151] iommu/vt-d: Fix iopf refcount leak in nested attach
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (789 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0790/2151] iommu/vt-d: Reserve scalable-mode DIDs from PASID entries during copy Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0792/2151] iommu/vt-d: Drop old iopf ref only after attach succeeds Greg Kroah-Hartman
` (91 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lu Baolu, Kevin Tian, Joerg Roedel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
[ Upstream commit 83871c3ae10e3dce95408175df94ecfa0280e15f ]
intel_nested_attach_dev() takes an iopf reference for the new domain but
does not drop the possible reference from the old domain. This leaks
info->iopf_refcount, can keep the device permanently on the iopf queue,
and later triggers WARN_ON(info->iopf_refcount) when PRI is disabled.
Fix this by dropping the possible reference from the old domain after
the nested translation setup completes.
Fixes: 17fce9d2336d9 ("iommu/vt-d: Put iopf enablement in domain attach path")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/nested.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/intel/nested.c b/drivers/iommu/intel/nested.c
index eb3e6d687e04d..1f47eb1a4f19b 100644
--- a/drivers/iommu/intel/nested.c
+++ b/drivers/iommu/intel/nested.c
@@ -64,6 +64,8 @@ static int intel_nested_attach_dev(struct iommu_domain *domain,
if (ret)
goto disable_iopf;
+ iopf_for_domain_remove(old, dev);
+
info->domain = dmar_domain;
info->domain_attached = true;
spin_lock_irqsave(&dmar_domain->lock, flags);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0792/2151] iommu/vt-d: Drop old iopf ref only after attach succeeds
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (790 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0791/2151] iommu/vt-d: Fix iopf refcount leak in nested attach Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0793/2151] iommu/vt-d: Fix IQE handling to cover all descriptors in submission range Greg Kroah-Hartman
` (90 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Lu Baolu, Kevin Tian, Joerg Roedel,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
[ Upstream commit 5fbb0fa7327667ade8fa61921425bd4f8803e272 ]
identity_domain_attach_dev() currently removes the old domain’s iopf
reference before programming pass-through. If pass-through setup fails,
attach fails but the old domain is still effectively attached — now
with its IOPF ref already dropped.
This can undercount info->iopf_refcount and may disable iopf queue
handling while the old domain can still issue page requests.
Fix it by removing the old domain’s iopf reference only after
pass-through setup succeeds, matching other attach paths.
Fixes: 236dd58fabd2 ("iommu/vt-d: Fix iopf_refcount leak on RID domain replacement")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/iommu.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 19ea73dad7f35..4098c4f1dcfd9 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -4562,6 +4562,14 @@ static int identity_domain_attach_dev(struct iommu_domain *domain,
if (dev_is_real_dma_subdevice(dev))
return 0;
+ if (sm_supported(iommu))
+ ret = intel_pasid_setup_pass_through(iommu, dev, IOMMU_NO_PASID);
+ else
+ ret = device_setup_pass_through(dev);
+
+ if (ret)
+ return ret;
+
/*
* The identity domain has no iopf_handler, so no IOPF reference is
* taken for it. The reference held by the old domain must still be
@@ -4569,16 +4577,9 @@ static int identity_domain_attach_dev(struct iommu_domain *domain,
* not affect the IOPF reference count.
*/
iopf_for_domain_remove(old, dev);
+ info->domain_attached = true;
- if (sm_supported(iommu))
- ret = intel_pasid_setup_pass_through(iommu, dev, IOMMU_NO_PASID);
- else
- ret = device_setup_pass_through(dev);
-
- if (!ret)
- info->domain_attached = true;
-
- return ret;
+ return 0;
}
static int identity_domain_set_dev_pasid(struct iommu_domain *domain,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0793/2151] iommu/vt-d: Fix IQE handling to cover all descriptors in submission range
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (791 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0792/2151] iommu/vt-d: Drop old iopf ref only after attach succeeds Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0794/2151] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2 Greg Kroah-Hartman
` (89 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Guanghui Feng, Lu Baolu,
Joerg Roedel, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guanghui Feng <guanghuifeng@linux.alibaba.com>
[ Upstream commit 754d07b940c4ce025fab022b548fb5c3d11bf766 ]
When an Invalidation Queue Error (IQE) occurs, hardware halts fetching
and IQH points at the faulting descriptor. The previous code only
checked whether IQH matched the first descriptor index of the current
submission, missing faults on any other descriptor within the batch.
Expand the check to cover the entire submission range [index, wait_index],
accounting for circular wrap-around.
Furthermore, after detecting IQE, the old recovery only replaced the
single faulting slot with a copy of the wait descriptor and immediately
returned -EINVAL. This left two problems:
a) Hardware resumed fetching and could hit another invalid descriptor
in the same abandoned batch, raising a second IQE that no submitter
would claim — permanently deadlocking the queue.
b) The caller reclaimed all batch slots (QI_FREE) while hardware might
still be asynchronously processing descriptors from that batch,
allowing concurrent overwrite and descriptor corruption.
Fix both by introducing qi_drain_remaining_descs(): upon IQE detection,
overwrite the stranded slots in [IQH, wait_index) with fenced no-op wait
descriptors, resubmit the wait descriptor at wait_index, clear IQE, and
spin until hardware signals QI_DONE (with DMAR_OPERATION_TIMEOUT). This
guarantees hardware has fully drained the batch before the caller
reclaims slots.
Fixes: 8a1d82462540 ("iommu/vt-d: Multiple descriptors per qi_submit_sync()")
Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iommu/intel/dmar.c | 72 ++++++++++++++++++++++++++++++++------
1 file changed, 61 insertions(+), 11 deletions(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index 2a99df386560e..7376cf6502afe 100644
--- a/drivers/iommu/intel/dmar.c
+++ b/drivers/iommu/intel/dmar.c
@@ -1280,6 +1280,49 @@ static void qi_dump_fault(struct intel_iommu *iommu, u32 fault)
(unsigned long long)desc->qw1);
}
+static int qi_drain_remaining_descs(struct intel_iommu *iommu, int head,
+ int wait_index)
+{
+ struct q_inval *qi = iommu->qi;
+ int shift = qi_shift(iommu);
+ struct qi_desc wait_desc = {};
+ struct qi_desc nop_desc = {};
+ cycles_t start;
+
+ nop_desc.qw0 = QI_IWD_FENCE | QI_IWD_TYPE;
+
+ wait_desc.qw0 = QI_IWD_STATUS_DATA(QI_DONE) | QI_IWD_PRQ_DRAIN |
+ QI_IWD_STATUS_WRITE | QI_IWD_FENCE | QI_IWD_TYPE;
+ wait_desc.qw1 = virt_to_phys(&qi->desc_status[wait_index]);
+
+ while (head != wait_index) {
+ memcpy(qi->desc + (head << shift), &nop_desc, 1 << shift);
+ head = (head + 1) % QI_LENGTH;
+ }
+
+ WRITE_ONCE(qi->desc_status[wait_index], QI_IN_USE);
+ memcpy(qi->desc + (wait_index << shift), &wait_desc, 1 << shift);
+
+ /*
+ * Order the descriptor rewrites before the writel() that restarts
+ * the fetch engine.
+ */
+ wmb();
+
+ writel(DMA_FSTS_IQE, iommu->reg + DMAR_FSTS_REG);
+
+ start = get_cycles();
+ while (READ_ONCE(qi->desc_status[wait_index]) != QI_DONE) {
+ if (DMAR_OPERATION_TIMEOUT < (get_cycles() - start)) {
+ pr_err("Timeout draining invalidation queue after IQE\n");
+ return -ETIMEDOUT;
+ }
+ cpu_relax();
+ }
+
+ return 0;
+}
+
static int qi_check_fault(struct intel_iommu *iommu, int index, int wait_index)
{
u32 fault;
@@ -1302,18 +1345,25 @@ static int qi_check_fault(struct intel_iommu *iommu, int index, int wait_index)
* is cleared.
*/
if (fault & DMA_FSTS_IQE) {
+ int head_idx, ret;
+
head = readl(iommu->reg + DMAR_IQH_REG);
- if ((head >> shift) == index) {
- struct qi_desc *desc = qi->desc + head;
-
- /*
- * desc->qw2 and desc->qw3 are either reserved or
- * used by software as private data. We won't print
- * out these two qw's for security consideration.
- */
- memcpy(desc, qi->desc + (wait_index << shift),
- 1 << shift);
- writel(DMA_FSTS_IQE, iommu->reg + DMAR_FSTS_REG);
+ head_idx = (head >> shift) % QI_LENGTH;
+
+ /*
+ * The faulting descriptor can be anywhere within the current
+ * submission's range [index, wait_index]. Since the queue is
+ * circular, this submission may wrap around QI_LENGTH
+ * (index > wait_index in that case), so check both the
+ * non-wrapped and wrapped cases of the range.
+ */
+ if (index <= wait_index ?
+ (head_idx >= index && head_idx <= wait_index) :
+ (head_idx >= index || head_idx <= wait_index)) {
+ ret = qi_drain_remaining_descs(iommu, head_idx, wait_index);
+ if (ret)
+ return ret;
+
pr_info("Invalidation Queue Error (IQE) cleared\n");
return -EINVAL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0794/2151] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (792 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0793/2151] iommu/vt-d: Fix IQE handling to cover all descriptors in submission range Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0795/2151] wifi: mac80211: Fix a race when expiring a mesh path Greg Kroah-Hartman
` (88 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mateusz Nowicki, Antonio Borneo,
Alexandre Torgue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mateusz Nowicki <mateusz.nowicki@posteo.net>
[ Upstream commit ae4d08bbe3f4f5ec920dbdba26091adf0ae6ba71 ]
OP-TEE implements the STM32MP2 watchdog SMC service with function ID
0xbc000000 (CFG_WDT_SM_HANDLER_ID), not 0xb200005a. With the current
value the arm_smc_wdt probe fails with -EIO and the IWDG started by the
bootloader is never refreshed.
Fixes: 89fca38168c9 ("arm64: dts: st: add arm-wdt node for watchdog support on stm32mp251")
Fixes: e9b03ef21386 ("arm64: dts: st: introduce stm32mp23 SoCs family")
Signed-off-by: Mateusz Nowicki <mateusz.nowicki@posteo.net>
Reviewed-by: Antonio Borneo <antonio.borneo@foss.st.com>
Link: https://lore.kernel.org/r/20260907091400.55954-1-mateusz.nowicki@posteo.net
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/st/stm32mp231.dtsi | 2 +-
arch/arm64/boot/dts/st/stm32mp251.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/st/stm32mp231.dtsi b/arch/arm64/boot/dts/st/stm32mp231.dtsi
index 88e214d395ab7..57ab9d785f347 100644
--- a/arch/arm64/boot/dts/st/stm32mp231.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp231.dtsi
@@ -35,7 +35,7 @@ arm-pmu {
arm_wdt: watchdog {
compatible = "arm,smc-wdt";
- arm,smc-id = <0xb200005a>;
+ arm,smc-id = <0xbc000000>;
status = "disabled";
};
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index e4e6f9f818d81..371bfa26bdd57 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -36,7 +36,7 @@ arm-pmu {
arm_wdt: watchdog {
compatible = "arm,smc-wdt";
- arm,smc-id = <0xb200005a>;
+ arm,smc-id = <0xbc000000>;
status = "disabled";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0795/2151] wifi: mac80211: Fix a race when expiring a mesh path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (793 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0794/2151] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2 Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0796/2151] RDMA/irdma: Free IRQ when CEQ vector mapping fails Greg Kroah-Hartman
` (87 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ginger Li, Johannes Berg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ginger Li <ginger.jzllee@gmail.com>
[ Upstream commit 6571b6a24cc37c650a1815b1c320e30db5de466f ]
My static analyzer identified a potential issue in 'net/mac80211/mesh_pathtbl.c':
mpath_expired() reads mpath->flags and mpath->exp_time without holding
mpath->state_lock, while mesh_path_fix_nexthop() and the other writers update
both fields under that lock. In mpath_lookup() and
__mesh_path_lookup_by_idx() the unlocked check is followed by taking the lock
and clearing MESH_PATH_ACTIVE, so the check and the update are not atomic:
CPU0 (mpath_lookup) CPU1 (mesh_path_fix_nexthop)
mpath_expired() reads the stale
flags/exp_time and returns true
spin_lock_bh(&mpath->state_lock)
mpath->exp_time = 0;
mpath->flags = FIXED|SN_VALID;
mesh_path_activate(mpath);
spin_unlock_bh(&mpath->state_lock)
spin_lock_bh(&mpath->state_lock)
mpath->flags &= ~MESH_PATH_ACTIVE;
spin_unlock_bh(&mpath->state_lock)
A path which mesh_path_fix_nexthop() has just set up as MESH_PATH_FIXED and
MESH_PATH_ACTIVE then has MESH_PATH_ACTIVE cleared again, and forwarding to
that destination silently stops.
Take mpath->state_lock before evaluating mpath_expired() so that the check and
the clearing of MESH_PATH_ACTIVE are atomic with respect to the writers.
Fixes: 60854fd94573 ("mac80211: mesh: convert path table to rhashtable")
Signed-off-by: Ginger Li <ginger.jzllee@gmail.com>
Link: https://patch.msgid.link/20260922054253.11976-1-ginger.jzllee@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/mesh_pathtbl.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 5b492ed5e5a35..33a0ef5285e10 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -247,9 +247,10 @@ static struct mesh_path *mpath_lookup(struct mesh_table *tbl, const u8 *dst,
mpath = rhashtable_lookup(&tbl->rhead, dst, mesh_rht_params);
- if (mpath && mpath_expired(mpath)) {
+ if (mpath) {
spin_lock_bh(&mpath->state_lock);
- mpath->flags &= ~MESH_PATH_ACTIVE;
+ if (mpath_expired(mpath))
+ mpath->flags &= ~MESH_PATH_ACTIVE;
spin_unlock_bh(&mpath->state_lock);
}
return mpath;
@@ -290,11 +291,11 @@ __mesh_path_lookup_by_idx(struct mesh_table *tbl, int idx)
if (!mpath)
return NULL;
- if (mpath_expired(mpath)) {
- spin_lock_bh(&mpath->state_lock);
+ spin_lock_bh(&mpath->state_lock);
+ if (mpath_expired(mpath))
mpath->flags &= ~MESH_PATH_ACTIVE;
- spin_unlock_bh(&mpath->state_lock);
- }
+ spin_unlock_bh(&mpath->state_lock);
+
return mpath;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0796/2151] RDMA/irdma: Free IRQ when CEQ vector mapping fails
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (794 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0795/2151] wifi: mac80211: Fix a race when expiring a mesh path Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0797/2151] RDMA/hns: Pin CQ buffer writable to match device DMA write access Greg Kroah-Hartman
` (86 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Serhat Kumral, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Serhat Kumral <serhatkumral1@gmail.com>
[ Upstream commit 952f18e04fa9790e347e09263c25318afe723d86 ]
irdma_cfg_ceq_vector() registers an IRQ handler before requesting the
CEQ-to-vector mapping through the virtual channel. If the mapping
fails, the function returns without releasing the IRQ resources.
The caller destroys the CEQ, leaving the IRQ handler registered
and potentially referencing freed memory.
Call irdma_destroy_irq() on mapping failure to release
the IRQ resources and drain the associated tasklet
before the caller destroys the CEQ. Use the same dev_id
passed to request_irq(), accounting for CEQ0 sharing
its interrupt vector with the AEQ.
Fixes: b800e82feba7 ("RDMA/irdma: Add GEN3 support for AEQ and CEQ")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Serhat Kumral <serhatkumral1@gmail.com>
Link: https://patch.msgid.link/20260918110428.36586-1-serhatkumral1@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/irdma/hw.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
index cbf7f4d75e5ea..1baffb595898c 100644
--- a/drivers/infiniband/hw/irdma/hw.c
+++ b/drivers/infiniband/hw/irdma/hw.c
@@ -1184,12 +1184,21 @@ static int irdma_cfg_ceq_vector(struct irdma_pci_f *rf, struct irdma_ceq *iwceq,
}
msix_vec->ceq_id = ceq_id;
- if (rf->sc_dev.privileged)
+ if (rf->sc_dev.privileged) {
rf->sc_dev.irq_ops->irdma_cfg_ceq(&rf->sc_dev, ceq_id,
msix_vec->idx, true);
- else
+ } else {
status = irdma_vchnl_req_ceq_vec_map(&rf->sc_dev, ceq_id,
msix_vec->idx);
+ if (!status)
+ return 0;
+
+ if (rf->msix_shared && !ceq_id)
+ irdma_destroy_irq(rf, msix_vec, rf);
+ else
+ irdma_destroy_irq(rf, msix_vec, iwceq);
+ }
+
return status;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0797/2151] RDMA/hns: Pin CQ buffer writable to match device DMA write access
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (795 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0796/2151] RDMA/irdma: Free IRQ when CEQ vector mapping fails Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0798/2151] RDMA/mlx5: Fix mlx5_ib_dev_res_init() failure when XRC cap is absent Greg Kroah-Hartman
` (85 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yishai Hadas, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@nvidia.com>
[ Upstream commit ce29f6e741844a78ad1977f2a550ede27ecf95f8 ]
alloc_cq_buf() leaves user_access zero-initialized, but the device
writes CQEs into the CQ buffer. Set IB_ACCESS_LOCAL_WRITE so the buffer
is pinned writable, matching the device's write access.
Fixes: 744b7bdfa79e ("RDMA/hns: Support 0 hop addressing for CQE buffer")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/20260915140933.40580-3-yishaih@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/hns/hns_roce_cq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c
index 150f5052d0b01..59c88b418c511 100644
--- a/drivers/infiniband/hw/hns/hns_roce_cq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_cq.c
@@ -258,6 +258,7 @@ static int alloc_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq,
buf_attr.region[0].size = hr_cq->cq_depth * hr_cq->cqe_size;
buf_attr.region[0].hopnum = hr_dev->caps.cqe_hop_num;
buf_attr.region_count = 1;
+ buf_attr.user_access = IB_ACCESS_LOCAL_WRITE;
ret = hns_roce_mtr_create(hr_dev, &hr_cq->mtr, &buf_attr,
hr_dev->caps.cqe_ba_pg_sz + PAGE_SHIFT,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0798/2151] RDMA/mlx5: Fix mlx5_ib_dev_res_init() failure when XRC cap is absent
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (796 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0797/2151] RDMA/hns: Pin CQ buffer writable to match device DMA write access Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0799/2151] RDMA/mlx5: Set WQ event handler before firmware RQ insertion Greg Kroah-Hartman
` (84 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yishai Hadas, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@nvidia.com>
[ Upstream commit 4354ab7a85d1ddd45a8a3337227fad5b37b44902 ]
mlx5_ib_dev_res_init() returns -EOPNOTSUPP when the firmware XRC
capability is absent, failing driver probe on XRC-less devices.
Make XRC optional throughout the devr resource path: initialize cq_lock
and srq_lock unconditionally (needed for every QP creation), skip xrcd
allocation and the XRC-type placeholder SRQ (s0) when xrc=0, and guard
their cleanup paths accordingly.
Fixes: f4375443b786 ("RDMA/mlx5: Get XRCD number directly for the internal use")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/20260915140933.40580-9-yishaih@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/main.c | 56 +++++++++++++++++++------------
1 file changed, 34 insertions(+), 22 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 3dd100cd91565..31e36ab9a1316 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3272,7 +3272,7 @@ int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev)
{
struct mlx5_ib_resources *devr = &dev->devr;
struct ib_srq_init_attr attr;
- struct ib_srq *s0, *s1;
+ struct ib_srq *s0 = NULL, *s1;
int ret = 0;
/*
@@ -3290,19 +3290,27 @@ int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev)
if (ret)
goto unlock;
- memset(&attr, 0, sizeof(attr));
- attr.attr.max_sge = 1;
- attr.attr.max_wr = 1;
- attr.srq_type = IB_SRQT_XRC;
- attr.ext.cq = devr->c0;
-
- s0 = ib_create_srq(devr->p0, &attr);
- if (IS_ERR(s0)) {
- ret = PTR_ERR(s0);
- mlx5_ib_err(dev,
- "Couldn't create SRQ 0 for res init, err=%pe\n",
- s0);
- goto unlock;
+ /*
+ * s0 is an XRC-type placeholder SRQ used as the default XRQN for
+ * XRC QPs. Skip it when XRC is absent; all devr->s0 accesses in
+ * qp.c are inside XRC QP paths that the verbs layer blocks before
+ * reaching this driver when xrc=0, so NULL is safe.
+ */
+ if (MLX5_CAP_GEN(dev->mdev, xrc)) {
+ memset(&attr, 0, sizeof(attr));
+ attr.attr.max_sge = 1;
+ attr.attr.max_wr = 1;
+ attr.srq_type = IB_SRQT_XRC;
+ attr.ext.cq = devr->c0;
+
+ s0 = ib_create_srq(devr->p0, &attr);
+ if (IS_ERR(s0)) {
+ ret = PTR_ERR(s0);
+ mlx5_ib_err(dev,
+ "Couldn't create SRQ 0 for res init, err=%pe\n",
+ s0);
+ goto unlock;
+ }
}
memset(&attr, 0, sizeof(attr));
@@ -3316,7 +3324,8 @@ int mlx5_ib_dev_res_srq_init(struct mlx5_ib_dev *dev)
mlx5_ib_err(dev,
"Couldn't create SRQ 1 for res init, err=%pe\n",
s1);
- ib_destroy_srq(s0);
+ if (s0)
+ ib_destroy_srq(s0);
goto unlock;
}
@@ -3333,8 +3342,11 @@ static int mlx5_ib_dev_res_init(struct mlx5_ib_dev *dev)
struct mlx5_ib_resources *devr = &dev->devr;
int ret;
+ mutex_init(&devr->cq_lock);
+ mutex_init(&devr->srq_lock);
+
if (!MLX5_CAP_GEN(dev->mdev, xrc))
- return -EOPNOTSUPP;
+ return 0;
ret = mlx5_cmd_xrcd_alloc(dev->mdev, &devr->xrcdn0, 0);
if (ret)
@@ -3346,9 +3358,6 @@ static int mlx5_ib_dev_res_init(struct mlx5_ib_dev *dev)
return ret;
}
- mutex_init(&devr->cq_lock);
- mutex_init(&devr->srq_lock);
-
return 0;
}
@@ -3359,10 +3368,13 @@ static void mlx5_ib_dev_res_cleanup(struct mlx5_ib_dev *dev)
/* After s0/s1 init, they are not unset during the device lifetime. */
if (devr->s1) {
ib_destroy_srq(devr->s1);
- ib_destroy_srq(devr->s0);
+ if (devr->s0)
+ ib_destroy_srq(devr->s0);
+ }
+ if (MLX5_CAP_GEN(dev->mdev, xrc)) {
+ mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn1, 0);
+ mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn0, 0);
}
- mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn1, 0);
- mlx5_cmd_xrcd_dealloc(dev->mdev, devr->xrcdn0, 0);
/* After p0/c0 init, they are not unset during the device lifetime. */
if (devr->c0) {
ib_destroy_cq(devr->c0);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0799/2151] RDMA/mlx5: Set WQ event handler before firmware RQ insertion
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (797 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0798/2151] RDMA/mlx5: Fix mlx5_ib_dev_res_init() failure when XRC cap is absent Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0800/2151] RDMA/mlx5: Set SRQ event handler before xarray insertion Greg Kroah-Hartman
` (83 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yishai Hadas, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@nvidia.com>
[ Upstream commit 28c559d1e25de46bb6dd39e6fa1e93ea6abdf1f6 ]
create_rq() inserts the RQ into dev->qp_table.tree, making it visible to
rsc_event_notifier() before rwq->core_qp.event was assigned. A firmware
WQ_CATAS_ERROR event in that window finds a NULL event pointer.
Move the assignment before create_rq().
Fixes: 350d0e4c7e4b ("IB/mlx5: Track asynchronous events on a receive work queue")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/20260915140933.40580-11-yishaih@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 3168d70315c78..1084bf154e0eb 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -5502,6 +5502,7 @@ struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,
rwq = kzalloc(sizeof(*rwq), GFP_KERNEL);
if (!rwq)
return ERR_PTR(-ENOMEM);
+ rwq->core_qp.event = mlx5_ib_wq_event;
err = prepare_user_rq(pd, init_attr, udata, rwq);
if (err)
goto err;
@@ -5525,7 +5526,6 @@ struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,
goto err_copy;
}
- rwq->core_qp.event = mlx5_ib_wq_event;
rwq->ibwq.event_handler = init_attr->event_handler;
return &rwq->ibwq;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0800/2151] RDMA/mlx5: Set SRQ event handler before xarray insertion
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (798 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0799/2151] RDMA/mlx5: Set WQ event handler before firmware RQ insertion Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0801/2151] RDMA/mlx5: Set RQ event handler for raw-packet QP Greg Kroah-Hartman
` (82 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yishai Hadas, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@nvidia.com>
[ Upstream commit d2aa15620e98dc4c6516944397ebea03b7a62b90 ]
mlx5_cmd_create_srq() stores the SRQ into the xarray before
srq->msrq.event was assigned. A firmware SRQ event arriving in that
window calls through a NULL pointer.
Move the assignment before mlx5_cmd_create_srq().
Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/20260915140933.40580-12-yishaih@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/srq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c
index bcb6b324af506..38def085ee267 100644
--- a/drivers/infiniband/hw/mlx5/srq.c
+++ b/drivers/infiniband/hw/mlx5/srq.c
@@ -284,6 +284,7 @@ int mlx5_ib_create_srq(struct ib_srq *ib_srq,
in.pd = to_mpd(ib_srq->pd)->pdn;
in.db_record = srq->db.dma;
+ srq->msrq.event = mlx5_ib_srq_event;
err = mlx5_cmd_create_srq(dev, &srq->msrq, &in);
kvfree(in.pas);
if (err) {
@@ -292,8 +293,6 @@ int mlx5_ib_create_srq(struct ib_srq *ib_srq,
}
mlx5_ib_dbg(dev, "create SRQ with srqn 0x%x\n", srq->msrq.srqn);
-
- srq->msrq.event = mlx5_ib_srq_event;
srq->ibsrq.ext.xrc.srq_num = srq->msrq.srqn;
if (udata) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0801/2151] RDMA/mlx5: Set RQ event handler for raw-packet QP
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (799 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0800/2151] RDMA/mlx5: Set SRQ event handler before xarray insertion Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0802/2151] RDMA/mlx5: Initialize QP/RQ/SQ resource refcount before publishing it Greg Kroah-Hartman
` (81 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yishai Hadas, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@nvidia.com>
[ Upstream commit a4fa6497002c80b55ebe597242a1bba2ff268886 ]
create_raw_packet_qp() creates a separate firmware RQ object but never
assigned rq->base.mqp.event. Any firmware event on this resource (e.g.
WQ_CATAS_ERROR, WQ_ACCESS_ERROR) calls through a NULL pointer.
Set the event pointer before the RQ is inserted into the resource table.
Fixes: 0fb2ed66a14c ("IB/mlx5: Add create and destroy functionality for Raw Packet QP")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/20260915140933.40580-13-yishaih@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/qp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 1084bf154e0eb..865000d1a2c52 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1617,6 +1617,7 @@ static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
if (qp->rq.wqe_cnt) {
rq->base.container_mibqp = qp;
+ rq->base.mqp.event = mlx5_ib_qp_event;
if (qp->flags & IB_QP_CREATE_CVLAN_STRIPPING)
rq->flags |= MLX5_IB_RQ_CVLAN_STRIPPING;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0802/2151] RDMA/mlx5: Initialize QP/RQ/SQ resource refcount before publishing it
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (800 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0801/2151] RDMA/mlx5: Set RQ event handler for raw-packet QP Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0803/2151] ASoC: amd: acp-es8336: Use an owned codec device reference Greg Kroah-Hartman
` (80 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yishai Hadas, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@nvidia.com>
[ Upstream commit 829a0e65deff3f826a7870a52404aeaf1a3fec3f ]
create_resource_common() inserted the resource into the radix tree
before its initialization was complete. A firmware EQE in that window
finds a zero refcount_t and calls refcount_inc() on it; the refcount API
treats this as a use-after-free, saturates the counter, and permanently
breaks the resource's lifecycle tracking.
Move the initialization before the radix_tree_insert().
Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/20260915140933.40580-15-yishaih@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/qpc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/qpc.c b/drivers/infiniband/hw/mlx5/qpc.c
index 146d03ae40bd9..67ed45f3ae17f 100644
--- a/drivers/infiniband/hw/mlx5/qpc.c
+++ b/drivers/infiniband/hw/mlx5/qpc.c
@@ -165,6 +165,10 @@ static int create_resource_common(struct mlx5_ib_dev *dev,
int err;
qp->common.res = rsc_type;
+ refcount_set(&qp->common.refcount, 1);
+ init_completion(&qp->common.free);
+ qp->pid = current->pid;
+
spin_lock_irq(&table->lock);
err = radix_tree_insert(&table->tree,
qp->qpn | (rsc_type << MLX5_USER_INDEX_LEN),
@@ -173,10 +177,6 @@ static int create_resource_common(struct mlx5_ib_dev *dev,
if (err)
return err;
- refcount_set(&qp->common.refcount, 1);
- init_completion(&qp->common.free);
- qp->pid = current->pid;
-
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0803/2151] ASoC: amd: acp-es8336: Use an owned codec device reference
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (801 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0802/2151] RDMA/mlx5: Initialize QP/RQ/SQ resource refcount before publishing it Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0804/2151] ASoC: amd: acp3x-es83xx: Keep " Greg Kroah-Hartman
` (79 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yibo Tan, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yibo Tan <lhfff@tju.edu.cn>
[ Upstream commit c257e3bcb36f4597d6dbb6fbc546e466ef53e385 ]
acpi_get_first_physical_node() returns a borrowed device pointer. If the
pa-enable GPIO lookup fails, st_es8336_late_probe() puts that pointer
despite not owning a reference. A later physical-node teardown can then
release the device while device_del() is still using it.
This was reproduced on current mainline with the real static late-probe
callback and normal platform-device unregister. The GPIO lookup returned
-EPROBE_DEFER and KASAN reported a slab-use-after-free in device_del(),
with the object freed by acpi_unbind_one().
Use acpi_bus_get_primary_device(), which obtains a stable device
reference under the physical-node lock, and release it at callback exit
with scoped cleanup. Keep the reference callback-local because late probe
can be retried; registering one devres action per attempt would accumulate
references.
The same KASAN guest with this change reached the same -EPROBE_DEFER and
unregister path without KASAN, WARNING, Oops or panic. The test directly
invoked the production callback and did not emulate a complete ASoC card or
physical AMD hardware.
Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Yibo Tan <lhfff@tju.edu.cn>
Link: https://patch.msgid.link/20260922185057.954150-2-lhfff@tju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/acp-es8336.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index 7593eaef5859a..e254c5d99de53 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -31,7 +31,6 @@
static unsigned long acp2x_machine_id;
static struct snd_soc_jack st_jack;
-static struct device *codec_dev;
static struct gpio_desc *gpio_pa;
static int sof_es8316_speaker_power_event(struct snd_soc_dapm_widget *w,
@@ -192,6 +191,7 @@ static const struct acpi_gpio_mapping acpi_es8336_gpios[] = {
static int st_es8336_late_probe(struct snd_soc_card *card)
{
+ struct device *codec_dev __free(put_device) = NULL;
struct acpi_device *adev;
int ret;
@@ -214,7 +214,6 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
if (IS_ERR(gpio_pa)) {
ret = dev_err_probe(card->dev, PTR_ERR(gpio_pa),
"could not get pa-enable GPIO\n");
- put_device(codec_dev);
return ret;
}
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0804/2151] ASoC: amd: acp3x-es83xx: Keep an owned codec device reference
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (802 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0803/2151] ASoC: amd: acp-es8336: Use an owned codec device reference Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0805/2151] ALSA: oxygen: use helper to activate the SPDIF PCM control Greg Kroah-Hartman
` (78 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yibo Tan, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yibo Tan <lhfff@tju.edu.cn>
[ Upstream commit 095025078dc3a1b4f0fcdc8b8d9dcb4d192a2a14 ]
acpi_get_first_physical_node() returns a borrowed device pointer. The
private data allocation failure path in acp3x_es83xx_probe() puts that
pointer despite not owning a reference. The successful path also saves the
borrowed pointer for later card operations.
This was reproduced on current mainline with failslab restricted to the
real static callback. The rejected devm_kzalloc() returned -ENOMEM, and
normal codec platform-device unregister then produced a KASAN
slab-use-after-free in device_del(), with allocation in
acpi_create_platform_device() and release in acpi_unbind_one().
Use acpi_bus_get_primary_device() to acquire the reference while the
physical-node lock is held. After allocating private data, register a
devres put action before publishing the pointer. This balances action
allocation and later probe failures, keeps the saved pointer alive during
card use, and drops the reference after ASoC card unregister during
successful teardown. The existing OOM put now correctly balances the owned
lookup.
The same filtered KASAN guest with this change reached the same -ENOMEM and
unregister path without KASAN, WARNING, Oops or panic. The test directly
invoked the production callback and did not emulate a complete ACP/ASoC
card or physical Huawei hardware.
Fixes: 54fcd9dd44b2 ("ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec")
Signed-off-by: Yibo Tan <lhfff@tju.edu.cn>
Link: https://patch.msgid.link/20260922185057.954150-3-lhfff@tju.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
index 7197c1d21d955..8f65720b153f4 100644
--- a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
+++ b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
@@ -10,6 +10,7 @@
#include <sound/soc-dapm.h>
#include <sound/jack.h>
#include <sound/soc-acpi.h>
+#include <acpi/acpi_bus.h>
#include <linux/clk.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
@@ -42,6 +43,11 @@ struct acp3x_es83xx_private {
struct snd_soc_dapm_route mic_map[2];
};
+static void acp3x_es83xx_put_codec_device(void *data)
+{
+ put_device(data);
+}
+
static const unsigned int channels[] = {
DUAL_CHANNEL,
};
@@ -438,6 +444,12 @@ static int acp3x_es83xx_probe(struct snd_soc_card *card)
return -ENOMEM;
}
+ ret = devm_add_action_or_reset(dev,
+ acp3x_es83xx_put_codec_device,
+ codec_dev);
+ if (ret)
+ return ret;
+
priv->codec_dev = codec_dev;
priv->quirk = (unsigned long)dmi_id->driver_data;
acp_drvdata->mach_priv = priv;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0805/2151] ALSA: oxygen: use helper to activate the SPDIF PCM control
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (803 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0804/2151] ASoC: amd: acp3x-es83xx: Keep " Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0806/2151] ALSA: via82xx: use helper to activate DXS controls Greg Kroah-Hartman
` (77 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Runyu Xiao, Takashi Iwai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Runyu Xiao <runyu.xiao@seu.edu.cn>
[ Upstream commit 5bdc232c3094304a7e17df5ddb66dcdacbead6bf ]
oxygen_open() and oxygen_close() modify the SPDIF PCM control access
flags while holding chip->mutex. Direct access changes bypass the control
core locking and notification path.
Move the access transition outside the driver mutex and use
snd_ctl_activate_id(), which serializes the control update with the control
core.
Fixes: d0ce9946c52e ("[ALSA] add CMI8788 driver")
Assisted-by: LLM
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260927121709.742840-1-runyu.xiao@seu.edu.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/oxygen/oxygen_pcm.c | 37 +++++++++++++++--------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index b716356010b89..75efbf59a6752 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -171,16 +171,14 @@ static int oxygen_open(struct snd_pcm_substream *substream,
snd_pcm_set_sync(substream);
chip->streams[channel] = substream;
- guard(mutex)(&chip->mutex);
- chip->pcm_active |= 1 << channel;
- if (channel == PCM_SPDIF) {
- chip->spdif_pcm_bits = chip->spdif_bits;
- chip->controls[CONTROL_SPDIF_PCM]->vd[0].access &=
- ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
- snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |
- SNDRV_CTL_EVENT_MASK_INFO,
- &chip->controls[CONTROL_SPDIF_PCM]->id);
+ scoped_guard(mutex, &chip->mutex) {
+ chip->pcm_active |= 1 << channel;
+ if (channel == PCM_SPDIF)
+ chip->spdif_pcm_bits = chip->spdif_bits;
}
+ if (channel == PCM_SPDIF)
+ snd_ctl_activate_id(chip->card,
+ &chip->controls[CONTROL_SPDIF_PCM]->id, 1);
return 0;
}
@@ -220,19 +218,16 @@ static int oxygen_close(struct snd_pcm_substream *substream)
struct oxygen *chip = snd_pcm_substream_chip(substream);
unsigned int channel = oxygen_substream_channel(substream);
- guard(mutex)(&chip->mutex);
- chip->pcm_active &= ~(1 << channel);
- if (channel == PCM_SPDIF) {
- chip->controls[CONTROL_SPDIF_PCM]->vd[0].access |=
- SNDRV_CTL_ELEM_ACCESS_INACTIVE;
- snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |
- SNDRV_CTL_EVENT_MASK_INFO,
- &chip->controls[CONTROL_SPDIF_PCM]->id);
- }
- if (channel == PCM_SPDIF || channel == PCM_MULTICH)
- oxygen_update_spdif_source(chip);
+ scoped_guard(mutex, &chip->mutex) {
+ chip->pcm_active &= ~(1 << channel);
+ if (channel == PCM_SPDIF || channel == PCM_MULTICH)
+ oxygen_update_spdif_source(chip);
- chip->streams[channel] = NULL;
+ chip->streams[channel] = NULL;
+ }
+ if (channel == PCM_SPDIF)
+ snd_ctl_activate_id(chip->card,
+ &chip->controls[CONTROL_SPDIF_PCM]->id, 0);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0806/2151] ALSA: via82xx: use helper to activate DXS controls
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (804 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0805/2151] ALSA: oxygen: use helper to activate the SPDIF PCM control Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0807/2151] drm/exynos/fimd: fix register offset type in fimd_trigger() Greg Kroah-Hartman
` (76 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Runyu Xiao, Takashi Iwai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Runyu Xiao <runyu.xiao@seu.edu.cn>
[ Upstream commit aee7c43126e3184d7eefde6545b3b88628e5591a ]
The VIA DXS playback callbacks modify control access flags directly when
a stream opens or closes. This bypasses the control core locking and
notification path.
Use snd_ctl_activate_id() for both transitions so access changes are
serialized by the control core and reported with the expected info event.
Fixes: 3d00941371a7 ("sound: via82xx: deactivate DXS controls of inactive streams")
Assisted-by: LLM
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260927141447.788664-1-runyu.xiao@seu.edu.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/via82xx.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 2b0f9e38863ed..220fd86d43a06 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1244,11 +1244,7 @@ static int snd_via8233_playback_open(struct snd_pcm_substream *substream)
VIA_DXS_MAX_VOLUME - (dxs_init_volume & 31);
chip->playback_volume[stream][1] =
VIA_DXS_MAX_VOLUME - (dxs_init_volume & 31);
- chip->dxs_controls[stream]->vd[0].access &=
- ~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
- snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |
- SNDRV_CTL_EVENT_MASK_INFO,
- &chip->dxs_controls[stream]->id);
+ snd_ctl_activate_id(chip->card, &chip->dxs_controls[stream]->id, 1);
}
return 0;
}
@@ -1335,10 +1331,7 @@ static int snd_via8233_playback_close(struct snd_pcm_substream *substream)
stream = viadev->reg_offset / 0x10;
if (chip->dxs_controls[stream]) {
- chip->dxs_controls[stream]->vd[0].access |=
- SNDRV_CTL_ELEM_ACCESS_INACTIVE;
- snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_INFO,
- &chip->dxs_controls[stream]->id);
+ snd_ctl_activate_id(chip->card, &chip->dxs_controls[stream]->id, 0);
}
return snd_via82xx_pcm_close(substream);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0807/2151] drm/exynos/fimd: fix register offset type in fimd_trigger()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (805 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0806/2151] ALSA: via82xx: use helper to activate DXS controls Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0808/2151] of/irq: Fix device node refcount leak in of_check_msi_parent() Greg Kroah-Hartman
` (75 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chen-Yu Tsai, Marek Szyprowski,
Inki Dae, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <wenst@chromium.org>
[ Upstream commit f901c9b986b6355716822d5c6ad34ae5edd71085 ]
Sparse reports:
exynos_drm_fimd.c:992:39: warning: incorrect type in initializer (different address spaces)
exynos_drm_fimd.c:992:39: expected void *timing_base
exynos_drm_fimd.c:992:39: got void [noderef] __iomem *
exynos_drm_fimd.c:1005:33: warning: incorrect type in argument 1 (different address spaces)
exynos_drm_fimd.c:1005:33: expected void const volatile [noderef] __iomem *addr
exynos_drm_fimd.c:1005:33: got void *
exynos_drm_fimd.c:1007:33: warning: incorrect type in argument 2 (different address spaces)
exynos_drm_fimd.c:1007:33: expected void volatile [noderef] __iomem *addr
exynos_drm_fimd.c:1007:33: got void *
Add "__iomem" to *timing_base to fix its type.
Fixes: 3854fab24e89 ("drm/exynos: fimd: support LCD I80 interface")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 205c238cc73a6..ba3ff13d7d02a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -988,7 +988,7 @@ static void fimd_trigger(struct device *dev)
{
struct fimd_context *ctx = dev_get_drvdata(dev);
const struct fimd_driver_data *driver_data = ctx->driver_data;
- void *timing_base = ctx->regs + driver_data->timing_base;
+ void __iomem *timing_base = ctx->regs + driver_data->timing_base;
u32 reg;
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0808/2151] of/irq: Fix device node refcount leak in of_check_msi_parent()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (806 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0807/2151] drm/exynos/fimd: fix register offset type in fimd_trigger() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0809/2151] rust: configfs: require thread-safe callback data Greg Kroah-Hartman
` (74 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Fuad Tabba,
Rob Herring (Arm), Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fuad Tabba <fuad.tabba@linux.dev>
[ Upstream commit cbe0f79dcab1c121d767927b53a61eadf2c5b518 ]
of_msi_xlate() documents @msi_np as a filter when it points at a node on
entry, handing back a reference only when it points at NULL. The msi-map
branch does that. of_check_msi_parent() keeps the reference from the 1:1
msi-parent match either way.
pci_msi_domain_get_msi_rid() is the only caller that passes a node in,
from irq_domain_get_of_node(), and it puts nothing, so a 1:1 match there
leaks the MSI controller node.
Fixes: 119aaeed0b67 ("of/irq: Add msi-parent check to of_msi_xlate()")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/20260826113604.010C01F000E9@smtp.kernel.org/
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://lore.kernel.org/all/20260826113604.010C01F000E9@smtp.kernel.org/
Link: https://patch.msgid.link/20260907112944.313618-2-fuad.tabba@linux.dev
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/of/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 14ca310c375a0..aa74a5b6f7656 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -693,7 +693,7 @@ static int of_check_msi_parent(struct device_node *dev_node, struct device_node
if ((*msi_node && *msi_node != msi_spec.np) || msi_spec.args_count != 0)
ret = -EINVAL;
- if (!ret) {
+ if (!ret && !*msi_node) {
/* Return with a node reference held */
*msi_node = msi_spec.np;
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0809/2151] rust: configfs: require thread-safe callback data
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (807 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0808/2151] of/irq: Fix device node refcount leak in of_check_msi_parent() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0810/2151] staging: iio: adc: ad7816: Sort headers alphabetically Greg Kroah-Hartman
` (73 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yilin Chen, Andreas Hindborg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yilin Chen <1479826151@qq.com>
[ Upstream commit ec27f3b700010d2ebae1cde2df0246197689d159 ]
The Rust configfs abstractions do not fully constrain callback data for
cross-thread use. Add the missing `Send` and `Sync` requirements.
Specifically, make the following changes:
1. Require `Data: Send` when implementing `Send` for `Subsystem<Data>`,
since the subsystem stores its data by value.
2. Make `GroupOperations` a `Sync` supertrait because `make_group` and
`drop_item` receive `&self` from foreign threads. Require `Child: Send`
because configfs may release child groups on an arbitrary thread.
3. Require `AttributeOperations::Data: Sync` because its callbacks receive
`&Data` from foreign threads.
4. Update the safety comments in FFI callbacks that call `get_group_data`
to cite these bounds as justification for sharing the returned
references with the callback thread.
5. Remove redundant `Child: 'static` bounds from `GroupOperationsVTable`
and `new_with_child_ctor`.
Fixes: 446cafc295bf ("rust: configfs: introduce rust support for configfs")
Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Should.20add.20Data.3A.20Send.2FSync.20bounds.20in.20configfs.3A.3ASubsystem.3F/with/623719979
Assisted-by: Gpt-5.6 Sol
Signed-off-by: Yilin Chen <1479826151@qq.com>
Link: https://msgid.link/tencent_5449081195EDDF5726C709CF648DD4044A08@qq.com
[ Andreas: Add Send/Sync bounds for `Group<Data>`, add `Send` bounds to
`GroupOperationsVTable`, `ItemOperationsVTable` and `ItemType` macro
implementation. ]
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
rust/kernel/configfs.rs | 63 ++++++++++++++++++++++++++++-------------
1 file changed, 44 insertions(+), 19 deletions(-)
diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs
index 002de999ff23f..967d852677c17 100644
--- a/rust/kernel/configfs.rs
+++ b/rust/kernel/configfs.rs
@@ -136,8 +136,9 @@ pub struct Subsystem<Data> {
// SAFETY: We do not provide any operations on `Subsystem`.
unsafe impl<Data> Sync for Subsystem<Data> {}
-// SAFETY: Ownership of `Subsystem` can safely be transferred to other threads.
-unsafe impl<Data> Send for Subsystem<Data> {}
+// SAFETY: Ownership of `Subsystem` can safely be transferred to other threads
+// if its data can be transferred as well.
+unsafe impl<Data: Send> Send for Subsystem<Data> {}
impl<Data> Subsystem<Data> {
/// Create an initializer for a [`Subsystem`].
@@ -250,6 +251,13 @@ pub struct Group<Data> {
data: Data,
}
+// SAFETY: We do not provide any operations on `Group`.
+unsafe impl<Data> Sync for Group<Data> {}
+
+// SAFETY: Ownership of `Group` can safely be transferred to other threads if
+// its data can be transferred as well.
+unsafe impl<Data: Send> Send for Group<Data> {}
+
impl<Data> Group<Data> {
/// Create an initializer for a new group.
///
@@ -339,7 +347,9 @@ unsafe fn get_group_data<'a, Parent>(this: *mut bindings::config_group) -> &'a P
impl<Parent, Child> GroupOperationsVTable<Parent, Child>
where
Parent: GroupOperations<Child = Child>,
- Child: 'static,
+ // We transfer `Arc<Group<Data>>` across a thread boundary in `make_group`
+ // and `drop_item`.
+ Arc<Group<Child>>: Send,
{
/// # Safety
///
@@ -358,8 +368,9 @@ impl<Parent, Child> GroupOperationsVTable<Parent, Child>
this: *mut bindings::config_group,
name: *const kernel::ffi::c_char,
) -> *mut bindings::config_group {
- // SAFETY: By function safety requirements of this function, this call
- // is safe.
+ // SAFETY: By function safety requirements, `this` points to a configfs
+ // group containing `Parent`. The `GroupOperations` bound guarantees
+ // that `Parent: Sync`, so it is safe to share it with this thread.
let parent_data = unsafe { get_group_data(this) };
let group_init = match Parent::make_group(
@@ -404,8 +415,9 @@ impl<Parent, Child> GroupOperationsVTable<Parent, Child>
this: *mut bindings::config_group,
item: *mut bindings::config_item,
) {
- // SAFETY: By function safety requirements of this function, this call
- // is safe.
+ // SAFETY: By function safety requirements, `this` points to a configfs
+ // group containing `Parent`. The `GroupOperations` bound guarantees
+ // that `Parent: Sync`, so it is safe to share it with this thread.
let parent_data = unsafe { get_group_data(this) };
// SAFETY: By function safety requirements, `item` is embedded in a
@@ -417,7 +429,9 @@ impl<Parent, Child> GroupOperationsVTable<Parent, Child>
if Parent::HAS_DROP_ITEM {
// SAFETY: We called `into_raw` to produce `r_child_group_ptr` in
- // `make_group`.
+ // `make_group`. This function may be executing on a different
+ // thread than `into_raw`. As `Arc<Group<Child>>: Send` this
+ // ownership transfer is safe.
let arc: Arc<Group<Child>> = unsafe { Arc::from_raw(r_child_group_ptr.cast_mut()) };
Parent::drop_item(parent_data, arc.as_arc_borrow());
@@ -448,6 +462,8 @@ const fn vtable_ptr() -> *const bindings::configfs_group_operations {
impl<Data> ItemOperationsVTable<Group<Data>, Data>
where
Data: 'static,
+ // We transfer `Arc<Group<Data>>` across a thread boundary in `release`.
+ Arc<Group<Data>>: Send,
{
/// # Safety
///
@@ -464,8 +480,9 @@ impl<Data> ItemOperationsVTable<Group<Data>, Data>
// embedded within a `Group<Data>`.
let r_group_ptr = unsafe { Group::<Data>::container_of(c_group_ptr) };
- // SAFETY: We called `into_raw` on `r_group_ptr` in
- // `make_group`.
+ // SAFETY: We called `into_raw` on `r_group_ptr` in `make_group`. This
+ // function may be running on a different thread than the thread that
+ // called `into_raw`. As `Arc<Group<Data>>: Send`, this is safe.
let pin_self: Arc<Group<Data>> = unsafe { Arc::from_raw(r_group_ptr.cast_mut()) };
drop(pin_self);
}
@@ -497,12 +514,12 @@ const fn vtable_ptr() -> *const bindings::configfs_item_operations {
///
/// Implement this trait on structs that embed a [`Subsystem`] or a [`Group`].
#[vtable]
-pub trait GroupOperations {
+pub trait GroupOperations: Sync {
/// The child data object type.
///
/// This group will create subgroups (subdirectories) backed by this kind of
/// object.
- type Child: 'static;
+ type Child: 'static + Send;
/// Creates a new subgroup.
///
@@ -569,8 +586,10 @@ impl<const ID: u64, O, Data> Attribute<ID, O, Data>
// `config_group`.
unsafe { container_of!(item, bindings::config_group, cg_item) };
- // SAFETY: The function safety requirements for this function satisfy
- // the conditions for this call.
+ // SAFETY: By function safety requirements, `c_group` points to a
+ // configfs group containing `Data`. The `AttributeOperations` bound
+ // guarantees that `Data: Sync`, so it is safe to share it with this
+ // thread.
let data: &Data = unsafe { get_group_data(c_group) };
// SAFETY: By function safety requirements, `page` is writable for `PAGE_SIZE`.
@@ -603,8 +622,10 @@ impl<const ID: u64, O, Data> Attribute<ID, O, Data>
// `config_group`.
unsafe { container_of!(item, bindings::config_group, cg_item) };
- // SAFETY: The function safety requirements for this function satisfy
- // the conditions for this call.
+ // SAFETY: By function safety requirements, `c_group` points to a
+ // configfs group containing `Data`. The `AttributeOperations` bound
+ // guarantees that `Data: Sync`, so it is safe to share it with this
+ // thread.
let data: &Data = unsafe { get_group_data(c_group) };
let ret = O::store(
@@ -657,7 +678,7 @@ pub const fn new(name: &'static CStr) -> Self {
pub trait AttributeOperations<const ID: u64 = 0> {
/// The type of the object that contains the field that is backing the
/// attribute for this operation.
- type Data;
+ type Data: Sync;
/// Renders the value of an attribute.
///
@@ -763,7 +784,8 @@ pub const fn new_with_child_ctor<const N: usize, Child>(
) -> Self
where
Data: GroupOperations<Child = Child>,
- Child: 'static,
+ Arc<Group<Child>>: Send,
+ Arc<Group<Data>>: Send,
{
Self {
item_type: Opaque::new(bindings::config_item_type {
@@ -781,7 +803,10 @@ pub const fn new_with_child_ctor<const N: usize, Child>(
pub const fn new<const N: usize>(
owner: &'static ThisModule,
attributes: &'static AttributeList<N, Data>,
- ) -> Self {
+ ) -> Self
+ where
+ Arc<Group<Data>>: Send,
+ {
Self {
item_type: Opaque::new(bindings::config_item_type {
ct_owner: owner.as_ptr(),
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0810/2151] staging: iio: adc: ad7816: Sort headers alphabetically
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (808 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0809/2151] rust: configfs: require thread-safe callback data Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0811/2151] staging: iio: adc: ad7816: Serialize SPI operations Greg Kroah-Hartman
` (72 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abdelnasser Hussein, Joshua Crofts,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
[ Upstream commit 8c7b99ff159d64679c9b3b4d5878e44459f7272a ]
Sort the include directives alphabetically to improve readability and
maintainability. This is a precursor cleanup patch to prepare for the
addition of new headers in subsequent changes.
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Stable-dep-of: b96187644664 ("staging: iio: adc: ad7816: Protect sysfs attributes with mutex")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/iio/adc/ad7816.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index 070621cb4fde5..c7f507916726f 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -5,19 +5,19 @@
* Copyright 2010 Analog Devices Inc.
*/
-#include <linux/interrupt.h>
-#include <linux/gpio/consumer.h>
#include <linux/device.h>
+#include <linux/gpio/consumer.h>
+#include <linux/interrupt.h>
#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/sysfs.h>
#include <linux/list.h>
-#include <linux/spi/spi.h>
#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/spi/spi.h>
+#include <linux/sysfs.h>
+#include <linux/iio/events.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
-#include <linux/iio/events.h>
/*
* AD7816 config masks
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0811/2151] staging: iio: adc: ad7816: Serialize SPI operations
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (809 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0810/2151] staging: iio: adc: ad7816: Sort headers alphabetically Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0812/2151] staging: iio: adc: ad7816: Protect sysfs attributes with mutex Greg Kroah-Hartman
` (71 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abdelnasser Hussein, Maxwell Doose,
Joshua Crofts, Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
[ Upstream commit 8f99c766605a484663764b52da56a0b160f9d9c3 ]
The ad7816_spi_read() and ad7816_spi_write() functions perform a
sequence of GPIO state changes followed by an SPI transfer. If multiple
operations occur simultaneously, the GPIO state could be changed by one
thread while another is in the middle of a transfer, leading to a race
condition.
Introduce a mutex to serialize the operations, ensuring that the GPIO
toggling and the SPI transfer are treated as a single atomic operation.
The mutex is placed right after the pointers in the device state
structure to avoid padding holes.
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Reviewed-by: Maxwell Doose <maxwell@maxwelld.cc>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Stable-dep-of: b96187644664 ("staging: iio: adc: ad7816: Protect sysfs attributes with mutex")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/iio/adc/ad7816.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index c7f507916726f..45ae9f101287a 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -5,12 +5,14 @@
* Copyright 2010 Analog Devices Inc.
*/
+#include <linux/cleanup.h>
#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/sysfs.h>
@@ -47,6 +49,7 @@ struct ad7816_chip_info {
struct gpio_desc *rdwr_pin;
struct gpio_desc *convert_pin;
struct gpio_desc *busy_pin;
+ struct mutex lock; /* protect device state during SPI transfers */
u8 oti_data[AD7816_CS_MAX + 1];
u8 channel_id; /* 0 always be temperature */
u8 mode;
@@ -67,6 +70,8 @@ static int ad7816_spi_read(struct ad7816_chip_info *chip, u16 *data)
int ret;
__be16 buf;
+ guard(mutex)(&chip->lock);
+
gpiod_set_value(chip->rdwr_pin, 1);
gpiod_set_value(chip->rdwr_pin, 0);
ret = spi_write_then_read(spi_dev, &chip->channel_id, sizeof(chip->channel_id), NULL, 0);
@@ -107,6 +112,8 @@ static int ad7816_spi_write(struct ad7816_chip_info *chip, u8 data)
struct spi_device *spi_dev = chip->spi_dev;
int ret;
+ guard(mutex)(&chip->lock);
+
gpiod_set_value(chip->rdwr_pin, 1);
gpiod_set_value(chip->rdwr_pin, 0);
ret = spi_write_then_read(spi_dev, &data, sizeof(data), NULL, 0);
@@ -360,6 +367,10 @@ static int ad7816_probe(struct spi_device *spi_dev)
return -ENOMEM;
chip = iio_priv(indio_dev);
+ ret = devm_mutex_init(&spi_dev->dev, &chip->lock);
+ if (ret)
+ return ret;
+
chip->spi_dev = spi_dev;
for (i = 0; i <= AD7816_CS_MAX; i++)
chip->oti_data[i] = 203;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0812/2151] staging: iio: adc: ad7816: Protect sysfs attributes with mutex
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (810 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0811/2151] staging: iio: adc: ad7816: Serialize SPI operations Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0813/2151] iio: dac: ad5758: Fix alignment for DMA safety Greg Kroah-Hartman
` (70 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Joshua Crofts, Abdelnasser Hussein,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
[ Upstream commit b96187644664d10b641dddeb7ca2eeef97a77c41 ]
The sysfs store functions modify driver state that is critical during
SPI transactions. ad7816_store_mode toggles hardware GPIO pins, while
ad7816_store_channel updates the internal software state
(chip->channel_id).
If these are modified concurrently by userspace while an SPI transfer
is in progress, it could corrupt the hardware transaction or cause the
driver to communicate with the wrong channel.
Add the existing chip->lock guard to these functions to serialize
access and prevent these race conditions.
Fixes: 7924425db04a ("staging: iio: adc: new driver for AD7816 devices")
Suggested-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/staging/iio/adc/ad7816.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index 45ae9f101287a..2672630aaf76f 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -143,6 +143,8 @@ static ssize_t ad7816_store_mode(struct device *dev,
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad7816_chip_info *chip = iio_priv(indio_dev);
+ guard(mutex)(&chip->lock);
+
if (strcmp(buf, "full") == 0) {
gpiod_set_value(chip->rdwr_pin, 1);
chip->mode = AD7816_FULL;
@@ -207,6 +209,8 @@ static ssize_t ad7816_store_channel(struct device *dev,
return -EINVAL;
}
+ guard(mutex)(&chip->lock);
+
chip->channel_id = data;
return len;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0813/2151] iio: dac: ad5758: Fix alignment for DMA safety
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (811 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0812/2151] staging: iio: adc: ad7816: Protect sysfs attributes with mutex Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0814/2151] iio: dac: ad5758: Reject out-of-range raw values Greg Kroah-Hartman
` (69 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arka Mondal, Nuno Sá,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arka Mondal <arka@arkamondal.net>
[ Upstream commit 465bdce79a9fe140a4b46b95f6bdfd880d197148 ]
ad5758_spi_reg_read() reads into st->d32[2] with spi_sync_transfer(),
but d32 is not marked __aligned(IIO_DMA_MINALIGN), so it can share a
cacheline with the fields before it. When DMA is not cache coherent,
the cache invalidation after the read can discard CPU writes to those
fields.
Mark d32 __aligned(IIO_DMA_MINALIGN). It is the last member of the
struct, so nothing comes after it.
Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal <arka@arkamondal.net>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/dac/ad5758.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5758.c b/drivers/iio/dac/ad5758.c
index 4ed4fda76ea97..27d5c460254ef 100644
--- a/drivers/iio/dac/ad5758.c
+++ b/drivers/iio/dac/ad5758.c
@@ -118,7 +118,7 @@ struct ad5758_state {
unsigned int dc_dc_ilim;
unsigned int slew_time;
bool pwr_down;
- __be32 d32[3];
+ __be32 d32[3] __aligned(IIO_DMA_MINALIGN);
};
/*
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0814/2151] iio: dac: ad5758: Reject out-of-range raw values
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (812 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0813/2151] iio: dac: ad5758: Fix alignment for DMA safety Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0815/2151] iio: dac: ad5758: Fix the offset calculation Greg Kroah-Hartman
` (68 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arka Mondal, Nuno Sá,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arka Mondal <arka@arkamondal.net>
[ Upstream commit ebc026be1b719e47bd7f2f1e72fabc875b590f87 ]
ad5758_write_raw() passes the value from userspace straight to
ad5758_spi_reg_write(), which keeps only the low 16 bits. Writing -1
to the raw attribute gives full-scale output, and 65536 gives code 0.
Return -EINVAL for values outside 0 to U16_MAX, as ad5755 does.
Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal <arka@arkamondal.net>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/dac/ad5758.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iio/dac/ad5758.c b/drivers/iio/dac/ad5758.c
index 27d5c460254ef..67fdd59bd69c7 100644
--- a/drivers/iio/dac/ad5758.c
+++ b/drivers/iio/dac/ad5758.c
@@ -557,6 +557,9 @@ static int ad5758_write_raw(struct iio_dev *indio_dev,
switch (info) {
case IIO_CHAN_INFO_RAW:
+ if (val < 0 || val > U16_MAX)
+ return -EINVAL;
+
mutex_lock(&st->lock);
ret = ad5758_spi_reg_write(st, AD5758_DAC_INPUT, val);
mutex_unlock(&st->lock);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0815/2151] iio: dac: ad5758: Fix the offset calculation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (813 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0814/2151] iio: dac: ad5758: Reject out-of-range raw values Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0816/2151] ALSA: caiaq: Serialize access to the EP1 command buffer Greg Kroah-Hartman
` (67 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arka Mondal, Nuno Sá,
Jonathan Cameron, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arka Mondal <arka@arkamondal.net>
[ Upstream commit a3b3580713f3ac5a32dc2874ee546828977a1d68 ]
The offset is a count of DAC codes, so the microamp or microvolt units
of min and max cancel out and the final division by 1000 is wrong. For
the +-20 mA range the driver reports -32 instead of -32768. For the
+-5 V and +-10 V ranges min * (1 << 16) also overflows int, and the
reported offset is 0.
Drop the division and do the multiplication in 64 bits.
Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support")
Signed-off-by: Arka Mondal <arka@arkamondal.net>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/dac/ad5758.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5758.c b/drivers/iio/dac/ad5758.c
index 67fdd59bd69c7..92c75d1ddce86 100644
--- a/drivers/iio/dac/ad5758.c
+++ b/drivers/iio/dac/ad5758.c
@@ -9,6 +9,7 @@
#include <linux/bsearch.h>
#include <linux/delay.h>
#include <linux/kernel.h>
+#include <linux/math64.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/property.h>
@@ -541,7 +542,7 @@ static int ad5758_read_raw(struct iio_dev *indio_dev,
case IIO_CHAN_INFO_OFFSET:
min = st->out_range.min;
max = st->out_range.max;
- *val = ((min * (1 << 16)) / (max - min)) / 1000;
+ *val = div_s64((s64)min * (1 << 16), max - min);
return IIO_VAL_INT;
default:
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0816/2151] ALSA: caiaq: Serialize access to the EP1 command buffer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (814 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0815/2151] iio: dac: ad5758: Fix the offset calculation Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0817/2151] ALSA: caiaq: Fix the Kore controller key map Greg Kroah-Hartman
` (66 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Niko Huuskonen, Takashi Iwai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niko Huuskonen <niko.huuskonen.00@gmail.com>
[ Upstream commit a718fd03e1e00211cf4662f5ab82d33f4c18e2a7 ]
snd_usb_caiaq_send_command() and snd_usb_caiaq_send_command_bank() copy
the command into cdev->ep1_out_buf and send it with a synchronous bulk
transfer. Nothing serializes their callers. An ALSA control write, which
sets the LEDs on the Kore controllers and several other devices, can run
at the same time as a PCM prepare, which sends the audio parameters
through the same buffer. One caller can then overwrite the buffer while
the transfer of the other is still in flight, and the device receives a
mix of both commands.
Protect the buffer with a mutex. All callers run in process context and
already sleep in usb_bulk_msg().
The problem was found by code review while adding another user of the
buffer, the Kore LCD support later in this series. It has not been
observed or reproduced.
Fixes: 8e3cd08ed8e5 ("[ALSA] caiaq - add control API and more input features")
Assisted-by: LLM
Signed-off-by: Niko Huuskonen <niko.huuskonen.00@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260927003532.289468-2-niko.huuskonen.00@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/usb/caiaq/device.c | 5 +++++
sound/usb/caiaq/device.h | 3 +++
2 files changed, 8 insertions(+)
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index f604846ec6e6f..e8619bb743581 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -212,6 +212,8 @@ int snd_usb_caiaq_send_command(struct snd_usb_caiaqdev *cdev,
if (len > EP1_BUFSIZE - 1)
len = EP1_BUFSIZE - 1;
+ guard(mutex)(&cdev->ep1_out_mutex);
+
if (buffer && len > 0)
memcpy(cdev->ep1_out_buf+1, buffer, len);
@@ -235,6 +237,8 @@ int snd_usb_caiaq_send_command_bank(struct snd_usb_caiaqdev *cdev,
if (len > EP1_BUFSIZE - 2)
len = EP1_BUFSIZE - 2;
+ guard(mutex)(&cdev->ep1_out_mutex);
+
if (buffer && len > 0)
memcpy(cdev->ep1_out_buf+2, buffer, len);
@@ -443,6 +447,7 @@ static int create_card(struct usb_device *usb_dev,
cdev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor),
le16_to_cpu(usb_dev->descriptor.idProduct));
spin_lock_init(&cdev->spinlock);
+ mutex_init(&cdev->ep1_out_mutex);
*cardp = card;
return 0;
diff --git a/sound/usb/caiaq/device.h b/sound/usb/caiaq/device.h
index 1c6f34693fa81..822d872c8ad1a 100644
--- a/sound/usb/caiaq/device.h
+++ b/sound/usb/caiaq/device.h
@@ -2,6 +2,8 @@
#ifndef CAIAQ_DEVICE_H
#define CAIAQ_DEVICE_H
+#include <linux/mutex.h>
+
#include "../usbaudio.h"
#define USB_VID_NATIVEINSTRUMENTS 0x17cc
@@ -68,6 +70,7 @@ struct snd_usb_caiaqdev {
unsigned char ep1_in_buf[EP1_BUFSIZE];
unsigned char ep1_out_buf[EP1_BUFSIZE];
+ struct mutex ep1_out_mutex; /* protects ep1_out_buf */
unsigned char midi_out_buf[EP1_BUFSIZE];
struct caiaq_device_spec spec;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0817/2151] ALSA: caiaq: Fix the Kore controller key map
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (815 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0816/2151] ALSA: caiaq: Serialize access to the EP1 command buffer Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0818/2151] spi: rspi: Fix DMA mode when the DMA controller is built as a module Greg Kroah-Hartman
` (65 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Niko Huuskonen, Takashi Iwai,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niko Huuskonen <niko.huuskonen.00@gmail.com>
[ Upstream commit c0508fc6895137f9e2dd43c1a09cc834254cc149 ]
keycode_kore does not match the hardware in two places:
- Softkeys 5 to 8 are listed in reverse order, so pressing the fifth
softkey reports BTN_8, the sixth BTN_7 and so on. Softkeys 1 to 4 are
correct. The OpenKoreBridge project, which drives a Kore 2 through
this driver, works around the same reversal in userspace.
- On the first Kore controller the touch sensors of the eight knobs are
scrambled: touching knob 1 reports KEY_BRL_DOT6, knob 2 KEY_BRL_DOT8,
knob 3 KEY_BRL_DOT2, knob 6 KEY_BRL_DOT7, knob 7 KEY_BRL_DOT1 and
knob 8 KEY_BRL_DOT3. Only knobs 4 and 5 are right.
Put the softkeys in order for both controllers, and give the first Kore
controller its own touch sensor order, so that BTN_n and KEY_BRL_DOTn
belong to the n-th knob. The touch sensor order of the Kore 2 is left
alone, as it could not be checked.
Userspace that compensates for the old order needs to follow. It can
read the key map with EVIOCGKEYCODE, which also makes it possible to
support kernels with and without this change.
Tested on a Kore controller (USB ID 17cc:4711).
Link: https://github.com/OpenKoreBridge/OpenKoreBridge
Fixes: 8e3cd08ed8e5 ("[ALSA] caiaq - add control API and more input features")
Assisted-by: LLM
Signed-off-by: Niko Huuskonen <niko.huuskonen.00@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260927003532.289468-3-niko.huuskonen.00@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/usb/caiaq/input.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/sound/usb/caiaq/input.c b/sound/usb/caiaq/input.c
index 6a5adb8d1e6a7..aee526e0da36a 100644
--- a/sound/usb/caiaq/input.c
+++ b/sound/usb/caiaq/input.c
@@ -41,11 +41,11 @@ static const unsigned short keycode_kore[] = {
BTN_3,
BTN_2,
BTN_1,
- BTN_8,
- BTN_7,
- BTN_6,
BTN_5,
- KEY_BRL_DOT4, /* touch sensitive knobs */
+ BTN_6,
+ BTN_7,
+ BTN_8,
+ KEY_BRL_DOT4, /* touch sensitive knobs (Kore 2 order) */
KEY_BRL_DOT3,
KEY_BRL_DOT2,
KEY_BRL_DOT1,
@@ -55,6 +55,21 @@ static const unsigned short keycode_kore[] = {
KEY_BRL_DOT5
};
+/* index of the first touch sensor in keycode_kore */
+#define KORE_TOUCH_KEYS 24
+
+/* the first Kore controller reports its touch sensors in this order */
+static const unsigned short keycode_kore1_touch[] = {
+ KEY_BRL_DOT4,
+ KEY_BRL_DOT8,
+ KEY_BRL_DOT3,
+ KEY_BRL_DOT7,
+ KEY_BRL_DOT2,
+ KEY_BRL_DOT6,
+ KEY_BRL_DOT1,
+ KEY_BRL_DOT5
+};
+
#define MASCHINE_BUTTONS (42)
#define MASCHINE_BUTTON(X) ((X) + BTN_MISC)
#define MASCHINE_PADS (16)
@@ -656,6 +671,12 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *cdev)
input->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC);
BUILD_BUG_ON(sizeof(cdev->keycode) < sizeof(keycode_kore));
memcpy(cdev->keycode, keycode_kore, sizeof(keycode_kore));
+ BUILD_BUG_ON(KORE_TOUCH_KEYS + ARRAY_SIZE(keycode_kore1_touch) >
+ ARRAY_SIZE(keycode_kore));
+ if (cdev->chip.usb_id ==
+ USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER))
+ memcpy(cdev->keycode + KORE_TOUCH_KEYS, keycode_kore1_touch,
+ sizeof(keycode_kore1_touch));
input->keycodemax = ARRAY_SIZE(keycode_kore);
input_set_abs_params(input, ABS_HAT0X, 0, 999, 0, 10);
input_set_abs_params(input, ABS_HAT0Y, 0, 999, 0, 10);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0818/2151] spi: rspi: Fix DMA mode when the DMA controller is built as a module
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (816 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0817/2151] ALSA: caiaq: Fix the Kore controller key map Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0819/2151] ASoC: mediatek: mt8192: fix APLL mux error handling Greg Kroah-Hartman
` (64 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Ovidiu Panait, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
[ Upstream commit 7b85114d47f693b709b2e8e22e44cdf58c04b111 ]
On the Renesas RZ/G2L platform, the RSPI driver falls back to PIO mode
instead of using DMA when the DMA controller driver is built as a module
(CONFIG_RZ_DMAC=m):
renesas_spi 1004b000.spi: dma_request_slave_channel_compat failed
renesas_spi 1004b000.spi: DMA not available, using PIO
The driver requests DMA channels through dma_request_slave_channel_compat()
which returns either a valid pointer or NULL and cannot handle
-EPROBE_DEFER. If the DMA controller has not probed yet, the driver falls
back to PIO directly.
Fix this by replacing the dma_request_slave_channel_compat() call with a
regular dma_request_chan() call. dma_request_slave_channel_compat() is
always passed a NULL fn_param in all code paths, so it actually behaves
like a plain dma_request_chan() call.
Fixes: e825b8dd2b36 ("spi: rspi: Add DT support to DMA setup")
Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Link: https://patch.msgid.link/20260921195943.107247-1-ovidiu.panait.rb@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-rspi.c | 49 ++++++++++++++++--------------------------
1 file changed, 19 insertions(+), 30 deletions(-)
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index c90dfe5211542..2719e8b003ff9 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -22,7 +22,6 @@
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
-#include <linux/sh_dma.h>
#include <linux/spi/spi.h>
#include <linux/spinlock.h>
@@ -1091,24 +1090,15 @@ static irqreturn_t rspi_irq_tx(int irq, void *_sr)
static struct dma_chan *rspi_request_dma_chan(struct device *dev,
enum dma_transfer_direction dir,
- unsigned int id,
dma_addr_t port_addr)
{
- dma_cap_mask_t mask;
struct dma_chan *chan;
struct dma_slave_config cfg;
int ret;
- dma_cap_zero(mask);
- dma_cap_set(DMA_SLAVE, mask);
-
- chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
- (void *)(unsigned long)id, dev,
- dir == DMA_MEM_TO_DEV ? "tx" : "rx");
- if (!chan) {
- dev_warn(dev, "dma_request_slave_channel_compat failed\n");
- return NULL;
- }
+ chan = dma_request_chan(dev, dir == DMA_MEM_TO_DEV ? "tx" : "rx");
+ if (IS_ERR(chan))
+ return chan;
memset(&cfg, 0, sizeof(cfg));
cfg.dst_addr = port_addr + RSPI_SPDR;
@@ -1121,7 +1111,7 @@ static struct dma_chan *rspi_request_dma_chan(struct device *dev,
if (ret) {
dev_warn(dev, "dmaengine_slave_config failed %d\n", ret);
dma_release_channel(chan);
- return NULL;
+ return ERR_PTR(ret);
}
return chan;
@@ -1130,29 +1120,23 @@ static struct dma_chan *rspi_request_dma_chan(struct device *dev,
static int rspi_request_dma(struct device *dev, struct spi_controller *ctlr,
const struct resource *res)
{
- unsigned int dma_tx_id, dma_rx_id;
+ struct dma_chan *chan;
- if (dev->of_node) {
- /* In the OF case we will get the slave IDs from the DT */
- dma_tx_id = 0;
- dma_rx_id = 0;
- } else {
- /* The driver assumes no error. */
+ if (!dev->of_node)
return 0;
- }
- ctlr->dma_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV, dma_tx_id,
- res->start);
- if (!ctlr->dma_tx)
- return -ENODEV;
+ chan = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV, res->start);
+ if (IS_ERR(chan))
+ return PTR_ERR(chan);
+ ctlr->dma_tx = chan;
- ctlr->dma_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM, dma_rx_id,
- res->start);
- if (!ctlr->dma_rx) {
+ chan = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM, res->start);
+ if (IS_ERR(chan)) {
dma_release_channel(ctlr->dma_tx);
ctlr->dma_tx = NULL;
- return -ENODEV;
+ return PTR_ERR(chan);
}
+ ctlr->dma_rx = chan;
ctlr->can_dma = rspi_can_dma;
dev_info(dev, "DMA available");
@@ -1380,6 +1364,11 @@ static int rspi_probe(struct platform_device *pdev)
}
ret = rspi_request_dma(&pdev->dev, ctlr, res);
+ if (ret == -EPROBE_DEFER) {
+ dev_err_probe(&pdev->dev, ret,
+ "failed to request DMA channels\n");
+ goto error2;
+ }
if (ret < 0)
dev_warn(&pdev->dev, "DMA not available, using PIO\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0819/2151] ASoC: mediatek: mt8192: fix APLL mux error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (817 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0818/2151] spi: rspi: Fix DMA mode when the DMA controller is built as a module Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0820/2151] ASoC: mediatek: mt8192: fix AFE clock " Greg Kroah-Hartman
` (63 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit e8c263e0ef957fd8286e299b2be9266b902cec16 ]
Propagate errors from clock operations in the enable path and clean up
previously enabled clocks when a later operation fails.
For the disable path, continue disabling all clocks even if a clock
operation fails. Log the error without returning it, so the disable path
can perform as much cleanup as possible.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 54 +++++++++++++---------
1 file changed, 32 insertions(+), 22 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
index 416aff7262539..bd778e5663b56 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
@@ -87,7 +87,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1], ret);
- goto EXIT;
+ return ret;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1],
afe_priv->clk[CLK_TOP_APLL1_CK]);
@@ -95,7 +95,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1],
aud_clks[CLK_TOP_APLL1_CK], ret);
- goto EXIT;
+ goto err_disable_mux_aud_1;
}
/* 180.6336 / 4 = 45.1584MHz */
@@ -103,7 +103,7 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1], ret);
- goto EXIT;
+ goto err_set_parent_mux_aud_1;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1],
afe_priv->clk[CLK_TOP_APLL1_D4]);
@@ -111,31 +111,36 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
aud_clks[CLK_TOP_APLL1_D4], ret);
- goto EXIT;
+ goto err_disable_mux_aud_eng1;
}
} else {
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1],
afe_priv->clk[CLK_CLK26M]);
- if (ret) {
+ if (ret)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG1],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
- }
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1],
afe_priv->clk[CLK_CLK26M]);
- if (ret) {
+ if (ret)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_1],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
- }
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
}
-EXIT:
+ return 0;
+
+err_disable_mux_aud_eng1:
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]);
+err_set_parent_mux_aud_1:
+ clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_1],
+ afe_priv->clk[CLK_CLK26M]);
+err_disable_mux_aud_1:
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]);
+
return ret;
}
@@ -149,7 +154,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2], ret);
- goto EXIT;
+ return ret;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_2],
afe_priv->clk[CLK_TOP_APLL2_CK]);
@@ -157,7 +162,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2],
aud_clks[CLK_TOP_APLL2_CK], ret);
- goto EXIT;
+ goto err_disable_mux_aud_2;
}
/* 196.608 / 4 = 49.152MHz */
@@ -165,7 +170,7 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2], ret);
- goto EXIT;
+ goto err_set_parent_mux_aud_2;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2],
afe_priv->clk[CLK_TOP_APLL2_D4]);
@@ -173,31 +178,36 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2],
aud_clks[CLK_TOP_APLL2_D4], ret);
- goto EXIT;
+ goto err_disable_mux_aud_eng2;
}
} else {
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2],
afe_priv->clk[CLK_CLK26M]);
- if (ret) {
+ if (ret)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_ENG2],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
- }
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]);
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_2],
afe_priv->clk[CLK_CLK26M]);
- if (ret) {
+ if (ret)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUD_2],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
- }
clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
}
-EXIT:
+ return 0;
+
+err_disable_mux_aud_eng2:
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]);
+err_set_parent_mux_aud_2:
+ clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUD_2],
+ afe_priv->clk[CLK_CLK26M]);
+err_disable_mux_aud_2:
+ clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0820/2151] ASoC: mediatek: mt8192: fix AFE clock error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (818 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0819/2151] ASoC: mediatek: mt8192: fix APLL mux error handling Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0821/2151] ASoC: mediatek: mt8192: fix error handling in APLL enable functions Greg Kroah-Hartman
` (62 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 7c54781e6e60681af8d0858148d613becb582328 ]
If a clock operation fails in mt8192_afe_enable_clock(), the function
returns immediately via the EXIT label without disabling the clocks
that were successfully enabled earlier in the sequence. This leaves
unneeded clocks running and causes a resource leak.
Properly unwind clocks enabled before an error by jumping to appropriate
cleanup labels on failure.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 28 +++++++++++++++-------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
index bd778e5663b56..7647bdd463d9c 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
@@ -220,21 +220,21 @@ int mt8192_afe_enable_clock(struct mtk_base_afe *afe)
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_INFRA_SYS_AUDIO], ret);
- goto EXIT;
+ return ret;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_INFRA_AUDIO_26M]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_INFRA_AUDIO_26M], ret);
- goto EXIT;
+ goto err_disable_infra_sys_audio;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_MUX_AUDIO]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIO], ret);
- goto EXIT;
+ goto err_disable_infra_audio_26m;
}
ret = clk_set_parent(afe_priv->clk[CLK_MUX_AUDIO],
afe_priv->clk[CLK_CLK26M]);
@@ -242,14 +242,14 @@ int mt8192_afe_enable_clock(struct mtk_base_afe *afe)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIO],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
+ goto err_disable_mux_audio;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_MUX_AUDIOINTBUS]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIOINTBUS], ret);
- goto EXIT;
+ goto err_disable_mux_audio;
}
ret = mt8192_set_audio_int_bus_parent(afe, CLK_CLK26M);
@@ -257,7 +257,7 @@ int mt8192_afe_enable_clock(struct mtk_base_afe *afe)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_MUX_AUDIOINTBUS],
aud_clks[CLK_CLK26M], ret);
- goto EXIT;
+ goto err_disable_mux_audiointbus;
}
ret = clk_set_parent(afe_priv->clk[CLK_TOP_MUX_AUDIO_H],
@@ -266,17 +266,27 @@ int mt8192_afe_enable_clock(struct mtk_base_afe *afe)
dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[CLK_TOP_MUX_AUDIO_H],
aud_clks[CLK_TOP_APLL2_CK], ret);
- goto EXIT;
+ goto err_disable_mux_audiointbus;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_AFE]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_AFE], ret);
- goto EXIT;
+ goto err_disable_mux_audiointbus;
}
-EXIT:
+ return 0;
+
+err_disable_mux_audiointbus:
+ clk_disable_unprepare(afe_priv->clk[CLK_MUX_AUDIOINTBUS]);
+err_disable_mux_audio:
+ clk_disable_unprepare(afe_priv->clk[CLK_MUX_AUDIO]);
+err_disable_infra_audio_26m:
+ clk_disable_unprepare(afe_priv->clk[CLK_INFRA_AUDIO_26M]);
+err_disable_infra_sys_audio:
+ clk_disable_unprepare(afe_priv->clk[CLK_INFRA_SYS_AUDIO]);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0821/2151] ASoC: mediatek: mt8192: fix error handling in APLL enable functions
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (819 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0820/2151] ASoC: mediatek: mt8192: fix AFE clock " Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0822/2151] ASoC: mediatek: mt8192: fix MCK clock error handling Greg Kroah-Hartman
` (61 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 88760524ca995acd229c30ec69ced7d883a90a72 ]
If a clock operation fails in mt8192_apll1_enable() or apll2_enable(),
the functions return without checking the return value of mux settings or
unwinding previously enabled clocks and MUX configurations.
Fix this by checking the return value of apll1_mux_setting() and
apll2_mux_setting(), and adding proper unwind handling on failure.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 32 ++++++++++++++++------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
index 7647bdd463d9c..118dd48196828 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
@@ -308,20 +308,22 @@ int mt8192_apll1_enable(struct mtk_base_afe *afe)
int ret;
/* setting for APLL */
- apll1_mux_setting(afe, true);
+ ret = apll1_mux_setting(afe, true);
+ if (ret)
+ return ret;
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL22M]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_APLL22M], ret);
- goto EXIT;
+ goto err_disable_mux_setting;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL1_TUNER]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_APLL1_TUNER], ret);
- goto EXIT;
+ goto err_disable_apll22m;
}
regmap_update_bits(afe->regmap, AFE_APLL1_TUNER_CFG,
@@ -332,7 +334,13 @@ int mt8192_apll1_enable(struct mtk_base_afe *afe)
AFE_22M_ON_MASK_SFT,
0x1 << AFE_22M_ON_SFT);
-EXIT:
+ return 0;
+
+err_disable_apll22m:
+ clk_disable_unprepare(afe_priv->clk[CLK_APLL22M]);
+err_disable_mux_setting:
+ apll1_mux_setting(afe, false);
+
return ret;
}
@@ -358,20 +366,22 @@ int mt8192_apll2_enable(struct mtk_base_afe *afe)
int ret;
/* setting for APLL */
- apll2_mux_setting(afe, true);
+ ret = apll2_mux_setting(afe, true);
+ if (ret)
+ return ret;
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL24M]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_APLL24M], ret);
- goto EXIT;
+ goto err_disable_mux_setting;
}
ret = clk_prepare_enable(afe_priv->clk[CLK_APLL2_TUNER]);
if (ret) {
dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
__func__, aud_clks[CLK_APLL2_TUNER], ret);
- goto EXIT;
+ goto err_disable_apll24m;
}
regmap_update_bits(afe->regmap, AFE_APLL2_TUNER_CFG,
@@ -382,7 +392,13 @@ int mt8192_apll2_enable(struct mtk_base_afe *afe)
AFE_24M_ON_MASK_SFT,
0x1 << AFE_24M_ON_SFT);
-EXIT:
+ return 0;
+
+err_disable_apll24m:
+ clk_disable_unprepare(afe_priv->clk[CLK_APLL24M]);
+err_disable_mux_setting:
+ apll2_mux_setting(afe, false);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0822/2151] ASoC: mediatek: mt8192: fix MCK clock error handling
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (820 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0821/2151] ASoC: mediatek: mt8192: fix error handling in APLL enable functions Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0823/2151] ASoC: mediatek: mt8192: switch to devm_clk_get_optional() Greg Kroah-Hartman
` (60 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 4a0ab266cb1594f8c6aef3c79726476ad99618c5 ]
If an error occurs after enabling 'm_sel_id' or 'div_clk_id' in
mt8192_mck_enable(), the function returns directly without disabling
the previously enabled clocks, leading to a resource leak.
Fix this by jumping to proper cleanup labels to unwind enabled clocks on
failure paths.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-5-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
index 118dd48196828..77f596cab92da 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
@@ -619,7 +619,7 @@ int mt8192_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate)
dev_err(afe->dev, "%s(), clk_set_parent %s-%s fail %d\n",
__func__, aud_clks[m_sel_id],
aud_clks[apll_clk_id], ret);
- return ret;
+ goto err_disable_m_sel;
}
}
@@ -628,17 +628,25 @@ int mt8192_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate)
if (ret) {
dev_err(afe->dev, "%s(), clk_prepare_enable %s fail %d\n",
__func__, aud_clks[div_clk_id], ret);
- return ret;
+ goto err_disable_m_sel;
}
ret = clk_set_rate(afe_priv->clk[div_clk_id], rate);
if (ret) {
dev_err(afe->dev, "%s(), clk_set_rate %s, rate %d, fail %d\n",
__func__, aud_clks[div_clk_id],
rate, ret);
- return ret;
+ goto err_disable_div_clk;
}
return 0;
+
+err_disable_div_clk:
+ clk_disable_unprepare(afe_priv->clk[div_clk_id]);
+err_disable_m_sel:
+ if (m_sel_id >= 0)
+ clk_disable_unprepare(afe_priv->clk[m_sel_id]);
+
+ return ret;
}
void mt8192_mck_disable(struct mtk_base_afe *afe, int mck_id)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0823/2151] ASoC: mediatek: mt8192: switch to devm_clk_get_optional()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (821 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0822/2151] ASoC: mediatek: mt8192: fix MCK clock error handling Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0824/2151] ASoC: mediatek: mt8192: mt8192-afe-gpio: Use guard() for mutex locks Greg Kroah-Hartman
` (59 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 6f4edfdce0099dc0c346c78c85f58a23d4ee646e ]
Switch from devm_clk_get() to devm_clk_get_optional() when requesting
clocks, as optional clocks automatically return NULL when not present
instead of requiring manual check and NULL assignment.
Additionally, handle clock errors properly using dev_err_probe() to
propagate error codes (such as -EPROBE_DEFER) on failure instead of
just printing a warning and continuing with NULL pointers.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-clk.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
index 77f596cab92da..9b9a3465ddb52 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-clk.c
@@ -672,13 +672,10 @@ int mt8192_init_clock(struct mtk_base_afe *afe)
return -ENOMEM;
for (i = 0; i < CLK_NUM; i++) {
- afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]);
- if (IS_ERR(afe_priv->clk[i])) {
- dev_warn(afe->dev, "%s devm_clk_get %s fail, ret %ld\n",
- __func__,
- aud_clks[i], PTR_ERR(afe_priv->clk[i]));
- afe_priv->clk[i] = NULL;
- }
+ afe_priv->clk[i] = devm_clk_get_optional(afe->dev, aud_clks[i]);
+ if (IS_ERR(afe_priv->clk[i]))
+ return dev_err_probe(afe->dev, PTR_ERR(afe_priv->clk[i]),
+ "failed to get clock %s\n", aud_clks[i]);
}
afe_priv->apmixedsys = syscon_regmap_lookup_by_phandle(of_node,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0824/2151] ASoC: mediatek: mt8192: mt8192-afe-gpio: Use guard() for mutex locks
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (822 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0823/2151] ASoC: mediatek: mt8192: switch to devm_clk_get_optional() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0825/2151] ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request() Greg Kroah-Hartman
` (58 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 14edf39daefbf7aa689ea2bb8811a85c498e0ff6 ]
Convert the explicit mutex_lock()/mutex_unlock() pair to guard(mutex)
to simplify the locking logic and automatically release the mutex on
all exit paths.
This changes the mutex release point from immediately before dev_warn()
to automatic cleanup at scope exit. However, the affected path only emits
a warning and immediately returns -EINVAL, without any further processing.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260610102021.83273-6-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 411be3902fa8 ("ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c b/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
index de5e1deaa167d..b993ca2dbd7c8 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
@@ -208,7 +208,7 @@ static int mt8192_afe_gpio_adda_ch34_ul(struct device *dev, bool enable)
int mt8192_afe_gpio_request(struct device *dev, bool enable,
int dai, int uplink)
{
- mutex_lock(&gpio_request_mutex);
+ guard(mutex)(&gpio_request_mutex);
switch (dai) {
case MT8192_DAI_ADDA:
if (uplink)
@@ -296,11 +296,9 @@ int mt8192_afe_gpio_request(struct device *dev, bool enable,
}
break;
default:
- mutex_unlock(&gpio_request_mutex);
dev_warn(dev, "%s(), invalid dai %d\n", __func__, dai);
return -EINVAL;
}
- mutex_unlock(&gpio_request_mutex);
return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0825/2151] ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (823 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0824/2151] ASoC: mediatek: mt8192: mt8192-afe-gpio: Use guard() for mutex locks Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0826/2151] ASoC: mediatek: mt8192: check return values in mt8192_afe_gpio_init() Greg Kroah-Hartman
` (57 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 411be3902fa8f879db6f2f55d0c15507efe09c92 ]
Currently, mt8192_afe_gpio_request() ignores the return values from
mt8192_afe_gpio_select() and other helper functions. If configuring
a GPIO state fails, the function still returns 0, hiding the failure
from callers.
Fix this by capturing and returning the error codes properly.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-8-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 74 +++++++++++----------
1 file changed, 40 insertions(+), 34 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c b/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
index b993ca2dbd7c8..ed6dfdf2589bb 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
@@ -208,98 +208,104 @@ static int mt8192_afe_gpio_adda_ch34_ul(struct device *dev, bool enable)
int mt8192_afe_gpio_request(struct device *dev, bool enable,
int dai, int uplink)
{
+ int ret;
+
guard(mutex)(&gpio_request_mutex);
switch (dai) {
case MT8192_DAI_ADDA:
if (uplink)
- mt8192_afe_gpio_adda_ul(dev, enable);
+ ret = mt8192_afe_gpio_adda_ul(dev, enable);
else
- mt8192_afe_gpio_adda_dl(dev, enable);
+ ret = mt8192_afe_gpio_adda_dl(dev, enable);
break;
case MT8192_DAI_ADDA_CH34:
if (uplink)
- mt8192_afe_gpio_adda_ch34_ul(dev, enable);
+ ret = mt8192_afe_gpio_adda_ch34_ul(dev, enable);
else
- mt8192_afe_gpio_adda_ch34_dl(dev, enable);
+ ret = mt8192_afe_gpio_adda_ch34_dl(dev, enable);
break;
case MT8192_DAI_I2S_0:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S0_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S0_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S0_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S0_OFF);
break;
case MT8192_DAI_I2S_1:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S1_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S1_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S1_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S1_OFF);
break;
case MT8192_DAI_I2S_2:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S2_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S2_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S2_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S2_OFF);
break;
case MT8192_DAI_I2S_3:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S3_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S3_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S3_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S3_OFF);
break;
case MT8192_DAI_I2S_5:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S5_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S5_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S5_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S5_OFF);
break;
case MT8192_DAI_I2S_6:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S6_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S6_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S6_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S6_OFF);
break;
case MT8192_DAI_I2S_7:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S7_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S7_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S7_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S7_OFF);
break;
case MT8192_DAI_I2S_8:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S8_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S8_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S8_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S8_OFF);
break;
case MT8192_DAI_I2S_9:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S9_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S9_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S9_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_I2S9_OFF);
break;
case MT8192_DAI_TDM:
if (enable)
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_TDM_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_TDM_ON);
else
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_TDM_OFF);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_TDM_OFF);
break;
case MT8192_DAI_VOW:
if (enable) {
- mt8192_afe_gpio_select(dev,
- MT8192_AFE_GPIO_VOW_CLK_ON);
- mt8192_afe_gpio_select(dev,
- MT8192_AFE_GPIO_VOW_DAT_ON);
+ ret = mt8192_afe_gpio_select(dev,
+ MT8192_AFE_GPIO_VOW_CLK_ON);
+ if (ret)
+ break;
+ ret = mt8192_afe_gpio_select(dev,
+ MT8192_AFE_GPIO_VOW_DAT_ON);
} else {
- mt8192_afe_gpio_select(dev,
- MT8192_AFE_GPIO_VOW_CLK_OFF);
- mt8192_afe_gpio_select(dev,
- MT8192_AFE_GPIO_VOW_DAT_OFF);
+ ret = mt8192_afe_gpio_select(dev,
+ MT8192_AFE_GPIO_VOW_CLK_OFF);
+ if (ret)
+ break;
+ ret = mt8192_afe_gpio_select(dev,
+ MT8192_AFE_GPIO_VOW_DAT_OFF);
}
break;
default:
dev_warn(dev, "%s(), invalid dai %d\n", __func__, dai);
- return -EINVAL;
+ ret = -EINVAL;
}
- return 0;
+ return ret;
}
EXPORT_SYMBOL(mt8192_afe_gpio_request);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0826/2151] ASoC: mediatek: mt8192: check return values in mt8192_afe_gpio_init()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (824 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0825/2151] ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0827/2151] ASoC: mediatek: mt8192: Handle regcache_sync() failure in runtime resume Greg Kroah-Hartman
` (56 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 7cca184ad434436e8f4648f71756bab0c3593ed9 ]
Currently, mt8192_afe_gpio_init() ignores the return values of
mt8192_afe_gpio_select() and mt8192_afe_gpio_request(). If configuring
GPIO states or requesting GPIOs fails during initialization, the function
still proceeds and returns 0, masking the initialization failure.
Fix this by checking and propagating the return values properly.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-10-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-gpio.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c b/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
index ed6dfdf2589bb..f2d5e61fbb639 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-gpio.c
@@ -151,13 +151,17 @@ int mt8192_afe_gpio_init(struct device *dev)
}
}
- mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_CLK_MOSI_ON);
+ ret = mt8192_afe_gpio_select(dev, MT8192_AFE_GPIO_CLK_MOSI_ON);
+ if (ret)
+ return ret;
/* gpio status init */
- mt8192_afe_gpio_request(dev, false, MT8192_DAI_ADDA, 0);
- mt8192_afe_gpio_request(dev, false, MT8192_DAI_ADDA, 1);
+ ret = mt8192_afe_gpio_request(dev, false, MT8192_DAI_ADDA, 0);
+ if (ret)
+ return ret;
+ ret = mt8192_afe_gpio_request(dev, false, MT8192_DAI_ADDA, 1);
- return 0;
+ return ret;
}
EXPORT_SYMBOL(mt8192_afe_gpio_init);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0827/2151] ASoC: mediatek: mt8192: Handle regcache_sync() failure in runtime resume
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (825 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0826/2151] ASoC: mediatek: mt8192: check return values in mt8192_afe_gpio_init() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0828/2151] ASoC: mediatek: mt8192: Propagate mt8192_afe_gpio_request() errors in ADDA DAI Greg Kroah-Hartman
` (55 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit d9e264741b041fc9dffc555bc1ab68708658cefd ]
Currently, the return value of regcache_sync() in
mt8192_afe_runtime_resume() is ignored. If regcache_sync() fails, the
function continues execution with clocks enabled and regcache out of sync.
Fix this by checking the return value of regcache_sync(). On failure,
restore regcache to cache-only mode and disable the clocks enabled
earlier in the function.
Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-11-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
index db0ae44a86afe..5e633e9573a31 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
@@ -2104,7 +2104,11 @@ static int mt8192_afe_runtime_resume(struct device *dev)
goto skip_regmap;
regcache_cache_only(afe->regmap, false);
- regcache_sync(afe->regmap);
+ ret = regcache_sync(afe->regmap);
+ if (ret) {
+ regcache_cache_only(afe->regmap, true);
+ mt8192_afe_disable_clock(afe);
+ }
/* enable audio sys DCM for power saving */
regmap_update_bits(afe_priv->infracfg,
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0828/2151] ASoC: mediatek: mt8192: Propagate mt8192_afe_gpio_request() errors in ADDA DAI
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (826 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0827/2151] ASoC: mediatek: mt8192: Handle regcache_sync() failure in runtime resume Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0829/2151] ASoC: mediatek: mt8192: Propagate errors in TDM DAI DAPM event handlers Greg Kroah-Hartman
` (54 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit eed9414a1b075e2df308e7222e3786981bd42b32 ]
Currently, DAPM event handlers in mt8192-dai-adda.c ignore the return
value of mt8192_afe_gpio_request(). If GPIO configuration fails during
PRE_PMU or POST_PMD events, the error is silently ignored.
Fix this by checking and propagating error codes from
mt8192_afe_gpio_request() in all ADDA DAPM event handlers.
Fixes: 607ac4859564 ("ASoC: mediatek: mt8192: support adda in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-13-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 44 +++++++++++++++------
1 file changed, 32 insertions(+), 12 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
index 99de85b876435..9a29f2feb174d 100644
--- a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
+++ b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c
@@ -218,10 +218,13 @@ static int mtk_adda_ul_event(struct snd_soc_dapm_widget *w,
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
struct mt8192_afe_private *afe_priv = afe->platform_priv;
int mtkaif_dmic = afe_priv->mtkaif_dmic;
+ int ret;
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 1);
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 1);
+ if (ret)
+ return ret;
/* update setting to dmic */
if (mtkaif_dmic) {
@@ -239,7 +242,9 @@ static int mtk_adda_ul_event(struct snd_soc_dapm_widget *w,
case SND_SOC_DAPM_POST_PMD:
/* should delayed 1/fs(smallest is 8k) = 125us before afe off */
usleep_range(125, 135);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 1);
+ ret = mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 1);
+ if (ret)
+ return ret;
break;
default:
break;
@@ -257,11 +262,14 @@ static int mtk_adda_ch34_ul_event(struct snd_soc_dapm_widget *w,
struct mt8192_afe_private *afe_priv = afe->platform_priv;
int mtkaif_dmic = afe_priv->mtkaif_dmic_ch34;
int mtkaif_adda6_only = afe_priv->mtkaif_adda6_only;
+ int ret;
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34,
- 1);
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34,
+ 1);
+ if (ret)
+ return ret;
/* update setting to dmic */
if (mtkaif_dmic) {
@@ -291,8 +299,10 @@ static int mtk_adda_ch34_ul_event(struct snd_soc_dapm_widget *w,
case SND_SOC_DAPM_POST_PMD:
/* should delayed 1/fs(smallest is 8k) = 125us before afe off */
usleep_range(125, 135);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34,
- 1);
+ ret = mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34,
+ 1);
+ if (ret)
+ return ret;
/* reset dmic */
afe_priv->mtkaif_dmic_ch34 = 0;
@@ -446,15 +456,20 @@ static int mtk_adda_dl_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
+ int ret;
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 0);
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 0);
+ if (ret)
+ return ret;
break;
case SND_SOC_DAPM_POST_PMD:
/* should delayed 1/fs(smallest is 8k) = 125us before afe off */
usleep_range(125, 135);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 0);
+ ret = mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 0);
+ if (ret)
+ return ret;
break;
default:
break;
@@ -469,17 +484,22 @@ static int mtk_adda_ch34_dl_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
+ int ret;
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34,
- 0);
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34,
+ 0);
+ if (ret)
+ return ret;
break;
case SND_SOC_DAPM_POST_PMD:
/* should delayed 1/fs(smallest is 8k) = 125us before afe off */
usleep_range(125, 135);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34,
- 0);
+ ret = mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34,
+ 0);
+ if (ret)
+ return ret;
break;
default:
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0829/2151] ASoC: mediatek: mt8192: Propagate errors in TDM DAI DAPM event handlers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (827 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0828/2151] ASoC: mediatek: mt8192: Propagate mt8192_afe_gpio_request() errors in ADDA DAI Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0830/2151] ASoC: mediatek: mt8192: Propagate errors in I2S " Greg Kroah-Hartman
` (53 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit d0bc9613bc2d9e20a7e4f3e447cd9427c95d194a ]
Currently, DAPM event handlers in mt8192-dai-tdm.c ignore return values
from mt8192_afe_gpio_request() and mt8192_mck_enable().
If GPIO configuration or master clock setup fails during DAPM events,
the error is silently ignored.
Fix this by checking and propagating error codes properly in all
TDM DAI DAPM event handlers.
Fixes: 52fcd65414ab ("ASoC: mediatek: mt8192: support tdm in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-14-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-dai-tdm.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
index 49440db370af0..36fa0f32ed1cb 100644
--- a/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
+++ b/sound/soc/mediatek/mt8192/mt8192-dai-tdm.c
@@ -250,6 +250,7 @@ static int mtk_tdm_en_event(struct snd_soc_dapm_widget *w,
struct mt8192_afe_private *afe_priv = afe->platform_priv;
int dai_id = get_tdm_id_by_name(w->name);
struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id];
+ int ret;
if (!tdm_priv) {
dev_warn(afe->dev, "%s(), tdm_priv == NULL", __func__);
@@ -261,16 +262,17 @@ static int mtk_tdm_en_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_afe_gpio_request(afe->dev, true, tdm_priv->id, 0);
+ ret = mt8192_afe_gpio_request(afe->dev, true, tdm_priv->id, 0);
break;
case SND_SOC_DAPM_POST_PMD:
- mt8192_afe_gpio_request(afe->dev, false, tdm_priv->id, 0);
+ ret = mt8192_afe_gpio_request(afe->dev, false, tdm_priv->id, 0);
break;
default:
+ ret = 0;
break;
}
- return 0;
+ return ret;
}
static int mtk_tdm_bck_en_event(struct snd_soc_dapm_widget *w,
@@ -282,6 +284,7 @@ static int mtk_tdm_bck_en_event(struct snd_soc_dapm_widget *w,
struct mt8192_afe_private *afe_priv = afe->platform_priv;
int dai_id = get_tdm_id_by_name(w->name);
struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id];
+ int ret;
if (!tdm_priv) {
dev_warn(afe->dev, "%s(), tdm_priv == NULL", __func__);
@@ -293,7 +296,9 @@ static int mtk_tdm_bck_en_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_mck_enable(afe, tdm_priv->bck_id, tdm_priv->bck_rate);
+ ret = mt8192_mck_enable(afe, tdm_priv->bck_id, tdm_priv->bck_rate);
+ if (ret)
+ return ret;
break;
case SND_SOC_DAPM_POST_PMD:
mt8192_mck_disable(afe, tdm_priv->bck_id);
@@ -314,6 +319,7 @@ static int mtk_tdm_mck_en_event(struct snd_soc_dapm_widget *w,
struct mt8192_afe_private *afe_priv = afe->platform_priv;
int dai_id = get_tdm_id_by_name(w->name);
struct mtk_afe_tdm_priv *tdm_priv = afe_priv->dai_priv[dai_id];
+ int ret;
if (!tdm_priv) {
dev_warn(afe->dev, "%s(), tdm_priv == NULL", __func__);
@@ -325,7 +331,9 @@ static int mtk_tdm_mck_en_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_mck_enable(afe, tdm_priv->mclk_id, tdm_priv->mclk_rate);
+ ret = mt8192_mck_enable(afe, tdm_priv->mclk_id, tdm_priv->mclk_rate);
+ if (ret)
+ return ret;
break;
case SND_SOC_DAPM_POST_PMD:
tdm_priv->mclk_rate = 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0830/2151] ASoC: mediatek: mt8192: Propagate errors in I2S DAI DAPM event handlers
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (828 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0829/2151] ASoC: mediatek: mt8192: Propagate errors in TDM DAI DAPM event handlers Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0831/2151] ASoC: mediatek: mt8192-mt6359: Fix error handling in MTKAIF calibration Greg Kroah-Hartman
` (52 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit 49aeb628d10ef3d5694c39b7a3427d34bde06bb2 ]
Currently, DAPM event handlers in mt8192-dai-i2s.c ignore return values
from mt8192_afe_gpio_request(), mt8192_apll1_enable(),
mt8192_apll2_enable(), and mt8192_mck_enable(). If GPIO configuration or
clock setup fails during DAPM events, the error is silently ignored.
Fix this by checking and propagating error codes properly in all I2S DAI
DAPM event handlers.
Fixes: 2c37b4ed730b ("ASoC: mediatek: mt8192: support i2s in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-15-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c b/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c
index 47dc7ec4cae7e..374df85411b7c 100644
--- a/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c
+++ b/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c
@@ -586,6 +586,7 @@ static int mtk_i2s_en_event(struct snd_soc_dapm_widget *w,
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
struct mtk_afe_i2s_priv *i2s_priv;
+ int ret;
i2s_priv = get_i2s_priv_by_name(afe, w->name);
@@ -599,16 +600,17 @@ static int mtk_i2s_en_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_afe_gpio_request(afe->dev, true, i2s_priv->id, 0);
+ ret = mt8192_afe_gpio_request(afe->dev, true, i2s_priv->id, 0);
break;
case SND_SOC_DAPM_POST_PMD:
- mt8192_afe_gpio_request(afe->dev, false, i2s_priv->id, 0);
+ ret = mt8192_afe_gpio_request(afe->dev, false, i2s_priv->id, 0);
break;
default:
+ ret = 0;
break;
}
- return 0;
+ return ret;
}
static int mtk_apll_event(struct snd_soc_dapm_widget *w,
@@ -617,6 +619,7 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w,
{
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
+ int ret;
dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x\n",
__func__, w->name, event);
@@ -624,9 +627,11 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0)
- mt8192_apll1_enable(afe);
+ ret = mt8192_apll1_enable(afe);
else
- mt8192_apll2_enable(afe);
+ ret = mt8192_apll2_enable(afe);
+ if (ret)
+ return ret;
break;
case SND_SOC_DAPM_POST_PMD:
if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0)
@@ -704,6 +709,7 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w,
struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
struct mtk_afe_i2s_priv *i2s_priv;
+ int ret;
dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x\n",
__func__, w->name, event);
@@ -716,7 +722,9 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w,
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
- mt8192_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate);
+ ret = mt8192_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate);
+ if (ret)
+ return ret;
break;
case SND_SOC_DAPM_POST_PMD:
i2s_priv->mclk_rate = 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0831/2151] ASoC: mediatek: mt8192-mt6359: Fix error handling in MTKAIF calibration
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (829 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0830/2151] ASoC: mediatek: mt8192: Propagate errors in I2S " Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0832/2151] perf test code-reading: Fix duplicate kernel maps and machine leak Greg Kroah-Hartman
` (51 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, bui duc phuc, Mark Brown,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: bui duc phuc <phucduc.bui@gmail.com>
[ Upstream commit d6c8a0b5bf696d89350e43bf554362de8929f801 ]
mt8192_mt6359_mtkaif_calibration() ignored the return values of
pm_runtime_get_sync() and mt8192_afe_gpio_request(), which could
leave PM runtime references or GPIO state unbalanced on failure.
Switch to pm_runtime_resume_and_get(), check each GPIO request,
and unwind on error.
Fixes: 18b13ff23fab ("ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260918133912.133799-16-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../mt8192/mt8192-mt6359-rt1015-rt5682.c | 37 +++++++++++++------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 91c57765ab57b..b50daa53cbff6 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -163,12 +163,23 @@ static int mt8192_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
int chosen_phase_1, chosen_phase_2, chosen_phase_3;
int counter;
int mtkaif_calib_ok;
+ int ret = 0;
- pm_runtime_get_sync(afe->dev);
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 1);
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 0);
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34, 1);
- mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34, 0);
+ ret = pm_runtime_resume_and_get(afe->dev);
+ if (ret < 0)
+ return ret;
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 1);
+ if (ret)
+ goto err_pm_put;
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA, 0);
+ if (ret)
+ goto err_disable_adda_1;
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34, 1);
+ if (ret)
+ goto err_disable_adda_0;
+ ret = mt8192_afe_gpio_request(afe->dev, true, MT8192_DAI_ADDA_CH34, 0);
+ if (ret)
+ goto err_disable_adda_ch34_1;
mt6359_mtkaif_calibration_enable(cmpnt_codec);
@@ -289,10 +300,14 @@ static int mt8192_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
mt6359_mtkaif_calibration_disable(cmpnt_codec);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 1);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 0);
- mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34, 1);
mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34, 0);
+err_disable_adda_ch34_1:
+ mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA_CH34, 1);
+err_disable_adda_0:
+ mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 0);
+err_disable_adda_1:
+ mt8192_afe_gpio_request(afe->dev, false, MT8192_DAI_ADDA, 1);
+err_pm_put:
pm_runtime_put(afe->dev);
dev_dbg(afe->dev, "%s(), mtkaif_chosen_phase[0/1/2]:%d/%d/%d\n",
@@ -301,7 +316,7 @@ static int mt8192_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd)
afe_priv->mtkaif_chosen_phase[1],
afe_priv->mtkaif_chosen_phase[2]);
- return 0;
+ return ret;
}
static int mt8192_mt6359_init(struct snd_soc_pcm_runtime *rtd)
@@ -319,9 +334,7 @@ static int mt8192_mt6359_init(struct snd_soc_pcm_runtime *rtd)
afe_priv->mtkaif_protocol = MTKAIF_PROTOCOL_2_CLK_P2;
/* mtkaif calibration */
- mt8192_mt6359_mtkaif_calibration(rtd);
-
- return 0;
+ return mt8192_mt6359_mtkaif_calibration(rtd);
}
static int mt8192_rt5682_init(struct snd_soc_pcm_runtime *rtd)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0832/2151] perf test code-reading: Fix duplicate kernel maps and machine leak
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (830 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0831/2151] ASoC: mediatek: mt8192-mt6359: Fix error handling in MTKAIF calibration Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0833/2151] perf build: Clean libperf-gtk.so in make clean Greg Kroah-Hartman
` (50 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 58bf7b7af359d4c6f1af29fd8d2067bbcff1d8c7 ]
In do_test_code_reading(), machine__new_host(&host_env) already calls
machine__create_kernel_maps(machine). Calling
machine__create_kernel_maps(machine) a second time immediately
afterwards duplicates all kernel module maps in machine->kmaps, causing
dso__load_kcore()'s module validation (do_validate_kcore_modules()) to
fail and fall back to /proc/kallsyms.
Furthermore, when try_kcore is true and !have_kcore, returning
TEST_CODE_READING_NO_KCORE directly bypasses out_err, leaking the entire
struct machine, its kernel/module maps and DSOs, all kallsyms symbols,
and host_env.
Remove the redundant machine__create_kernel_maps() call, check for
!machine after machine__new_host(), and jump to out_err when returning
TEST_CODE_READING_NO_KCORE.
Fixes: 0fd4008ed755c52d ("perf test: Use machine__new_host in mmap thread code reading test")
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/tests/code-reading.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 4e759b8989806..5535c58b777d1 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -710,10 +710,8 @@ static int do_test_code_reading(bool try_kcore)
perf_env__init(&host_env);
machine = machine__new_host(&host_env);
-
- ret = machine__create_kernel_maps(machine);
- if (ret < 0) {
- pr_debug("machine__create_kernel_maps failed\n");
+ if (!machine) {
+ pr_debug("machine__new_host failed\n");
goto out_err;
}
@@ -733,8 +731,10 @@ static int do_test_code_reading(bool try_kcore)
have_kcore = dso__is_kcore(dso);
/* 2nd time through we just try kcore */
- if (try_kcore && !have_kcore)
- return TEST_CODE_READING_NO_KCORE;
+ if (try_kcore && !have_kcore) {
+ err = TEST_CODE_READING_NO_KCORE;
+ goto out_err;
+ }
/* No point getting kernel events if there is no kernel object */
if (!have_vmlinux && !have_kcore)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0833/2151] perf build: Clean libperf-gtk.so in make clean
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (831 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0832/2151] perf test code-reading: Fix duplicate kernel maps and machine leak Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0834/2151] arm64: dts: ti: k3-am62-verdin-ivy: Fix main_gpio0/main_gpio1 line names size Greg Kroah-Hartman
` (49 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit fb0da4af899ab1d6a66d29b21189bda3c68c2ce0 ]
When GTK support was made opt-in (first via GTK2=1 and recently ported
to GTK4=1), $(OUTPUT)libperf-gtk.so is only added to ALL_PROGRAMS when
GTK4 is defined. As a result, running 'make clean' without GTK4=1 does
not remove $(OUTPUT)libperf-gtk.so.
Add $(OUTPUT)libperf-gtk.so explicitly to the core-progs clean list so
it is always removed by 'make clean'.
Fixes: 4751bddd3f983af2 ("perf tools: Make GTK2 support opt-in")
Closes: https://lore.kernel.org/linux-perf-users/CAP-5=fV6+mzN3Lf_mCAJ4aP42JFZsF55ekvt8XrX505xOWwrmA@mail.gmail.com/
Reported-by: Ian Rogers <irogers@google.com>
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 3e3e266c5bc1d..84cfd7395d18c 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1275,7 +1275,7 @@ clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $(
-name '\.*.cmd' -delete -o -name '\.*.d' -delete -o -name '*.shellcheck_log' -delete
$(Q)$(RM) $(OUTPUT).config-detected
$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 \
- perf-read-vdsox32 $(OUTPUT)$(LIBJVMTI).so
+ perf-read-vdsox32 $(OUTPUT)$(LIBJVMTI).so $(OUTPUT)libperf-gtk.so
$(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo \
$(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE \
$(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0834/2151] arm64: dts: ti: k3-am62-verdin-ivy: Fix main_gpio0/main_gpio1 line names size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (832 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0833/2151] perf build: Clean libperf-gtk.so in make clean Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0835/2151] perf vendor events intel: Fix sierraforest umask encoding Greg Kroah-Hartman
` (48 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Francesco Dolcini, Nishanth Menon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Dolcini <francesco.dolcini@toradex.com>
[ Upstream commit a74db73609d6e307bfcb6ef8073be2c47fb5bd9e ]
ivy redefines gpio-line-names for main_gpio0/main_gpio1, sized 87/88
entries instead of the SoC's actual 92/52 ti,ngpio. Resize both
arrays to match, keeping every existing label at its original index.
Fixes: 881f5e9d8082 ("arm64: dts: ti: k3-am62-verdin: Add Ivy carrier board")
Assisted-by: LLM
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260922152551.270845-2-francesco@dolcini.it
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../arm64/boot/dts/ti/k3-am62-verdin-ivy.dtsi | 41 +++----------------
1 file changed, 5 insertions(+), 36 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am62-verdin-ivy.dtsi b/arch/arm64/boot/dts/ti/k3-am62-verdin-ivy.dtsi
index 71c29eab0eee7..a07d37b87ecbe 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-verdin-ivy.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-verdin-ivy.dtsi
@@ -367,6 +367,11 @@ &main_gpio0 {
"",
"",
"",
+ "",
+ "",
+ "",
+ "",
+ "", /* 90 */
"";
};
@@ -425,42 +430,6 @@ &main_gpio1 {
"",
"",
"", /* 50 */
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", /* 60 */
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", /* 70 */
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "", /* 80 */
- "",
- "",
- "",
- "",
- "",
- "",
"";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0835/2151] perf vendor events intel: Fix sierraforest umask encoding.
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (833 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0834/2151] arm64: dts: ti: k3-am62-verdin-ivy: Fix main_gpio0/main_gpio1 line names size Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0836/2151] perf vendor events intel: Fix skylakex " Greg Kroah-Hartman
` (47 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit a86bd28b6e71101a1b11b7768f9bbc648b7b14d3 ]
Fix UMaskExt that was wrongly encoded when the UMask was 0.
Fixes: 9626368d429a ("perf vendor events intel: Update sierraforst events to v1.01")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../perf/pmu-events/arch/x86/sierraforest/uncore-cache.json | 5 +++++
.../arch/x86/sierraforest/uncore-interconnect.json | 2 ++
2 files changed, 7 insertions(+)
diff --git a/tools/perf/pmu-events/arch/x86/sierraforest/uncore-cache.json b/tools/perf/pmu-events/arch/x86/sierraforest/uncore-cache.json
index 3d1fb5f0417ec..e3946d897cb11 100644
--- a/tools/perf/pmu-events/arch/x86/sierraforest/uncore-cache.json
+++ b/tools/perf/pmu-events/arch/x86/sierraforest/uncore-cache.json
@@ -692,6 +692,7 @@
"EventName": "UNC_CHA_REMOTE_SF.DIRBACKED_ONLY",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x4000",
"Unit": "CHA"
},
{
@@ -721,6 +722,7 @@
"EventName": "UNC_CHA_REMOTE_SF.INCLUSIVE_ONLY",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -739,6 +741,7 @@
"EventName": "UNC_CHA_REMOTE_SF.UPDATE_EXCLUSIVE",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -758,6 +761,7 @@
"EventName": "UNC_CHA_REMOTE_SF.VICTIM_EXCLUSIVE",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -767,6 +771,7 @@
"EventName": "UNC_CHA_REMOTE_SF.VICTIM_SHARED",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
diff --git a/tools/perf/pmu-events/arch/x86/sierraforest/uncore-interconnect.json b/tools/perf/pmu-events/arch/x86/sierraforest/uncore-interconnect.json
index 251e5d20fefec..ce49487324b36 100644
--- a/tools/perf/pmu-events/arch/x86/sierraforest/uncore-interconnect.json
+++ b/tools/perf/pmu-events/arch/x86/sierraforest/uncore-interconnect.json
@@ -515,6 +515,7 @@
"EventName": "UNC_B2CMI_IMC_WRITES.NI",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x300",
"Unit": "B2CMI"
},
{
@@ -524,6 +525,7 @@
"EventName": "UNC_B2CMI_IMC_WRITES.NI_MISS",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x500",
"Unit": "B2CMI"
},
{
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0836/2151] perf vendor events intel: Fix skylakex umask encoding.
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (834 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0835/2151] perf vendor events intel: Fix sierraforest umask encoding Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0837/2151] perf vendor events intel: Fix snowridgex " Greg Kroah-Hartman
` (46 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit f37e7dfbd34c4e48d2bea4c5e0e64c398671e87b ]
Fix UMaskExt that was wrongly encoded when the UMask was 0.
Fixes: 748d5cf71948 ("perf vendor events intel: Fix uncore topics for skylakex")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../pmu-events/arch/x86/skylakex/uncore-interconnect.json | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/pmu-events/arch/x86/skylakex/uncore-interconnect.json b/tools/perf/pmu-events/arch/x86/skylakex/uncore-interconnect.json
index eef801c68bd25..08311bdb2b203 100644
--- a/tools/perf/pmu-events/arch/x86/skylakex/uncore-interconnect.json
+++ b/tools/perf/pmu-events/arch/x86/skylakex/uncore-interconnect.json
@@ -13462,6 +13462,7 @@
"EventName": "UNC_UPI_TxL_HDR_MATCH.DATA_HDR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x800",
"Unit": "UPI"
},
{
@@ -13472,6 +13473,7 @@
"EventName": "UNC_UPI_TxL_HDR_MATCH.DUAL_SLOT_HDR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x2000",
"Unit": "UPI"
},
{
@@ -13482,6 +13484,7 @@
"EventName": "UNC_UPI_TxL_HDR_MATCH.LOC",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x200",
"Unit": "UPI"
},
{
@@ -13514,6 +13517,7 @@
"EventName": "UNC_UPI_TxL_HDR_MATCH.NON_DATA_HDR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x1000",
"Unit": "UPI"
},
{
@@ -13524,6 +13528,7 @@
"EventName": "UNC_UPI_TxL_HDR_MATCH.REM",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x400",
"Unit": "UPI"
},
{
@@ -13567,6 +13572,7 @@
"EventName": "UNC_UPI_TxL_HDR_MATCH.SGL_SLOT_HDR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x4000",
"Unit": "UPI"
},
{
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0837/2151] perf vendor events intel: Fix snowridgex umask encoding.
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (835 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0836/2151] perf vendor events intel: Fix skylakex " Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0838/2151] soc: ti: k3-ringacc: Correct ring API kernel-doc Greg Kroah-Hartman
` (45 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 8a0b9c9ff582258aafc6d6c8fe3fb104d9686a7b ]
Fix UMaskExt that was wrongly encoded when the UMask was 0.
Fixes: 2bb848f820a5 ("perf vendor events intel: Fix uncore topics for snowridgex")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../arch/x86/snowridgex/uncore-cache.json | 68 +++++++++++++++++++
.../x86/snowridgex/uncore-interconnect.json | 10 +++
2 files changed, 78 insertions(+)
diff --git a/tools/perf/pmu-events/arch/x86/snowridgex/uncore-cache.json b/tools/perf/pmu-events/arch/x86/snowridgex/uncore-cache.json
index a81776deb2e61..c32f1f3f826ac 100644
--- a/tools/perf/pmu-events/arch/x86/snowridgex/uncore-cache.json
+++ b/tools/perf/pmu-events/arch/x86/snowridgex/uncore-cache.json
@@ -1592,6 +1592,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : All Request Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Any local or remote transaction to the LLC, including prefetch.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -1624,6 +1625,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : CRd Request Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Local or remote CRd transactions to the LLC. This includes CRd prefetch.",
+ "UMask": "0x1000",
"Unit": "CHA"
},
{
@@ -1645,6 +1647,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : Local request Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Any local transaction to the LLC, including prefetches from the Core",
+ "UMask": "0x4000",
"Unit": "CHA"
},
{
@@ -1687,6 +1690,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : Data Read Request Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Read transactions.",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -1752,6 +1756,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : Flush or Invalidate Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing.",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -1773,6 +1778,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : Transactions homed locally Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Transaction whose address resides in the local MC.",
+ "UMask": "0x80000",
"Unit": "CHA"
},
{
@@ -1805,6 +1811,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : Write Request Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Writeback transactions to the LLC This includes all write transactions -- both Cacheable and UC.",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
@@ -1925,6 +1932,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Cache Lookups : RFO Request Filter : Counts the number of times the LLC was accessed - this includes code, data, prefetches and hints coming from L2. This has numerous filters available. Note the non-standard filtering equation. This event will count requests that lookup the cache multiple times with multiple increments. One must ALWAYS select a state or states (in the umask field) to match. Otherwise, the event will count nothing. : Local or remote RFO transactions to the LLC. This includes RFO prefetch.",
+ "UMask": "0x800",
"Unit": "CHA"
},
{
@@ -2077,6 +2085,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Lines Victimized : Local Only : Counts the number of lines that were victimized on a fill. This can be filtered by the state that the line was in.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -2195,6 +2204,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x10000000",
"Unit": "CHA"
},
{
@@ -2205,6 +2215,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x20000000",
"Unit": "CHA"
},
{
@@ -2215,6 +2226,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x80000",
"Unit": "CHA"
},
{
@@ -2225,6 +2237,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x8000000",
"Unit": "CHA"
},
{
@@ -2235,6 +2248,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
@@ -2289,6 +2303,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x40000000",
"Unit": "CHA"
},
{
@@ -2299,6 +2314,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x10000",
"Unit": "CHA"
},
{
@@ -2309,6 +2325,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -2319,6 +2336,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -2329,6 +2347,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x200000",
"Unit": "CHA"
},
{
@@ -2339,6 +2358,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x4000000",
"Unit": "CHA"
},
{
@@ -2349,6 +2369,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x800000",
"Unit": "CHA"
},
{
@@ -2359,6 +2380,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x1000000",
"Unit": "CHA"
},
{
@@ -2369,6 +2391,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -2379,6 +2402,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x8000",
"Unit": "CHA"
},
{
@@ -2411,6 +2435,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x100000",
"Unit": "CHA"
},
{
@@ -2421,6 +2446,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x20000",
"Unit": "CHA"
},
{
@@ -2431,6 +2457,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x400000",
"Unit": "CHA"
},
{
@@ -2441,6 +2468,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x2000000",
"Unit": "CHA"
},
{
@@ -2451,6 +2479,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x1000",
"Unit": "CHA"
},
{
@@ -2461,6 +2490,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x80000000",
"Unit": "CHA"
},
{
@@ -2471,6 +2501,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x100000000",
"Unit": "CHA"
},
{
@@ -2481,6 +2512,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x200000000",
"Unit": "CHA"
},
{
@@ -2491,6 +2523,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "Pipe Rejects : More Miscellaneous events in the Cbo.",
+ "UMask": "0x4000",
"Unit": "CHA"
},
{
@@ -2523,6 +2556,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx READ Credits Empty : MC10 : Counts the number of times when there are no credits available for sending reads from the CHA into the iMC. In order to send reads into the memory controller, the HA must first acquire a credit for the iMC's AD Ingress queue. : Filter for memory controller 10 only.",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -2533,6 +2567,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx READ Credits Empty : MC11 : Counts the number of times when there are no credits available for sending reads from the CHA into the iMC. In order to send reads into the memory controller, the HA must first acquire a credit for the iMC's AD Ingress queue. : Filter for memory controller 11 only.",
+ "UMask": "0x800",
"Unit": "CHA"
},
{
@@ -2543,6 +2578,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx READ Credits Empty : MC12 : Counts the number of times when there are no credits available for sending reads from the CHA into the iMC. In order to send reads into the memory controller, the HA must first acquire a credit for the iMC's AD Ingress queue. : Filter for memory controller 12 only.",
+ "UMask": "0x1000",
"Unit": "CHA"
},
{
@@ -2553,6 +2589,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx READ Credits Empty : MC13 : Counts the number of times when there are no credits available for sending reads from the CHA into the iMC. In order to send reads into the memory controller, the HA must first acquire a credit for the iMC's AD Ingress queue. : Filter for memory controller 13 only.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -2629,6 +2666,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx READ Credits Empty : MC8 : Counts the number of times when there are no credits available for sending reads from the CHA into the iMC. In order to send reads into the memory controller, the HA must first acquire a credit for the iMC's AD Ingress queue. : Filter for memory controller 8 only.",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -2639,6 +2677,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx READ Credits Empty : MC9 : Counts the number of times when there are no credits available for sending reads from the CHA into the iMC. In order to send reads into the memory controller, the HA must first acquire a credit for the iMC's AD Ingress queue. : Filter for memory controller 9 only.",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
@@ -5047,6 +5086,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : DDR4 Access : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -5057,6 +5097,7 @@
"EventName": "UNC_CHA_TOR_INSERTS.DDR4",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -5078,6 +5119,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just Hits : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -5687,6 +5729,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just ISOC : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x200000000",
"Unit": "CHA"
},
{
@@ -5697,6 +5740,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just Local Targets : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x8000",
"Unit": "CHA"
},
{
@@ -5740,6 +5784,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Match the Opcode in b[29:19] of the extended umask field : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x20000",
"Unit": "CHA"
},
{
@@ -5750,6 +5795,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just Misses : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
@@ -5760,6 +5806,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : MMCFG Access : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -5770,6 +5817,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just NearMem : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x40000000",
"Unit": "CHA"
},
{
@@ -5780,6 +5828,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just NonCoherent : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x100000000",
"Unit": "CHA"
},
{
@@ -5790,6 +5839,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Just NotNearMem : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x80000000",
"Unit": "CHA"
},
{
@@ -5800,6 +5850,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Inserts : Match the PreMorphed Opcode in b[29:19] of the extended umask field : Counts the number of entries successfully inserted into the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x40000",
"Unit": "CHA"
},
{
@@ -5832,6 +5883,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : DDR4 Access : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -5853,6 +5905,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just Hits : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -6440,6 +6493,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just ISOC : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x200000000",
"Unit": "CHA"
},
{
@@ -6450,6 +6504,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just Local Targets : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x8000",
"Unit": "CHA"
},
{
@@ -6493,6 +6548,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Match the Opcode in b[29:19] of the extended umask field : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x20000",
"Unit": "CHA"
},
{
@@ -6503,6 +6559,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just Misses : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
@@ -6513,6 +6570,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : MMCFG Access : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -6523,6 +6581,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just NearMem : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x40000000",
"Unit": "CHA"
},
{
@@ -6533,6 +6592,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just NonCoherent : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x100000000",
"Unit": "CHA"
},
{
@@ -6543,6 +6603,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Just NotNearMem : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x80000000",
"Unit": "CHA"
},
{
@@ -6553,6 +6614,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "TOR Occupancy : Match the PreMorphed Opcode in b[29:19] of the extended umask field : For each cycle, this event accumulates the number of valid entries in the TOR that match qualifications specified by the subevent. Does not include addressless requests such as locks and interrupts.",
+ "UMask": "0x40000",
"Unit": "CHA"
},
{
@@ -8356,6 +8418,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx WRITE Credits Empty : MC10 : Counts the number of times when there are no credits available for sending WRITEs from the CHA into the iMC. In order to send WRITEs into the memory controller, the HA must first acquire a credit for the iMC's BL Ingress queue. : Filter for memory controller 10 only.",
+ "UMask": "0x400",
"Unit": "CHA"
},
{
@@ -8366,6 +8429,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx WRITE Credits Empty : MC11 : Counts the number of times when there are no credits available for sending WRITEs from the CHA into the iMC. In order to send WRITEs into the memory controller, the HA must first acquire a credit for the iMC's BL Ingress queue. : Filter for memory controller 11 only.",
+ "UMask": "0x800",
"Unit": "CHA"
},
{
@@ -8376,6 +8440,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx WRITE Credits Empty : MC12 : Counts the number of times when there are no credits available for sending WRITEs from the CHA into the iMC. In order to send WRITEs into the memory controller, the HA must first acquire a credit for the iMC's BL Ingress queue. : Filter for memory controller 12 only.",
+ "UMask": "0x1000",
"Unit": "CHA"
},
{
@@ -8386,6 +8451,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx WRITE Credits Empty : MC13 : Counts the number of times when there are no credits available for sending WRITEs from the CHA into the iMC. In order to send WRITEs into the memory controller, the HA must first acquire a credit for the iMC's BL Ingress queue. : Filter for memory controller 13 only.",
+ "UMask": "0x2000",
"Unit": "CHA"
},
{
@@ -8462,6 +8528,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx WRITE Credits Empty : MC8 : Counts the number of times when there are no credits available for sending WRITEs from the CHA into the iMC. In order to send WRITEs into the memory controller, the HA must first acquire a credit for the iMC's BL Ingress queue. : Filter for memory controller 8 only.",
+ "UMask": "0x100",
"Unit": "CHA"
},
{
@@ -8472,6 +8539,7 @@
"Experimental": "1",
"PerPkg": "1",
"PublicDescription": "CHA iMC CHNx WRITE Credits Empty : MC9 : Counts the number of times when there are no credits available for sending WRITEs from the CHA into the iMC. In order to send WRITEs into the memory controller, the HA must first acquire a credit for the iMC's BL Ingress queue. : Filter for memory controller 9 only.",
+ "UMask": "0x200",
"Unit": "CHA"
},
{
diff --git a/tools/perf/pmu-events/arch/x86/snowridgex/uncore-interconnect.json b/tools/perf/pmu-events/arch/x86/snowridgex/uncore-interconnect.json
index 88ee90b8a2d9f..9667e4f48c13a 100644
--- a/tools/perf/pmu-events/arch/x86/snowridgex/uncore-interconnect.json
+++ b/tools/perf/pmu-events/arch/x86/snowridgex/uncore-interconnect.json
@@ -2210,6 +2210,7 @@
"EventName": "UNC_M2M_IMC_WRITES.CH0_FROM_TGR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x500",
"Unit": "M2M"
},
{
@@ -2239,6 +2240,7 @@
"EventName": "UNC_M2M_IMC_WRITES.CH0_NI_MISS",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x2000",
"Unit": "M2M"
},
{
@@ -2278,6 +2280,7 @@
"EventName": "UNC_M2M_IMC_WRITES.CH1_FROM_TGR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x900",
"Unit": "M2M"
},
{
@@ -2307,6 +2310,7 @@
"EventName": "UNC_M2M_IMC_WRITES.CH1_NI_MISS",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0xc00",
"Unit": "M2M"
},
{
@@ -2336,6 +2340,7 @@
"EventName": "UNC_M2M_IMC_WRITES.FROM_TGR",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x1d00",
"Unit": "M2M"
},
{
@@ -2365,6 +2370,7 @@
"EventName": "UNC_M2M_IMC_WRITES.NI_MISS",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x1c00",
"Unit": "M2M"
},
{
@@ -2837,6 +2843,7 @@
"EventName": "UNC_M2M_PREFCAM_DROP_REASONS_CH0.RPQ_PROXY",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x100",
"Unit": "M2M"
},
{
@@ -2866,6 +2873,7 @@
"EventName": "UNC_M2M_PREFCAM_DROP_REASONS_CH0.XPT_THRESH",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x200",
"Unit": "M2M"
},
{
@@ -2935,6 +2943,7 @@
"EventName": "UNC_M2M_PREFCAM_DROP_REASONS_CH1.RPQ_PROXY",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x100",
"Unit": "M2M"
},
{
@@ -2964,6 +2973,7 @@
"EventName": "UNC_M2M_PREFCAM_DROP_REASONS_CH1.XPT_THRESH",
"Experimental": "1",
"PerPkg": "1",
+ "UMask": "0x200",
"Unit": "M2M"
},
{
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0838/2151] soc: ti: k3-ringacc: Correct ring API kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (836 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0837/2151] perf vendor events intel: Fix snowridgex " Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0839/2151] soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc Greg Kroah-Hartman
` (44 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Nishanth Menon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 45ea6911ad16859d4ce4f25780b0ebcf5660e43a ]
The ring accelerator header labels k3_ring_cfg as an enum, uses
propname instead of property, and gives the DMA reset helper the
ordinary reset helper's name. The DMA reset comment also omits occ,
including the convention that zero requests a hardware occupancy read.
The proxy flag is parsed as a separate parameter, and the pop helpers
describe pushing elements. Proxy access is supported in Message mode;
the listed Credentials and Queue modes are not implemented. The phandle
lookup returns encoded error pointers rather than integer error values.
Match the declarations and document these argument and operation roles.
Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Link: https://patch.msgid.link/20260923061658.20140-1-kmehltretter@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/soc/ti/k3-ringacc.h | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/include/linux/soc/ti/k3-ringacc.h b/include/linux/soc/ti/k3-ringacc.h
index 39b022b925986..2de6031b94241 100644
--- a/include/linux/soc/ti/k3-ringacc.h
+++ b/include/linux/soc/ti/k3-ringacc.h
@@ -57,13 +57,13 @@ struct k3_ringacc;
struct k3_ring;
/**
- * enum k3_ring_cfg - RA ring configuration structure
+ * struct k3_ring_cfg - RA ring configuration structure
*
* @size: Ring size, number of elements
* @elm_size: Ring element size
* @mode: Ring operational mode
* @flags: Ring configuration flags. Possible values:
- * @K3_RINGACC_RING_SHARED: when set allows to request the same ring
+ * %K3_RINGACC_RING_SHARED: when set allows to request the same ring
* few times. It's usable when the same ring is used as Free Host PD ring
* for different flows, for example.
* Note: Locking should be done by consumer if required
@@ -88,11 +88,10 @@ struct k3_ring_cfg {
/**
* of_k3_ringacc_get_by_phandle - find a RA by phandle property
* @np: device node
- * @propname: property name containing phandle on RA node
+ * @property: property name containing phandle on RA node
*
- * Returns pointer on the RA - struct k3_ringacc
- * or -ENODEV if not found,
- * or -EPROBE_DEFER if not yet registered
+ * Return: Pointer to the RA, or ERR_PTR(-ENODEV) if the phandle cannot
+ * be resolved, or ERR_PTR(-EPROBE_DEFER) if the RA is not yet registered.
*/
struct k3_ringacc *of_k3_ringacc_get_by_phandle(struct device_node *np,
const char *property);
@@ -103,10 +102,8 @@ struct k3_ringacc *of_k3_ringacc_get_by_phandle(struct device_node *np,
* k3_ringacc_request_ring - request ring from ringacc
* @ringacc: pointer on ringacc
* @id: ring id or K3_RINGACC_RING_ID_ANY for any general purpose ring
- * @flags:
- * @K3_RINGACC_RING_USE_PROXY: if set - proxy will be allocated and
- * used to access ring memory. Sopported only for rings in
- * Message/Credentials/Queue mode.
+ * @flags: Set %K3_RINGACC_RING_USE_PROXY to allocate a proxy for
+ * accessing ring memory in Message mode.
*
* Returns pointer on the Ring - struct k3_ring
* or NULL in case of failure.
@@ -126,8 +123,9 @@ int k3_ringacc_request_rings_pair(struct k3_ringacc *ringacc,
*/
void k3_ringacc_ring_reset(struct k3_ring *ring);
/**
- * k3_ringacc_ring_reset - ring reset for DMA rings
+ * k3_ringacc_ring_reset_dma - ring reset for DMA rings
* @ring: pointer on Ring
+ * @occ: occupancy used by the DMA reset quirk, or zero to read it from hardware
*
* Resets ring internal state ((hw)occ, (hw)idx). Should be used for rings
* which are read by K3 UDMA, like TX or Free Host PD rings.
@@ -217,8 +215,8 @@ int k3_ringacc_ring_push(struct k3_ring *ring, void *elem);
* @ring: pointer on ring
* @elem: pointer on ring element buffer
*
- * Push one ring element from the ring head. Size of the ring element is
- * determined by ring configuration &struct k3_ring_cfg elm_size..
+ * Pop one ring element from the ring head. Size of the ring element is
+ * determined by ring configuration &struct k3_ring_cfg elm_size.
*
* Returns 0 on success, errno otherwise.
*/
@@ -242,7 +240,7 @@ int k3_ringacc_ring_push_head(struct k3_ring *ring, void *elem);
* @ring: pointer on ring
* @elem: pointer on ring element buffer
*
- * Push one ring element from the ring tail. Size of the ring element is
+ * Pop one ring element from the ring tail. Size of the ring element is
* determined by ring configuration &struct k3_ring_cfg elm_size.
*
* Returns 0 on success, errno otherwise.
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0839/2151] soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (837 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0838/2151] soc: ti: k3-ringacc: Correct ring API kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0840/2151] fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range() Greg Kroah-Hartman
` (43 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Udit Kumar,
Nishanth Menon, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 6c4e6e8f5cf95f7e0d4f04928a9ae70e20c73d4b ]
The heading for k3_ringacc_init_data repeats struct, so kernel-doc
cannot match it to the declaration. Its three fields are also missing
descriptions.
Use the structure name and describe the firmware handle, device ID,
and total number of available rings used during DMA ring initialization.
Fixes: d782298c6f6b ("soc: ti: k3-ringacc: add AM64 DMA rings support.")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Link: https://patch.msgid.link/20260923061658.20140-2-kmehltretter@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/soc/ti/k3-ringacc.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/soc/ti/k3-ringacc.h b/include/linux/soc/ti/k3-ringacc.h
index 2de6031b94241..7b7fc237c08f5 100644
--- a/include/linux/soc/ti/k3-ringacc.h
+++ b/include/linux/soc/ti/k3-ringacc.h
@@ -254,7 +254,10 @@ u32 k3_ringacc_get_tisci_dev_id(struct k3_ring *ring);
struct ti_sci_handle;
/**
- * struct struct k3_ringacc_init_data - Initialization data for DMA rings
+ * struct k3_ringacc_init_data - Initialization data for DMA rings
+ * @tisci: TI SCI firmware handle
+ * @tisci_dev_id: TI SCI device ID of the DMA controller
+ * @num_rings: Total number of available rings
*/
struct k3_ringacc_init_data {
const struct ti_sci_handle *tisci;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0840/2151] fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (838 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0839/2151] soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0841/2151] cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only Greg Kroah-Hartman
` (42 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, AutonomousCodeSecurity,
Xiang Mei (Microsoft), Konstantin Komarov, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei (Microsoft) <xmei5@asu.edu>
[ Upstream commit bf9a6578e03b065335836e025356b4b9170b9449 ]
When fallocate(FALLOC_FL_INSERT_RANGE) grows a still-resident ntfs3
attribute, attr_insert_range() shifts the inline data using the insert
length 'bytes' as both the destination offset and the copy size:
memmove(data + bytes, data, bytes);
Both are wrong: the shift must start at the insertion point 'vbo' and
move only the data past it (data_size - vbo). When bytes > data_size the
memmove runs off the end of the data_size + bytes buffer and overflows
the adjacent slab object.
Since vbo < data_size is already enforced above, the reworked offsets stay
within the data_size + bytes buffer and cannot under/overflow.
BUG: KASAN: slab-out-of-bounds in attr_insert_range (fs/ntfs3/attrib.c:2581)
Write of size 512 at addr ffff8880135e8b10 by task exploit/142
...
__asan_memmove (mm/kasan/shadow.c:95)
attr_insert_range (fs/ntfs3/attrib.c:2581)
ntfs_fallocate (fs/ntfs3/file.c:618)
vfs_fallocate (fs/open.c:338)
__x64_sys_fallocate (fs/open.c:362)
...
Fixes: 9256ec35359f ("fs/ntfs3: Refactoring attr_insert_range to restore after errors")
Reported-by: AutonomousCodeSecurity@microsoft.com
Signed-off-by: Xiang Mei (Microsoft) <xmei5@asu.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ntfs3/attrib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index 4e348c0f813e1..1feef22cc67e3 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -2438,8 +2438,8 @@ int attr_insert_range(struct ntfs_inode *ni, u64 vbo, u64 bytes)
char *data = Add2Ptr(attr_b,
le16_to_cpu(attr_b->res.data_off));
- memmove(data + bytes, data, bytes);
- memset(data, 0, bytes);
+ memmove(data + vbo + bytes, data + vbo, data_size - vbo);
+ memset(data + vbo, 0, bytes);
goto done;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0841/2151] cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (839 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0840/2151] fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0842/2151] spi: spi-qpic-snand: fix read location register usage in qcom_spi_config_cw_read() Greg Kroah-Hartman
` (41 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Waiman Long, Ridong Chen,
Guopeng Zhang, Tejun Heo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Waiman Long <longman@redhat.com>
[ Upstream commit 8a1c0f5c82843104d9bef2bc3726c89da70a9b91 ]
Commit f82f80426f7a ("sched/deadline: Ensure that updates to exclusive
cpusets don't break AC") adds a check in validate_change() to make
sure that there is enough bandwidth for SCHED_DEADLINE tasks if we
shrink a v1 exclusive cpuset that has CS_CPU_EXCLUSIVE flag set.
With the introduction of cpuset partition in cgroup v2, we keep setting
the CS_CPU_EXCLUSIVE flag for a partition root so that the SCHED_DEADLINE
check will continue to work as intended. However it turns out that the
current code isn't perfect and there are cases where a cpuset isn't
a valid partition root, but the exclusive flag is still incorrectly
set. This can leads to SCHED_DEADLINE check being incorrectly triggered
when there are deadline tasks in the system. This can result in unexpected
-EBUSY failure when making changes to cpuset control files. Fix that
by checking for a valid partition root for v2 and is_cpu_exclusive()
for v1. It is far easier and less cumbersome than to make sure that
the exclusive flag is only set for valid partition roots.
Even though commit a86ce68078b2 ("cgroup/cpuset: Extract out
CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling") is marked as a
commit to be fixed, the problem may exist before that.
Fixes: a86ce68078b2 ("cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling")
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Ridong Chen <ridong.chen@linux.dev>
Reviewed-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/cgroup/cpuset.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 15b6c9a6402ab..968a50997ac1e 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -714,8 +714,8 @@ static int validate_change(struct cpuset *cur, struct cpuset *trial)
* For v1, effective_cpus == cpus_allowed & user_xcpus() returns
* cpus_allowed.
*
- * For v2, is_cpu_exclusive() & is_sched_load_balance() are true only
- * for non-isolated partition root. At this point, the target
+ * For v2, is_partition_valid(cur) & is_sched_load_balance() are true
+ * only for non-isolated partition root. At this point, the target
* effective_cpus isn't computed yet. user_xcpus() is the best
* approximation.
*
@@ -724,7 +724,8 @@ static int validate_change(struct cpuset *cur, struct cpuset *trial)
* becomes an issue.
*/
ret = -EBUSY;
- if (is_cpu_exclusive(cur) && is_sched_load_balance(cur) &&
+ if ((is_partition_valid(cur) || (!cpuset_v2() && is_cpu_exclusive(cur))) &&
+ is_sched_load_balance(cur) &&
!cpuset_cpumask_can_shrink(cur->effective_cpus, user_xcpus(trial)))
goto out;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0842/2151] spi: spi-qpic-snand: fix read location register usage in qcom_spi_config_cw_read()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (840 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0841/2151] cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0843/2151] RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment Greg Kroah-Hartman
` (40 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Gabor Juhos, Mark Brown, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gabor Juhos <j4g8y7@gmail.com>
[ Upstream commit f3c0a2b557ea87cbd802b278783c32484a063ded ]
While configuring a codeword read, the com_spi_config_cw_read()
function unconditionally schedules writing of the regular read
location registers. However these registers should be written
only if the actual codeword is not the last one.
Change the function to schedule writing of the registers corresponding
to the acual codeword only.
While at it, also drop the single-use 'reg' and 'num_cw' local variables
and use the respective values directly in order to make the code easier
to understand.
Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://patch.msgid.link/20260922-qpic-snand-fix-cw_read-readloc-v1-1-67f6819fb3d7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-qpic-snand.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
index 567485785ec96..2f279516de4a9 100644
--- a/drivers/spi/spi-qpic-snand.c
+++ b/drivers/spi/spi-qpic-snand.c
@@ -486,15 +486,14 @@ static void qcom_spi_set_read_loc(struct qcom_nand_controller *snandc, int cw, i
static void
qcom_spi_config_cw_read(struct qcom_nand_controller *snandc, bool use_ecc, int cw)
{
- __le32 *reg = &snandc->regs->read_location0;
- int num_cw = snandc->qspi->num_cw;
-
- qcom_write_reg_dma(snandc, reg, NAND_READ_LOCATION_0, 4, NAND_BAM_NEXT_SGL);
- if (cw == (num_cw - 1)) {
- reg = &snandc->regs->read_location_last0;
- qcom_write_reg_dma(snandc, reg, NAND_READ_LOCATION_LAST_CW_0, 4,
+ if (cw == (snandc->qspi->num_cw - 1))
+ qcom_write_reg_dma(snandc, &snandc->regs->read_location_last0,
+ NAND_READ_LOCATION_LAST_CW_0, 4,
+ NAND_BAM_NEXT_SGL);
+ else
+ qcom_write_reg_dma(snandc, &snandc->regs->read_location0,
+ NAND_READ_LOCATION_0, 4,
NAND_BAM_NEXT_SGL);
- }
qcom_write_reg_dma(snandc, &snandc->regs->cmd, NAND_FLASH_CMD, 1, NAND_BAM_NEXT_SGL);
qcom_write_reg_dma(snandc, &snandc->regs->exec, NAND_EXEC_CMD, 1, NAND_BAM_NEXT_SGL);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0843/2151] RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (841 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0842/2151] spi: spi-qpic-snand: fix read location register usage in qcom_spi_config_cw_read() Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0844/2151] IB/isert: Dont share drop_cmd_list across concurrent connection teardowns Greg Kroah-Hartman
` (39 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit 9728effe43d8fc4d58e12b697d0d6127355abdd5 ]
In handle_reg_mr_integrity, when mr->pi_mr is NULL (physical-address
optimization path), the code points mr->pi_mr at a stack-local pa_pi_mr
so set_pi_umr_wr can read it during this call. The pointer is never
restored, so after the function returns mr->pi_mr dangles at a freed stack
frame. A second IB_WR_REG_MR_INTEGRITY posted on the same MR without
remapping reads the stale pointer and dereferences it.
Save the original pi_mr (captured at function entry) and restore it on
the out path.
Fixes: 2563e2f30acb ("RDMA/mlx5: Use PA mapping for PI handover")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260919100848.2442-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx5/wr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/mlx5/wr.c b/drivers/infiniband/hw/mlx5/wr.c
index 9947feb7fb8a0..1748c633213ed 100644
--- a/drivers/infiniband/hw/mlx5/wr.c
+++ b/drivers/infiniband/hw/mlx5/wr.c
@@ -925,6 +925,7 @@ static int handle_reg_mr_integrity(struct mlx5_ib_dev *dev,
qp->next_fence = MLX5_FENCE_MODE_INITIATOR_SMALL;
out:
+ mr->pi_mr = pi_mr;
return err;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0844/2151] IB/isert: Dont share drop_cmd_list across concurrent connection teardowns
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (842 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0843/2151] RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment Greg Kroah-Hartman
@ 2026-11-18 14:42 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0845/2151] arm64: dts: imx8dxl-evk: fix reserved memory node names for remoteproc Greg Kroah-Hartman
` (38 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:42 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Li RongQing, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li RongQing <lirongqing@baidu.com>
[ Upstream commit d30e9b1bc47bd9be4b2fc97b0e4074bc02c4203a ]
isert_put_unsol_pending_cmds() declares drop_cmd_list as a static
LIST_HEAD, so the list is shared across all invocations of the function.
It is called from isert_wait_conn(), the per-connection .iscsit_wait_conn
transport callback, which runs independently for each connection during
teardown.
conn->cmd_lock only protects each connection's own conn_cmd_list, not the
shared drop_cmd_list. If two connections tear down at the same time, both
threads list_move_tail() commands into the same drop_cmd_list without any
mutual exclusion, and then both iterate and list_del/put it concurrently.
This corrupts the linked list and can double-free iscsit_cmd structures.
Make drop_cmd_list a stack-local list, matching the pattern already used
in isert_free_np().
Fixes: 3e03c4b01da3 ("iser-target: Put the reference on commands waiting for unsol data")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Link: https://patch.msgid.link/20260921031100.2199-1-lirongqing@baidu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index b3fc753982a38..e3ff99c75b308 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2586,7 +2586,7 @@ static void
isert_put_unsol_pending_cmds(struct iscsit_conn *conn)
{
struct iscsit_cmd *cmd, *tmp;
- static LIST_HEAD(drop_cmd_list);
+ LIST_HEAD(drop_cmd_list);
spin_lock_bh(&conn->cmd_lock);
list_for_each_entry_safe(cmd, tmp, &conn->conn_cmd_list, i_conn_node) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0845/2151] arm64: dts: imx8dxl-evk: fix reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (843 preceding siblings ...)
2026-11-18 14:42 ` [PATCH 6.18 0844/2151] IB/isert: Dont share drop_cmd_list across concurrent connection teardowns Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0846/2151] arm64: dts: imx8qm-mek: " Greg Kroah-Hartman
` (37 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit c4e5f1a143799651aba2c4f66860b63b56786306 ]
The imx_rproc driver uses node names to identify reserved memory regions.
It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the
resource table, and "vdev" prefix to filter vdev regions.
Rename the reserved memory nodes to use the expected names so the driver
can correctly identify and handle each region.
Fixes: ee39dbd9a6cb ("arm64: dts: imx8dxl-evk: add imx8dxl_cm4, lsio mu5, related memory region")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8dxl-evk.dts | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts b/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts
index 605a423a1b668..40d6e175f1400 100644
--- a/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts
@@ -29,7 +29,7 @@ imx8dxl-cm4 {
clocks = <&clk_dummy>;
mbox-names = "tx", "rx", "rxdb";
mboxes = <&lsio_mu5 0 1 &lsio_mu5 1 1 &lsio_mu5 3 1>;
- memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
power-domains = <&pd IMX_SC_R_M4_0_PID0>, <&pd IMX_SC_R_M4_0_MU_1A>;
fsl,resource-id = <IMX_SC_R_M4_0_PID0>;
@@ -65,32 +65,32 @@ linux,cma {
linux,cma-default;
};
- vdev0vring0: memory0@90000000 {
+ vdev0vring0: vdev0vring0@90000000 {
reg = <0 0x90000000 0 0x8000>;
no-map;
};
- vdev0vring1: memory@90008000 {
+ vdev0vring1: vdev0vring1@90008000 {
reg = <0 0x90008000 0 0x8000>;
no-map;
};
- vdev1vring0: memory@90010000 {
+ vdev1vring0: vdev1vring0@90010000 {
reg = <0 0x90010000 0 0x8000>;
no-map;
};
- vdev1vring1: memory@90018000 {
+ vdev1vring1: vdev1vring1@90018000 {
reg = <0 0x90018000 0 0x8000>;
no-map;
};
- rsc_table: memory-rsc-table@900ff000 {
+ rsc_table: rsc-table@900ff000 {
reg = <0 0x900ff000 0 0x1000>;
no-map;
};
- vdevbuffer: memory-vdevbuffer@90400000 {
+ vdev0buffer: vdev0buffer@90400000 {
compatible = "shared-dma-pool";
reg = <0 0x90400000 0 0x100000>;
no-map;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0846/2151] arm64: dts: imx8qm-mek: fix reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (844 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0845/2151] arm64: dts: imx8dxl-evk: fix reserved memory node names for remoteproc Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0847/2151] arm64: dts: imx8qm-mek: fix dsp " Greg Kroah-Hartman
` (36 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit c712a46c10d38ce7869a9d81d7986e844a4e9f24 ]
The imx_rproc driver uses node names to identify reserved memory regions.
It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the
resource table, and "vdev" prefix to filter vdev regions.
Rename the reserved memory nodes to use the expected names so the driver
can correctly identify and handle each region.
Fixes: 52c9971edd4f ("arm64: dts: imx8qm-mek: add cm4 remote-proc and related memory region")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 26 ++++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
index a97883873b564..cea9156049b2c 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
@@ -44,57 +44,57 @@ reserved-memory {
#size-cells = <2>;
ranges;
- vdev0vring0: memory@90000000 {
+ vdev0vring0: vdev0vring0@90000000 {
reg = <0 0x90000000 0 0x8000>;
no-map;
};
- vdev0vring1: memory@90008000 {
+ vdev0vring1: vdev0vring1@90008000 {
reg = <0 0x90008000 0 0x8000>;
no-map;
};
- vdev1vring0: memory@90010000 {
+ vdev1vring0: vdev1vring0@90010000 {
reg = <0 0x90010000 0 0x8000>;
no-map;
};
- vdev1vring1: memory@90018000 {
+ vdev1vring1: vdev1vring1@90018000 {
reg = <0 0x90018000 0 0x8000>;
no-map;
};
- rsc_table0: memory@900ff000 {
+ rsc_table0: rsc-table@900ff000 {
reg = <0 0x900ff000 0 0x1000>;
no-map;
};
- vdev2vring0: memory@90100000 {
+ vdev2vring0: vdev2vring0@90100000 {
reg = <0 0x90100000 0 0x8000>;
no-map;
};
- vdev2vring1: memory@90108000 {
+ vdev2vring1: vdev2vring1@90108000 {
reg = <0 0x90108000 0 0x8000>;
no-map;
};
- vdev3vring0: memory@90110000 {
+ vdev3vring0: vdev3vring0@90110000 {
reg = <0 0x90110000 0 0x8000>;
no-map;
};
- vdev3vring1: memory@90118000 {
+ vdev3vring1: vdev3vring1@90118000 {
reg = <0 0x90118000 0 0x8000>;
no-map;
};
- rsc_table1: memory@901ff000 {
+ rsc_table1: rsc-table@901ff000 {
reg = <0 0x901ff000 0 0x1000>;
no-map;
};
- vdevbuffer: memory@90400000 {
+ vdev0buffer: vdev0buffer@90400000 {
compatible = "shared-dma-pool";
reg = <0 0x90400000 0 0x100000>;
no-map;
@@ -440,7 +440,7 @@ imx8qm-cm4-0 {
mboxes = <&lsio_mu5 0 1
&lsio_mu5 1 1
&lsio_mu5 3 1>;
- memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table0>;
power-domains = <&pd IMX_SC_R_M4_0_PID0>, <&pd IMX_SC_R_M4_0_MU_1A>;
@@ -455,7 +455,7 @@ imx8qm-cm4-1 {
mboxes = <&lsio_mu6 0 1
&lsio_mu6 1 1
&lsio_mu6 3 1>;
- memory-region = <&vdevbuffer>, <&vdev2vring0>, <&vdev2vring1>,
+ memory-region = <&vdev0buffer>, <&vdev2vring0>, <&vdev2vring1>,
<&vdev3vring0>, <&vdev3vring1>, <&rsc_table1>;
power-domains = <&pd IMX_SC_R_M4_1_PID0>, <&pd IMX_SC_R_M4_1_MU_1A>;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0847/2151] arm64: dts: imx8qm-mek: fix dsp reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (845 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0846/2151] arm64: dts: imx8qm-mek: " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0848/2151] arm64: dts: imx8qxp-mek: fix " Greg Kroah-Hartman
` (35 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit 2cd565bde7e872409fa468fb9410e539fb5969e4 ]
The imx_dsp_rproc driver checks for the name "vdev0buffer" to skip
mapping the vdev buffer region, as it is handled by
rproc_add_virtio_dev. With the node named "memory", the check fails
and the region gets unnecessarily mapped.
Rename the DSP reserved memory nodes to use proper names for
consistency with other remoteproc reserved memory regions and to
ensure the vdev0buffer check works correctly.
Rename the DSP reserved memory nodes to use the expected names so
the driver can correctly identify and handle each region.
Fixes: d0ee7ae8ce26 ("arm64: dts: imx8qm-mek: enable dsp node for rproc usage")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
index cea9156049b2c..16ed4bdd1d10e 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qm-mek.dts
@@ -105,17 +105,17 @@ dsp_reserved: memory@92400000 {
no-map;
};
- dsp_vdev0vring0: memory@942f0000 {
+ dsp_vdev0vring0: vdev0vring0@942f0000 {
reg = <0 0x942f0000 0 0x8000>;
no-map;
};
- dsp_vdev0vring1: memory@942f8000 {
+ dsp_vdev0vring1: vdev0vring1@942f8000 {
reg = <0 0x942f8000 0 0x8000>;
no-map;
};
- dsp_vdev0buffer: memory@94300000 {
+ dsp_vdev0buffer: vdev0buffer@94300000 {
compatible = "shared-dma-pool";
reg = <0 0x94300000 0 0x100000>;
no-map;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0848/2151] arm64: dts: imx8qxp-mek: fix reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (846 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0847/2151] arm64: dts: imx8qm-mek: fix dsp " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0849/2151] arm64: dts: imx8qxp-mek: fix dsp " Greg Kroah-Hartman
` (34 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit a9f3cf4354022ca0b4a0d12eab7af9858f71c9f7 ]
The imx_rproc driver uses node names to identify reserved memory regions.
It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the
resource table, and "vdev" prefix to filter vdev regions.
Rename the reserved memory nodes to use the expected names so the driver
can correctly identify and handle each region.
Fixes: 5fa302590f17 ("arm64: dts: imx8qxp-mek: add cm4 and related nodes")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
index eb86977040879..4279510fc5c3b 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
@@ -27,7 +27,7 @@ imx8x_cm4: imx8x-cm4 {
mboxes = <&lsio_mu5 0 1
&lsio_mu5 1 1
&lsio_mu5 3 1>;
- memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
power-domains = <&pd IMX_SC_R_M4_0_PID0>,
<&pd IMX_SC_R_M4_0_MU_1A>;
@@ -226,32 +226,32 @@ reserved-memory {
#size-cells = <2>;
ranges;
- vdev0vring0: memory@90000000 {
+ vdev0vring0: vdev0vring0@90000000 {
reg = <0 0x90000000 0 0x8000>;
no-map;
};
- vdev0vring1: memory@90008000 {
+ vdev0vring1: vdev0vring1@90008000 {
reg = <0 0x90008000 0 0x8000>;
no-map;
};
- vdev1vring0: memory@90010000 {
+ vdev1vring0: vdev1vring0@90010000 {
reg = <0 0x90010000 0 0x8000>;
no-map;
};
- vdev1vring1: memory@90018000 {
+ vdev1vring1: vdev1vring1@90018000 {
reg = <0 0x90018000 0 0x8000>;
no-map;
};
- rsc_table: memory@900ff000 {
+ rsc_table: rsc-table@900ff000 {
reg = <0 0x900ff000 0 0x1000>;
no-map;
};
- vdevbuffer: memory@90400000 {
+ vdev0buffer: vdev0buffer@90400000 {
compatible = "shared-dma-pool";
reg = <0 0x90400000 0 0x100000>;
no-map;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0849/2151] arm64: dts: imx8qxp-mek: fix dsp reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (847 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0848/2151] arm64: dts: imx8qxp-mek: fix " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0850/2151] arm64: dts: imx8ulp-evk: fix " Greg Kroah-Hartman
` (33 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit 715f8f8877d03025a2af98b4128c83441617eb74 ]
The imx_dsp_rproc driver checks for the name "vdev0buffer" to skip
mapping the vdev buffer region, as it is handled by
rproc_add_virtio_dev. With the node named "memory", the check fails
and the region gets unnecessarily mapped.
Rename the DSP reserved memory nodes to use proper names for
consistency with other remoteproc reserved memory regions and to
ensure the vdev0buffer check works correctly.
Rename the DSP reserved memory nodes to use the expected names so
the driver can correctly identify and handle each region.
Fixes: f3e22e1d8171 ("arm64: dts: imx8qxp-mek: add dsp rproc-related mem regions")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
index 4279510fc5c3b..53e71f4314b31 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
+++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
@@ -257,17 +257,17 @@ vdev0buffer: vdev0buffer@90400000 {
no-map;
};
- dsp_vdev0vring0: memory@942f0000 {
+ dsp_vdev0vring0: vdev0vring0@942f0000 {
reg = <0 0x942f0000 0 0x8000>;
no-map;
};
- dsp_vdev0vring1: memory@942f8000 {
+ dsp_vdev0vring1: vdev0vring1@942f8000 {
reg = <0 0x942f8000 0 0x8000>;
no-map;
};
- dsp_vdev0buffer: memory@94300000 {
+ dsp_vdev0buffer: vdev0buffer@94300000 {
compatible = "shared-dma-pool";
reg = <0 0x94300000 0 0x100000>;
no-map;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0850/2151] arm64: dts: imx8ulp-evk: fix reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (848 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0849/2151] arm64: dts: imx8qxp-mek: fix dsp " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0851/2151] arm64: dts: imx93-14x14-evk: " Greg Kroah-Hartman
` (32 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit f55e49b75c65c3e38e7bbe1d735f79128a50126e ]
The imx_rproc driver checks for the name "vdev0buffer" to skip mapping
the vdev buffer region, as it is handled by rproc_add_virtio_dev.
With the node named "vdevbuffer", the check fails and the region gets
unnecessarily mapped. Rename it to "vdev0buffer" to match what the
driver expects.
Fixes: 014fbffa25a7 ("arm64: dts: imx8ulp-evk: enable CM33 node")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
index 5dea66c1e7aa0..48a3e40053299 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
@@ -67,7 +67,7 @@ vdev1vring1: vdev1vring1@aff18000 {
no-map;
};
- vdevbuffer: vdevbuffer@a8400000 {
+ vdev0buffer: vdev0buffer@a8400000 {
compatible = "shared-dma-pool";
reg = <0 0xa8400000 0 0x100000>;
no-map;
@@ -126,7 +126,7 @@ &cm33 {
mboxes = <&mu 0 1>,
<&mu 1 1>,
<&mu 3 1>;
- memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0851/2151] arm64: dts: imx93-14x14-evk: fix reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (849 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0850/2151] arm64: dts: imx8ulp-evk: fix " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0852/2151] arm64: dts: imx93-9x9-qsb: " Greg Kroah-Hartman
` (31 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit e62f7ef5320d05361ee7f665568d05361b0c59d9 ]
The imx_rproc driver checks for the name "vdev0buffer" to skip mapping
the vdev buffer region, as it is handled by rproc_add_virtio_dev.
With the node named "vdevbuffer", the check fails and the region gets
unnecessarily mapped. Rename it to "vdev0buffer" to match what the
driver expects.
Fixes: 0481dadbc5e5 ("arm64: dts: imx93: support i.MX93-14x14-EVK board")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
index f9eebd27d640c..35693b2f28d0d 100644
--- a/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-14x14-evk.dts
@@ -69,7 +69,7 @@ rsc_table: rsc-table@2021e000 {
no-map;
};
- vdevbuffer: vdevbuffer@a4020000 {
+ vdev0buffer: vdev0buffer@a4020000 {
compatible = "shared-dma-pool";
reg = <0 0xa4020000 0 0x100000>;
no-map;
@@ -184,7 +184,7 @@ &cm33 {
mboxes = <&mu1 0 1>,
<&mu1 1 1>,
<&mu1 3 1>;
- memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0852/2151] arm64: dts: imx93-9x9-qsb: fix reserved memory node names for remoteproc
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (850 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0851/2151] arm64: dts: imx93-14x14-evk: " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0853/2151] PCI/IOV: Read VF config values that need not match PF Greg Kroah-Hartman
` (30 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Peng Fan, Frank Li, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit 475a58b82921cc89805b31e0bc1df91681124a3d ]
The imx_rproc driver checks for the name "vdev0buffer" to skip mapping
the vdev buffer region, as it is handled by rproc_add_virtio_dev.
With the node named "vdevbuffer", the check fails and the region gets
unnecessarily mapped. Rename it to "vdev0buffer" to match what the
driver expects.
Fixes: 0565d20cd8c2 ("arm64: dts: freescale: Support i.MX93 9x9 Quick Start Board")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts
index 197c8f8b7f669..d06d1add4bd03 100644
--- a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts
@@ -76,7 +76,7 @@ rsc_table: rsc-table@2021e000 {
no-map;
};
- vdevbuffer: vdevbuffer@a4020000 {
+ vdev0buffer: vdev0buffer@a4020000 {
compatible = "shared-dma-pool";
reg = <0 0xa4020000 0 0x100000>;
no-map;
@@ -212,7 +212,7 @@ &cm33 {
mboxes = <&mu1 0 1>,
<&mu1 1 1>,
<&mu1 3 1>;
- memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
+ memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table>;
status = "okay";
};
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0853/2151] PCI/IOV: Read VF config values that need not match PF
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (851 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0852/2151] arm64: dts: imx93-9x9-qsb: " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0854/2151] swim: Return -EROFS when opened with BLK_OPEN_WRITE flag Greg Kroah-Hartman
` (29 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Logan Odell, Bjorn Helgaas,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Logan Odell <loganodell@google.com>
[ Upstream commit ae43799529c480510dcc14bd0ed141a1d85b9259 ]
Per PCIe r7.0, sec 7.5.1.1.5 and 7.5.1.2.3, VF Revision IDs and Subsystem
IDs may differ from the PF's. Read these values from VF config space
instead of using cached values from VF 0.
Per 7.5.1.1.6 and 7.5.1.2.3, VF Class Codes and Subsystem Vendor IDs must
be the same as the PF's. Use the PF's value instead of reading from VF
config space.
Per 7.5.1.1.9, the Header Type for a VF must be 0, so hardcode that
assignment.
Fixes: cf0921bea66c ("PCI/IOV: Use VF0 cached config registers for other VFs")
Signed-off-by: Logan Odell <loganodell@google.com>
[bhelgaas: commit log, move "rev" decl inside block that uses it]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260910173648.1304517-1-loganodell@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/iov.c | 25 -------------------------
drivers/pci/pci.h | 4 ----
drivers/pci/probe.c | 15 ++++++++++-----
3 files changed, 10 insertions(+), 34 deletions(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 277a239e26e6c..e44958be4c54d 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -179,29 +179,6 @@ bool pci_iov_is_memory_decoding_enabled(struct pci_dev *dev)
return cmd & PCI_SRIOV_CTRL_MSE;
}
-static void pci_read_vf_config_common(struct pci_dev *virtfn)
-{
- struct pci_dev *physfn = virtfn->physfn;
-
- /*
- * Some config registers are the same across all associated VFs.
- * Read them once from VF0 so we can skip reading them from the
- * other VFs.
- *
- * PCIe r4.0, sec 9.3.4.1, technically doesn't require all VFs to
- * have the same Revision ID and Subsystem ID, but we assume they
- * do.
- */
- pci_read_config_dword(virtfn, PCI_CLASS_REVISION,
- &physfn->sriov->class);
- pci_read_config_byte(virtfn, PCI_HEADER_TYPE,
- &physfn->sriov->hdr_type);
- pci_read_config_word(virtfn, PCI_SUBSYSTEM_VENDOR_ID,
- &physfn->sriov->subsystem_vendor);
- pci_read_config_word(virtfn, PCI_SUBSYSTEM_ID,
- &physfn->sriov->subsystem_device);
-}
-
int pci_iov_sysfs_link(struct pci_dev *dev,
struct pci_dev *virtfn, int id)
{
@@ -329,8 +306,6 @@ static struct pci_dev *pci_iov_scan_device(struct pci_dev *dev, int id,
virtfn->physfn = pci_dev_get(dev);
virtfn->no_command_memory = 1;
- if (id == 0)
- pci_read_vf_config_common(virtfn);
rc = pci_setup_device(virtfn);
if (rc) {
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index fd302523f5a04..3c37eac6273d5 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -617,10 +617,6 @@ struct pci_sriov {
u16 driver_max_VFs; /* Max num VFs driver supports */
struct pci_dev *dev; /* Lowest numbered PF */
struct pci_dev *self; /* This PF */
- u32 class; /* VF device */
- u8 hdr_type; /* VF header type */
- u16 subsystem_vendor; /* VF subsystem vendor */
- u16 subsystem_device; /* VF subsystem device */
resource_size_t barsz[PCI_SRIOV_NUM_BARS]; /* VF BAR size */
u16 vf_rebar_cap; /* VF Resizable BAR capability offset */
bool drivers_autoprobe; /* Auto probing of VFs by driver */
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 082c51ce88936..8ba97205be82a 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1873,8 +1873,13 @@ static u32 pci_class(struct pci_dev *dev)
u32 class;
#ifdef CONFIG_PCI_IOV
- if (dev->is_virtfn)
- return dev->physfn->sriov->class;
+ if (dev->is_virtfn) {
+ u8 rev;
+
+ if (pci_read_config_byte(dev, PCI_REVISION_ID, &rev))
+ rev = 0;
+ return (dev->physfn->class << 8) | rev;
+ }
#endif
pci_read_config_dword(dev, PCI_CLASS_REVISION, &class);
return class;
@@ -1884,8 +1889,8 @@ static void pci_subsystem_ids(struct pci_dev *dev, u16 *vendor, u16 *device)
{
#ifdef CONFIG_PCI_IOV
if (dev->is_virtfn) {
- *vendor = dev->physfn->sriov->subsystem_vendor;
- *device = dev->physfn->sriov->subsystem_device;
+ *vendor = dev->physfn->subsystem_vendor;
+ pci_read_config_word(dev, PCI_SUBSYSTEM_ID, device);
return;
}
#endif
@@ -1899,7 +1904,7 @@ static u8 pci_hdr_type(struct pci_dev *dev)
#ifdef CONFIG_PCI_IOV
if (dev->is_virtfn)
- return dev->physfn->sriov->hdr_type;
+ return 0;
#endif
pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type);
return hdr_type;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0854/2151] swim: Return -EROFS when opened with BLK_OPEN_WRITE flag
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (852 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0853/2151] PCI/IOV: Read VF config values that need not match PF Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0855/2151] swim: Fix FDEJECT ioctl for exclusive open Greg Kroah-Hartman
` (28 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stan Johnson, Finn Thain, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit d8fe777978a12a96cb5d10d6d888720fcba2da2b ]
Write requests are not supported by the driver and produce IO errors as
shown below. Avoid this by returning -EROFS when opened for writing.
[ 4111.690000] I/O error, dev fd0, sector 2 op 0x1:(WRITE) flags 0x800800 phys_seg 1 prio class 2
[ 4111.700000] Buffer I/O error on dev fd0, logical block 2, lost async page write
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Link: https://patch.msgid.link/327be6ca3c92c3411b5dfaeede014ed65a2d0f0f.1790641175.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 2fdf36868155e..9057dca830c5f 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -630,7 +630,8 @@ static int floppy_open(struct gendisk *disk, blk_mode_t mode)
if (mode & (BLK_OPEN_READ | BLK_OPEN_WRITE)) {
if (disk_check_media_change(disk) && fs->disk_in)
fs->ejected = 0;
- if ((mode & BLK_OPEN_WRITE) && fs->write_protected) {
+ if (mode & BLK_OPEN_WRITE) {
+ /* Write support isn't implemented. */
err = -EROFS;
goto out;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0855/2151] swim: Fix FDEJECT ioctl for exclusive open
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (853 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0854/2151] swim: Return -EROFS when opened with BLK_OPEN_WRITE flag Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0856/2151] swim3: " Greg Kroah-Hartman
` (27 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stan Johnson, Finn Thain, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit c76b93df9ae61d8ddebf6aa3bc218252f85e80c6 ]
The eject command from the util-linux package does not work with the swim
driver: the drive doesn't eject anything and the command fails.
Apparently, ioctl(fd, FDEJECT) returns -EBUSY when fd is opened O_EXCL.
Fix this by checking ref_count for either 1 or -1. Either value means that
the caller is the sole user of the disk.
Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Link: https://patch.msgid.link/ae3ee8e86833a2739d7857460cbe2addf4146088.1790641175.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 9057dca830c5f..9c63e67c556c7 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -691,10 +691,11 @@ static int floppy_ioctl(struct block_device *bdev, blk_mode_t mode,
switch (cmd) {
case FDEJECT:
- if (fs->ref_count != 1)
- return -EBUSY;
mutex_lock(&swim_mutex);
- err = floppy_eject(fs);
+ if (fs->ref_count == -1 || fs->ref_count == 1)
+ err = floppy_eject(fs);
+ else
+ err = -EBUSY;
mutex_unlock(&swim_mutex);
return err;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0856/2151] swim3: Fix FDEJECT ioctl for exclusive open
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (854 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0855/2151] swim: Fix FDEJECT ioctl for exclusive open Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0857/2151] RDMA/bnxt_re: Fix integer overflow in send payload size computation Greg Kroah-Hartman
` (26 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Stan Johnson, Finn Thain, Jens Axboe,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Finn Thain <fthain@linux-m68k.org>
[ Upstream commit ce054fbe9a4bf4ffefef0f8e2504ea54da058ed2 ]
The eject command from the util-linux package does not work with the
swim3 driver: the drive doesn't eject anything and the command fails.
Apparently, ioctl(fd, FDEJECT) returns -EBUSY after fd was opened O_EXCL.
Fix this by checking ref_count for either 1 or -1. Either value means that
the caller is the sole user of the disk.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Link: https://patch.msgid.link/f4cb43726ee6f1cf159a6208f77b4cceea670a3c.1790641175.git.fthain@linux-m68k.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/swim3.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 01f7aef3fcfbc..b55cfe485bebd 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -887,7 +887,6 @@ static int floppy_locked_ioctl(struct block_device *bdev, blk_mode_t mode,
unsigned int cmd, unsigned long param)
{
struct floppy_state *fs = bdev->bd_disk->private_data;
- int err;
if ((cmd & 0x80) && !capable(CAP_SYS_ADMIN))
return -EPERM;
@@ -898,10 +897,9 @@ static int floppy_locked_ioctl(struct block_device *bdev, blk_mode_t mode,
switch (cmd) {
case FDEJECT:
- if (fs->ref_count != 1)
- return -EBUSY;
- err = fd_eject(fs);
- return err;
+ if (fs->ref_count == -1 || fs->ref_count == 1)
+ return fd_eject(fs);
+ return -EBUSY;
case FDGETPRM:
if (copy_to_user((void __user *) param, &floppy_type,
sizeof(struct floppy_struct)))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0857/2151] RDMA/bnxt_re: Fix integer overflow in send payload size computation
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (855 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0856/2151] swim3: " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0858/2151] RDMA/bnxt_re: Detect wrong sge_len passed for inline Greg Kroah-Hartman
` (25 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Selvin Xavier, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <selvin.xavier@broadcom.com>
[ Upstream commit 3483cbbd7487163345b4b4d5eb8cad8540d1c3ba ]
bnxt_re_build_sgl() summed SGE lengths into a signed int, which could
overflow. Make it return u32, and have bnxt_re_copy_wr_payload() report
the size via a u32 out-parameter with the return value carrying only
the error status, instead of overloading a signed int with both.
Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 44 +++++++++++++-----------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index fcd57d34ee072..0252cd6711a1a 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -165,10 +165,11 @@ static void bnxt_re_check_and_set_relaxed_ordering(struct bnxt_re_dev *rdev,
qplib_mr->flags |= CMDQ_REGISTER_MR_FLAGS_ENABLE_RO;
}
-static int bnxt_re_build_sgl(struct ib_sge *ib_sg_list,
+static u32 bnxt_re_build_sgl(struct ib_sge *ib_sg_list,
struct bnxt_qplib_sge *sg_list, int num)
{
- int i, total = 0;
+ u32 total = 0;
+ int i;
for (i = 0; i < num; i++) {
sg_list[i].addr = ib_sg_list[i].addr;
@@ -2793,17 +2794,22 @@ static int bnxt_re_copy_inline_data(struct bnxt_re_dev *rdev,
static int bnxt_re_copy_wr_payload(struct bnxt_re_dev *rdev,
const struct ib_send_wr *wr,
- struct bnxt_qplib_swqe *wqe)
+ struct bnxt_qplib_swqe *wqe,
+ u32 *payload_sz)
{
- int payload_sz = 0;
+ int rc;
- if (wr->send_flags & IB_SEND_INLINE)
- payload_sz = bnxt_re_copy_inline_data(rdev, wr, wqe);
- else
- payload_sz = bnxt_re_build_sgl(wr->sg_list, wqe->sg_list,
- wqe->num_sge);
+ if (wr->send_flags & IB_SEND_INLINE) {
+ rc = bnxt_re_copy_inline_data(rdev, wr, wqe);
+ if (rc < 0)
+ return rc;
+ *payload_sz = rc;
+ } else {
+ *payload_sz = bnxt_re_build_sgl(wr->sg_list, wqe->sg_list,
+ wqe->num_sge);
+ }
- return payload_sz;
+ return 0;
}
static void bnxt_ud_qp_hw_stall_workaround(struct bnxt_re_qp *qp)
@@ -2826,7 +2832,8 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev,
struct bnxt_re_qp *qp,
const struct ib_send_wr *wr)
{
- int rc = 0, payload_sz = 0;
+ int rc = 0;
+ u32 payload_sz = 0;
unsigned long flags;
spin_lock_irqsave(&qp->sq_lock, flags);
@@ -2842,11 +2849,9 @@ static int bnxt_re_post_send_shadow_qp(struct bnxt_re_dev *rdev,
goto bad;
}
- payload_sz = bnxt_re_copy_wr_payload(qp->rdev, wr, &wqe);
- if (payload_sz < 0) {
- rc = -EINVAL;
+ rc = bnxt_re_copy_wr_payload(qp->rdev, wr, &wqe, &payload_sz);
+ if (rc)
goto bad;
- }
wqe.wr_id = wr->wr_id;
wqe.type = BNXT_QPLIB_SWQE_TYPE_SEND;
@@ -2887,7 +2892,8 @@ int bnxt_re_post_send(struct ib_qp *ib_qp, const struct ib_send_wr *wr,
{
struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp);
struct bnxt_qplib_swqe wqe;
- int rc = 0, payload_sz = 0;
+ int rc = 0;
+ u32 payload_sz = 0;
unsigned long flags;
spin_lock_irqsave(&qp->sq_lock, flags);
@@ -2904,11 +2910,9 @@ int bnxt_re_post_send(struct ib_qp *ib_qp, const struct ib_send_wr *wr,
goto bad;
}
- payload_sz = bnxt_re_copy_wr_payload(qp->rdev, wr, &wqe);
- if (payload_sz < 0) {
- rc = -EINVAL;
+ rc = bnxt_re_copy_wr_payload(qp->rdev, wr, &wqe, &payload_sz);
+ if (rc)
goto bad;
- }
wqe.wr_id = wr->wr_id;
switch (wr->opcode) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0858/2151] RDMA/bnxt_re: Detect wrong sge_len passed for inline
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (856 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0857/2151] RDMA/bnxt_re: Fix integer overflow in send payload size computation Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0859/2151] RDMA/bnxt_re: Validate SRQ max_sge at create time Greg Kroah-Hartman
` (24 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kalesh AP, Selvin Xavier,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <selvin.xavier@broadcom.com>
[ Upstream commit 81551ece0864c346080d241719d458c93f0e7fc9 ]
Avoid handling wrong sge_len by adding extra check
to see if the passed length is more than the inline
size supported.
Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 0252cd6711a1a..7c8aad8a12405 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -2777,8 +2777,9 @@ static int bnxt_re_copy_inline_data(struct bnxt_re_dev *rdev,
wr->sg_list[i].addr;
sge_len = wr->sg_list[i].length;
- if ((sge_len + wqe->inline_len) >
- BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH) {
+ if (sge_len > BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH ||
+ ((sge_len + wqe->inline_len) >
+ BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH)) {
ibdev_err(&rdev->ibdev,
"Inline data size requested > supported value");
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0859/2151] RDMA/bnxt_re: Validate SRQ max_sge at create time
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (857 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0858/2151] RDMA/bnxt_re: Detect wrong sge_len passed for inline Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0860/2151] RDMA/bnxt_re: Initialize wqe.flags in bnxt_re_post_srq_recv() Greg Kroah-Hartman
` (23 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Selvin Xavier, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <selvin.xavier@broadcom.com>
[ Upstream commit 1894ed9a664d19c190ce1bd2146759efbae77e4b ]
bnxt_re_create_srq() stored attr.max_sge into srq->qplib_srq.max_sge
unvalidated, which defeats the num_sge check in
bnxt_re_post_srq_recv() since that check compares against this same
attacker-chosen value. Reject max_sge > dev_attr->max_srq_sges at
create time, and clamp dev_attr->max_srq_sges to BNXT_STATIC_MAX_SGE
since SRQ WQEs use the fixed-size SGE array.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 ++++++++
drivers/infiniband/hw/bnxt_re/qplib_sp.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 7c8aad8a12405..656b39753f353 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -1897,6 +1897,14 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq,
goto exit;
}
+ if (srq_init_attr->attr.max_sge > dev_attr->max_srq_sges) {
+ ibdev_err(&rdev->ibdev,
+ "Create SRQ failed - max_sge %d exceeds supported %d",
+ srq_init_attr->attr.max_sge, dev_attr->max_srq_sges);
+ rc = -EINVAL;
+ goto exit;
+ }
+
if (srq_init_attr->srq_type != IB_SRQT_BASIC) {
rc = -EOPNOTSUPP;
goto exit;
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
index 408a34df26672..5036cc2c2cd6f 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
@@ -160,7 +160,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw)
attr->max_srq = le16_to_cpu(sb->max_srq);
attr->max_srq_wqes = le32_to_cpu(sb->max_srq_wr) - 1;
- attr->max_srq_sges = sb->max_srq_sge;
+ attr->max_srq_sges = min_t(u32, sb->max_srq_sge, BNXT_STATIC_MAX_SGE);
attr->max_pkey = 1;
attr->max_inline_data = attr->max_qp_sges * sizeof(struct sq_sge);
if (!bnxt_qplib_is_chip_gen_p7(rcfw->res->cctx))
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0860/2151] RDMA/bnxt_re: Initialize wqe.flags in bnxt_re_post_srq_recv()
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (858 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0859/2151] RDMA/bnxt_re: Validate SRQ max_sge at create time Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0861/2151] RDMA/bnxt_re: Fix the PD and DPI table size Greg Kroah-Hartman
` (22 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Selvin Xavier, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <selvin.xavier@broadcom.com>
[ Upstream commit 4d8168a3b7c93385c11dc836df569d337089b218 ]
wqe is declared once above the WR loop and never zeroed, so
wqe.flags holds indeterminate stack contents on the first WR and the
previous WR's stale value thereafter. This propagates straight into
the hardware-visible srqe->flags in bnxt_qplib_post_srq_recv().
Most values of the wqe struct is set except flags. So initialize
flags also.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 656b39753f353..6e29ffc0704b8 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -2042,6 +2042,7 @@ int bnxt_re_post_srq_recv(struct ib_srq *ib_srq, const struct ib_recv_wr *wr,
spin_lock_irqsave(&srq->lock, flags);
while (wr) {
/* Transcribe each ib_recv_wr to qplib_swqe */
+ wqe.flags = 0;
wqe.num_sge = wr->num_sge;
bnxt_re_build_sgl(wr->sg_list, wqe.sg_list, wr->num_sge);
wqe.wr_id = wr->wr_id;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0861/2151] RDMA/bnxt_re: Fix the PD and DPI table size
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (859 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0860/2151] RDMA/bnxt_re: Initialize wqe.flags in bnxt_re_post_srq_recv() Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0862/2151] RDMA/bnxt_re: Use bnxt_ext_stats_supported for counter count selection Greg Kroah-Hartman
` (21 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Selvin Xavier, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <selvin.xavier@broadcom.com>
[ Upstream commit aa6c2ef821a6ba7f3fd58cfcc031b2d16f3811c6 ]
The PD and DPI bitmaps were sized as max >> 3 (bytes),
but bitmap ops (set_bit(), clear_bit(), find_first_bit(),
test_and_set_bit()) operate on whole unsigned long words,
so whenever max isn't a multiple of BITS_PER_LONG,
the buffer under-allocates and the top word's bitops
read/write past the end of the kmalloc()'d buffer.
Most exposed on the DPI table, since dpit->max comes from the
firmware-reported dev_attr->max_dpi with no alignment guarantee.
Fix the size of both allocations with
BITS_TO_LONGS(max) * sizeof(unsigned long).
Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/bnxt_re/qplib_res.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.c b/drivers/infiniband/hw/bnxt_re/qplib_res.c
index 0fcea79eb110d..d92db77e7ed50 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.c
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.c
@@ -45,6 +45,7 @@
#include <linux/dma-mapping.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
+#include <linux/bitops.h>
#include <rdma/ib_verbs.h>
#include <rdma/iter.h>
@@ -668,9 +669,9 @@ static int bnxt_qplib_alloc_pd_tbl(struct bnxt_qplib_res *res,
{
u32 bytes;
- bytes = max >> 3;
+ bytes = BITS_TO_LONGS(max) * sizeof(unsigned long);
if (!bytes)
- bytes = 1;
+ bytes = sizeof(unsigned long);
pdt->tbl = kmalloc(bytes, GFP_KERNEL);
if (!pdt->tbl)
return -ENOMEM;
@@ -805,9 +806,9 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res,
if (!dpit->app_tbl)
return -ENOMEM;
- bytes = dpit->max >> 3;
+ bytes = BITS_TO_LONGS(dpit->max) * sizeof(unsigned long);
if (!bytes)
- bytes = 1;
+ bytes = sizeof(unsigned long);
dpit->tbl = kmalloc(bytes, GFP_KERNEL);
if (!dpit->tbl) {
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0862/2151] RDMA/bnxt_re: Use bnxt_ext_stats_supported for counter count selection
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (860 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0861/2151] RDMA/bnxt_re: Fix the PD and DPI table size Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0863/2151] media: venus: Drop session events without an instance Greg Kroah-Hartman
` (20 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kalesh AP, Selvin Xavier,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Selvin Xavier <selvin.xavier@broadcom.com>
[ Upstream commit 7cc8ccb157a4769c8fbce8296532dcb8a8ea0d5e ]
Selecting between BNXT_RE_NUM_EXT_COUNTERS and
BNXT_RE_NUM_STD_COUNTERS relied only on
bnxt_qplib_is_chip_gen_p5_p7(), which doesn't account for the
extended stats capability flag or the PF/VF restriction. Use
bnxt_ext_stats_supported() instead, matching the check already
used to populate the extended stats, so the counter count stays
consistent with what gets filled in.
Fixes: 8238c7bd8420 ("RDMA/bnxt_re: Fix the statistics for Gen P7 VF")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/bnxt_re/hw_counters.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/hw_counters.c b/drivers/infiniband/hw/bnxt_re/hw_counters.c
index 651cf9d0e0c7c..575b97030587e 100644
--- a/drivers/infiniband/hw/bnxt_re/hw_counters.c
+++ b/drivers/infiniband/hw/bnxt_re/hw_counters.c
@@ -413,7 +413,8 @@ int bnxt_re_ib_get_hw_stats(struct ib_device *ibdev,
}
done:
- return bnxt_qplib_is_chip_gen_p5_p7(rdev->chip_ctx) ?
+ return bnxt_ext_stats_supported(rdev->chip_ctx, rdev->dev_attr->dev_cap_flags,
+ rdev->is_virtfn) ?
BNXT_RE_NUM_EXT_COUNTERS : BNXT_RE_NUM_STD_COUNTERS;
}
@@ -423,7 +424,8 @@ struct rdma_hw_stats *bnxt_re_ib_alloc_hw_port_stats(struct ib_device *ibdev,
struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev);
int num_counters = 0;
- if (bnxt_qplib_is_chip_gen_p5_p7(rdev->chip_ctx))
+ if (bnxt_ext_stats_supported(rdev->chip_ctx, rdev->dev_attr->dev_cap_flags,
+ rdev->is_virtfn))
num_counters = BNXT_RE_NUM_EXT_COUNTERS;
else
num_counters = BNXT_RE_NUM_STD_COUNTERS;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0863/2151] media: venus: Drop session events without an instance
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (861 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0862/2151] RDMA/bnxt_re: Use bnxt_ext_stats_supported for counter count selection Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0864/2151] media: iris: cancel sys error work on driver removal Greg Kroah-Hartman
` (19 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ruoyu Wang, Bryan ODonoghue,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ruoyu Wang <ruoyuw560@gmail.com>
[ Upstream commit 8921f6da06fd869b6f1aa8d02e40a4e2e2a45fe4 ]
hfi_process_msg_packet() intentionally allows HFI_MSG_EVENT_NOTIFY
packets without a matching session instance because HFI_EVENT_SYS_ERROR
is a system event and has no session attached.
That exception currently applies to every event-notify packet. If the
firmware reports a late or otherwise invalid session event after
to_instance() fails, hfi_event_notify() can dispatch it to session-only
handlers such as event_seq_changed() or event_release_buffer_ref(), which
dereference inst.
Only system errors are valid without a session instance. Drop other
event notifications before the session event handlers can dereference a
NULL inst.
This issue was found by a static analysis checker and confirmed by
manual source review.
Fixes: 09c2845e8fe4 ("[media] media: venus: hfi: add Host Firmware Interface (HFI)")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/venus/hfi_msgs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/hfi_msgs.c b/drivers/media/platform/qcom/venus/hfi_msgs.c
index 47b99d5b5af73..3135c1024fb1f 100644
--- a/drivers/media/platform/qcom/venus/hfi_msgs.c
+++ b/drivers/media/platform/qcom/venus/hfi_msgs.c
@@ -230,6 +230,9 @@ static void hfi_event_notify(struct venus_core *core, struct venus_inst *inst,
if (!packet)
return;
+ if (!inst && pkt->event_id != HFI_EVENT_SYS_ERROR)
+ return;
+
switch (pkt->event_id) {
case HFI_EVENT_SYS_ERROR:
event_sys_error(core, EVT_SYS_ERROR, pkt);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0864/2151] media: iris: cancel sys error work on driver removal
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (862 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0863/2151] media: venus: Drop session events without an instance Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0865/2151] rnull: configfs: add power to configfs features Greg Kroah-Hartman
` (18 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hungyu Lin, Vishnu Reddy,
Dmitry Baryshkov, Bryan ODonoghue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hungyu Lin <dennylin0707@gmail.com>
[ Upstream commit 4524809316482b64ff092afb7e7b0525ce137c75 ]
Cancel sys_error_handler before tearing down the driver.
The delayed work may still be pending when iris_remove()
runs. Since iris_core is allocated with devm_kzalloc(),
allowing the work to execute after driver removal could
result in accessing freed memory.
Fixes: fb583a214337 ("media: iris: introduce host firmware interface with necessary hooks")
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: Fixed patch title]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/iris/iris_probe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
index b6251493bd9cc..e9f30093afa2d 100644
--- a/drivers/media/platform/qcom/iris/iris_probe.c
+++ b/drivers/media/platform/qcom/iris/iris_probe.c
@@ -254,6 +254,8 @@ static void iris_remove(struct platform_device *pdev)
if (!core)
return;
+ cancel_delayed_work_sync(&core->sys_error_handler);
+
iris_core_deinit(core);
video_unregister_device(core->vdev_dec);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0865/2151] rnull: configfs: add power to configfs features
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (863 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0864/2151] media: iris: cancel sys error work on driver removal Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0867/2151] media: iris: take core lock when scanning the instance list Greg Kroah-Hartman
` (17 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Malte Wechter, Andreas Hindborg,
Jens Axboe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malte Wechter <maltewechter@gmail.com>
[ Upstream commit 0cd698e89375d0dfc257f9ae978420aa7fe5359d ]
features displayed by configfs for rnull was inconsistent with the
actual features available. This correctly exposes `power` as a feature,
which is also consistent with the C null_blk driver.
Fixes: d969d504bc13 ("rnull: enable configuration via `configfs`")
Signed-off-by: Malte Wechter <maltewechter@gmail.com>
Link: https://msgid.link/20260924-upstream-v7-3-rc3-v2-1-ca56ae7a73e9@gmail.com
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://patch.msgid.link/20260929-rust-block-for-v7-4-rc1-b4-v1-8-642a4c1aebd7@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/rnull/configfs.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/rnull/configfs.rs b/drivers/block/rnull/configfs.rs
index 8498e9bae6fd1..5c08edc7f2840 100644
--- a/drivers/block/rnull/configfs.rs
+++ b/drivers/block/rnull/configfs.rs
@@ -36,7 +36,7 @@ impl AttributeOperations<0> for Config {
fn show(_this: &Config, page: &mut [u8; PAGE_SIZE]) -> Result<usize> {
let mut writer = kernel::str::Formatter::new(page);
- writer.write_str("blocksize,size,rotational,irqmode\n")?;
+ writer.write_str("blocksize,size,rotational,irqmode,power\n")?;
Ok(writer.bytes_written())
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0867/2151] media: iris: take core lock when scanning the instance list
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (864 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0865/2151] rnull: configfs: add power to configfs features Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0868/2151] media: iris: reject open() when the session limit is reached Greg Kroah-Hartman
` (16 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitry Baryshkov, Konrad Dybcio,
Bryan ODonoghue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[ Upstream commit 428e6f95e685a06a73868aee95dd94dca7b3a027 ]
iris_check_session_supported() walks core->instances to confirm the
current instance is registered, but does so without holding core->lock.
A concurrent iris_close() takes core->lock and removes a (possibly
different) instance from the list via list_del_init() before freeing it,
so the lockless traversal can follow a freed pointer and dereference it,
resulting in a use-after-free.
Hold core->lock across the list traversal, matching the other iterators
over core->instances such as iris_check_core_mbpf(). The lock is dropped
before iris_check_core_mbpf() is called so the nesting is unchanged.
Fixes: bdbe1cac0c10 ("media: iris: add check whether the video session is supported or not")
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/iris/iris_vb2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c
index bf0b8400996ec..6cc50750be716 100644
--- a/drivers/media/platform/qcom/iris/iris_vb2.c
+++ b/drivers/media/platform/qcom/iris/iris_vb2.c
@@ -56,10 +56,14 @@ static int iris_check_session_supported(struct iris_inst *inst)
bool found = false;
int ret;
+ mutex_lock(&core->lock);
list_for_each_entry(instance, &core->instances, list) {
- if (instance == inst)
+ if (instance == inst) {
found = true;
+ break;
+ }
}
+ mutex_unlock(&core->lock);
if (!found) {
ret = -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0868/2151] media: iris: reject open() when the session limit is reached
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (865 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0867/2151] media: iris: take core lock when scanning the instance list Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0876/2151] RDMA/rtrs-clt: Reject invalid queue_depth from the peer Greg Kroah-Hartman
` (15 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitry Baryshkov, Konrad Dybcio,
Bryan ODonoghue, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[ Upstream commit 397ebadcbc219f6c20d11c0378d8cb7695d015c2 ]
iris_add_session() silently skips adding the instance to core->instances
once max_session_count is reached, but returns void, so iris_open()
continues as if it succeeded and hands a file descriptor back to
userspace. As the instance is not on core->instances, firmware responses
for it are dropped and every subsequent ioctl times out.
Make iris_add_session() return an error when the limit is reached and
fail iris_open() accordingly, freeing the partially initialised instance.
Fixes: 38fc8beaba55 ("media: iris: implement reqbuf ioctl with vb2_queue_setup")
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/qcom/iris/iris_vidc.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/platform/qcom/iris/iris_vidc.c
index b916e8c8a6456..2ebccd9455cf3 100644
--- a/drivers/media/platform/qcom/iris/iris_vidc.c
+++ b/drivers/media/platform/qcom/iris/iris_vidc.c
@@ -39,21 +39,23 @@ static void iris_v4l2_fh_deinit(struct iris_inst *inst, struct file *filp)
v4l2_fh_exit(&inst->fh);
}
-static void iris_add_session(struct iris_inst *inst)
+static int iris_add_session(struct iris_inst *inst)
{
struct iris_core *core = inst->core;
struct iris_inst *iter;
u32 count = 0;
- mutex_lock(&core->lock);
+ guard(mutex)(&core->lock);
list_for_each_entry(iter, &core->instances, list)
count++;
- if (count < core->iris_platform_data->max_session_count)
- list_add_tail(&inst->list, &core->instances);
+ if (count >= core->iris_platform_data->max_session_count)
+ return -EBUSY;
- mutex_unlock(&core->lock);
+ list_add_tail(&inst->list, &core->instances);
+
+ return 0;
}
static void iris_remove_session(struct iris_inst *inst)
@@ -202,12 +204,17 @@ int iris_open(struct file *filp)
if (ret)
goto fail_m2m_ctx_release;
- iris_add_session(inst);
+ ret = iris_add_session(inst);
+ if (ret)
+ goto fail_inst_deinit;
inst->fh.m2m_ctx = inst->m2m_ctx;
return 0;
+fail_inst_deinit:
+ kfree(inst->fmt_src);
+ kfree(inst->fmt_dst);
fail_m2m_ctx_release:
v4l2_m2m_ctx_release(inst->m2m_ctx);
fail_m2m_release:
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0876/2151] RDMA/rtrs-clt: Reject invalid queue_depth from the peer
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (866 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0868/2151] media: iris: reject open() when the session limit is reached Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0877/2151] RDMA/rxe: Reject prefetch of a non-ODP MR Greg Kroah-Hartman
` (14 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Farhad Alemi, Quanye Yang, Jack Wang,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quanye Yang <quanyeyang@proton.me>
[ Upstream commit 724cd362162ca7ca5a250bec65efd74f7dad9f5c ]
queue_depth is taken from the server's CM private_data and later
used as a session invariant. A peer can send 0, which the client
stores and then trips WARN_ON() in create_con_cq_qp() when the
next connection is set up.
Reject a zero queue_depth on ESTABLISHED, same as a bad
magic or version, and fail the handshake with -ECONNRESET.
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu>
Closes: https://lore.kernel.org/linux-rdma/CA+0ovCg_sG8gaZXXj9zmOrpxRt=8+-x9wvycVNUKwWmMbr6-Yg@mail.gmail.com
Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Link: https://patch.msgid.link/20260922-rtrs-fix-warning-rtrs-clt-rdma-cm-handler-v1-1-2076c0ee1455@proton.me
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/ulp/rtrs/rtrs-clt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index fea3b17611c50..96f76dfe18619 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1859,6 +1859,10 @@ static int rtrs_rdma_conn_established(struct rtrs_clt_con *con,
}
if (con->c.cid == 0) {
queue_depth = le16_to_cpu(msg->queue_depth);
+ if (!queue_depth) {
+ rtrs_err(clt, "Invalid queue depth %u\n", queue_depth);
+ return -ECONNRESET;
+ }
if (clt_path->queue_depth > 0 && queue_depth != clt_path->queue_depth) {
rtrs_err(clt, "Error: queue depth changed\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0877/2151] RDMA/rxe: Reject prefetch of a non-ODP MR
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (867 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0876/2151] RDMA/rtrs-clt: Reject invalid queue_depth from the peer Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0878/2151] RDMA/ionic: Fix XArray initialization to use XArray flags Greg Kroah-Hartman
` (13 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Norbert Szetei, Zhu Yanjun,
Leon Romanovsky, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Norbert Szetei <norbert@doyensec.com>
[ Upstream commit 66f18a749a3eeeb19f0b7812ecbe8b1ac18d73ec ]
rxe_ib_advise_mr_prefetch() and rxe_ib_prefetch_sg_list() look up the MR
by lkey and hand it to rxe_odp_do_pagefault_and_lock() without checking
that it is an ODP MR. That path runs to_ib_umem_odp() on mr->umem, and
for a non-ODP MR mr->umem is a plain struct ib_umem from ib_umem_get(),
so the container_of() in to_ib_umem_odp() lands past the end of the
object and ib_umem_odp_map_dma_and_lock() reads its ib_umem_odp fields
out of bounds.
lookup_mr() validates the lkey, PD, access and state but not the MR
type, and IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH is accepted for any MR.
BUG: KASAN: slab-out-of-bounds in ib_umem_odp_map_dma_and_lock+0x884/0x8a0
Read of size 8 at addr ffff88810a3ebcf0 by task advi/921
ib_umem_odp_map_dma_and_lock+0x884/0x8a0
rxe_ib_advise_mr+0x543/0xad0
ib_uverbs_handler_UVERBS_METHOD_ADVISE_MR+0x446/0x530
ib_uverbs_cmd_verbs+0x2b3c/0x3b20
ib_uverbs_ioctl+0x1e3/0x310
Allocated by task 921:
__ib_umem_get_va+0x13e/0xae0
rxe_mr_init_user+0x2ae/0xb00
rxe_reg_user_mr+0x337/0x510
The buggy address belongs to the object at ffff88810a3ebc80
which belongs to the cache kmalloc-96 of size 96
Ask lookup_mr() for IB_ACCESS_ON_DEMAND in both the synchronous and
the asynchronous prefetch arm. mr->access carries that flag only for
an MR registered as ODP, so the existing
(access & mr->access) != access test rejects a plain MR and the
prefetch fails with -EINVAL.
Fixes: 3576b0df1588 ("RDMA/rxe: Implement synchronous prefetch for ODP MRs")
Signed-off-by: Norbert Szetei <norbert@doyensec.com>
Link: https://patch.msgid.link/20260923-rxe-advise-mr-v3-v3-2-95e1a4077e4d@doyensec.com
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/sw/rxe/rxe_odp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_odp.c b/drivers/infiniband/sw/rxe/rxe_odp.c
index 995c1cb5c958e..567b1cb96a950 100644
--- a/drivers/infiniband/sw/rxe/rxe_odp.c
+++ b/drivers/infiniband/sw/rxe/rxe_odp.c
@@ -476,7 +476,7 @@ static int rxe_ib_prefetch_sg_list(struct ib_pd *ibpd,
struct rxe_mr *mr;
struct ib_umem_odp *umem_odp;
- mr = lookup_mr(pd, IB_ACCESS_LOCAL_WRITE,
+ mr = lookup_mr(pd, IB_ACCESS_LOCAL_WRITE | IB_ACCESS_ON_DEMAND,
sg_list[i].lkey, RXE_LOOKUP_LOCAL);
if (!mr) {
@@ -542,7 +542,7 @@ static int rxe_ib_advise_mr_prefetch(struct ib_pd *ibpd,
for (i = 0; i < num_sge; ++i) {
/* Takes a reference, which will be released in the queued work */
- mr = lookup_mr(pd, IB_ACCESS_LOCAL_WRITE,
+ mr = lookup_mr(pd, IB_ACCESS_LOCAL_WRITE | IB_ACCESS_ON_DEMAND,
sg_list[i].lkey, RXE_LOOKUP_LOCAL);
if (!mr) {
mr = ERR_PTR(-EINVAL);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0878/2151] RDMA/ionic: Fix XArray initialization to use XArray flags
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (868 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0877/2151] RDMA/rxe: Reject prefetch of a non-ODP MR Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0879/2151] RDMA/ionic: Fix double removal of CMB mmap entries in create QP error path Greg Kroah-Hartman
` (12 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abhijit Gangurde, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abhijit Gangurde <abhijit.gangurde@amd.com>
[ Upstream commit 2eca9c14e66a1f71c089fe5c3afb2d339da3023a ]
xa_init_flags() takes XArray flags (XA_FLAGS_*), not gfp flags, even
though the parameter is typed gfp_t. Passing GFP_ATOMIC leaves both
lock-type bits clear, so xa_lock_type() resolves to XA_LOCK_NORMAL for
qp_tbl and cq_tbl.
Both tables are used with the IRQ-safe accessors: xa_store_irq() with
GFP_KERNEL from process context, and xa_lock_irqsave() from the event
queue path. When a store needs to grow the tree, __xas_nomem() drops
the lock using the recorded lock type before allocating:
if (gfpflags_allow_blocking(gfp)) {
xas_unlock_type(xas, lock_type);
xas->xa_alloc = kmem_cache_alloc_lru(...);
xas_lock_type(xas, lock_type);
}
With XA_LOCK_NORMAL that is a plain spin_unlock(), so the sleeping
GFP_KERNEL allocation runs with interrupts still disabled by
xa_store_irq(), and lockdep annotates the lock with the wrong class.
GFP_ATOMIC also happens to set __GFP_HIGH (0x20), which collides with
XA_FLAGS_ACCOUNT (32U) and silently enables memcg accounting of the
XArray nodes.
Use XA_FLAGS_LOCK_IRQ so the lock type matches how the tables are
actually accessed.
Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path")
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Link: https://patch.msgid.link/20260925093638.3032149-1-abhijit.gangurde@amd.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/ionic/ionic_ibdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/ionic/ionic_ibdev.c b/drivers/infiniband/hw/ionic/ionic_ibdev.c
index 73a616ae35023..40e8faf82437e 100644
--- a/drivers/infiniband/hw/ionic/ionic_ibdev.c
+++ b/drivers/infiniband/hw/ionic/ionic_ibdev.c
@@ -314,8 +314,8 @@ static struct ionic_ibdev *ionic_create_ibdev(struct ionic_aux_dev *ionic_adev)
ionic_fill_lif_cfg(ionic_adev->lif, &dev->lif_cfg);
- xa_init_flags(&dev->qp_tbl, GFP_ATOMIC);
- xa_init_flags(&dev->cq_tbl, GFP_ATOMIC);
+ xa_init_flags(&dev->qp_tbl, XA_FLAGS_LOCK_IRQ);
+ xa_init_flags(&dev->cq_tbl, XA_FLAGS_LOCK_IRQ);
ionic_init_resids(dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0879/2151] RDMA/ionic: Fix double removal of CMB mmap entries in create QP error path
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (869 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0878/2151] RDMA/ionic: Fix XArray initialization to use XArray flags Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0880/2151] perf python: Initialize debug output on module load Greg Kroah-Hartman
` (11 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abhijit Gangurde, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abhijit Gangurde <abhijit.gangurde@amd.com>
[ Upstream commit 485effd117d0310a7f589defb4f442fa3bb52ae2 ]
The error unwind in ionic_create_qp() removes the SQ and RQ CMB mmap
entries explicitly, and then falls through to ionic_qp_rq_destroy() and
ionic_qp_sq_destroy(), whose ionic_qp_{rq,sq}_destroy_cmb() helpers
remove the very same entries a second time.
Drop the explicit removals and leave ionic_qp_{rq,sq}_destroy_cmb() as
the single owner on the ionic_destroy_qp() path.
Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path")
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Link: https://patch.msgid.link/20260925093638.3032149-2-abhijit.gangurde@amd.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/ionic/ionic_controlpath.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/infiniband/hw/ionic/ionic_controlpath.c b/drivers/infiniband/hw/ionic/ionic_controlpath.c
index 38d57bc2ba525..18494206d017d 100644
--- a/drivers/infiniband/hw/ionic/ionic_controlpath.c
+++ b/drivers/infiniband/hw/ionic/ionic_controlpath.c
@@ -2276,7 +2276,7 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr,
&resp.sq_cmb_offset);
if (!qp->mmap_sq_cmb) {
rc = -ENOMEM;
- goto err_mmap_sq;
+ goto err_qp_cmd;
}
resp.sq_cmb = qp->sq_cmb;
@@ -2313,7 +2313,7 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr,
&resp.rq_cmb_offset);
if (!qp->mmap_rq_cmb) {
rc = -ENOMEM;
- goto err_mmap_rq;
+ goto err_qp_cmd;
}
resp.rq_cmb = qp->rq_cmb;
@@ -2321,7 +2321,7 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr,
rc = ib_copy_to_udata(udata, &resp, sizeof(resp));
if (rc)
- goto err_resp;
+ goto err_qp_cmd;
}
ionic_pgtbl_unbuf(dev, &rq_buf);
@@ -2339,7 +2339,7 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr,
else
rc = xa_err(entry);
- goto err_resp;
+ goto err_qp_cmd;
}
if (qp->has_sq) {
@@ -2370,13 +2370,7 @@ int ionic_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *attr,
return 0;
-err_resp:
- if (udata && (qp->rq_cmb & IONIC_CMB_ENABLE))
- rdma_user_mmap_entry_remove(qp->mmap_rq_cmb);
-err_mmap_rq:
- if (udata && (qp->sq_cmb & IONIC_CMB_ENABLE))
- rdma_user_mmap_entry_remove(qp->mmap_sq_cmb);
-err_mmap_sq:
+err_qp_cmd:
ionic_destroy_qp_cmd(dev, qp->qpid);
err_cmd:
ionic_pgtbl_unbuf(dev, &rq_buf);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0880/2151] perf python: Initialize debug output on module load
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (870 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0879/2151] RDMA/ionic: Fix double removal of CMB mmap entries in create QP error path Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0881/2151] perf pmu: Fix race with concurrent tracepoint creation and removal in perf list Greg Kroah-Hartman
` (10 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit 3d13b3f1f3a7cd33d1847a4b87c3198089b6c4a7 ]
Unlike the perf binary's main(), PyInit_perf() does not call
perf_debug_setup(). As a result, the first warning or error printed from
the perf Python C extension hits debug_file() with _debug_file == NULL
and emits 'debug_file not set' without a trailing newline before the
actual diagnostic message.
Call perf_debug_setup() in PyInit_perf() and add the missing trailing
newline to the fallback warning in debug_file().
Fixes: ec49230cf6dda704 ("perf debug: Expose debug file")
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/debug.c | 2 +-
tools/perf/util/python.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 1dfa4d0eec4d7..b63d4e2f027a9 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -55,7 +55,7 @@ FILE *debug_file(void)
{
if (!_debug_file) {
debug_set_file(stderr);
- pr_warning_once("debug_file not set");
+ pr_warning_once("%s not set\n", __func__);
}
return _debug_file;
}
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 2fa9670bc51f0..aaae49748c13c 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -2269,6 +2269,7 @@ PyMODINIT_FUNC PyInit_perf(void)
/* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
+ perf_debug_setup();
Py_INCREF(&pyrf_evlist__type);
PyModule_AddObject(module, "evlist", (PyObject*)&pyrf_evlist__type);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0881/2151] perf pmu: Fix race with concurrent tracepoint creation and removal in perf list
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (871 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0880/2151] perf python: Initialize debug output on module load Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0882/2151] RDMA/mad: Reject receive completions shorter than GRH Greg Kroah-Hartman
` (9 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ian Rogers, Arnaldo Carvalho de Melo,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <irogers@google.com>
[ Upstream commit ab20a3090d338c4f161cb1a68e64a7f8914569ea ]
perf_pmus__print_pmu_events() first counts events via
perf_pmu__num_events() to allocate the aliases array, then populates it
via perf_pmu__for_each_event(). When dynamic tracepoints (such as
kprobes or uprobes during 'perf test' runs) are concurrently created or
removed between the two passes:
- If an event is removed, state.index is smaller than the allocated len,
leaving trailing zeroed entries in aliases[] with name == NULL and
pmu == NULL, which causes qsort(cmp_sevent) or the print loop to crash
with SIGSEGV.
- If a dynamic tracepoint subsystem directory is removed while scanning
/sys/kernel/tracing/events, tp_pmu__for_each_tp_event() returns
-ENOENT and aborts enumeration of all remaining tracepoint subsystems.
- If an event is added, perf_pmus__print_pmu_events__callback() aborts
enumeration when state->index reaches state->aliases_len.
Grow state->aliases dynamically via realloc() when needed, use
state.index as the actual populated length for sorting and printing, and
ignore -ENOENT when a tracepoint subsystem directory disappears during
enumeration.
Fixes: c3245d2093c16c60 ("perf pmu: Abstract alias/event struct")
Fixes: 45b6e281cb0648ac ("perf tp_pmu: Add event APIs")
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/util/pmus.c | 21 +++++++++++++++++----
tools/perf/util/tp_pmu.c | 8 ++++++--
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c
index 98be2eb8f1f03..a13bebbbe4916 100644
--- a/tools/perf/util/pmus.c
+++ b/tools/perf/util/pmus.c
@@ -8,6 +8,7 @@
#include <sys/types.h>
#include <ctype.h>
#include <pthread.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "cpumap.h"
@@ -553,7 +554,7 @@ static int cmp_sevent(const void *a, const void *b)
}
/* Order by event name. */
- return strcmp(as->name, bs->name);
+ return strcmp(as->name ?: "", bs->name ?: "");
}
static bool pmu_alias_is_duplicate(struct sevent *a, struct sevent *b)
@@ -563,7 +564,7 @@ static bool pmu_alias_is_duplicate(struct sevent *a, struct sevent *b)
return false;
/* Don't remove duplicates for different PMUs */
- return strcmp(a->pmu_name, b->pmu_name) == 0;
+ return strcmp(a->pmu_name ?: "", b->pmu_name ?: "") == 0;
}
struct events_callback_state {
@@ -579,8 +580,18 @@ static int perf_pmus__print_pmu_events__callback(void *vstate,
struct sevent *s;
if (state->index >= state->aliases_len) {
- pr_err("Unexpected event %s/%s/\n", info->pmu->name, info->name);
- return 1;
+ size_t new_len = max_t(size_t, 16, state->aliases_len * 2);
+ struct sevent *new_aliases;
+
+ new_aliases = realloc(state->aliases, new_len * sizeof(struct sevent));
+ if (!new_aliases) {
+ pr_err("Unexpected event %s/%s/\n", info->pmu->name, info->name);
+ return 1;
+ }
+ memset(&new_aliases[state->aliases_len], 0,
+ (new_len - state->aliases_len) * sizeof(struct sevent));
+ state->aliases = new_aliases;
+ state->aliases_len = new_len;
}
assert(info->pmu != NULL || info->name != NULL);
s = &state->aliases[state->index];
@@ -636,6 +647,8 @@ void perf_pmus__print_pmu_events(const struct print_callbacks *print_cb, void *p
perf_pmu__for_each_event(pmu, skip_duplicate_pmus, &state,
perf_pmus__print_pmu_events__callback);
}
+ aliases = state.aliases;
+ len = state.index;
qsort(aliases, len, sizeof(struct sevent), cmp_sevent);
for (int j = 0; j < len; j++) {
/* Skip duplicates */
diff --git a/tools/perf/util/tp_pmu.c b/tools/perf/util/tp_pmu.c
index c2be8c9f9084d..5ac732e068412 100644
--- a/tools/perf/util/tp_pmu.c
+++ b/tools/perf/util/tp_pmu.c
@@ -151,7 +151,9 @@ static int for_each_event_cb(void *state, const char *sys_name, const char *evt_
static int for_each_event_sys_cb(void *state, const char *sys_name)
{
- return tp_pmu__for_each_tp_event(sys_name, state, for_each_event_cb);
+ int ret = tp_pmu__for_each_tp_event(sys_name, state, for_each_event_cb);
+
+ return ret == -ENOENT ? 0 : ret;
}
int tp_pmu__for_each_event(struct perf_pmu *pmu, void *state, pmu_event_callback cb)
@@ -176,7 +178,9 @@ static int num_events_cb(void *state, const char *sys_name __maybe_unused,
static int num_events_sys_cb(void *state, const char *sys_name)
{
- return tp_pmu__for_each_tp_event(sys_name, state, num_events_cb);
+ int ret = tp_pmu__for_each_tp_event(sys_name, state, num_events_cb);
+
+ return ret == -ENOENT ? 0 : ret;
}
size_t tp_pmu__num_events(struct perf_pmu *pmu __maybe_unused)
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0882/2151] RDMA/mad: Reject receive completions shorter than GRH
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (872 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0881/2151] perf pmu: Fix race with concurrent tracepoint creation and removal in perf list Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0883/2151] RDMA/mlx4: Do not allow the user to write to the clock page Greg Kroah-Hartman
` (8 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiale Yao, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiale Yao <yaojiale02@163.com>
[ Upstream commit 2dc2126e690203d6adbddc7675927a242d810e43 ]
ib_mad_recv_done() derives the OPA MAD length by subtracting the GRH
size from wc->byte_len without ensuring the receive completion covers
the GRH. If it is shorter, the subtraction wraps before the result is
stored in mad_len and an invalid length can be passed downstream.
Reject receive completions shorter than the GRH before inspecting the
MAD header or deriving the MAD length.
Fixes: 8e4349d13f33 ("IB/mad: Add final OPA MAD processing")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Link: https://patch.msgid.link/20260926105927.3183294-1-yaojiale02@163.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/core/mad.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index f7ad35233c2df..daad0be9054b6 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -2342,6 +2342,8 @@ static void ib_mad_recv_done(struct ib_cq *cq, struct ib_wc *wc)
recv->header.mapping,
mad_priv_dma_size(recv),
DMA_FROM_DEVICE);
+ if (unlikely(wc->byte_len < sizeof(struct ib_grh)))
+ goto out;
/* Setup MAD receive work completion from "normal" work completion */
recv->header.wc = *wc;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0883/2151] RDMA/mlx4: Do not allow the user to write to the clock page
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (873 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0882/2151] RDMA/mad: Reject receive completions shorter than GRH Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0884/2151] RDMA/cxgb4: Do not allow userspace to write the status page Greg Kroah-Hartman
` (7 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiale Yao, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiale Yao <yaojiale02@163.com>
[ Upstream commit 33db1d9683b8fb00bc233d0bea093e694ed9afc5 ]
mlx4_ib_mmap() maps the internal clock page to userspace through
rdma_user_mmap_io(), which does not restrict write access. Userspace can
request PROT_WRITE directly, or upgrade a read-only mapping later with
mprotect() because VM_MAYWRITE remains set.
Reject VM_WRITE, VM_EXEC and clear VM_MAYWRITE, applying the same read-only
policy as commit c660133c339f ("RDMA/mlx5: Do not allow the user to write to the
clock page"). The rdma-core mlx4 provider requests this mapping with
PROT_READ, so its existing behavior is unchanged.
Fixes: 52033cfb5aab ("IB/mlx4: Add mmap call to map the hardware clock")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Link: https://patch.msgid.link/20260926111150.3197004-1-yaojiale02@163.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/mlx4/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index dd35e03402ab4..164f34e887552 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -1176,6 +1176,10 @@ static int mlx4_ib_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
struct mlx4_clock_params params;
int ret;
+ if (vma->vm_flags & (VM_WRITE | VM_EXEC))
+ return -EPERM;
+ vm_flags_clear(vma, VM_MAYWRITE);
+
ret = mlx4_get_internal_clock_params(dev->dev, ¶ms);
if (ret)
return ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0884/2151] RDMA/cxgb4: Do not allow userspace to write the status page
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (874 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0883/2151] RDMA/mlx4: Do not allow the user to write to the clock page Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0885/2151] time: Prevent time64_to_tm() day truncation on 32-bit Greg Kroah-Hartman
` (6 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jiale Yao, Leon Romanovsky,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiale Yao <yaojiale02@163.com>
[ Upstream commit 1c5335a6902639596a795705349da7f76027e103 ]
The device status page is shared by all userspace contexts and contains
db_off, which the driver updates to control doorbell flow. The rdma-core
provider maps it with PROT_READ, but c4iw_mmap() passes the requested page
protection through when handling CXGB4_MMAP_CONTIG.
A process can therefore request PROT_WRITE directly or later upgrade a
read-only mapping with mprotect() because VM_MAYWRITE remains set. This
lets userspace alter device-wide flow-control state seen by the kernel and
other contexts.
Reject initially writable mappings and clear VM_MAYWRITE before mapping the
page. This preserves the existing read-only userspace ABI.
Fixes: 05eb23893c2c ("cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Link: https://patch.msgid.link/20260926112611.3214382-1-yaojiale02@163.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/hw/cxgb4/provider.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
index e059f92d90fd4..4b2c7ec348176 100644
--- a/drivers/infiniband/hw/cxgb4/provider.c
+++ b/drivers/infiniband/hw/cxgb4/provider.c
@@ -171,6 +171,11 @@ static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
len, t4_pgprot_wc(vma->vm_page_prot));
break;
case CXGB4_MMAP_CONTIG:
+ if (vma->vm_flags & (VM_WRITE | VM_EXEC)) {
+ ret = -EPERM;
+ break;
+ }
+ vm_flags_clear(vma, VM_MAYWRITE);
ret = io_remap_pfn_range(vma, vma->vm_start,
addr >> PAGE_SHIFT,
len, vma->vm_page_prot);
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0885/2151] time: Prevent time64_to_tm() day truncation on 32-bit
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (875 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0884/2151] RDMA/cxgb4: Do not allow userspace to write the status page Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0886/2151] RDMA/rtrs-clt: Dont WARN on unexpected info-response opcode Greg Kroah-Hartman
` (5 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Karl Mehltretter, Thomas Gleixner,
Thomas Weißschuh, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <kmehltretter@gmail.com>
[ Upstream commit 2927f7ca78448781e11a4623d347cd653c28adf6 ]
time64_to_tm() accepts a 64-bit seconds value, but stores the quotient in
long. On a 32-bit kernel the day count therefore wraps when it reaches
2^31, even though the corresponding year remains representable in
struct tm.
This is reachable when formatting externally supplied timestamps. For
example, NILFS recovery copies the little-endian 64-bit ss_create field
from an on-disk segment summary into time64_t. Its sysfs attributes then
print that value with %ptTs, whose formatter calls time64_to_tm(). A
corrupted image can consequently produce an architecture-dependent printed
date.
Keep the day quotient in s64 while leaving the seconds-within-day remainder
as long. Use div_s64_rem() for the weekday calculation so 32-bit builds do
not require compiler runtime division helpers.
Fixes: e6c2682a1da3 ("time: Add time64_to_tm()")
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Assisted-by: LLM
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260925165702.51677-2-kmehltretter@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/time/timeconv.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/time/timeconv.c b/kernel/time/timeconv.c
index 59b922c826e77..aed3af950fa0b 100644
--- a/kernel/time/timeconv.c
+++ b/kernel/time/timeconv.c
@@ -49,8 +49,9 @@ void time64_to_tm(time64_t totalsecs, int offset, struct tm *result)
u32 u32tmp, day_of_century, year_of_century, day_of_year, month, day;
u64 u64tmp, udays, century, year;
bool is_Jan_or_Feb, is_leap_year;
- long days, rem;
int remainder;
+ long rem;
+ s64 days;
days = div_s64_rem(totalsecs, SECS_PER_DAY, &remainder);
rem = remainder;
@@ -70,7 +71,8 @@ void time64_to_tm(time64_t totalsecs, int offset, struct tm *result)
result->tm_sec = rem % 60;
/* January 1, 1970 was a Thursday. */
- result->tm_wday = (4 + days) % 7;
+ div_s64_rem(days + 4, 7, &remainder);
+ result->tm_wday = remainder;
if (result->tm_wday < 0)
result->tm_wday += 7;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0886/2151] RDMA/rtrs-clt: Dont WARN on unexpected info-response opcode
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (876 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0885/2151] time: Prevent time64_to_tm() day truncation on 32-bit Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0887/2151] vfio/platform: prevent read-only region mappings from becoming writable Greg Kroah-Hartman
` (4 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Farhad Alemi, Quanye Yang, Jack Wang,
Jason Gunthorpe, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quanye Yang <quanyeyang@proton.me>
[ Upstream commit 49c5691ad76f000e66c4f2635d5f196db5d038f9 ]
The info-response receive is posted for a SEND. The completion
opcode comes from the peer, so RDMA WRITE with Immediate is a
legal WC on that WQE even though it violates the RTRS handshake.
WARN_ON(wc->opcode != IB_WC_RECV) treats that peer-controlled
field as an internal invariant and panics with panic_on_warn.
Treat a non-SEND completion as a handshake failure: log it and
keep the existing CONNECTING_ERR cleanup.
Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
Link: https://patch.msgid.link/r/20260921-rtrs-fix-rtrs-clt-info-rsp-done-v1-1-c64281ed97c0@proton.me
Reported-by: Farhad Alemi <farhad.alemi@berkeley.edu>
Closes: https://lore.kernel.org/linux-rdma/CA+0ovCge-K+hcGHXZ4R3Ww5+cg159uxHBeVbKeUSLBRSMT8OWA@mail.gmail.com/
Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Reviewed-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/infiniband/ulp/rtrs/rtrs-clt.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 96f76dfe18619..99de772e99afb 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -2499,7 +2499,12 @@ static void rtrs_clt_info_rsp_done(struct ib_cq *cq, struct ib_wc *wc)
ib_wc_status_msg(wc->status));
goto out;
}
- WARN_ON(wc->opcode != IB_WC_RECV);
+ if (wc->opcode != IB_WC_RECV) {
+ rtrs_err(clt_path->clt,
+ "Path info response has unexpected opcode %d\n",
+ wc->opcode);
+ goto out;
+ }
if (wc->byte_len < sizeof(*msg)) {
rtrs_err(clt_path->clt, "Path info response is malformed: size %d\n",
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0887/2151] vfio/platform: prevent read-only region mappings from becoming writable
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (877 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0886/2151] RDMA/rtrs-clt: Dont WARN on unexpected info-response opcode Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0888/2151] vfio/fsl-mc: " Greg Kroah-Hartman
` (3 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mostafa Saleh, Eric Auger,
Pranjal Shrivastava, Abdifatah Suruur, Alex Williamson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdifatah Suruur <suruurism@gmail.com>
[ Upstream commit 420bed9131dbbe37abe9d6b32af51219875811e0 ]
vfio_platform_mmap() rejects writable mappings of regions without the
WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region
read-only and then upgrade the mapping to writable with mprotect().
Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for
its read-only objects and as fixed in drm/vc4 (CVE-2026-68445),
drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock:
prevent read-only mappings from becoming writable").
Note this is defensive hardening: no in-tree platform driver currently
publishes a region without the WRITE flag. The guard costs nothing and
keeps the mmap() interface honest if a read-only region ever appears.
Fixes: fad4d5b1f042 ("vfio/platform: support MMAP of MMIO regions")
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Abdifatah Suruur <suruurism@gmail.com>
Link: https://lore.kernel.org/r/20260929094848.7439-2-suruurism@gmail.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vfio/platform/vfio_platform_common.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
index 3bf1043cd7957..bd7600c6b9de7 100644
--- a/drivers/vfio/platform/vfio_platform_common.c
+++ b/drivers/vfio/platform/vfio_platform_common.c
@@ -595,9 +595,13 @@ int vfio_platform_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma
&& (vma->vm_flags & VM_READ))
return -EINVAL;
- if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE)
- && (vma->vm_flags & VM_WRITE))
- return -EINVAL;
+ /* Prevent read-only region mappings from being upgraded with mprotect() */
+ if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE)) {
+ if (vma->vm_flags & VM_WRITE)
+ return -EINVAL;
+
+ vm_flags_clear(vma, VM_MAYWRITE);
+ }
vma->vm_private_data = vdev;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0888/2151] vfio/fsl-mc: prevent read-only region mappings from becoming writable
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (878 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0887/2151] vfio/platform: prevent read-only region mappings from becoming writable Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0889/2151] vfio/cdx: " Greg Kroah-Hartman
` (2 subsequent siblings)
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ioana Ciornei, Abdifatah Suruur,
Alex Williamson, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdifatah Suruur <suruurism@gmail.com>
[ Upstream commit 25fd8b27ee8d4f59cc2ad99cf67aef4570b82096 ]
vfio_fsl_mc_mmap() rejects writable mappings of regions without the
WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region
read-only and then upgrade the mapping to writable with mprotect().
Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for
its read-only objects and as fixed in drm/vc4 (CVE-2026-68445),
drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock:
prevent read-only mappings from becoming writable").
Note this is defensive hardening: the fsl-mc bus publishes all device
regions with the WRITE flag set, so no device can currently reach the
read-only path. The guard costs nothing and keeps the mmap() interface
honest if a read-only region ever appears.
Fixes: 67247289688d4 ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions")
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Abdifatah Suruur <suruurism@gmail.com>
Link: https://lore.kernel.org/r/20260929094848.7439-3-suruurism@gmail.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 84cd0eb65c471..944d4f22c5c36 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
@@ -409,9 +409,13 @@ static int vfio_fsl_mc_mmap(struct vfio_device *core_vdev,
&& (vma->vm_flags & VM_READ))
return -EINVAL;
- if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE)
- && (vma->vm_flags & VM_WRITE))
- return -EINVAL;
+ /* Prevent read-only region mappings from being upgraded with mprotect() */
+ if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE)) {
+ if (vma->vm_flags & VM_WRITE)
+ return -EINVAL;
+
+ vm_flags_clear(vma, VM_MAYWRITE);
+ }
vma->vm_private_data = mc_dev;
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* [PATCH 6.18 0889/2151] vfio/cdx: prevent read-only region mappings from becoming writable
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (879 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0888/2151] vfio/fsl-mc: " Greg Kroah-Hartman
@ 2026-11-18 14:43 ` Greg Kroah-Hartman
2026-11-18 16:59 ` [PATCH 6.18 0000/2151] 6.18.65-rc1 review Brett A C Sheffield
2026-11-18 17:40 ` Pavel Machek
882 siblings, 0 replies; 884+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-18 14:43 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Abdifatah Suruur, Alex Williamson,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdifatah Suruur <suruurism@gmail.com>
[ Upstream commit 9c5cd385d295fa8621dff0e9f6063e3f6ff24159 ]
vfio_cdx_mmap() rejects writable mappings of regions without the WRITE
flag, but leaves VM_MAYWRITE set. Userspace can map such a region
read-only and then upgrade the mapping to writable with mprotect(),
writing to MMIO regions the device marks read-only.
Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for
its read-only objects and as fixed in drm/vc4 (CVE-2026-68445),
drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock:
prevent read-only mappings from becoming writable").
Note this is defensive hardening: no in-tree cdx device currently
publishes a region without the WRITE flag. The guard costs nothing and
keeps the mmap() interface honest if a read-only region ever appears.
Fixes: 234489ac56130 ("vfio/cdx: add support for CDX bus")
Signed-off-by: Abdifatah Suruur <suruurism@gmail.com>
Link: https://lore.kernel.org/r/20260929094848.7439-4-suruurism@gmail.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vfio/cdx/main.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c
index a9639730cfdf5..a7f33a47df52a 100644
--- a/drivers/vfio/cdx/main.c
+++ b/drivers/vfio/cdx/main.c
@@ -289,9 +289,13 @@ static int vfio_cdx_mmap(struct vfio_device *core_vdev,
(vma->vm_flags & VM_READ))
return -EPERM;
- if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE) &&
- (vma->vm_flags & VM_WRITE))
- return -EPERM;
+ /* Prevent read-only region mappings from being upgraded with mprotect() */
+ if (!(vdev->regions[index].flags & VFIO_REGION_INFO_FLAG_WRITE)) {
+ if (vma->vm_flags & VM_WRITE)
+ return -EPERM;
+
+ vm_flags_clear(vma, VM_MAYWRITE);
+ }
return vfio_cdx_mmap_mmio(vdev->regions[index], vma);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 884+ messages in thread
* Re: [PATCH 6.18 0000/2151] 6.18.65-rc1 review
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (880 preceding siblings ...)
2026-11-18 14:43 ` [PATCH 6.18 0889/2151] vfio/cdx: " Greg Kroah-Hartman
@ 2026-11-18 16:59 ` Brett A C Sheffield
2026-11-18 17:40 ` Pavel Machek
882 siblings, 0 replies; 884+ messages in thread
From: Brett A C Sheffield @ 2026-11-18 16:59 UTC (permalink / raw)
To: gregkh
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, rwarsow, conor, hargar, broonie, achill, sr,
Brett A C Sheffield
# Librecast Test Results
044/044 [ OK ] liblcrq
010/010 [ OK ] libmld
120/120 [ OK ] liblibrecast
CPU/kernel: Linux auntie 6.18.65-rc1-gb8cc618d685d #1 SMP PREEMPT_DYNAMIC Wed Nov 18 16:50:11 -00 2026 x86_64 AMD Ryzen 9 9950X 16-Core Processor AuthenticAMD GNU/Linux
Tested-by: Brett A C Sheffield <bacs@librecast.net>
^ permalink raw reply [flat|nested] 884+ messages in thread
* Re: [PATCH 6.18 0000/2151] 6.18.65-rc1 review
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
` (881 preceding siblings ...)
2026-11-18 16:59 ` [PATCH 6.18 0000/2151] 6.18.65-rc1 review Brett A C Sheffield
@ 2026-11-18 17:40 ` Pavel Machek
882 siblings, 0 replies; 884+ messages in thread
From: Pavel Machek @ 2026-11-18 17:40 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, rwarsow, conor, hargar, broonie, achill, sr
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
Hi!
> This is the start of the stable review cycle for the 6.18.65 release.
> There are 2151 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.18.y
Tested-by: Pavel Machek (CIP) <pavel@nabladev.com>
Best regards,
Pavel
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 884+ messages in thread
end of thread, other threads:[~2026-11-18 18:01 UTC | newest]
Thread overview: 884+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 14:28 [PATCH 6.18 0000/2151] 6.18.65-rc1 review Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0001/2151] KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0002/2151] inet: frags: limit the truesize of a reassembly queue Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0003/2151] KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E Greg Kroah-Hartman
2026-11-18 14:28 ` [PATCH 6.18 0004/2151] mm/hugetlb: fix endless write fault on a leftover uffd bit Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0005/2151] 9p/xen: drain response work after unbinding IRQ Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0006/2151] ksmbd: revert fsids on durable reconnect and replay failure Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0007/2151] mm/ksm: fix use of a freed anon_vma at swap-in Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0008/2151] ksmbd: enforce the read-only share flag when creating a stream Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0009/2151] mm/shmem: hold off eviction in shmem_writeout() Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0010/2151] fbcon: Rebuild rotated font buffer on font change Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0011/2151] mm/memcontrol: fix stuck FLUSHING_CACHED_CHARGE bit on isolated cpus Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0012/2151] ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0013/2151] ASoC: SOF: Intel: hda-sdw-bpt: Stop active DMA before closing BPT streams Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0014/2151] drm/amdkfd: Validate the control stack of a restored queue Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0015/2151] pidfs: prepare to drop exit_info pointer Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0016/2151] pidfs: dont let PIDFD_GET_INFO miss a reaped task Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0017/2151] btrfs: prevent deleting the wrong subvolume by ID Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0018/2151] PCI/pwrctrl: slot: Rename private struct and pointers for consistency Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0019/2151] PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all() Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0020/2151] ocfs2/cluster: hold a reference on the heartbeat thread Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0021/2151] ocfs2/heartbeat: serialize concurrent writes to a regions dev attribute Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0022/2151] ASoC: qcom: audioreach: fix module cfg blob size handling Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0023/2151] ACPI: utils: Add exclusive AML evaluation helpers Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0024/2151] platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0025/2151] mm/userfaultfd: write-lock the VMA before waking waiters when unregistering Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0026/2151] mm/userfaultfd: wake waiters when registration modes are removed Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0027/2151] cxl/pci: Use the Device GPF DVSEC for restricted endpoints Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0028/2151] scsi: ufs: core: Change the error check sequence for auto hibern8 Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0029/2151] hwmon: chipcap2: fix IRQ teardown ordering Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0030/2151] hwmon: chipcap2: disable device after hwmon teardown Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0031/2151] libceph: initialize CRUSH choose argument weights Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0032/2151] ovl: port ovl_dir_llseek() to cred guard Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0033/2151] ovl: inherit FMODE_NONOTIFY when opening directory realfiles Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0034/2151] f2fs: fix to fetch ino via ino_of_node() under cache lock Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0035/2151] drm/amdgpu: sign extend the addresses GEM_OP(GET_MAPPING_INFO) returns Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0036/2151] mm/vma: fix expansion of VMA_MIXEDMAP_BIT VMAs Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0037/2151] drm/amdgpu: drop the gang leader reference when freeing gang jobs Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0038/2151] apparmor: refactor xattr attachment, to take the file path Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0039/2151] apparmor: constify aa_perms parameters that are read-only Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0040/2151] apparmor: constify aa_profile parameters on read-only compute paths Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0041/2151] apparmor: fix profile leak when a policy load fails Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0042/2151] hwmon: (chipcap2) Drop unnecessary include files Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0043/2151] hwmon: chipcap2: serialize access to the alarm indicators Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0044/2151] hwmon: chipcap2: synchronize ready IRQ state Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0045/2151] platform/x86: hp-wmi: Order DMI board name arrays Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0046/2151] platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0047/2151] inet: frags: bound the wmem charge of the socket completing a reassembly Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0048/2151] io_uring/eventfd: reset deferred signal state Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0049/2151] alpha: select SYSCTL_EXCEPTION_TRACE Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0050/2151] can: dev: can_dropped_invalid_skb: drop CAN XL frames on non-CAN XL devices Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0051/2151] Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728 Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0052/2151] ALSA: pcm: Optimize cpu_latency_qos_*() calls Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0053/2151] ALSA: pcm: Prevent O_APPEND open on OSS streams Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0054/2151] tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0055/2151] khugepaged: fix readahead lock inversion in collapse_file() Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0056/2151] net: Use a dedicated flag to track disabled napi instances Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0057/2151] hwmon: (sht15) Remove redundant dev_err() Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0058/2151] hwmon: (sht15) Stop deferred work before releasing its resources Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0059/2151] mm: page_alloc: do not give all non-blocking requests reserve access Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0060/2151] mm/page_alloc: let the highest memory node recover from hopeless state Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0061/2151] drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0062/2151] drm/amd/display: set allow_freesync before validating a new stream Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0063/2151] hugetlbfs: enforce F_SEAL_EXEC in setattr Greg Kroah-Hartman
2026-11-18 14:29 ` [PATCH 6.18 0064/2151] ALSA: usb-audio: qcom: Free QMI handle Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0065/2151] ALSA: usb-audio: qcom: Check the return value of qmi_handle_init() Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0066/2151] drm/amd/display: Signal PQ EOTF in FreeSync infopacket for DP HDR Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0067/2151] hwmon: (coretemp) Set nr_cores only after core_data allocation succeeds Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0068/2151] drm/amd/pm: populate unique ID for smu 13.0.7 Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0069/2151] drm/amdgpu/userq: wait for GPU reset before mapping or unmapping queues Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0070/2151] xfs: refuse a pNFS LAYOUTCOMMIT of a range without blocks Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0071/2151] btrfs: raid56: do not verify the content if there is no data checksum Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0072/2151] ocfs2: add extra flags check in ocfs2_ioctl_move_extents() Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0073/2151] ocfs2: validate move extents against a stable EOF Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0074/2151] ksmbd: do not read past the DACL in the access denied debug message Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0075/2151] cipso: stop modifying live ip_options_rcu Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0076/2151] mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0077/2151] KVM: arm64: vgic-its: Dont map an LPI from more than one event Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0078/2151] l2tp: snapshot sequencing state when building transmit headers Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0079/2151] mm/memory: update stale locking comments for fault handlers Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0080/2151] mm: fix address wraparound when scanning large folio PTEs Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0081/2151] mm/huge_memory: fix truncate racing with PMD zapping Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0082/2151] hwmon: (coretemp) Read TjMax only when refreshing the temperature Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0083/2151] hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp() Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0084/2151] hwmon: (tmp108) Fix initial conversion delay and wait until ready Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0085/2151] drm/amdgpu: dont walk the CS chunks when allocating them failed Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0086/2151] mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0087/2151] mm/vma: dont leak the charge for stack growth Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0088/2151] sched: Re-arrange the {EN,DE}QUEUE flags Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0089/2151] sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0090/2151] sched/fair: Clear throttle state when leaving the fair class Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0091/2151] sched_ext: Skip ops.set_weight() for disabled tasks Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0092/2151] mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0093/2151] quota: initialize dquot cache before mounting rootfs Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0094/2151] ksmbd: let the owner read and change the DACL when no ACE names it Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0095/2151] mm/userfaultfd: compare exact registration modes before skipping Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0096/2151] apparmor: optimize current_label_crit_section() with needput Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0097/2151] apparmor: fix query_data() output overlapping the lookup key Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0098/2151] mm/shmem: preserve allocation errors when swapping in large entries Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0099/2151] mm/filemap: read mapping->a_ops->free_folio under i_lock Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0100/2151] mm/rmap: handle device-exclusive entries in folio_referenced_one() Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0101/2151] fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0102/2151] mm/huge_memory: properly handle refcounted PUD mappings on fork Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0103/2151] fork: take mmap_lock before copying mm_struct Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0104/2151] hwmon: (gpd-fan) Reset both fans to automatic on duo boards Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0105/2151] ASoC: qcom: q6apm: clear g_apm on driver removal Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0106/2151] mm: fix deadlock of mremap() against UFFDIO_MOVE Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0107/2151] rose: walk the neighbour list under its lock when a device goes down Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0108/2151] rose: hold RTNL while a route is added or deleted Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0109/2151] rose: change the loopback nodes under the neighbour list lock too Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0110/2151] rose: check the length of Restart Request and Diagnostic frames Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0111/2151] rose: keep a socket unbound when connect() fails to autobind it Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0112/2151] rose: refuse an empty message when the Q bit is included Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0113/2151] rose: give loopback answers LCIs that calls cannot be given Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0114/2151] rose: clear the other half of a through route a new call takes over Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0115/2151] rose: disconnect sockets under their lock when a neighbour goes away Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0116/2151] hdlcdrv: close the hardware driver once, and only if it was opened Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0117/2151] mm/shmem: make shmem_file() check the files inode Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0118/2151] drm/amd/display: Reset DET of HUBPs without a plane before outstanding updates Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0119/2151] mm/shmem: fix accounting of swapin-error markers Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0120/2151] ovl: inherit FMODE_NONOTIFY when reading directory layers Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0121/2151] comedi: addi_apci_3xxx: fix subdevice count underallocation Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0122/2151] comedi: dt2811: fix shift-out-of-bounds in IRQ check Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0123/2151] ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time Greg Kroah-Hartman
2026-11-18 14:30 ` [PATCH 6.18 0124/2151] ALSA: hda/realtek: Enable mute and mic-mute LEDs on HP ENVY 17-cr0xxx Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0125/2151] serial: max310x: schedule tx_work directly from the IRQ handler Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0126/2151] x86/cpufeatures: Make X86_FEATURE leaf 17 Linux-specific Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0127/2151] drm/komeda: Fix bits parsing of GLB_CORE_ID Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0128/2151] accel/qaic: reject BO sizes that overflow page count Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0129/2151] drm/panfrost: Prevent division by 0 Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0130/2151] bpf: sched_ext: Mark ops argument container pointer fields as trusted Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0131/2151] drm/omap: dsi: avoid sending bta sync all the time in writes Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0132/2151] drm: of: Fix drm_of_get_data_lanes_count_ep() return value documentation Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0133/2151] libbpf: Avoid overflow in BTF.ext bounds check Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0134/2151] selftests/bpf: Allocate a larger timeout for connection Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0135/2151] bpf: Roll back stream capacity when allocation fails Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0136/2151] bpf: Fix stream capacity leak in staging path Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0137/2151] bpf: Return partial progress from bpf_stream_read on fault Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0138/2151] bpf: Reject oversized bpf_stream_vprintk output with -E2BIG Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0139/2151] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0140/2151] bpf: Reject oversized stream read buffers Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0141/2151] gpio: pcf857x: implement get_direction() Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0142/2151] drm/vkms: Fix limited-range YCbCr to RGB conversion scaling Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0143/2151] bpftool: Fix spurious batch file read error Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0144/2151] regulator: fixed: reject incompatible platform devices Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0145/2151] spi: sh-msiof: propagate setup runtime-PM errors Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0146/2151] iio: humidity: hts221: report available values via read_avail() Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0147/2151] dt-bindings: iio: light: ltr501: Sort compatible enum array Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0148/2151] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0149/2151] iio: temperature: tmp117: fix calibbias cache update on I2C write failure Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0150/2151] iio: pressure: rohm-bm1390: Fix AVE_NUM initialization Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0151/2151] ata: pata_parport: Fix use-after-free in new_device_store Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0152/2151] ARM: dts: helios4: fix lm75 supply name Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0153/2151] ARM: dts: armada-385-clearfog-gtr: fix vmmc property name Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0154/2151] ARM: dts: armada-395-gp: drop unsupported SDHCI clock-frequency Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0155/2151] ARM: dts: armada-388-helios4: fix vmmc property name Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0156/2151] ARM: dts: helios4: fix vbus-supply for USB2 PHY Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0157/2151] ARM: dts: helios4: fix spi1 location Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0158/2151] kexec_file: stop the top-down search before it underflows Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0159/2151] perf jitdump: Fix extended header read that always fails Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0160/2151] perf jitdump: Fix debug_data and unwinding_data leaks Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0161/2151] perf jitdump: Validate code_size against total_size in code load Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0162/2151] perf jitdump: Prevent integer underflow in debug info size calculation Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0163/2151] perf jitdump: Bounds-check debug entry byte-swap loop Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0164/2151] perf jitdump: Check snprintf return before computing header size Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0165/2151] perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0166/2151] perf jitdump: Free event in jit_repipe_code_move() Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0167/2151] perf: replace strcpy() with strncpy() in util/jitdump.c Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0168/2151] perf jitdump: Use dirname() return value in jit_open() Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0169/2151] perf jitdump: Validate debug entries on native (non-swap) path Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0170/2151] perf jitdump: Validate sym string NUL-termination in code load Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0171/2151] perf jitdump: Validate unwinding sizes against record payload Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0172/2151] dt-bindings: display: panel: samsung,s6e8aa5x01: Allow common properties Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0173/2151] remoteproc: qcom_q6v5_adsp: Fix double jiffies conversion in adsp_start() Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0174/2151] arm64: dts: qcom: sdm845-sony-xperia-tama: Fix Bluetooth UART pinctrl Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0175/2151] cxl/mce: Avoid alias page retirement for corrected errors Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0176/2151] remoteproc: xlnx: Initialize mailbox work before requesting channels Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0177/2151] dt-bindings: clock: qcom,milos-camcc: Document interconnect path Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0178/2151] dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0179/2151] dt-bindings: clock: qcom,milos-videocc: " Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0180/2151] lsm: dont call security_backing_file_free() multiple times Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0181/2151] ASoC: wcd-mbhc-v2: Fix incorrect properties names and typos Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0182/2151] pwm: renesas-tpu: Fix runtime PM reference leak Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0183/2151] spi: omap2-mcspi: Remove unbalanced pm_runtime_put_sync() calls Greg Kroah-Hartman
2026-11-18 14:31 ` [PATCH 6.18 0184/2151] soc: qcom: apr: clean up failed service registrations Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0185/2151] platform/chrome: cros_ec_proto: Fix deferred response Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0186/2151] staging: rtl8723bs: remove unused private debug counters Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0187/2151] staging: rtl8723bs: disable SDIO function on block size failure Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0188/2151] staging: octeon: schedule the TX cleanup tasklet every 1024th packet Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0189/2151] clk: fix self-consuming provider module pinning Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0190/2151] microblaze: CCF: fix refcount leak Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0191/2151] microblaze: prevent ptrace writes to MSR and pt_mode Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0192/2151] soundwire: intel: initialise quirk_mask before reading it Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0193/2151] arm64: dts: rockchip: Correct Device Orientation on Gameforce Ace Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0194/2151] cxl/ras: Pass the PCI devices struct device to match_memdev_by_parent() Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0195/2151] wifi: rtw88: debugfs: dont vzalloc(0) when rsvd_page is read unconfigured Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0196/2151] sched_ext/scx_flatcg: Make cgv_node_less() wraparound-safe Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0197/2151] fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0198/2151] sched/core: Dont steal a proxy-exec donor Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0199/2151] dlm: validate lock modes in recovery messages Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0200/2151] dlm: fix NULL pointer dereference in dlm_dump_rsb_name() Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0201/2151] dlm: fix buffer overflow from negative len in dlm_search_rsb_tree Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0202/2151] dlm: fix variable key length lookup Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0203/2151] remoteproc: imx_dsp_rproc: Drop extra space Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0204/2151] remoteproc: imx_dsp: Acquire runtime PM before adding carveouts Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0205/2151] arm64: dts: imx95: Avoid 32-bit PCIe window System RAM overlap Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0206/2151] x86/crash: Reserve elfcorehdr for CONFIG_NR_CPUS, not CONFIG_NR_CPUS_DEFAULT Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0207/2151] bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0208/2151] PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0209/2151] dmaengine: fsl_raid: dont invoke client callback under desc_lock Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0210/2151] dmaengine: fsl_raid: avoid free_q underflow in free_chan_resources Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0211/2151] RDMA/hns: Fix missing CQE when UD QP use different SL Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0212/2151] clk: Use the generic OF phandle parsing in only one place Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0213/2151] wifi: ath12k: signal regd update completion when reg event is dropped Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0214/2151] wifi: ath11k: disable interrupts during firmware crash recovery Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0215/2151] wifi: ath11k: fix sporadic WLAN initialization failures Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0216/2151] wifi: ath11k: fix NULL dereference in ahb remove when QMI init incomplete Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0217/2151] wifi: ath11k: unregister PM notifier on QMI init failure path Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0218/2151] arm64: dts: broadcom: bcm2712: Add V3D device node Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0219/2151] arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to root level Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0220/2151] arm64: dts: broadcom: bcm2712: adjust display status Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0221/2151] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0222/2151] selftests/clone3: tighten CLONE_CLEAR_SIGHAND conflict test Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0223/2151] selftests/pidfd: fix PPID values in error message Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0224/2151] wifi: mac80211: dont seed an S1G stas last_rate Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0225/2151] wifi: mac80211: fix unauthorised port check for encap offload Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0226/2151] wifi: mac80211: fix key selection for encap offload frames Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0227/2151] wifi: mac80211: dont send encap offload frames unencrypted Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0228/2151] wifi: mac80211: drop encap offload frames with a tainted key Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0229/2151] wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0230/2151] wifi: wfx: fix possible device hang during init Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0231/2151] hwrng: cctrng - Fix runtime PM usage counter leak Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0232/2151] crypto: asymmetric_keys - fix OOB read in pefile_parse_binary Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0233/2151] wifi: mac80211: fix swapped fq_overlimit/fq_overmemory in aqm debugfs Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0234/2151] irqchip/riscv-imsic: Use GENMASK for base address masks Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0235/2151] memory: brcmstb_dpfe: validate firmware section sizes Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0236/2151] arm64: dts: qcom: purwa: Drop the Hamoa workaround for PDC Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0237/2151] arm64: dts: ti: k3-j722s-evm: Switch audio codec clock from audio_refclk1 to external clock Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0238/2151] cxl/features: Reject feature offset that overflows 16-bit field Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0239/2151] cxl/fwctl: Propagate feature RPC delivery errors Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0240/2151] selftests/bpf: make cmdline_contains stricter Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0241/2151] spi: amlogic: spisg: Fix transfer size limit and timeout handling Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0242/2151] spi: amlogic: spisg: Fix the incorrect keep_ss of the last descriptor Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0243/2151] regulator: mp886x: fix vsel_mask Greg Kroah-Hartman
2026-11-18 14:32 ` [PATCH 6.18 0244/2151] efi/cper: Reject CPER records with an out-of-range error_data_length Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0245/2151] efi/cper: Reject an error status block length that wraps a u32 Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0246/2151] ACPI: extlog: Validate elog record length before walking sections Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0247/2151] ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0248/2151] ACPI: extlog: Trace CPER Non-standard Section Body Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0249/2151] ACPI: extlog: Trace CPER PCI Express Error Section Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0250/2151] ACPI: APEI: GHES: Add helper to copy CPER CXL protocol error info to work struct Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0251/2151] ACPI: extlog: Trace CPER CXL Protocol Error Section Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0252/2151] ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0253/2151] ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0254/2151] efi/cper: Read only validated fields in cper_mem_err_pack() Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0255/2151] ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0256/2151] spi: mtk-nor: fix runtime PM usage count leak in probe error path Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0257/2151] remoteproc: imx_rproc: Allow mappings ending at region boundary Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0258/2151] perf trace: Fix error checking in btf_struct_scnprintf() Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0259/2151] perf evsel: Validate branch stack before byte swapping Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0260/2151] perf evsel: Validate RAW sample " Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0261/2151] RDMA/irdma: Preserve fast-registration IOVA on 32-bit Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0262/2151] gpio: crystalcove: add missing MODULE_ALIAS() Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0263/2151] ABI: sysfs-class-infiniband: Drop the entries of the removed qib driver Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0264/2151] pwm: loongson: Reload PWM configuration through counter reset Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0265/2151] drivers/base/node: fix UAF on device_register() failure Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0266/2151] irqchip/gic-v3-its: Dont WARN on LPI free allocation failure Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0267/2151] ASoC: es8326: report resume restore errors Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0268/2151] ASoC: es8375: " Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0269/2151] ASoC: codecs: ES8389: Modify volatile_register Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0270/2151] ASoC: es8389: report resume restore errors Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0271/2151] ASoC: fs210x: report register " Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0272/2151] arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmware Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0273/2151] arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header path Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0274/2151] virtio_ccw: fix synchronize_cbs() after interrupt fallback Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0275/2151] virtio_ccw: always take irq_lock in the classic interrupt handler Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0276/2151] pwm: mtk-disp: Fix period readback Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0277/2151] mac80211: tx: Use info->flags in ieee80211_tx_h_select_key() Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0278/2151] ASoC: mediatek: mt8186: Fix APLL mux setting error handling Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0279/2151] ASoC: mediatek: mt8186: Fix clock handling in mux disable path Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0280/2151] ASoC: mediatek: mt8186: Fix AFE clock error handling Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0281/2151] ASoC: mediatek: mt8186: Fix APLL enable " Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0282/2151] ASoC: mediatek: mt8186: Fix MCK " Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0283/2151] ASoC: mediatek: mt6797: fix wrong unwind order and error code in enable_clock Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0284/2151] pwm: lp3943: fix NULL pointer dereference for an unconfigured channel Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0285/2151] selftests/sched_ext: Handle CPU hotplug write failures Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0286/2151] EDAC/i10nm: Fix Granite Rapids ADXL MC mapping Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0287/2151] perf bpf: Fix up build failure due to change of btf_vlen() return type Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0288/2151] perf trace: Enhance BTF type formatting to symbolise kernel function pointers Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0289/2151] perf trace: Add upper bound checks for augmented BTF struct printing Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0290/2151] libbpf: Fix array comparison in BTF dedup Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0291/2151] mtd: spinand: Fix spinand_manufacturer_ops kernel-doc Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0292/2151] ASoC: codecs: sma1307: validate setting firmware layout Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0293/2151] ASoC: codecs: sta32x: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0294/2151] ASoC: sta32x: make power restoration transactional Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0295/2151] spi: amlogic-spisg: check clk_prepare_enable() return value Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0296/2151] dmaengine: sun6i-dma: Fix use-after-free in error handling paths Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0297/2151] dmaengine: at_hdmac: Fix use-after-free by proper tasklet cleanup Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0298/2151] dmaengine: mediatek: hsdma: fix runtime PM leak on init failure Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0299/2151] dmaengine: img-mdc: Fix runtime PM usage counter leak Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0300/2151] dmaengine: zynqmp_dma: Fix chan probe/remove error handling Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0301/2151] dmaengine: dw-axi-dmac: convert clock handling to clk_bulk API Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0302/2151] dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0303/2151] dmaengine: xilinx_dma: Move descriptors to done list based on completion bit Greg Kroah-Hartman
2026-11-18 14:33 ` [PATCH 6.18 0304/2151] dmaengine: zynqmp_dma: drop redundant label Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0305/2151] ASoC: codecs: nau8822: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0306/2151] ASoC: codecs: nau8822: add support for supply regulators Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0307/2151] ASoC: nau8822: keep regcache offline while supplies are off Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0308/2151] ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310 Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0309/2151] ACPI: PM: Drop parent state update from acpi_device_get_power() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0310/2151] ACPI: PCI: Introduce acpi_dev_get_pci_dev() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0311/2151] ACPI: scan: Stop calling acpi_bus_init_power() early Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0312/2151] ACPI: glue: Reduce debug noise from acpi_device_notify() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0313/2151] ACPI: glue: Rework the success message in acpi_device_notify() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0314/2151] ACPI: utils: Adjust message printing macros for ACPI objects Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0315/2151] wifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0316/2151] wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0317/2151] wifi: ath12k: Free allocated CE IRQs on request_irq() failure Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0318/2151] wifi: ath12k: Free allocated external " Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0319/2151] selftests: net: csum: filter packets by source address and port Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0320/2151] cpufreq/amd-pstate-ut: Fix amd_pstate_ut_check_freq failure with Requested CPU Min frequency BIOS option Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0321/2151] power: supply: mp2629: Use the full batt_impedance_compensation name in the ABI document Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0322/2151] power: supply: mm8013: Publish the OF module alias Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0323/2151] power: supply: bq24190_charger: use the wake irq API Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0324/2151] dt-bindings: power: bq27xxx: bq27z561: allow interrupts property Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0325/2151] power: supply: bq2515x: Propagate charge-enable read errors Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0326/2151] scsi: mpi3mr: Fix buffer overflow in BSG passthrough request copy Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0327/2151] scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0328/2151] scsi: mpi3mr: Fix I/O block counter leak on admin request post failure Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0329/2151] scsi: mpi3mr: Fix target device reference leak in BSG task management Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0330/2151] scsi: mpi3mr: Fix buffer overflow when caching log data Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0331/2151] scsi: mpi3mr: Fix out-of-bounds reply frame access Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0332/2151] scsi: mpi3mr: Fix out-of-bounds sense buffer access Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0333/2151] scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0334/2151] scsi: mpi3mr: Fix target device reference leak in device removal handshake Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0335/2151] scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0336/2151] scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0337/2151] scsi: mpi3mr: Fix out-of-bounds read of event data Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0338/2151] scsi: mpi3mr: Fix out-of-bounds phy array access on link change Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0339/2151] scsi: mpi3mr: Fix buffer overflow in the BSG target device map Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0340/2151] scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0341/2151] scsi: mpi3mr: zero out diagnostic buffer status memory Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0342/2151] scsi: mpi3mr: Fix use-after-free of the firmware event workqueue Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0343/2151] scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0344/2151] iio: accel: kionix-kx022a: Fix IPOL macro name Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0345/2151] iio: imu: adis16400: Check return value of spi_setup() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0346/2151] efi/libstub: Fix efi_set_event_at() parameter documentation Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0347/2151] kernfs: fix up the unlocked attribute reads on the creation paths Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0348/2151] arm64: dts: mediatek: mt8188-geralt: Enlarge SCP core0 memory region Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0349/2151] PCI: xgene: Use managed clock for PCIe controller Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0350/2151] RDMA/hns: Limit gmv_entry_num to avoid memory waste Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0351/2151] RDMA/hns: Fix GID capacity loss in 64K system Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0352/2151] usb: image: microtek: stop SG processing after transfer errors Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0353/2151] USB: usbmon: fix null-ptr-deref in mon_bus_remove() when mon_bus_init() fails Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0354/2151] USB: pci-quirks: Release EHCI device reference Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0355/2151] usb-storage: alauda: do not do DMA from the stack Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0356/2151] usb-storage: alauda: check the return value of alauda_read_map() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0357/2151] usb-storage: alauda: fix out-of-bounds zone index Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0358/2151] usb: musb: da8xx: depopulate OF children on remove Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0359/2151] usb: musb: da8xx: depopulate OF children on probe failure Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0360/2151] dmaengine: sprd: use clk_bulk API to fix clock imbalance Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0361/2151] firmware: arm_scmi: Protect xfer->async_done with xfer->lock Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0362/2151] firmware: arm_scmi: Dont reuse raw xfers with async_done still armed Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0363/2151] firmware: arm_scmi: Fix error path leak in scmi_raw_message_send() Greg Kroah-Hartman
2026-11-18 14:34 ` [PATCH 6.18 0364/2151] usb: gadget: composite: avoid warning on aborted delayed status Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0365/2151] usb: gadget: f_mass_storage: ignore class requests while inactive Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0366/2151] dmaengine: fsl_raid: zero CF descriptor pool allocations Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0367/2151] dmaengine: dw-axi-dmac: Fix AXI burst length encoding Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0368/2151] dmaengine: dw-axi-dmac: Fix LLI dump out-of-bounds access Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0369/2151] dmaengine: dw-axi-dmac: Fix CH_CFG2 channel priority position Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0370/2151] PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0371/2151] regulator: ab8500: Fix AB8505 VANA voltage selectors Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0372/2151] regulator: ab8500: Remove stale expand_register kernel-doc entry Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0373/2151] regulator: ab8500: Add AB8505 VAUX3 3.05 V setting Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0374/2151] regulator: ab8500: Handle AB8505 VINTCORE selector 7 Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0375/2151] regulator: ab8500: Treat cut 1.0 VAUX3 as fixed Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0376/2151] regulator: ab8500: Test dedicated enable bits only Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0377/2151] regulator: ab8500: Propagate mode enable read errors Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0378/2151] arm64: dts: qcom: sm7225-fairphone-fp4: Disable PMK8350 PON Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0379/2151] sit: fix UAF in ipip6_tunnel_del_prl() Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0380/2151] ip_tunnel: use WRITE_ONCE in ip_tunnel_encap_setup Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0381/2151] crypto: amlogic - Fix DMA memory leak in cipher error path Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0382/2151] crypto: qat - avoid OOB read when stripping RSA leading zeros Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0383/2151] crypto: qat - release instance on DH fallback allocation failure Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0384/2151] crypto: rsassa-pkcs1 - reject undersized keys when signing Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0385/2151] crypto: rsassa-pkcs1 - reject undersized keys when verifying Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0386/2151] crypto: mxs-dcp - handle zero-length skcipher requests Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0387/2151] crypto: lskcipher - preserve state across unaligned chunks Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0388/2151] memory: exynos5422-dmc: handle clock enable failures Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0389/2151] gfs2: Fix journaled truncate range end offset Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0390/2151] ACPI: glue: Carry out companion lookup under bus_type_sem Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0391/2151] ACPI: glue: Fix up and adjust acpi_unbind_one() Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0392/2151] thermal: gov_power_allocator: Fix NULL pointer dereference in update_tz() Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0393/2151] firewire: cdev: Fix FW_CDEV_IOC_CREATE_ISO_CONTEXT references in kernel-doc Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0394/2151] firewire: core: remove unused link field in fw_packet structure Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0395/2151] cpuidle: menu: Remove incorrect unlikely() annotation Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0396/2151] cpuidle: menu: Remove single state handling Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0397/2151] cpuidle: menu: Do not return a disabled idle state Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0398/2151] ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200 Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0399/2151] ARM: dts: stm32: lxa-tac: " Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0400/2151] ARM: dts: stm32: fairytux2: " Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0401/2151] ARM: dts: stm32: add LTDC / DCMIPP access controller for STM32MP135 Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0402/2151] cpuidle: teo: Do not return a disabled idle state Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0403/2151] PM: runtime: Only queue an idle check for RPM-linked suppliers Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0404/2151] ARM: dts: stm32: Drop bias-disable from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0405/2151] HID: i2c-hid: Unfollow the panel on shutdown Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0406/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp15 DK boards Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0407/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp157c-ev1 Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0408/2151] ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0409/2151] bpf: Fix program BTF use-after-free in sleepable programs Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0410/2151] ARM: dts: imx7-tqma7: correctly specify PMIC voltage constraints Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0411/2151] arm64: dts: ti: k3-j784s4-j742s2-evm-common: Set ACSPCIe refclk to MAIN_PLL2_HSDIV4 for pcie1 Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0412/2151] x86/svm: Avoid sign extension of SVM_EVTINJ_VALID in 64-bit expressions Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0413/2151] clk: mediatek: reset: Fix device registration kernel-doc Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0414/2151] clk: rs9: Add clock index range check to rs9_of_clk_get() Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0415/2151] clk: s2mps11: Propagate OF provider registration failures Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0416/2151] spi: Fix the return value in spi_new_ancillary_device() kernel-doc Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0417/2151] ata: libata-scsi: Fix ata_scsi_hotplug() reference in kernel-doc Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0418/2151] gfs2: Fix the return value in gfs2_get_link() kernel-doc Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0419/2151] virtio: synchronize callbacks after device reset Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0420/2151] virtio_pci_modern: move avq cleanup from reset to del_vqs Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0421/2151] ALSA: control: Fix virtual master creation reference in kernel-doc Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0422/2151] ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0423/2151] ACPI: video: Fix backlight unregistration ordering Greg Kroah-Hartman
2026-11-18 14:35 ` [PATCH 6.18 0424/2151] cgroup/dmem: Fix eviction helper reference in dmem_cgroup_try_charge() Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0425/2151] clk: sunxi-ng: div: Add feature support to M clock macro Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0426/2151] clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0427/2151] clk: sunxi-ng: sun55i-a523-ccu: Use P-only clocks for high-speed timers Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0428/2151] clk: sunxi-ng: sun55i-a523-r-ccu: Use P-only clocks for timers Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0429/2151] perf header: Fix potential memory corruption in cpu_cache_level__read Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0430/2151] regulator: qcom-rpmh: Fix the return value in rpmh_regulator_vrm_get_optimum_mode() kernel-doc Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0431/2151] libbpf: fix log level propagation for light skeleton loaders Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0432/2151] fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0433/2151] fs/ntfs3: update ctime only on successful setxattr Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0434/2151] ntfs: Do not kmap page cache pages for compression Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0435/2151] fs/ntfs3: zero frame pages on read error Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0436/2151] pinctrl: amd: add timeout to irq-enable readback Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0437/2151] microblaze: uaccess: Zero out destination on failed get_user() Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0438/2151] microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0439/2151] arm64: pi: Run the source checker on the libfdt objects under C=2 Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0440/2151] wifi: mac80211: Fix the return value in mesh_path_add() kernel-doc Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0441/2151] wifi: mac80211: dont reset the TXQ scheduling round number Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0442/2151] mtd: spi-nor: spansion: Remove s25fs256s0 Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0443/2151] wifi: wfx: fix use-after-free of the cooling work on device removal Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0444/2151] f2fs: quota: fix stale lock holder on remount failure Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0445/2151] firmware: imx: dsp: fix mailbox channel leak on kasprintf failure Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0446/2151] memblock: reject non-page-aligned reserve_mem regions Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0447/2151] phy: hisilicon: hi3670: Fix OF node and device reference leaks Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0448/2151] phy: cadence: Sierra: Do not modify register when getting parent clock Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0449/2151] memory: emif: fix device_node reference leak on np_ddr Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0450/2151] RDMA/rxe: Use validated num_sge in local buffer Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0451/2151] RDMA/uverbs: Make CQ handle mandatory for WQ creation Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0452/2151] media: i2c: ar0521: remove duplicate media entity cleanup Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0453/2151] block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0454/2151] remoteproc: core: Set trace buffer name for diagnostics Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0455/2151] dmaengine: mv_xor: kill tasklet on channel add error path Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0456/2151] loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0457/2151] platform/x86/intel/vsec: reset state before re-enumerating Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0458/2151] wifi: rtw88: sdio: zero the padding added to a TX transfer Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0459/2151] ntfs3: fix out-of-bounds read in ntfs_read_mft() Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0460/2151] fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0461/2151] mm/gup_test: reject wrapped user ranges Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0462/2151] mm/gup_test: safely calculate GUP batch size Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0463/2151] mm/gup_test: report actual pinned bytes Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0464/2151] crypto: eip93 - fix ssl mac bit field definition Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0465/2151] arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0466/2151] ACPI: tables: handle failed initrd override mappings Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0467/2151] cxl/hdm: Reject switch decoder interleave ways that overflow targets Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0468/2151] cxl/hdm: Make switch decoder target parsing endian-safe Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0469/2151] cxl/hdm: Restore commit_end when decoder enumeration fails Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0470/2151] cxl/port: Bound switch decoder target array access by nr_targets Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0471/2151] pinctrl: stm32: Drop the nonexistent CONFIG_MACH_STM32MP25 from the STM32MP257 default Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0472/2151] ASoC: codecs: rt1015: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0473/2151] ASoC: rt1015: make control calibration failures observable Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0474/2151] ASoC: SOF: imx: Prevent stack OOB read in DSP panic dump Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0475/2151] scsi: pm8001: Fix SATA FIS offset in struct hw_event_resp Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0476/2151] staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0477/2151] selftests/bpf: Wait for links to come up in lwt_ip_encap Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0478/2151] md/raid10: fix missing wakeup in wait_barrier_nolock Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0479/2151] md: reject v0.90 arrays with too many devices Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0480/2151] md/raid5: dont BUG() on an inconsistent reshape state from the superblock Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0481/2151] md/raid5: reject raid4/5 arrays with too few disks Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0482/2151] md/raid5: setup_conf: Fix null-ptr-def in error handling path Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0483/2151] md/raid5: reject a per-device size smaller than one chunk Greg Kroah-Hartman
2026-11-18 14:36 ` [PATCH 6.18 0484/2151] kernfs: dont hold kernfs_rwsem across notification delivery Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0485/2151] kernfs: pass struct ns_common instead of const void * for namespace tags Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0486/2151] kernfs: make directory seek namespace-aware Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0487/2151] kernfs: dont repeat or skip an entry when readdir resumes Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0488/2151] kernfs: dont hold kernfs_rwsem across dir_emit() Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0489/2151] ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0490/2151] ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0491/2151] spi: virtio: fix max frequency setting Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0492/2151] clk: si521xx: correct the SI52147 OF output enable map Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0493/2151] clk: milbeaut: Return divider update timeouts Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0494/2151] drm/amd/pm: bound SCLK FCW range entries to the table size Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0495/2151] drm/amd: Add correct prefix for VBIOS message Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0496/2151] drm/amdgpu: Print full vbios info Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0497/2151] drm/amdgpu: bounds check ATOM IIO table parsing Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0498/2151] drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0499/2151] ata: sata_dwc_460ex: Dont enable interrupt if libATA core registration fails Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0500/2151] accel/amdxdna: Fully initialize map structure before registering notifier Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0501/2151] accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0502/2151] dt-bindings: interrupt-controller: chrp,open-pic: Typo s/pci/pic/ Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0503/2151] dt-bindings: interrupt-controller: chrp,open-pic: Fix dangling reference Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0504/2151] libbpf: Reject local struct_ops bitfields before data access Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0505/2151] rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0506/2151] rcu: fix shrink budget underflow in lazy_rcu_shrink_scan Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0507/2151] PCI: dra7xx: Remove device links to PHY Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0508/2151] PCI: dra7xx: Fix clock enable leak on probe failure Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0509/2151] kconfig: fix extra output from savedefconfig on out-of-range defaults Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0510/2151] cxl/pci: Skip reset detection for DVSEC emulated decoders Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0511/2151] cxl/port: Fix uninitialized coordinates reported for RCDs Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0512/2151] cxl/test: Add support for acpi extended linear cache Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0513/2151] cxl/port: Reduce number of @dport variables in cxl_port_add_dport() Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0514/2151] cxl/port: Cleanup dport removal with a devres group Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0515/2151] cxl/port: Move decoder setup before dport creation Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0516/2151] cxl/port: Move dport probe operations to a driver event Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0517/2151] cxl/port: Move dport RAS setup to dport add time Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0518/2151] cxl/core: Fix dport use-after-free via the einj_inject debugfs file Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0519/2151] crypto: qat - fix active_devs leak on crypto alg registration failure Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0520/2151] crypto: atmel-sha - reject initialization without a device Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0521/2151] interconnect: exynos: Remove the PM QoS request on unbind Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0522/2151] interconnect: qcom: icc-rpm: Handle icc_link_create() failures Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0523/2151] interconnect: qcom: use 64-bit SMD RPM bus votes Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0524/2151] RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device() Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0525/2151] RDMA/restrack: Dont set RESTRACK_DD mark after a failed xa_insert() Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0526/2151] RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0527/2151] cxl/region: Create node access attributes for CFMWS-only NUMA nodes Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0528/2151] cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0529/2151] ACPI: CPPC: Validate the _CPC package header Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0530/2151] ASoC: codecs: ab8500: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component() Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0531/2151] ASoC: codecs: ab8500: convert to snd_soc_dapm_xxx() Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0532/2151] ASoC: codecs: ab8500: Remove suspicious code Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0533/2151] ASoC: codecs: ab8500: Use guard() for mutex locks Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0534/2151] ASoC: ab8500: Remove the nonfunctional sidetone apply control Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0535/2151] ASoC: ab8500: Skip digital microphone support on AB8505 Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0536/2151] spi: mxic: fix ps_clk leak in runtime resume Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0537/2151] ACPI: HMAT: preserve hmat_adist_nb notifier block Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0538/2151] perf tool: Add the perf_tool argument to all callbacks Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0539/2151] perf build: Dont add NO_AUXTRACE if missing feature-get_cpuid Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0540/2151] perf build: Remove NO_AUXTRACE build option Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0541/2151] perf auxtrace: Remove errno.h from auxtrace.h and fix transitive dependencies Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0542/2151] perf arch x86 tests: Add test for topdown event sorting Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0543/2151] perf topdown: Dont require config1==0 for a slots event Greg Kroah-Hartman
2026-11-18 14:37 ` [PATCH 6.18 0544/2151] dt-bindings: vendor-prefixes: add ESS Technology Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0545/2151] clk: raspberrypi: Handle cpufreq device registration failure Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0546/2151] clk: versatile: clk-icst: Fix node reference leak in of_syscon_icst_setup() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0547/2151] clk: starfive: jh7110: reject oscillator lookup errors Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0548/2151] bpf, lsm: Reject writes into the BPF LSM program context Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0549/2151] pinctrl: fix PINCTRL_SPPCTL=m Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0550/2151] fs/ntfs3: check INDEX_ROOT resident size before use in ntfs_read_mft() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0551/2151] fs/ntfs3: fix valid_size not being updated in attr_allocate_frame() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0552/2151] fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0553/2151] fs/ntfs3: validate $SDH entry size in ntfs_insert_security Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0554/2151] pmdomain: imx: Propagate SCU provider registration failures Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0555/2151] dt-bindings: vendor-prefixes: add vendor prefix for Nexperia B.V Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0556/2151] thermal: renesas: rzg3e: make min and max temperature per-chip Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0557/2151] drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0558/2151] thermal: renesas: rzg3e: make calibration value retrieval per-chip Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0559/2151] thermal: renesas: rzg3e: Remove stale @trim_offset kernel-doc entry Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0560/2151] thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0561/2151] thermal/drivers/renesas/rzg3e: Fix race between set_trips() and get_temp() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0562/2151] bpftool: Make skeleton C++ compatible with explicit casts Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0563/2151] bpftool: Generate skeleton for global percpu data Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0564/2151] bpftool: Compute map size of light skeletons at runtime Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0565/2151] selftests/bpf: Clean up child when task_work__open() fails Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0566/2151] i3c: mipi-i3c-hci: Restore controller state if i3c_hci_enable_ibi() returns an error Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0567/2151] i3c: mipi-i3c-hci: Fix runtime PM violation in i3c_hci_free_ibi() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0568/2151] pstore: dont leave an ERR_PTR in the ramoops zone pointer Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0569/2151] pstore: reject persistent RAM zones too small for the buffer header Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0570/2151] KMSAN: fix memset() when using fortify-source, again Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0571/2151] md/raid5: give the io_unit slab caches per-array names Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0572/2151] mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0573/2151] leds: lp8860: Fix device_node leak in lp8860_probe() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0574/2151] leds: pca9532: Check i2c_smbus_read_byte_data() return value Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0575/2151] perf test: Fix a leaked map reference in the arch dwarf unwind tests Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0576/2151] perf libbfd: Fix the clang -Wthread-safety build failure Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0577/2151] perf symbol: Fix the build when demangling with libbfd Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0578/2151] perf build: Only pass clang flags to CXX when CXX is clang Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0579/2151] perf build: Use the given CC rather than clang in clang builds Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0580/2151] perf build: Check the version of the compiler that is used Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0581/2151] perf check: Add libbabeltrace to the listed features Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0582/2151] perf test: perf data --to-ctf testing Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0583/2151] tools build: Deduplicate test-libunwind for different architectures Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0584/2151] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0585/2151] perf build: Remove leftovers of removed build options Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0586/2151] leds: lm3692x: Fix regulator/gpio leak and wrong enabled state on last write failure Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0587/2151] perf annotate-data: Show the sample count in the data-type browser Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0588/2151] RDMA/core: Fix partial copy of IPv6 flow_lbl in LAG hash skb Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0589/2151] RDMA/irdma: Fix erroneous -ENOMEM for large MR registration Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0590/2151] leds: st1202: Clear unused pattern slots in pattern_set() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0591/2151] leds: st1202: Name pattern index variables consistently Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0592/2151] leds: st1202: Scale pattern brightness to the 12-bit PWM range Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0593/2151] leds: st1202: Add hardware-accelerated blink support Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0594/2151] leds: st1202: Spell out the phase-shift configuration bit Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0595/2151] leds: st1202: Program the channel current for hardware patterns Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0596/2151] leds: st1202: Take a reference on the LED firmware node Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0597/2151] leds: st1202: Do not set brightness from atomic context Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0598/2151] leds: st1202: Clear unused pattern slots in blink_set() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0599/2151] leds: st1202: Honour max_brightness when blinking Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0600/2151] leds: st1202: Cap the channel current in st1202_led_set() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0601/2151] leds: flash: Prevent using uninitialized variable in flash_fault_show() Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0602/2151] regulator: mp886x: check get_voltage_sel() return value Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0603/2151] regulator: mp886x: fix pontential division by zero Greg Kroah-Hartman
2026-11-18 14:38 ` [PATCH 6.18 0604/2151] arm64: dts: ti: k3-am62-verdin: fix main_gpio0/main_gpio1 line names size Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0605/2151] RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0606/2151] ata: pata_parport: fix parport attach idr_alloc for Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0607/2151] ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0608/2151] ASoC: amd: acp3x-es83xx: " Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0609/2151] x86/boot: Remove redundant "cc" clobber in memcmp() and document it Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0610/2151] x86/asm: Introduce inline memcpy and memset Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0611/2151] x86/asm, x86/boot: Carve out inline memcmp() into a separate header Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0612/2151] x86/asm: Group inline string functions Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0613/2151] x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0614/2151] wifi: rtl8xxxu: free RX skb when URB submission fails Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0615/2151] RDMA/irdma: check vport device allocation Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0616/2151] RDMA/cxgb4: Fix neigh reference leak in rx_pkt() Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0617/2151] RDMA/cxgb4: Fix skb " Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0618/2151] RDMA/mlx5: Fix RQ resource reference leak in mlx5_ib_wq_event() Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0619/2151] RDMA/siw: Fix qp use-after-free in siw_get_base_qp() Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0620/2151] hwrng: starfive - propagate clock and reset errors Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0621/2151] crypto: starfive - handle clock enable failures Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0622/2151] crypto: starfive - propagate clock and reset errors Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0623/2151] crypto: api - Fix DUP_FIRST crash on unregister Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0624/2151] crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0625/2151] crypto: ccp - fix SFS ioctl race against device teardown Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0626/2151] crypto: ccp - kill v3 IRQ tasklet during teardown Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0627/2151] crypto: ccp - kill v5 " Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0628/2151] RDMA/mlx5: Guard steering anchor resource destruction on create error Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0629/2151] swim: Assert strobe with stable outputs Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0630/2151] swim: Select appropriate drive once only Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0631/2151] swim: Enable the drive when probing Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0632/2151] swim: Dont disable drive after every sector Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0633/2151] swim: Perform ISM/IWM mode switching according to specs Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0634/2151] swim: Configure parameter memory Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0635/2151] swim: Refactor SWIM setup Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0636/2151] swim: Enable clock divider only where appropriate Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0637/2151] swim: Dont start motor until medium is present Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0638/2151] swim: Recalibrate when drive is probed Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0639/2151] swim: Add track zero recalibration delay Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0640/2151] swim: Handle FIFO timeout error Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0641/2151] swim: Check for CRC errors Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0642/2151] swim: Simplify return value initialization Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0643/2151] swim: Check error register during sector read Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0644/2151] swim: Dont use the mark register to read data Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0645/2151] swim: Fix buffer overflow Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0646/2151] swim: Convert to blocking queue Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0647/2151] swim: Remove redundant RELAX actions Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0648/2151] swim: Deduplicate polling loops Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0649/2151] swim: Check drive ready bit Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0650/2151] swim: Revisit delays Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0651/2151] swim: Dont search beyond the first data mark Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0652/2151] media: i2c: ov5648: Fix a data race on state->streaming Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0653/2151] media: staging/ipu7: release ISYS firmware resources on remove Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0654/2151] serial: msm: select PM_OPP Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0655/2151] serial: txx9: Drop noop probe function and dangerous remove callback Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0656/2151] serial: 8250_hub6: add hub6_match_port() Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0657/2151] serial: 8250: fix compile error with hub6_match_port() when compiled as a module Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0658/2151] serial: 8250: Fix corner case for port matching Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0659/2151] serial: 8250: hub6: Add cleanup code Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0660/2151] RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0661/2151] serial: sh-sci: Drop checking port type for device file{create, remove} Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0662/2151] serial: sh-sci: Unregister UART on sysfs setup failure Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0663/2151] serial: 8250_uniphier: Use devm_clk_get_enabled() Greg Kroah-Hartman
2026-11-18 14:39 ` [PATCH 6.18 0664/2151] serial: sifive: fix off-by-one in console port bounds check Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0665/2151] HID: Intel-thc-hid: Intel-quicki2c: Use hid_safe_input_report() Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0666/2151] HID: Intel-thc-hid: Intel-quickspi: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0667/2151] ARM: dts: ux500: Convert HREF audio to audio-graph-card2 Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0668/2151] rust: clk: document overflow panics in `Hertz` constructors Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0669/2151] dt-bindings: vendor-prefixes: add Free Mobile Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0670/2151] arm64: dts: imx8mp-kontron: Fix LVDS clock frequency for DL device Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0671/2151] clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0672/2151] clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0673/2151] clk: qcom: fix SM6115 lpasscc register offset Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0674/2151] tools/nolibc: fix WIFSIGNALED() for status 0 Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0675/2151] bpftool: Fix CPU IDs in per-CPU map output Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0676/2151] bpftool: Accept zero perf counter snapshots Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0677/2151] bpftool: Group profile events by CPU Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0678/2151] bpftool: Scale counters and report cycles per run Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0679/2151] bpftool: Fix sparse CPU IDs in prog profile Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0680/2151] iommufd: Fix iommufd_hw_capabilities reference in kernel-doc Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0681/2151] ext2: drain in-flight DIO before buffered write fallback Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0682/2151] mfd: rk8xx: Register poweroff handler in atomic phase Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0683/2151] mfd: intel_quark_i2c_gpio: Manage the fixed-rate clock Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0684/2151] mfd: da9150: Balance IRQ wake on teardown Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0685/2151] um: Add definition of __NR_close_range for older host OSs Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0686/2151] rust: dma: allow drivers to tune max segment size Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0687/2151] rust: scatterlist: honor the devices maximum " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0688/2151] kconfig: warn about malformed KCONFIG_PROBABILITY values Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0689/2151] ASoC: fsl_asrc: use regmap_write_bits to update clock source registers Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0690/2151] perf mem: Fix size tracking for mem_lvls in perf_script__meminfo_scnprintf() Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0691/2151] NFS: use TCP for MOUNT when xprtsec= selects TLS Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0692/2151] PCI/TPH: Validate the firmware Steering Tag response Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0693/2151] bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0694/2151] ASoC: fsl_asrc: check the second front-end DMA channel Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0695/2151] ASoC: adau17x1: return cache sync errors from resume Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0696/2151] ASoC: ak4642: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0697/2151] ASoC: es8316: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0698/2151] ASoC: es8323: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0699/2151] ASoC: nau8540: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0700/2151] ASoC: rt1011: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0701/2151] ASoC: rt1016: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0702/2151] ASoC: rt1305: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0703/2151] ASoC: rt1308: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0704/2151] ASoC: rt1318: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0705/2151] ASoC: rt5616: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0706/2151] ASoC: rt5659: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0707/2151] ASoC: rt5660: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0708/2151] ASoC: rt5665: " Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0709/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0710/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0711/2151] ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0712/2151] ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0713/2151] ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0714/2151] spi: rockchip-sfc: disable runtime PM in remove Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0715/2151] spi: rockchip-sfc: skip DMA cleanup in PIO mode Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0716/2151] iio: accel: bma220: publish the SPI driver ACPI alias Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0717/2151] dt-bindings: arm: mediatek: Fix MT6779 audsys compatible Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0718/2151] powerpc/ftrace: Dont restore r13 during ftrace_regs_caller Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0719/2151] perf llvm: Fix memory leak of args->fileloc in symbol__disassemble_llvm() Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0720/2151] sysctl: unregister tables before freeing bitmap Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0721/2151] vfio: Reject a second cdev open before mutating shared device state Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0722/2151] arm64: dts: qcom: x1e80100-dell-inspiron-14-plus-7441: fix touchscreen i2c address Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0723/2151] arm64: dts: qcom: x1-crd: Mark the EC reset gpio as reserved Greg Kroah-Hartman
2026-11-18 14:40 ` [PATCH 6.18 0724/2151] arm64: dts: qcom: x1e001de-devkit: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0725/2151] arm64: dts: qcom: x1e78100-t14s: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0726/2151] arm64: dts: qcom: x1e80100-dell-xps13-9345: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0727/2151] arm64: dts: qcom: x1e80100-yoga-slim7x: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0728/2151] arm64: dts: qcom: x1e80100-qcp: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0729/2151] arm64: dts: qcom: x1-asus-zenbook-a14: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0730/2151] arm64: dts: qcom: x1-dell-thena: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0731/2151] arm64: dts: qcom: x1-hp-omnibook-x14: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0732/2151] arm64: dts: qcom: x1p42100-thinkbook-16: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0733/2151] dt-bindings: vendor-prefixes: Add General Mobile Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0734/2151] perf c2c: Fix documented default coalesce fields Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0735/2151] perf pmu: Add PMU kind to simplify differentiating Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0736/2151] perf evlist: Special map propagation for tool events that read on 1 CPU Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0737/2151] perf evlist: Dont restrict uncore events to PMU CPUs Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0738/2151] mtd: block: prevent reclaim I/O during request processing Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0739/2151] clk: qcom: gcc-qcs615: Fix GCC_CPUSS_GNOC_CBCR offset Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0740/2151] wifi: ath12k: avoid double DMA unmap of held monitor RX buffers Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0741/2151] wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event() Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0742/2151] writeback: size foreign flushes by target wb dirty pages Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0743/2151] ACPICA: Fix memory leak in acpi_ds_create_field() Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0744/2151] ACPICA: Fix PCC OperationRegion command offsets Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0745/2151] perf annotate-data: Resolve type DIEs in the debug file they came from Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0746/2151] ACPI: PCC: Preserve shared memory signature in OpRegion handler Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0747/2151] ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0748/2151] ASoC: mediatek: mt8183: Fix clock handling in mux disable path Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0749/2151] ASoC: mediatek: mt8183: Fix APLL enable error handling Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0750/2151] dt-bindings: vendor-prefixes: Add Chip Wealth Technology Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0751/2151] arm64: dts: qcom: sdm845-lg: fix sdcard pinctrl nodes Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0752/2151] hfs/hfsplus: serialize B-tree close against folio release Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0753/2151] x86/fpu: Fix potential underflow in xstate_calculate_size() Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0754/2151] arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0755/2151] arm64: dts: qcom: monaco-evk: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0756/2151] arm64: dts: qcom: qcs8300-ride: " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0757/2151] ARM: dts: qcom: msm8974: Sort header includes alphabetically Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0758/2151] ARM: dts: qcom: msm8974: add MDSS reset Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0759/2151] dt-bindings: vendor-prefixes: Add LeEco Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0760/2151] dt-bindings: vendor-prefixes: Add Retroid Pocket Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0761/2151] bpf: Skip zero-length stream writes Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0762/2151] tools/nolibc: provide the portable sys/select.h Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0763/2151] tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0764/2151] MIPS: Octeon: size the swiotlb for a modular OHCI platform driver Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0765/2151] MIPS: Only check -msym32 when need-compiler Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0766/2151] bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0767/2151] bitmap: bitmap_parse(): reject non-hex character before 8 digits Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0768/2151] bitmap: bitmap_parselist(): reject trailing characters after group size Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0769/2151] bitmap: bitmap_parselist(): dont wrap around on a huge " Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0770/2151] m68k: apollo: Fix interrupt setup Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0771/2151] drm/msm/a6xx: Fix secondary rail vote in ARC votes Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0772/2151] kbuild: Remove alignment on .modinfo section Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0773/2151] kbuild: do not allocate .modinfo in vmlinux Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0774/2151] kbuild: keep .modinfo when vmlinux is linked with --gc-sections Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0775/2151] netfilter: synproxy: fix reset of ct seqadj when reopening a connection Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0776/2151] ARM: dts: gemini: Use a level-high interrupt for TVE200 Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0777/2151] netfilter: nfnetlink_hook: Dump nat type chains Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0778/2151] netfilter: nfnetlink: Fix for interrupted hook dumps Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0779/2151] arm64: dts: qcom: hamoa-iot-evk: Add backlight support for eDP panel Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0780/2151] arm64: dts: qcom: hamoa-iot-evk: Enable TPM (ST33) on SPI11 Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0781/2151] arm64: dts: qcom: hamoa-iot-evk: add MCP2518FD CAN on spi18 Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0782/2151] arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0783/2151] PCI: aardvark: Disable PHY on probe failures Greg Kroah-Hartman
2026-11-18 14:41 ` [PATCH 6.18 0784/2151] arm64: dts: qcom: sm8150: Use SM8150_CX for the SDHC power domain Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0785/2151] um: time-travel: fix sched_yield() behaviour Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0786/2151] iommu/vt-d: Fix copied_tables bitmap leak on error in copy_translation_tables Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0787/2151] iommu/vt-d: Do not ignore context table copy failures Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0788/2151] iommu/vt-d: Cache max domain ID to avoid redundant calculation Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0789/2151] iommu/vt-d: Handle DID reservation errors when copying context tables Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0790/2151] iommu/vt-d: Reserve scalable-mode DIDs from PASID entries during copy Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0791/2151] iommu/vt-d: Fix iopf refcount leak in nested attach Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0792/2151] iommu/vt-d: Drop old iopf ref only after attach succeeds Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0793/2151] iommu/vt-d: Fix IQE handling to cover all descriptors in submission range Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0794/2151] arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2 Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0795/2151] wifi: mac80211: Fix a race when expiring a mesh path Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0796/2151] RDMA/irdma: Free IRQ when CEQ vector mapping fails Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0797/2151] RDMA/hns: Pin CQ buffer writable to match device DMA write access Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0798/2151] RDMA/mlx5: Fix mlx5_ib_dev_res_init() failure when XRC cap is absent Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0799/2151] RDMA/mlx5: Set WQ event handler before firmware RQ insertion Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0800/2151] RDMA/mlx5: Set SRQ event handler before xarray insertion Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0801/2151] RDMA/mlx5: Set RQ event handler for raw-packet QP Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0802/2151] RDMA/mlx5: Initialize QP/RQ/SQ resource refcount before publishing it Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0803/2151] ASoC: amd: acp-es8336: Use an owned codec device reference Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0804/2151] ASoC: amd: acp3x-es83xx: Keep " Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0805/2151] ALSA: oxygen: use helper to activate the SPDIF PCM control Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0806/2151] ALSA: via82xx: use helper to activate DXS controls Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0807/2151] drm/exynos/fimd: fix register offset type in fimd_trigger() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0808/2151] of/irq: Fix device node refcount leak in of_check_msi_parent() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0809/2151] rust: configfs: require thread-safe callback data Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0810/2151] staging: iio: adc: ad7816: Sort headers alphabetically Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0811/2151] staging: iio: adc: ad7816: Serialize SPI operations Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0812/2151] staging: iio: adc: ad7816: Protect sysfs attributes with mutex Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0813/2151] iio: dac: ad5758: Fix alignment for DMA safety Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0814/2151] iio: dac: ad5758: Reject out-of-range raw values Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0815/2151] iio: dac: ad5758: Fix the offset calculation Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0816/2151] ALSA: caiaq: Serialize access to the EP1 command buffer Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0817/2151] ALSA: caiaq: Fix the Kore controller key map Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0818/2151] spi: rspi: Fix DMA mode when the DMA controller is built as a module Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0819/2151] ASoC: mediatek: mt8192: fix APLL mux error handling Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0820/2151] ASoC: mediatek: mt8192: fix AFE clock " Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0821/2151] ASoC: mediatek: mt8192: fix error handling in APLL enable functions Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0822/2151] ASoC: mediatek: mt8192: fix MCK clock error handling Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0823/2151] ASoC: mediatek: mt8192: switch to devm_clk_get_optional() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0824/2151] ASoC: mediatek: mt8192: mt8192-afe-gpio: Use guard() for mutex locks Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0825/2151] ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0826/2151] ASoC: mediatek: mt8192: check return values in mt8192_afe_gpio_init() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0827/2151] ASoC: mediatek: mt8192: Handle regcache_sync() failure in runtime resume Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0828/2151] ASoC: mediatek: mt8192: Propagate mt8192_afe_gpio_request() errors in ADDA DAI Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0829/2151] ASoC: mediatek: mt8192: Propagate errors in TDM DAI DAPM event handlers Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0830/2151] ASoC: mediatek: mt8192: Propagate errors in I2S " Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0831/2151] ASoC: mediatek: mt8192-mt6359: Fix error handling in MTKAIF calibration Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0832/2151] perf test code-reading: Fix duplicate kernel maps and machine leak Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0833/2151] perf build: Clean libperf-gtk.so in make clean Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0834/2151] arm64: dts: ti: k3-am62-verdin-ivy: Fix main_gpio0/main_gpio1 line names size Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0835/2151] perf vendor events intel: Fix sierraforest umask encoding Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0836/2151] perf vendor events intel: Fix skylakex " Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0837/2151] perf vendor events intel: Fix snowridgex " Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0838/2151] soc: ti: k3-ringacc: Correct ring API kernel-doc Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0839/2151] soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0840/2151] fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0841/2151] cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0842/2151] spi: spi-qpic-snand: fix read location register usage in qcom_spi_config_cw_read() Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0843/2151] RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment Greg Kroah-Hartman
2026-11-18 14:42 ` [PATCH 6.18 0844/2151] IB/isert: Dont share drop_cmd_list across concurrent connection teardowns Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0845/2151] arm64: dts: imx8dxl-evk: fix reserved memory node names for remoteproc Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0846/2151] arm64: dts: imx8qm-mek: " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0847/2151] arm64: dts: imx8qm-mek: fix dsp " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0848/2151] arm64: dts: imx8qxp-mek: fix " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0849/2151] arm64: dts: imx8qxp-mek: fix dsp " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0850/2151] arm64: dts: imx8ulp-evk: fix " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0851/2151] arm64: dts: imx93-14x14-evk: " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0852/2151] arm64: dts: imx93-9x9-qsb: " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0853/2151] PCI/IOV: Read VF config values that need not match PF Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0854/2151] swim: Return -EROFS when opened with BLK_OPEN_WRITE flag Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0855/2151] swim: Fix FDEJECT ioctl for exclusive open Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0856/2151] swim3: " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0857/2151] RDMA/bnxt_re: Fix integer overflow in send payload size computation Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0858/2151] RDMA/bnxt_re: Detect wrong sge_len passed for inline Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0859/2151] RDMA/bnxt_re: Validate SRQ max_sge at create time Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0860/2151] RDMA/bnxt_re: Initialize wqe.flags in bnxt_re_post_srq_recv() Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0861/2151] RDMA/bnxt_re: Fix the PD and DPI table size Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0862/2151] RDMA/bnxt_re: Use bnxt_ext_stats_supported for counter count selection Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0863/2151] media: venus: Drop session events without an instance Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0864/2151] media: iris: cancel sys error work on driver removal Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0865/2151] rnull: configfs: add power to configfs features Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0867/2151] media: iris: take core lock when scanning the instance list Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0868/2151] media: iris: reject open() when the session limit is reached Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0876/2151] RDMA/rtrs-clt: Reject invalid queue_depth from the peer Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0877/2151] RDMA/rxe: Reject prefetch of a non-ODP MR Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0878/2151] RDMA/ionic: Fix XArray initialization to use XArray flags Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0879/2151] RDMA/ionic: Fix double removal of CMB mmap entries in create QP error path Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0880/2151] perf python: Initialize debug output on module load Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0881/2151] perf pmu: Fix race with concurrent tracepoint creation and removal in perf list Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0882/2151] RDMA/mad: Reject receive completions shorter than GRH Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0883/2151] RDMA/mlx4: Do not allow the user to write to the clock page Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0884/2151] RDMA/cxgb4: Do not allow userspace to write the status page Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0885/2151] time: Prevent time64_to_tm() day truncation on 32-bit Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0886/2151] RDMA/rtrs-clt: Dont WARN on unexpected info-response opcode Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0887/2151] vfio/platform: prevent read-only region mappings from becoming writable Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0888/2151] vfio/fsl-mc: " Greg Kroah-Hartman
2026-11-18 14:43 ` [PATCH 6.18 0889/2151] vfio/cdx: " Greg Kroah-Hartman
2026-11-18 16:59 ` [PATCH 6.18 0000/2151] 6.18.65-rc1 review Brett A C Sheffield
2026-11-18 17:40 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox