summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2026-10-09Input: 88pm860x-onkey - drop redundant info->idev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes info->idev->dev.parent to the supplied parent device, so the explicit assignment in pm860x_onkey_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: tegra-kbc - drop redundant kbc->idev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes kbc->idev->dev.parent to the supplied parent device, so the explicit assignment in tegra_kbc_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: tc3589x-keypad - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in tc3589x_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: stmpe-keypad - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in stmpe_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: st-keyscan - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in keyscan_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: qt1050 - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in qt1050_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: pxa27x-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in pxa27x_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: mpr121-touchkey - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in mpr_touchkey_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: max7359-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in max7359_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: lpc32xx-keys - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in lpc32xx_kscan_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: jornada720-kbd - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in jornada720_kbd_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: imx-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in imx_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: cros-ec-keyb - drop redundant idev->dev.parent assignmentsDmitry Torokhov
devm_input_allocate_device() already initializes idev->dev.parent to the supplied parent device, so the explicit assignments in cros_ec_keyb_register_bs() and cros_ec_keyb_register_matrix() are redundant. Remove them. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: clps711x-keypad - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in clps711x_keypad_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: bcm-keypad - drop redundant input_dev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input_dev->dev.parent to the supplied parent device, so the explicit assignment in bcm_kp_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: adp5520-keys - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in adp5520_keys_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: 88pm860x-ts - drop redundant idev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes idev->dev.parent to the supplied parent device, so the explicit assignment in pm860x_touch_probe() is redundant. Remove it. Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: cyapa - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in cyapa_create_input_dev() is redundant. Remove it. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: axp20x-pek - drop redundant idev->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes idev->dev.parent to the supplied parent device, so the explicit assignment in axp20x_pek_probe_input_device() is redundant. Remove it. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: applespi - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignments in applespi_register_touchpad_device() and applespi_probe() are redundant. Remove them. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: gpio_keys - drop redundant input->dev.parent assignmentDmitry Torokhov
devm_input_allocate_device() already initializes input->dev.parent to the supplied parent device, so the explicit assignment in gpio_keys_probe() is redundant. Remove it. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09Input: ati_remote2 - fix type confusion in device attribute handlersHaotian Zhang
Previously, the channel_mask and mode_mask attributes were registered on the parent usb_device via sysfs_create_group(). When commit b20d6bf8014b ("Input: ati-remote2 - use driver core to instantiate device attributes") converted the driver to let the driver core manage them via dev_groups in struct usb_driver, the attributes moved to the bound usb_interface devices, but the show and store callbacks were not updated accordingly. As a result, the callbacks still invoked to_usb_device() on a device pointer belonging to a struct usb_interface, producing an invalid usb_device pointer. Use to_usb_interface() directly in the attribute handlers to obtain the interface and its driver data. Fixes: b20d6bf8014b ("Input: ati-remote2 - use driver core to instantiate device attributes") Assisted-by: DeepSeek-V4.1-Flash Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20261009040302.3087205-1-vulab@iscas.ac.cn Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-10-09dm-crypt: allow encryption sector size up to PAGE_SIZEItai Handler
The "sector_size:<bytes>" option is capped at 4096 bytes. The reason is stated in commit 8f0009a22517 ("dm crypt: optionally support larger encryption sector size"): "the maximal IO must fit into the page limit, so the limit is set to the minimal page size possible (4096 bytes)." The rule is right; only the way it is resolved is not. The page limit it refers to is a property of the kernel that is running, but it was written as the smallest page size of any architecture, so a kernel with larger pages is held to a limit that belongs to a different one. The block layer has since stopped doing that for its own block size, in commit 47dd67532303 ("block/bdev: lift block size restrictions to 64k"), and dm-crypt is now the stricter of the two. Apply the same rule to the kernel being built: raise the cap to min(PAGE_SIZE, BLK_MAX_BLOCK_SIZE). PAGE_SIZE is still the page limit the original commit meant. A sector is passed to the crypto API as a single scatterlist entry, bio_iter_iovec() never returns more than PAGE_SIZE bytes, and crypt_alloc_buffer() may fall back to order-0 pages for the write bounce buffer. BLK_MAX_BLOCK_SIZE caps the logical block size that crypt_io_hints() announces. It is PAGE_SIZE without transparent hugepages, and 64K with them, which no architecture having a PAGE_SIZE above 64K can enable - so it does not lower the bound on any configuration today. It is in the expression so that this target cannot announce a block size blk_validate_limits() would reject. A larger unit also turns several crypto requests per page into one. Whether that is worth anything depends on the driver: for a CPU cipher the per-request cost is small, and it only pays off where a request carries a large fixed cost, as when the cipher is offloaded over DMA. Widen sector_size to unsigned int so that it can hold a sector larger than 65535. That also makes the option reject an argument of 69632, which %hu truncates to 4096 and accepts as a 4096-byte sector. Document that an encryption sector larger than the unit the device writes atomically can be torn by a power failure, and what each cipher mode does when that happens. The maximum stays 4096 wherever PAGE_SIZE is 4096, the default stays 512 bytes, and every table using a size from 512 to 4096 behaves as it did. The one behavioural change is the truncation above: an argument that wrapped into range is now rejected rather than silently accepted. A mapping larger than 4096 bytes can only be activated where PAGE_SIZE allows, so it is not suitable for portable on-disk formats. Bump the target version so that userspace can detect the new limit. Assisted-by: LLM Signed-off-by: Itai Handler <itai.handler@gmail.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2026-10-09kho: rename KHO scratch to KHO bootmemPratyush Yadav (Google)
The term "KHO scratch" is vague and overloaded. For one, it does not accurately describe what the memory is for. From KHO's perspective, it is memory passed by the previous kernel that is guaranteed to have no allocations and hence it is safe to allocate from. For another, the term is overloaded. KHO also knows to discover other ranges of memory that don't have any preservations and are safe to allocate from. This is done by kho_extend_scratch(). These areas, while called "scratch", are completely different from the chunk of memory passed by the previous kernel for early boot allocations. Rename "KHO scratch" to "KHO boot memory", or "KHO bootmem" in short. Update all function names, variable names, comments, and documentation to use this. Call the discovered areas "noprsrv", matching what memblock would see them as. Rename kho_extend_scratch() to reflect this. This patch largely has no functional changes. The only functional changes are renames of debugfs files from "scratch_phys" and "scratch_len" to "bootmem_phys" and "bootmem_len" respectively. Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org> Link: https://patch.msgid.link/20260922041321.233986-4-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
2026-10-09memblock: rename KHO_SCRATCH to KHO_NOPRSRVPratyush Yadav (Google)
The term "KHO scratch" is vague. It does not accurately describe what the memory is for. Generally, scratch is for things that don't contain anything useful. This is not true. For memblock, KHO_SCRATCH is the _only_ useful memory during a KHO boot. It is memory passed by the previous kernel that is guaranteed to have no preserved pages, and so is the only thing safe to allocate from early in boot. In addition, KHO now has the ability to discover other "scratch" areas. These aren't directly passed by the previous kernel. Instead, they are found by searching the KHO preserved memory map. Memblock does not care about the difference between the two. From memblock's perspective, both are memory areas with no preservations and so they are safe to allocate from before KHO fully initializes. Rename MEMBLOCK_KHO_SCRATCH to MEMBLOCK_KHO_NOPRSRV. This name clearly shows what the memory is for from memblock's perspective. Update memblock functions and comments that refer to scratch to use noprsrv. There are no functional changes apart from the flag name change in debugfs. Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org> Link: https://patch.msgid.link/20260922041321.233986-3-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
2026-10-09Merge tag 'kvm-s390-next-7.4-1' of ↵Paolo Bonzini
git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM/vfio: Use file-based reference counting for KVM This series switches the KVM-VFIO interface and external consumers over to standard file-based reference counting, eliminating all external KVM symbol exports. Currently, VFIO integrates with KVM by looking up kvm_get_kvm_safe() and kvm_put_kvm() dynamically using symbol_get(), manually tracking module reference counts and storing a put_kvm function pointer in struct vfio_device. In the ARM64-on-s390 architecture, a second concurrent KVM module (kvm-arm64) is introduced alongside native KVM to host hardware-accelerated ARM64 guests. Having exported global symbols (like kvm_get_kvm/kvm_put_kvm) creates symbol conflicts and prevents clean coexistence of two KVM modules. Additionally, the file based counting simplifies the code and reuses the existing fs refcounting. Instead of passing raw KVM pointers and managing module symbols manually, the interface now passes the underlying VM file descriptor throughout VFIO and associated architecture subsystems. To safely extract the KVM instance from a file, an architecture-namespaced helper mechanism is introduced that verifies the file belongs to the expected KVM implementation before accessing its internal state. A back-pointer from the KVM instance to its associated file is maintained across its lifecycle so subsystems can safely acquire file references on demand. Finally, with VFIO, architecture page tracking, and device hooks converted to use file references, the remaining KVM reference- counting exports are restricted strictly to internal KVM modules.
2026-10-09xen-blkfront: Fix IO race during unplugRoss Lagerwall
During unplug, blkfront stops the hw queues and marks the disk as dead, then later during removal calls del_gendisk(). However, IO issued after the hw queues are stopped but before the call to del_gendisk() will be queued but never handled. This causes del_gendisk() to hang forever waiting for the queue refcount to drop to zero. This can be reproduced by issuing IO during an artificial delay after stopping the hw queues. Fix this by simply not stopping the hw queues directly. Marking the disk as dead already freezes the queue which prevents new requests being added and it synchronously runs the hw queues to clear anything pending. If the hw queues are stopped when calling blk_mark_disk_dead(), running the hw queues is a no-op and can leave queued requests unprocessed. Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Acked-by: Roger Pau Monné <roger@xenproject.org> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20261006163411.2583538-1-ross.lagerwall@citrix.com>
2026-10-09remoteproc: core: Fetch the auto-boot firmware only onceYonghao Zhang
Auto-boot for an always-on remote processor registers an asynchronous request_firmware_nowait() whose callback, rproc_auto_boot_callback(), calls rproc_boot() first and only releases the fetched image at the very end of the callback. rproc_boot() does not take this image as an argument: it fetches the very same image again with a synchronous request_firmware(), so every auto-boot reads the firmware image twice and allocates the buffer twice; on kernels with the sysfs fallback enabled, the uevent round-trip is repeated as well. The asynchronous request exists only so that rproc_add() does not block on the filesystem read; the image it fetches is never used. The core already defers rproc_boot() to a worker for detached processors (attach_work). Reuse that worker for offline processors too and drop the asynchronous firmware request: rproc_boot() fetches the image exactly once and dispatches between a firmware boot and an attach based on the processor state. The work is renamed to boot_work to match its widened role. commit 400e64df6b23 ("remoteproc: add framework for controlling remote processors") noted back in 2011 that "we must wait until it completes before we try to unregister the device". rproc_del() now does exactly that: it waits for the boot work with cancel_work_sync(), which also closes the theoretical window in which a pending attach work could outlive the rproc instance. The changed fallback behaviour only matters for legacy configurations. udev dropped its userspace firmware loader back in 2014, as recorded in Documentation/driver-api/firmware/fallback-mechanisms.rst, and the kernel has documented since commit 02c399306826 ("firmware_loader: enhance Kconfig documentation over FW_LOADER") that "Linux no longer relies on or uses a fallback mechanism in userspace". Auto-boot now uses the same synchronous fallback semantics as every other explicit boot source (sysfs, cdev). Signed-off-by: Yonghao Zhang <hyz3367@gmail.com> Link: https://lore.kernel.org/r/20261001081056.38293-1-hyz3367@gmail.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2026-10-09rtc: abx80x: add support for ABX81XAntoni Pokusinski
Abracon ABX81X is a family of RTCs with SPI interface featuring the same functionalities as the ABX80X I2C clocks. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-10-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: create abx80x_i2c_probe()Antoni Pokusinski
Move the I2C-specific code from abx80x_probe() to the newly created function. This is a preparation for introducing the support for ABX81X RTCs which use SPI interface. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-9-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: replace read-modify-write pattern with regmap helpersAntoni Pokusinski
Before introducing the regmap usage in the driver, updating specific bits of a register was performed using the read-modify-write pattern. Now, the functions regmap_update_bits() and regmap_write_bits() can be used to simplify the code. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-8-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: use regmap instead of I2C specific APIAntoni Pokusinski
Rework the driver so that it uses regmap_* functions for communication with the device instead of the i2c_smbus_* API. This way the support for ABX81X RTCs which use SPI can be added later. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-7-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: add irq to struct abx80x_privAntoni Pokusinski
This way the irq number is not tied to the i2c_client and can be easily accessed also in the case of ABX81X SPI clocks. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-6-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: properly handle shared IRQsAntoni Pokusinski
The abx80x RTC driver registers its interrupt handler with IRQF_SHARED, but the handler always returned IRQ_HANDLED and cleared the status register even when no interrupt source from the RTC was active. This could cause the driver to claim interrupts belonging to other devices sharing the same IRQ line and could also clear unrelated status bits in the RTC status register. Only handle the interrupt when the alarm or watchdog flags are set, and clear only those interrupt status bits that were handled. Return IRQ_NONE when the interrupt was not generated by the RTC. Fixes: 718a820a303c ("rtc: abx80x: add alarm support") Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-5-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: add mutex protection for register writesAntoni Pokusinski
The ABX80X RTC driver performs multi-step register operations such as NVMEM transfers or register writes preceded by a configuration key write. Add a mutex to serialize all the register writes to protect these sequences against race conditions. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-4-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09rtc: abx80x: fix error check after i2c_smbus_read in read_alarm()Antoni Pokusinski
i2c_smbus_read_i2c_block_data() returns the number of bytes read on success and a negative error code on failure. The existing code treated any non-zero return value as an error. Fix the error handling by checking only for negative return values. Fixes: 718a820a303c ("rtc: abx80x: add alarm support") Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://patch.msgid.link/20260916205138.16771-3-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2026-10-09ovpn: remove redundant peer NULL checks in crypto post functionsMarco Baffo
The AEAD helpers set the peer pointer in the skb control buffer before any error return or crypto request submission. Both crypto paths hold a peer reference until post-processing finishes. Remove the redundant NULL checks before ovpn_peer_put() in ovpn_encrypt_post() and ovpn_decrypt_post(). Signed-off-by: Marco Baffo <marco@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2026-10-09ovpn: remove unused work field from struct ovpn_socketRalf Lici
work in struct ovpn_socket was introduced but never used. Remove it. Signed-off-by: Ralf Lici <ralf@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2026-10-09ovpn: Fix the return value in ovpn_bind_from_sockaddr() kernel-docKarl Mehltretter
ovpn_bind_from_sockaddr() returns an ERR_PTR() on failure, never NULL, but its kernel-doc says "NULL otherwise". Say ERR_PTR(). The wrong text came in with commit 80747caef33d ("ovpn: introduce the ovpn_peer object"). Assisted-by: LLM Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2026-10-09pmdomain: Merge branch dt into nextUlf Hansson
Merge the immutable branch dt into next, to allow the updated DT bindings to be tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-10-09dt-bindings: arm: ux500: Drop NR_DOMAINSLinus Walleij
Keep the internal Ux500 PM domain count local to the only driver that uses it. Do not expose this implementation detail through the DT binding header. Assisted-by: LLM Suggested-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-10-09slimbus: messaging: fix leaked PM vote on tid allocation failureZongmin Zhou
In slim_do_transfer(), when a transaction needs a tid and slim_alloc_txn_tid() fails, the function returns directly instead of jumping to slim_xfer_err. The runtime PM vote taken earlier with pm_runtime_get_sync() is then never released, leaving the controller permanently powered up. As txn->tid is still 0 at that point, jumping to slim_xfer_err drops the vote exactly like it is done for other failed transactions. Fixes: d3062a2109309 ("slimbus: messaging: add slim_alloc/free_txn_tid()") Cc: stable@vger.kernel.org Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101448.1084691-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09nvmem: core: Fix OOB read for bit offsets of more than one byteJanne Grunau
When the bit offset is BITS_PER_BYTE or larger the read position is advanced by `bytes_offset`. This is not taken into account in the per-byte read loop which still reads `cell->bytes` resulting in an out of bounds read of `bytes_offset` bytes. The information read OOB does not leak directly as the erroneously read bits are cleared. Detected by KASAN while looking for a use-after-free in simplefb.c. Cc: stable@vger.kernel.org Fixes: 7a06ef751077 ("nvmem: core: fix bit offsets of more than one byte") Tested-by: Dmitry Sinyavin <sinyavin@gmail.com> Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101329.1084348-5-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09nvmem: layouts: onie-tlv: fix device_node reference leak in error pathLeo Cheng
onie_tlv_add_cells() takes a reference on the child node via of_get_child_by_name() for each parsed TLV and passes it to nvmem_add_one_cell() as cell.np. On success the created cell entry adopts that reference and releases it later via of_node_put(); on failure nvmem_add_one_cell() does not consume it, so the caller still owns it, but the error path only puts layout before returning, leaking the child node reference. Put cell.np on the error path as well. of_node_put(NULL) is a no-op, so this is safe even when of_get_child_by_name() returned NULL. Fixes: d3c0d12f6474 ("nvmem: layouts: onie-tlv: Add new layout driver") Signed-off-by: Leo Cheng <leo-cheng@vip.qq.com> Reviewed-by: Michael Walle <mwalle@kernel.org> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101329.1084348-4-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09nvmem: layouts: sl28vpd: fix device_node reference leak in error pathLeo Cheng
sl28vpd_add_cells() takes a reference on the child node via of_get_child_by_name() for each entry and passes it to nvmem_add_one_cell() as info.np. On success the created cell entry adopts that reference and releases it later via of_node_put() when the entry is torn down; nvmem_add_one_cell() does not take its own reference. On failure it does not consume the reference either, so the caller still owns it, but the error path only puts layout_np before returning, leaking the child node reference. Put info.np on the error path as well. of_node_put(NULL) is a no-op, so this is safe even when of_get_child_by_name() returned NULL. Fixes: d9fae023fe86 ("nvmem: layouts: sl28vpd: Add new layout driver") Signed-off-by: Leo Cheng <leo-cheng@vip.qq.com> Reviewed-by: Michael Walle <mwalle@kernel.org> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101329.1084348-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09nvmem: rockchip-otp: Serialize readsAlexey Charkov
The OTP controller is driven through a single set of registers holding a state machine which has to be stepped through for every word read, yet nothing keeps two readers out of each other's way. Concurrent reads interleave, and the outcome is either a reader bailing out: rockchip-otp 2a580000.otp: timeout during read setup or, worse, one of them silently taking delivery of the other's data. Reading two cells in parallel from userspace on RK3576 reproduces both within 150 iterations - 53 read errors and 9 corrupted results, the latter either losing their first word or, in one case, ending in the two bytes which belong to the other reader's cell - whereas the same reads issued sequentially never fail. Concurrency is not hypothetical here, as six thermal sensors source their trim values from the OTP and reach the driver straight from asynchronous driver probing. Guard the read path with a mutex. Reads are the only way into the hardware, as the driver registers no write callback, and they always run in process context, so a plain mutex spanning the whole clock-enable, read, clock-disable sequence is enough. Fixes: 755864feb729 ("nvmem: add Rockchip OTP driver") Cc: stable@vger.kernel.org Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Alexey Charkov <alchark@flipper.net> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101329.1084348-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09misc: fastrpc: Allocate entire reserved memory for Audio PD in probeJianping Li
Allocating and freeing Audio PD memory from userspace is unsafe because the kernel cannot reliably determine when the DSP has finished using the memory. Userspace may free buffers while they are still in use by the DSP, and remote free requests cannot be safely trusted. Additionally, the current implementation allows userspace to repeatedly grow the Audio PD heap, but does not support shrinking it. This can lead to unbounded memory usage over time, effectively causing a memory leak. Fix this by allocating the entire Audio PD reserved-memory region during rpmsg probe and tying its lifetime to the rpmsg channel. This removes userspace-controlled alloc/free and ensures that memory is reclaimed only when the DSP process is torn down. The reserved-memory region is now mandatory for the Audio PD domain. Rather than failing rpmsg probe when it is missing, validate it in fastrpc_init_create_static_process() and reject only the static-process creation. This keeps the fastrpc device probing for all other domains even on a misconfigured device tree. Fixes: 0871561055e66 ("misc: fastrpc: Add support for audiopd") Cc: stable@kernel.org Signed-off-by: Jianping Li <jianping.li@oss.qualcomm.com> Reviewed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com> Link: https://lore.kernel.org/all/20260814101955.234238-1-jianping.li@oss.qualcomm.com/ Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101220.1084101-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09misc: fastrpc: fix double-free in fastrpc_map_attach() error pathYifei Gao
map->table is assigned right after dma_buf_map_attachment_unlocked() succeeds. The two failure checks that follow, the len > map->size test and, where subsystem VMIDs are configured, a failed qcom_scm_assign_mem(), jump to map_err with map->table already set. map_err manually calls dma_buf_detach() and dma_buf_put() and then falls through to fastrpc_map_put(). Since that change the error path tail is fastrpc_map_put() -> fastrpc_free_map(), and fastrpc_free_map() already unmaps, detaches and puts the dma-buf whenever map->table is set. The two operations therefore run twice: the second dma_buf_put() drops an extra reference on map->buf, and dma_buf_unmap_attachment_unlocked() dereferences the map->attach already freed by the manual dma_buf_detach(). kref_init() sets the refcount to 1 with no intervening get, so the final fastrpc_map_put() frees the map synchronously and the redundant cleanup is deterministic. The len > map->size branch is reachable by an unprivileged process via FASTRPC_IOCTL_MEM_MAP with an fd whose dma-buf is smaller than the requested length, before any DSP invocation. Route both map->table-is-set failure branches to get_err instead of map_err, so fastrpc_free_map() is the single owner of the unmap/detach/put sequence. map_err is retained for the dma_buf_map_attachment_unlocked() failure, which is reached with map->table still NULL and an attachment that fastrpc_free_map() will not clean up, so its dma_buf_detach()/dma_buf_put() must still run manually. Fixes: 334f1a1cbe03 ("misc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Yifei Gao <gyf161023@gmail.com> Reviewed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20261002101220.1084101-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-10-09Merge tag 'fpga-for-7.4-rc1' of ↵Greg Kroah-Hartman
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 7.4-rc1 - Uwe drops unnecessary header file for fpga-dfl driver - Heiko corrects GPIO controls for xilinx driver - Hemanth fixes a comment typo in altera driver - Karl fixes a code comment in fpga manager core - Nazim introduces a graceful error handling for altera driver All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun <yilun.xu@intel.com> * tag 'fpga-for-7.4-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: altera-cvp: Retry teardown and reset CVP state on failure fpga: altera-cvp: Add helper to disable CvP mode fpga: Fix of_fpga_mgr_get() reference in fpga_mgr_lock() docs fpga: fix typo in s10_ops_write() comment fpga: xilinx-selectmap: control CSI_B and RDWR_B during configuration fpga: dfl: Drop #include for <linux/mod_devicetable.h>
2026-10-09Merge tag 'rtw-next-2026-10-08' of https://github.com/pkshih/rtwJohannes Berg
Pink-Ke Shih says: ================== rtw-next patches for v7.4 Mainly, continue to develop RTL8922DE with many patches. Some random cleanups and fixes. The major changes are listed below: rtw88: - support RTL8723BS (remove staging rtl8723bs by the way) - add SDIO TX back-pressure to improve performance rtw89: - add P2P_DEVICE declaration - many BT-coexistence update for RTL8922D ================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>