summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-19zloop: print device that had errorsJohannes Thumshirn
When testing zoned filesystems that span multiple zloop drives it can be difficult to figure out which devices access caused an error. Prefix the error messages where we have the disk available with the disk name. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://patch.msgid.link/20261019150936.1819956-1-johannes.thumshirn@wdc.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-10-19regmap: Merge up fixesMark Brown
The main thing here is a fix for lockdep warnings with MMIO regmaps that use a raw spinlock and a cache, some other lockdep fixes we'd done for the benefit of the maple tree on sleeping buses meant that we were doing allocations for those MMIO regmaps under a raw spinlock. While fixing that Michael Reeves also noticed that the debugfs files were briefly available without the cache structures backing them. There's also a fix for interrupt freeing on error in regmap-irq which had been hanging around because it's not super urgent.
2026-10-19ALSA: hda/realtek: Enable mute LED on HP Pavilion 15-eg2xxxMoroz Tymofii
The HP Pavilion 15-eg2xxx (103c:89f6) uses GPIO bit 4 for its speaker mute LED. Enable the existing ALC287 GPIO LED fixup for this system. Tested on Linux 7.3-rc7 without an hda_model override. The F5 LED follows speaker mute/unmute correctly, and audio playback works normally. Signed-off-by: Moroz Tymofii <moroztymofii@gmail.com> Link: https://patch.msgid.link/20261019164725.10666-1-moroztymofii@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ALSA: aloop: Keep the timer source alive until card releaseCen Zhang
The timer_source string must remain valid while PCM opens can select and parse it. loopback_set_timer_source() allocates the string with parent-device devres, which can release it while the card is still registered. A successful nonempty proc replacement after snd_card_register() adds the string allocation after trigger_card_free. Unbinding the platform device while snd_aloop remains loaded releases devres in reverse order. An open for an unused cable can run after the string is freed and before the card-free action disconnects the card: Device unbind PCM open devres_release_all() free replacement string snd_pcm_open() snd_card_file_add() loopback_open() loopback_snd_timer_open() loopback_parse_timer_id() trigger_card_free() snd_card_free() snd_card_disconnect() The parser can then read freed memory. KASAN has reported a one-byte use-after-free read in strchr() from loopback_snd_timer_open(). The cable_lock mutex serializes explicit replacements with opens, but implicit devres release does not take it. The card and module references held by PCM open do not retain this separate devres allocation. Use kstrdup() and release the current string from card->private_free. PCM admission already retains the card until each file is removed, and card disconnect drains proc callbacks before final card release. This keeps the string alive across admitted PCM opens and preserves the cable_lock serialization of replacements. Install the callback before the initial allocation so probe failures also release the string. Fixes: b072e65aadd6 ("ALSA: aloop: Allocate resources with device-managed APIs") Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-71a33a26d68356e3ade7-v1-108d86919c5c92fe1ea8@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ALSA: aloop: Keep shared timer callbacks alive through closeCen Zhang
The shared sound-timer callback must finish using the selected PCM runtimes before a close can detach them. loopback_snd_timer_period_elapsed() saves the active substreams under cable->lock, then drops the lock before calling snd_pcm_period_elapsed() or snd_pcm_stop_xrun(). The sound-timer backend has no per-stream close drain, and free_cable() keeps the timer open when the paired endpoint remains attached. With both directions running on a shared sound timer, playback can be dropped and closed while a notification is pending. Capture keeps the timer alive, allowing this order: Timer callback Playback owner -------------- -------------- select playback under cable->lock unlock; delay notification DROP; HW_FREE -> OPEN close: snd_pcm_drop(); unlock free_cable(); peer stays alive snd_pcm_period_elapsed() lock stream; cache runtime snd_pcm_detach_substream() free runtime and its fasync read runtime->fasync The stream lock taken by snd_pcm_drop() cannot protect a notification that starts after it returns, and detach does not take it. The callback can therefore read runtime->fasync after the runtime has been freed, and an escaped notification can also reach a replacement runtime if the same substream slot is reopened before the notification resumes. Take the existing cable->stop_count reference under cable->lock when selecting the targets and release it after the PCM callbacks finish, including the XRUN path. free_cable() already removes the closing endpoint under that lock and waits for stop_count before returning, so runtime detach and slot reuse cannot overtake the notification. Fixes: 26c53379f98d ("ALSA: aloop: Support selection of snd_timer instead of jiffies") Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-275c4399f517e09d7188-v2-2f64c1328529ef7a8fec@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ALSA: hda: aw88399: use SSID-specific firmware nameMarco Giunta
Use the ACPI subsystem ID to construct per-model firmware filenames (e.g. "awinic/aw88399_acf_17aa3938.bin") when loading firmware on HDA systems. This makes the driver compatible with the linux-firmware repository's per-device naming convention. Also, since the ACPI SSID is now required for firmware loading, change the error handling for a missing SSID from silently succeeding to an early -ENODEV return in aw88399_hda_acpi_probe(). Tested-by: Xia Yun'an <imitoy@imitoy.top> Signed-off-by: Marco Giunta <marco_giunta@outlook.it> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/SN6PR19MB23030BA9E3636DBBBB8C6408FC992@SN6PR19MB2303.namprd19.prod.outlook.com
2026-10-19ASoC: aw88399: pass firmware name as argumentMarco Giunta
Pass the ACF firmware filename as an argument to aw88399_request_firmware_file() instead of hardcoding AW88399_ACF_FILE. Both existing callers (ASoC and HDA) pass AW88399_ACF_FILE to preserve current behavior. Also add missing newlines to the log messages of the modified lines. This allows the HDA side codec driver to request per-model firmware files in the next patch. Tested-by: Xia Yun'an <imitoy@imitoy.top> Signed-off-by: Marco Giunta <marco_giunta@outlook.it> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/SN6PR19MB2303DB0BF41797A38EB04CBFFC992@SN6PR19MB2303.namprd19.prod.outlook.com
2026-10-19Merge tag 'asoc-v7.4' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v7.4 There's an awful lot of cleanup work in this pull request, lots from Bui Duc Phuc, Pengpeng Hou, HyeongJun An and Chancel Liu cleaning up detail issues in drivers in addition to Mormoto-san's ongoing framework work. This time Morimoto-san's work included enabling auto_selectable_formats so there's less manual configuration required for DAI links. There's also been a huge amount of upstreaming activity from Qualcomm, some pain there but hopefully enough has now landed for things to be smoother in future. - Use auto_selectable_formats in most drivers to reduce the amount of manual configuration required for DAI links. - Support for compressed audio on SOF IPC4 systems. - Support for AMD ACP 7.B and 7.F, AmLogic A9 and T7, Airoha AN7581, ESS Technology ES9039Q2M, Intel Cherry Trail with RT5688, Nuvoton NAU83G60, nVidia systems with WM8994, Qualcomm QAIF, Senary I2S, WCD9378 and various platforms, Realtek RT766 and RT767, Senary SN624x I also mistakenly merged some SPI changes in here then applied more patches on top before I noticed (it looks like this was b4's base selection logic picking a bad base for some ASoC work), highlights there are: - Improvements for spidev_test to cover additional use cases, plus be a bit easier to use. - Push more Tegra210 QSPI handling into interrupt context for performance improvements. - Support for Qualcomm QPIC SNAND v2 and RealTek RTD1625 NOR. - Documentation clarifications. - Fixes for some runtime PM and error handling issues. - Support for R-Car Gen5. (this should also be going in via my SPI pull request)
2026-10-19PCI: rcar-gen4: Add missing PM opsMarek Vasut
The R-Car Gen4 PCIe controller is part of a power domain. On R-Car S4 and V4H, this is an always-on power domain which is not shut down in suspend. On R-Car V4M, this is a dedicated A2PCIPHY power domain, which is shut down during suspend, and the controller loses state, which prevents the PCIe from working after resume. Fix this by adding generic suspend/resume noirq ops for the controller, which tear the link down on suspend, and restart it on resume. Use the same PM ops on all of R-Car Gen4 to gracefully suspend and resume the PCIe link on V4H and S4 too. Test case which demonstrates the problem on R-Car V4M: $ hexdump -vC /sys/bus/pci/devices/0000:00:00.0/config > /tmp/pre $ echo s2idle > /sys/power/mem_sleep $ echo platform > /sys/power/pm_test $ echo mem > /sys/power/state $ hexdump -vC /sys/bus/pci/devices/0000:00:00.0/config > /tmp/post $ diff -Naru /tmp/pre /tmp/post ... -00000000 12 19 32 00 07 05 10 00 00 00 04 06 00 00 01 00 +00000000 12 19 32 00 07 05 10 00 00 00 00 ff 00 00 80 00 ^^^^^ Class 0604->00ff Fixes: 0270dbe4f891 ("arm64: dts: renesas: r8a779h0: Add PCIe Host and Endpoint nodes") Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Koichiro Den <den@valinux.co.jp> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/20261004011851.866833-1-marek.vasut+renesas@mailbox.org
2026-10-19spi: Merge up fixesMark Brown
A small collection of driver specific fixes, all quite important if you have the relevant hardware.
2026-10-19dax: fix wrong error code returned from dax_dedupe_file_range_compare()Jianyun Gao
When dax_range_compare_iter() returns a negative error code (e.g. -EIO), dax_dedupe_file_range_compare() incorrectly returns 'ret' which holds the positive return value from iomap_iter() indicating more iterations remain. This positive value leaks to the caller, where vfs_dedupe_file_range() interprets it as success (bytes_deduped = len), causing userspace to incorrectly believe deduplication completed. Return 'status' instead to propagate the actual error code. Fixes: 0e79e3736d54 ("fsdax: dedupe: iter two files at the same time") Cc: stable@vger.kernel.org Signed-off-by: Jianyun Gao <jianyungao89@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Link: https://patch.msgid.link/20261015143426.17620-1-jianyungao89@gmail.com Signed-off-by: Alison Schofield <alison.schofield@intel.com>
2026-10-19dt-bindings: mfd: db8500-prcmu: Deprecate EPOD regulatorsLinus Walleij
Deprecate the db8500-prcmu-regulators node and make it optional as EPOD control moves to generic power domains. External consumers of VAPE and VSMPS2 now use the actual AB8500 or AB8505 buck regulators. Stop requiring the individual regulator child nodes while retaining their definitions for existing device trees. Assisted-by: LLM Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260921-ux500-power-domains-v7-1-v3-4-9352be6b86b1@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
2026-10-19io_uring/waitid: prevent cancel reference wrapJunyeong Lee
io_waitid packs the cancellation state into bit 31 of ->refs and uses bits 30:0 as a 31-bit reference counter: #define IO_WAITID_CANCEL_FLAG BIT(31) #define IO_WAITID_REF_MASK GENMASK(30, 0) __io_waitid_cancel() marks a request canceled, then increments the low bits of ->refs to claim completion ownership. When another path owns the request, the increment remains even though cancellation returns false. The request remains discoverable by cancellation, so repeated failed attempts can wrap the 31-bit reference field to zero. A later cancellation can claim ownership and complete the request a second time. Use atomic_fetch_or() when setting the cancel flag and inspect the old flag value. The first cancel attempt continues to the existing ownership increment, preserving its wake and issuer handoff semantics. Later attempts see the cancel flag and return without incrementing the reference field. This makes repeated failed cancellation attempts idempotent while leaving the first-cancel state transitions unchanged. Fixes: f31ecf671ddc ("io_uring: add IORING_OP_WAITID support") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Junyeong Lee <jylee5498@gmail.com> Link: https://patch.msgid.link/20261019152100.63565-1-jylee5498@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-10-19io_uring/poll: don't loop on HUP with multiple referencesJens Axboe
io_poll_check_events() drops down to one reference when a multishot request sees HUP with more than one, so that the loop goes around once more. It did so by subtracting one less than it had. With the cmpxchg that only takes the local count down: the exchange fails, the next pass reads the unchanged count, and goes through the same motions again. The loop then only ends once io_poll_issue() stops the request. Drop the extra references from the counter instead, and loop once more without trying the exchange. The next pass sees one reference, like it did before, and ends unless a wake up came in. Fixes: 937d38dcacd6 ("io_uring/poll: avoid retry wakeup loss when dropping ownership") Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-10-19nfs/localio: pin UUIDs during global invalidationJinpyo Lee
nfs_localio_invalidate_clients() moves UUID nodes embedded in nfs_client objects to a private list, then walks that list without retaining the containing clients. Concurrent client teardown can free an entry that the iterator has already selected, causing a use-after-free. Take a reference to each selected UUID under the namespace list lock. Keep this reference count in nfs_common, independently of cl_count, and have nfs_free_client() drain temporary UUID users before freeing the client. Releasing a UUID reference wakes waiting probes and signals completion when the last reference is dropped. It neither calls into nfs.ko nor performs final NFS client teardown in the NFSD invalidation context. Keep the UUID on the namespace list until its files have been closed. When another thread is already disabling it, wait for that thread to finish unlinking it instead of repeatedly selecting the same head entry. The wait releases the UUID spinlock so file cleanup can make progress. Append registrations in sequence order and capture the last sequence under the namespace list lock at the start of invalidation. Stop at that boundary so new registrations cannot indefinitely extend the sweep, even if its original last entry is removed concurrently. Publish the LOCALIO association under the UUID and namespace list locks before making the entry visible to invalidation. A temporary UUID reference allows the handshake to drop the global lookup lock before taking the UUID lock in the documented order; recheck the lookup in case the probe was withdrawn. A new probe waits for temporary UUID users to drain, then rechecks the association before reusing the UUID. This keeps a transient invalidation reference from discarding the client's LOCALIO revalidation attempt. Withdraw pending probes before dropping the owner's UUID reference. A deterministic same-base KASAN reproducer triggered the reported use-after-free on the unpatched tree. With this patch, the same controlled invalidation and teardown race completed without the target KASAN report or another selected kernel diagnostic. A separate all-live run recorded disable events for all 16 unique clients. Test-only synchronization hooks verified that a second disabler waits for unlink after ->net is cleared and that client teardown waits for a temporary UUID reference to drain. NFSv4.2 and NFSv3 read, write, and unmount smoke tests, export-flush and I/O stress, NFSD restarts, network namespace lifecycle tests, and module unloads passed with KASAN and lockdep enabled. A full x86_64 kernel and modules build with GCC 13.3, CONFIG_WERROR=y, NFS_FS=m, NFSD=m, and LOCALIO enabled completed without diagnostics. Module metadata showed that nfs_localio.ko depends only on sunrpc, while nfs.ko depends on lockd, nfs_localio, and sunrpc. A separate NFS_FS=m, NFSD=y build also linked vmlinux successfully. The vulnerability research and validation were conducted by members of the Tobabz team as part of the Best of the Best 15th program. Fixes: 085804110aa1 ("nfs_common: track all open nfsd_files per LOCALIO nfs_client") Assisted-by: LLM Signed-off-by: Jinpyo Lee <bint4b13@gmail.com> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-10-19NFSv4/flexfiles: fail I/O to the data server once a lock is lostBenjamin Coddington
When a client loses a byte-range lock, because its lease expired and it may not recover the lock (nfs.recover_lost_locks=0) or because reclaim failed, it marks the lock state NFS_LOCK_LOST and fails further I/O by that lock owner. Otherwise an application that believes it holds a lock over a range is never told that the lock is gone, and can overwrite data that another client has since written under its own lock on that range. The NFSv4 READ/WRITE and file layout I/O paths apply this in rpc_call_prepare, where nfs4_set_rw_stateid() returns -EIO for a lost lock. The flexfiles data server I/O path does not: the NFSv3 data server path never checked, and the check on the NFSv4 path was removed when the data server stateid began to be taken from the layout. Fail read and write RPCs to the data server in rpc_call_prepare when the lock is lost. The data server path has no use for the stateid that nfs4_set_rw_stateid() selects, and selecting it looks up a delegation or open stateid on every I/O. Instead add nfs4_lock_context_lost(), which only tests NFS_LOCK_LOST, and check it alongside the open state. Its lookup, __nfs4_lookup_lock_state(), is split out of __nfs4_find_lock_state() and takes no reference: a lock state is only unlinked from state->lock_states under state->state_lock, so one found while holding that lock cannot be freed before it is released. Use it in nfs4_copy_lock_stateid() as well, which only reads the lock state under that lock. That drops a reference get and put from stateid selection for all NFSv4 I/O without changing the stateid selected. Terminating the RPC in rpc_call_prepare is not enough on its own. The done callback reads the -EIO as a data server connection error, forgets the device ID, and resets the I/O to pNFS (or, for an NFSv4 data server, possibly to the MDS). After a reset to pNFS a new LAYOUTGET is granted and rpc_call_prepare fails the I/O again, without end. The existing NFS_CONTEXT_BAD check does not loop, since the open state is then invalid and pnfs_update_layout() fails the reset I/O, but it still forgets the device ID. So when an RPC that was never sent fails and the open context is bad, the open state is invalid, or the lock is lost, complete it with -EIO without error handling. An RPC that was sent and failed is handled as before, so a real data server error is still reported to the MDS. Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver") Fixes: bb21ce0ad227 ("flexfiles: use per-mirror specified stateid for IO") Cc: stable@vger.kernel.org Tested-by: Arun Potharaju <arun.potharaju@hammerspace.com> Assisted-by: LLM Signed-off-by: Benjamin Coddington <bcodding@hammerspace.com> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-10-19pNFS/flexfiles: don't report an interrupted DS connect as a DS errorTigran Mkrtchyan
If nfs4_pnfs_ds_connect() is interrupted by a signal, nfs4_ff_layout_prepare_ds() records an NFS4ERR_NXIO error for the data server, sends a LAYOUTERROR to the MDS and may mark the layout for return. The data server is healthy in this case; only the calling task was killed. A bpftrace log of a killed task shows the connect failing with -ERESTARTSYS, followed by a LAYOUTERROR for a data server that completed the TCP handshake with the same client microseconds later (time in microseconds, abridged): python3 rpc_create (ret) 1xx.yy.50.179:24009 err=-512 kworker inet_sock_set_state :735 -> 1xx.yy.50.179:24009 CLOSE -> SYN_SENT swapper inet_sock_set_state :735 -> 1xx.yy.50.179:24009 SYN_SENT -> ESTABLISHED kworker inet_sock_set_state :735 -> 1xx.yy.50.179:24009 ESTABLISHED -> FIN_WAIT1 python3 nfs4_pnfs_ds_connect (ret) status=-512 python3 nfs4_ff_layout_prepare_ds (ret) err=-512 kworker rpc_request nfs v4 LAYOUTERROR async task=3/6752 kworker rpc_stats_latency LAYOUTERROR backlog=66us rtt=315us exec=421us Return the error to the caller without reporting a DS failure when the connect ended with -ERESTARTSYS or -EINTR. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-10-19pNFS/flexfiles: make pg_init retry loops killableTigran Mkrtchyan
When a task is killed while the pNFS client connects to a data server, nfs4_pnfs_ds_connect() fails with -ERESTARTSYS. If the layout has FF_FLAGS_NO_IO_THRU_MDS set, ff_layout_pg_init_read() cannot fall back to the MDS and retries after an uninterruptible ssleep. As the fatal signal stays pending, every new connect attempt is aborted the same way and the task loops forever without returning to user space: # grep -E 'SigPnd|ShdPnd' /proc/156021/status SigPnd: 0000000000000100 ShdPnd: 0000000000000100 # cat /proc/156021/stack msleep+0x2e/0x50 ff_layout_pg_init_read+0x267/0x310 [nfs_layout_flexfiles] __nfs_pageio_add_request+0x1c1/0x480 [nfs] nfs_pageio_add_request+0x21d/0x2c0 [nfs] nfs_read_add_folio+0x143/0x200 [nfs] nfs_readahead+0x204/0x290 [nfs] read_pages+0x62/0x230 page_cache_ra_unbounded+0x136/0x180 filemap_get_pages+0xf2/0x350 filemap_read+0xd5/0x320 nfs_file_read+0x6d/0xc0 [nfs] vfs_read+0x24f/0x3a0 __x64_sys_pread64+0x90/0xc0 do_syscall_64+0x5f/0xe0 Previous attempt propagates the error from nfs4_ff_layout_prepare_ds(), but only ff_layout_{read,write}_pagelist() look at it. The pg_init functions test IS_ERR() and retry on any error. Check for a fatal signal or an exiting task before sleeping in ff_layout_pg_init_read() and ff_layout_pg_init_write() and fail the I/O instead of retrying. Fixes: f06bedfa62d5 ("pNFS/flexfiles: don't attempt pnfs on fatal DS errors") Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-10-19nfsv4/pnfs: use the MDS authflavor for data server connectionsTigran Mkrtchyan
When a pNFS client connects to an NFSv4.1 data server, the EXCHANGE_ID is always attempted with RPCSEC_GSS krb5i first, even if the auth flavor with the MDS is AUTH_SYS. On a host that runs rpc.gssd but has no usable machine credential, every first contact with a data server therefore upcalls to rpc.gssd before falling back to AUTH_SYS. As nfs4_discover_server_trunking is serialized by nfs_clid_init_mutex such an extra upcall creates a backlog of DS connections when many files accessed in parallel. Pass the authflavor of the MDS lease to nfs4_alloc_client() and skip the krb5i attempt if the MDS already ended up with AUTH_SYS. Nothing changes for the MDS itself, or for data servers of an MDS whose lease was established with krb5i. Fixes: 4edaa308888b ("NFS: Use "krb5i" to establish NFSv4 state whenever possible") Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-10-19dt-bindings: media: Convert hisilicon,hix5hd2-ir to DT schemaRob Herring (Arm)
Convert the hisilicon,hix5hd2-ir binding to DT schema format. It's a straight forward conversion. As this was the last reference to rc.txt, it can be removed. Acked-by: Wei Xu <xuwei5@hisilicon.com> Link: https://patch.msgid.link/20261002193158.3263741-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2026-10-19f2fs: fix submit accounting for IPU writebackSeongjae Jeong
f2fs_write_cache_pages() uses the submitted count, which is set to fio.submitted in f2fs_write_single_data_page(), to update nwritten and decrement wbc->nr_to_write. In the OPU path, f2fs_submit_page_write() sets fio->submitted to 1. However, in the IPU path, fio->submitted is never set and remains zero. As a result, successful IPU writes are not accounted for. This can cause asynchronous writeback to continue beyond its budget. Set fio->submitted in f2fs_inplace_write_data() after a page is successfully merged into a bio or submitted, so that successful IPU writes are included in the writeback accounting. Cc: stable@kernel.org Fixes: d68f735b3bc9 ("f2fs: check io submission more precisely") Signed-off-by: Seongjae Jeong <jsjlee1020@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-10-19f2fs: fix to avoid potential reference count leak in do_garbage_collect()Chao Yu
In do_garbage_collect(), we have reserved reference counts on summary cache of all segments, once gc_thread encounter freezing, we need to release all reference counts. Cc: stable@kernel.org Cc: Daeho Jeong <daehojeong@google.com> Fixes: 02d91398a602 ("f2fs: fix to freeze GC and discard threads quickly") Signed-off-by: Chao Yu <chao@kernel.org> Reviewed-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-10-19f2fs: refresh pinned allocation boundary after resizeWenjie Qi
Online shrink updates MAIN_SECS() but leaves resizable_tail_secno and pinned_area_max_secno unchanged. The pinned allocation limit can exceed the new main area when shrinking beyond the reserved tail. Consume the reserved tail by the number of removed sections, clamping it to zero, before refreshing the shared pinned allocation boundary. This preserves the boundary while shrinking within the reservation and limits it to the new main area otherwise, retaining the zoned limit. Save the old tail count and restore it before rolling back the geometry if the final checkpoint fails. Also bound pinned section allocation by the current MAIN_SECS(). Range evacuation temporarily reduces it before moving cursegs, while the cached pinned boundary still describes the old geometry. Otherwise, a pinned curseg can be reallocated into the range being removed. Fixes: c966d29e01bb ("f2fs: support resizable tail section and unify pinned allocation") Suggested-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Wenjie Qi <qiwenjie@xiaomi.com> Reviewed-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-10-19f2fs: flush SIT journal during filesystem resizeWenjie Qi
During a filesystem resize, SBI_IS_RESIZEFS prevents new SIT entries from being added to the journal and forces existing entries to the SIT area. However, f2fs_flush_sit_entries() returns early when there are no new dirty sentries, leaving existing journal entries behind. After the main area shrinks, a later checkpoint can access a journal entry whose segment number is outside the new geometry and trigger f2fs_bug_on(). Only take the zero-dirty fast path when entries may be written back to the journal. This lets resize drain existing entries through remove_sits_in_journal() even when there are no new dirty sentries. Cc: stable@kernel.org Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS") Signed-off-by: Wenjie Qi <qiwenjie@xiaomi.com> Reviewed-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-10-19tracing/histograms: Verify event_call identity when updating synth_event ↵Lee Jones
refcount In event_hist_trigger_parse() and hist_unreg_all(), the histogram registration and unregistration paths look up find_synth_event() using trace_event_name(file->event_call) and adjust se->ref if a match is found. Because find_synth_event() only compares the event basename, registering or removing a histogram on a non-synthetic trace event whose basename matches a synthetic event erroneously modifies the synthetic event's reference count. If a histogram is registered on the non-synthetic event before the synthetic event is created and removed afterwards, se->ref is decremented without a matching increment, allowing the synthetic event to be freed while an active histogram action still holds a pointer to it. Introduce find_synth_event_call() to verify that &se->call matches file->event_call before adjusting se->ref. Fixes: 4b147936fa50 ("tracing: Add support for 'synthetic' events") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261019120730.2342739-1-lee@kernel.org Signed-off-by: Lee Jones <lee@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-10-19ftrace: Initialize modname and offset in print_rec()Aaron Ahmed
print_rec() leaves 'modname' and 'offset' uninitialized and kallsyms_lookup() only sets them on success. When the lookup fails like when a module is being loaded or unloaded, 'modname' holds a garbage value, passes the 'if (modname)' check, and is dereferenced by seq_printf(). Oops: general protection fault RIP: 0010:string+0x48/0xe0 Call Trace: vsnprintf+0x1f5/0x650 seq_printf+0x8e/0xb0 print_rec+0x6c/0xc0 t_show+0x4c/0x440 seq_read_iter+0x119/0x480 This can be triggered by reading available_filter_functions while a module is being loaded or unloaded. Initialize both variables so a failed lookup skips the module name. Cc: stable@vger.kernel.org Fixes: b39181f7c690 ("ftrace: Add FTRACE_MCOUNT_MAX_OFFSET to avoid adding weak function") Link: https://patch.msgid.link/20261016230403.4916-1-aarnahmd@amazon.com Tested-by: Gavin Inglis <giinglis@amazon.com> Signed-off-by: Aaron Ahmed <aarnahmd@amazon.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-10-19ALSA: pcm: Protect channel-map reads against runtime detachCen Zhang
Channel-map controls remain accessible between PCM opens. In-tree HDA code publishes the generic controls through add_std_chmaps(), so a SNDRV_CTL_IOCTL_ELEM_READ can overlap the final close of the same PCM substream. pcm_chmap_ctl_get() checks substream->runtime and later reads its channel count. Final close clears and frees that runtime under pcm->open_mutex, while the control callback holds only controls_rwsem: Control GET Final PCM close ----------- --------------- snd_ctl_elem_read() down_read(controls_rwsem) pcm_chmap_ctl_get() check substream->runtime lock(pcm->open_mutex) snd_pcm_release_substream() snd_pcm_detach_substream() substream->runtime = NULL kfree(runtime) unlock(pcm->open_mutex) substream->runtime->channels NULL or freed-pointer access up_read(controls_rwsem) Reloading the cleared field can fault through NULL, while retaining the old pointer can access freed storage. controls_rwsem keeps the control alive, but does not serialize the matching PCM close. Copy the channel count under open_mutex and use that scalar for the map lookup. Use trylock with -EBUSY because snd_pcm_dev_disconnect() takes open_mutex before removing controls under controls_rwsem; blocking in the reverse order from GET could deadlock. Fixes: 2d3391ec0ecc ("ALSA: PCM: channel mapping API implementation") Assisted-by: LLM Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Link: https://patch.msgid.link/pm-pmb-0b5d6bc7124d0b921f2c-v4-b9738bdeab8823999181@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ftrace: Let ftrace_call_adjust() reject a patch siteJose Fernandez (Anthropic)
When ftrace_call_adjust() returns 0 for a patch site, ftrace_process_locs() does not skip the site. The NULL test runs before the adjustment since commit 6eeca746fa5f ("ftrace: Test mcount_loc addr before calling ftrace_call_addr()"), so the 0 is stored as the record's ip and ftrace_init_nop() later hits the BUG_ON() in arm64's patch_map(). Test the adjusted address too and count the site as skipped. Link: https://patch.msgid.link/20260924-b4-arm64-callops-kcfi-v2-2-587865b6d991@linux.dev Reviewed-by: Ben Cressey <ben@cressey.dev> Reviewed-by: Florent Revest (Anthropic) <florent.revest@linux.dev> Assisted-by: LLM Signed-off-by: Jose Fernandez (Anthropic) <jose.fernandez@linux.dev> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-10-19ftrace: Do not leak a module's empty page groupJose Fernandez (Anthropic)
When every mcount_loc entry of a module is skipped, ftrace_process_locs() leaves the module's first page group linked with no records. ftrace_release_mod() matches a module's groups by records[0].ip, which is 0 here, so the group is never freed. While it stays linked, ftrace_free_mem() reads pg->records[pg->index - 1] with pg->index == 0 on every later module load, as lookup_rec() did before commit ee92fa443358f ("ftrace: Fix invalid address access in lookup_rec() when index is 0"). Unlink and free the new page groups when none of them got a record. Link: https://patch.msgid.link/20260924-b4-arm64-callops-kcfi-v2-1-587865b6d991@linux.dev Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/all/20260904013350.5141B1F000E9@smtp.kernel.org/ Assisted-by: LLM Signed-off-by: Jose Fernandez (Anthropic) <jose.fernandez@linux.dev> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-10-19ALSA: jack: Pin the module while debugfs files are openCen Zhang
With CONFIG_SND=m and CONFIG_SND_JACK_INJECTION_DEBUG enabled, an in-tree HDA jack creates these debugfs files through snd_jack_new() and snd_jack_add_debugfs(). Their file_operations live in snd, but none sets .owner. full_proxy_open_regular() therefore takes no snd module reference when it calls fops_get(real_fops). A debugfs descriptor can outlive removal of its HDA card. Once the card and dependent modules, including the OSS emulation modules, have been removed, snd can be unloaded while that descriptor is still open: Descriptor holder Card/module teardown ----------------- -------------------- open jack debugfs file full_proxy_open_regular() fops_get(real_fops) owner == NULL: no snd pin keep descriptor open remove HDA card snd_card_disconnect() snd_jack_dev_disconnect() remove debugfs nodes snd_jack_dev_free() unload dependent modules rmmod snd alsa_sound_exit() free_module(): unmap snd close descriptor full_proxy_release() read real_fops->release fops_put(real_fops) read real_fops->owner debugfs_remove() drains active operations, but does not wait for idle open descriptors. Release deliberately bypasses removal protection and reads the real table even when no release callback is installed. The last close can therefore access unloaded snd storage. Set .owner to THIS_MODULE in all six tables. The existing proxy fops_get()/fops_put() pair then keeps snd loaded through the final table access on close. Fixes: 2d670ea2bd53 ("ALSA: jack: implement software jack injection via debugfs") Assisted-by: LLM Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Link: https://patch.msgid.link/pm-pmb-431ddb947e1a13b95d3a-v3-02d37dd7b4eb4774e100@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ALSA: usb-audio: Avoid applying boot quirk for Behringer UMC204HDTakashi Iwai
There have been reports about a regression with the recent boot quirk for Behringer devices; it broke UMC204HD models(1397:0508 and 1397:0509). The quirk was to just run usb_get_descriptor(), so I expected it rather harmful, but in this case, it doesn't look so, resulting in an error like 'failed to read device descriptor: -110' that leads to a fatal probe error. As a quick workaround, skip the quirk for those UMC204HD models. Fixes: b5c4823cf3e4 ("ALSA: usb-audio: Apply boot quirk for Behringer models generically") Reported-by: Will Bush <will@willbush.dev> Closes: https://lore.kernel.org/45162613-2802-401c-84c9-742f9c8c68e6@app.fastmail.com Closes: https://bugzilla.suse.com/show_bug.cgi?id=1285896 Link: https://patch.msgid.link/20261019102347.2425406-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ALSA: pcm: Remove channel-map controls before freeing substreamsCen Zhang
A late HDA codec bind on an already registered card builds new PCMs before registering them. add_std_chmaps() publishes generic channel-map controls during this BUILD stage. If an earlier chmap succeeds and a later allocation fails, probe cleanup frees the BUILD PCM while the card's control device remains accessible. These generic controls are added directly by snd_pcm_add_chmap_ctls(); snd_hda_ctls_clear() only removes codec-tracked mixer controls. BUILD devices also skip dev_disconnect. snd_pcm_free_stream() then frees the substreams before free_chmap() withdraws their generic control: Late HDA codec bind / rollback Control GET on the live card ------------------------------ ---------------------------- hda_codec_driver_probe() snd_hda_codec_build_pcms() PCM is BUILD snd_hda_codec_build_controls() add_std_chmaps() publish an earlier chmap later allocation: -ENOMEM snd_hda_codec_cleanup_for_unbind() snd_hda_ctls_clear() generic chmap remains codec_release_pcms() snd_device_free() BUILD: skip dev_disconnect snd_pcm_free_stream() kfree(substream) snd_ctl_elem_read() down_read(controls_rwsem) pcm_chmap_ctl_get() walk freed substream free_chmap() snd_ctl_remove() wait for GET up_read(controls_rwsem) The control read lock cannot protect a substream already freed before control removal starts. The failure above occurs before snd_card_register(), so the PCM has not transitioned out of BUILD. Move free_chmap() before the substream free loop. Its snd_ctl_remove() withdraws the control and drains readers under controls_rwsem before any substream is released. Normal registered-device disconnect already removes the control, so the later call remains harmless on that path. Fixes: 2d3391ec0ecc ("ALSA: PCM: channel mapping API implementation") Assisted-by: LLM Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Link: https://patch.msgid.link/pm-pmb-4a207d9ef3a3597a74a4-v4-80b0113669b1a62fbbe9@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19ALSA: pcmtest: Pin the module while pattern files are openCen Zhang
The fill_pattern_fops table must remain alive until the final release of each pattern debugfs file. It has no .owner, so the fops_get() call in full_proxy_open_regular() does not take a PCMTest module reference. With snd-pcmtest loaded as a module, a user with permission to open a fill_patternN file and unload the module can retain the descriptor across normal unload, provided no PCM file or other module reference prevents it. The following ordering is possible: Pattern file user Module unload ----------------- ------------- open(fill_patternN) full_proxy_open_regular() fops_get(fill_pattern_fops) owner == NULL: no module pin keep the descriptor open mod_exit() clear_debug_files() debugfs_remove_recursive() drain active operations return from mod_exit() free_module() free the module image close(fd) full_proxy_release() read real_fops->release -> UAF fops_put(real_fops) read real_fops->owner access freed module memory Even though the table has no release callback, reading those fields is a use-after-free and can fault. The retained dentry keeps the proxy's bookkeeping alive, but does not retain the module storage. Set .owner to THIS_MODULE so the existing fops_get()/fops_put() pair pins PCMTest until final release has finished accessing the table. Normal module unload is then blocked while any pattern file is open. Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-1ce354e709dbab28e563-v2-6b2ea0aa16ec39442f6d@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-19nios2: ksyms: Declare __mulsi3 exportThomas Weißschuh
GCC may emit libcalls to __mulsi3(). As modpost is not aware that this function is provided through the linked in libgcc, it fails: ERROR: modpost: kernel/locking/test-ww_mutex.ko: symbol '__mulsi3' undefined! ERROR: modpost: kernel/time/test_udelay.ko: symbol '__mulsi3' undefined! ERROR: modpost: kernel/resource_kunit.ko: symbol '__mulsi3' undefined! ERROR: modpost: fs/fuse/virtiofs.ko: symbol '__mulsi3' undefined! etc. Make sure modpost can see the symbol from libgcc. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202610171933.J4bFOfL8-lkp@intel.com/ Fixes: 2fc8483fdcde ("nios2: Build infrastructure") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
2026-10-19tools/power turbostat: Dump RDT CPUID.0xF,0x10,0x27,0x28 SupportLen Brown
If Asymmetric RDT is supported, dump it on every CPU. Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Dump RDT CPUID.7 SupportLen Brown
Show both Symmetric and Asymmetric RDT bits. Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: pmt: Improve sscanf() hygieneLen Brown
Explicitly check sscanf() return values for number of matches, and handle EOF (-1). Defensive programming -- not an issue actively seen by users. Fixes: 4265a86582ea ("tools/power turbostat: Add PMT directory iterator helper") Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: bool force_loadLen Brown
It is confusing to increment what is effectively a bool value. Define force_load as bool, and access it accordingly. Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Fix typo: MHz, not MhzLen Brown
The SI symbol for megahertz capitalizes both the SI prefix ('M') and the unit symbol ('Hz'). Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: consistently use warn/err, not perrorLen Brown
Acknowledge that get_msr() always errs out on failure by returning void and deleting checks for its return value. Replace all perror() with warn(). Replace all perror()/exit() with err(). No functional change, unless you count the uniform return value of -1 on calloc failure. Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup add_counter declarationLen Brown
Declaration and definition parameter name mismatch was confusing. Some params can be 'const'. No functional change. Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup counter sets debug codeLen Brown
When the debug "--Dump" option is used to dump counter values, also dump the counter sets. Update that counter counter-set debug code to pass code review. Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: Unify comparisons to max_cpu_numLen Brown
Unify the syntax of loops over all CPUs for consistency, since we just fixed two off-by-one bugs. No functional change. Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: Remove useless assert()Len Brown
No functional change. Assisted-by: Claude:claude-haiku-4-5 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: Delete duplicate table entryLen Brown
No functional change. Assisted-by: Claude:claude-haiku-4-5 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: Remove hard-coded 8192 CPU limitLen Brown
The --cpu cmdline option was parsed before topology_probe() set max_cpu_num, and so it used a hard-coded CPU limit of 8192. Probe max_cpu_num earlier and allocate the set for --cpu using the same size as all other CPU sets, large enough to hold max possible (but not bigger). No functional change, unless you count fixing some error paths. Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Rename: Differentiate counter and CPU setsLen Brown
Sets of Built-In-Counters (BICs) are implemented using cpu_set_t. Since cpu_set_t is also used for sets of CPUs, invent the name "bic_set_t" to make it more clear which is which. typedef is discouraged by kernel coding checkers, but is appropriate here -- and better than #define. No functional change. Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Cleanup: Delete unused flagsLen Brown
No functional change. Assisted-by: Claude:claude-haiku-4-5 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19tools/power turbostat: Decode Uncore Frequency Agent TypesLen Brown
Newer platforms export Uncore Frequency agent_types: $ cat /sys/devices/system/cpu/intel_uncore_frequency/uncore03/agent_types memory Update the previous system configuration header lines: Uncore Frequency package0 domain4 cluster1: 800 - 2100 MHz (800 - 2100 MHz) 2100 MHz With (more concise) lines that include this (agent type) description: pkg0: UMHz4.1(memory): 800 - 2100 MHz (800 - 2100 MHz) 2100 MHz The actual measurement column header is unchanged: UMHz4.1 Signed-off-by: Len Brown <len.brown@intel.com>
2026-10-19net: stmmac: leave the datapath running for normal-size MTU changesJames Hilliard
When both MTUs are at most ETH_DATA_LEN, the receive buffer size and MAC receive limit do not change. Update the MTU without restarting the datapath. This also avoids rebinding a live AF_XDP pool to a temporary RXQ. XDP rejects jumbo MTUs, so all supported XDP MTU changes take this path. Jumbo transitions still use the existing reopen path. Found by source review while working on the stmmac MTU/resume recovery series. The fast path was tested on Allwinner H616 with sun8i EMAC1 and an AC300 PHY. The AF_XDP scenario was identified by inspection. Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261013-stmmac-mtu-fastpath-v2-1-1e4ce8137689@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>