aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2026-01-31vmw_balloon: adjust BALLOON_DEFLATE when deflating while migratingDavid Hildenbrand (Red Hat)1-0/+2
Patch series "mm: balloon infrastructure cleanups", v3. I started with wanting to remove the dependency of the balloon infrastructure on the page lock, but ended up performing various other cleanups, some of which I had on my todo list for years. This series heavily cleans up and simplifies our balloon infrastructure, including our balloon page migration functionality. With this series, we no longer make use of the page lock for PageOffline pages as part of the balloon infrastructure (preparing for memdescs where PageOffline pages won't have any such lock), and simplifies migration handling such that refcounting can more easily be adjusted later (long-term focus is for PageOffline pages to not have a refcount either). Plenty of related cleanups. This patch (of 24): When we're effectively deflating the balloon while migrating a page because inflating the new page failed, we're not adjusting BALLOON_DEFLATE. Let's do that. This is a preparation for factoring out this handling to the core code, making it work in a similar way first. As this (deflating while migrating because of inflation error) is a corner case that I don't really expect to happen in practice and the stats are not that crucial, this likely doesn't classify as a fix. Link: https://lkml.kernel.org/r/20260119230133.3551867-1-david@kernel.org Link: https://lkml.kernel.org/r/20260119230133.3551867-2-david@kernel.org Signed-off-by: David Hildenbrand (Red Hat) <david@kernel.org> Reviewed-by: SeongJae Park <sj@kernel.org> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Acked-by: Michael S. Tsirkin <mst@redhat.com Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Eugenio Pérez <eperezma@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jason Wang <jasowang@redhat.com> Cc: Jerrin Shaji George <jerrin.shaji-george@broadcom.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-01-31Merge branch 'mm-hotfixes-stable' into mm-stable to pick up "mm/shmem,Andrew Morton3-3/+3
swap: fix race of truncate and swap entry split", needed for merging "mm, swap: cleanup swap entry management workflow".
2026-01-31Merge tag 'linux-can-next-for-6.20-20260131' of ↵Jakub Kicinski2-32/+42
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2026-01-31 This first 2 patches are by Biju Das, target the rcar_canfd driver and add support for FD-only mode. Lad Prabhakar's patches, also for the rcar_canfd driver add support for the RZ/T2H SoC. The last 2 patches are by Michael Tretter and me, target the sja1000 driver and clean up the CAN state handling. * tag 'linux-can-next-for-6.20-20260131' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: sja1000: sja1000_err(): use error counter for error state can: sja1000: sja1000_err(): make use of sja1000_get_berr_counter() to read error counters can: rcar_canfd: Add RZ/T2H support dt-bindings: can: renesas,rcar-canfd: Document RZ/T2H and RZ/N2H SoCs dt-bindings: can: renesas,rcar-canfd: Document RZ/V2H(P) and RZ/V2N SoCs dt-bindings: can: renesas,rcar-canfd: Specify reset-names can: rcar_canfd: Add support for FD-Only mode dt-bindings: can: renesas,rcar-canfd: Document renesas,fd-only property ==================== Link: https://patch.msgid.link/20260131101512.1958907-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-31Merge tag 'iommu-fixes-v6.19-rc7' of ↵Linus Torvalds2-1/+13
git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: - Fix a performance regression cause by the new Generic IO-Page-Table code detected in Intel VT-d driver - Command queue flushing fix for NVidia version of the ARM-SMMU-v3 * tag 'iommu-fixes-v6.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/tegra241-cmdqv: Reset VCMDQ in tegra241_vcmdq_hw_init_user() iommupt: Only cache flush memory changed by unmap
2026-01-31hwmon: (cros_ec) Move temperature channel params to a macroThomas Weißschuh1-24/+25
An upcoming change will add more channel parameters. This leads to a lot of churn and very long lines. Use a macro to encapsulate all of the shared values. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20260118-cros_ec-hwmon-pwm-v2-3-77eb1709b031@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (cros_ec) Add support for fan target speedThomas Weißschuh1-1/+25
Use EC_CMD_PWM_GET_FAN_TARGET_RPM to retrieve the target fan speed. The EC only supports this for the first fan. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20260118-cros_ec-hwmon-pwm-v2-2-77eb1709b031@weissschuh.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (tmp108) Add support for P3T1035 and P3T2030Mayank Mahajan2-38/+161
Add support for the P3T1035 & P3T2030 temperature sensor. While mostly compatible with the TMP108, P3T1035 uses an 8-bit configuration register instead of the 16-bit layout used by TMP108. Updated driver to handle this difference during configuration read/write. Signed-off-by: Mayank Mahajan <mayankmahajan.x@nxp.com> Link: https://lore.kernel.org/r/20260119040459.2898998-2-mayankmahajan.x@nxp.com [groeck: Reordered include files to retain alphabetic order] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: pmbus: add support for STEF48H28Charles Hsu3-0/+85
Add support for STEF48H28 hot-swap controller. Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com> Link: https://lore.kernel.org/r/20260126063712.1049025-2-hsu.yungteng@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (nct7363) Fix a resource leak in nct7363_present_pwm_faninFelix Gu1-0/+1
When calling of_parse_phandle_with_args(), the caller is responsible to call of_node_put() to release the reference of device node. In nct7363_present_pwm_fanin, it does not release the reference, causing a resource leak. Signed-off-by: Felix Gu <gu_0233@qq.com> Link: https://lore.kernel.org/r/tencent_9717645269E4C07D3D131F52201E12E5E10A@qq.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (emc2305) Fix a resource leak in emc2305_of_parse_pwm_childFelix Gu1-0/+1
When calling of_parse_phandle_with_args(), the caller is responsible to call of_node_put() to release the reference of device node. In emc2305_of_parse_pwm_child, it does not release the reference, causing a resource leak. Signed-off-by: Felix Gu <gu_0233@qq.com> Link: https://lore.kernel.org/r/tencent_738BA80BBF28F3440301EEE6F9E470165105@qq.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (gpd-fan) add support for Micro PC 2Cryolitia PukNgae1-1/+26
GPD Micro PC 2 is a mobile productivity device with 7-inch screen and abundant ports.[1] Link: https://www.gpd.hk/gpdmicropc2345345345 #1 Co-developed-by: kylon <3252255+kylon@users.noreply.github.com> Signed-off-by: kylon <3252255+kylon@users.noreply.github.com> Tested-by: kylon <3252255+kylon@users.noreply.github.com> Link: https://github.com/Cryolitia/gpd-fan-driver/pull/23 Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://lore.kernel.org/r/20251222-mpc2-v1-1-695d8d351cc1@uniontech.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (coretemp) Add TjMax for Silvermont through Tremont AtomsLaveesh Bansal1-0/+9
Add fallback TjMax values for Intel Atom processors based on Silvermont, Airmont, Goldmont, and Tremont microarchitectures. These processors support MSR_IA32_TEMPERATURE_TARGET for reading TjMax directly, so these table entries serve as fallback values only when the MSR read fails (e.g., in some virtualization scenarios). Added processors and TjMax values: - INTEL_ATOM_SILVERMONT (0x37, Bay Trail): - Stepping 9 (E38xx embedded): 110C - Other steppings (Z37xx tablet): 90C Stepping identified from Intel E3800 Specification Update. - INTEL_ATOM_SILVERMONT_MID (0x4a, Merrifield): 90C - INTEL_ATOM_SILVERMONT_MID2 (0x5a, Moorefield): 90C - INTEL_ATOM_AIRMONT (0x4c, Cherry Trail): 90C - INTEL_ATOM_GOLDMONT (0x5c, Apollo Lake): 105C - INTEL_ATOM_GOLDMONT_PLUS (0x7a, Gemini Lake): 105C - INTEL_ATOM_TREMONT (0x96, Elkhart Lake): 105C - INTEL_ATOM_TREMONT_L (0x9c, Jasper Lake): 105C Not included (MSR reads work reliably, server/specialized chips): - INTEL_ATOM_SILVERMONT_D (Avoton): Server, Tcase 97C - INTEL_ATOM_GOLDMONT_D (Denverton): Server, Tcase 82C - INTEL_ATOM_AIRMONT_NP (Lightning Mountain): Network processor - INTEL_ATOM_TREMONT_D (Jacobsville): Server - INTEL_ATOM_GRACEMONT (Alder Lake-N): Very new, MSR works Reference: Intel datasheets and ARK processor specifications - Z3600/Z3700 datasheet: https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/atom-z36xxx-z37xxx-datasheet-vol-1.pdf - E3845 ARK: https://www.intel.com/content/www/us/en/products/sku/78475/intel-atom-processor-e3845-2m-cache-1-91-ghz/specifications.html - E3800 Spec Update: https://community.intel.com/cipcp26785/attachments/cipcp26785/embedded-atom-processors/4708/1/600834-329901-intel-atom-processor-e3800-product-family-su-rev015.pdf Signed-off-by: Laveesh Bansal <laveeshb@laveeshbansal.com> Link: https://lore.kernel.org/r/20260106155426.547872-3-laveeshb@laveeshbansal.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (nct6683) Add customer ID for ASRock Z590 TaichiAnj Duvnjak1-0/+3
Add support for customer ID 0x1621 found on ASRock Z590 Taichi boards using the Nuvoton NCT6686D embedded controller. This allows the driver to instantiate without requiring the force=1 module parameter. Tested on two separate ASRock Z590 Taichi boards, both with EC firmware version 1.0 build 01/25/21. Signed-off-by: Anj Duvnjak <avian@extremenerds.net> Link: https://lore.kernel.org/r/20251222220942.10762-1-avian@extremenerds.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (f71882fg) Add F81968 supportJi-Ze Hong (Peter Hong)1-2/+4
Add hardware monitoring support for the Fintek F81968 Super I/O chip. It is fully compatible with F81866. Several products share compatibility with the F81866. To better distinguish between them, ensure that the Product ID is displayed when the device is probed. Signed-off-by: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw> Link: https://lore.kernel.org/r/20251223051040.10227-1-peter_hong@fintek.com.tw Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (nct7363) Simplify with scoped for each OF child loopKrzysztof Kozlowski1-5/+2
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251224110702.61746-6-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (max6639) Simplify with scoped for each OF child loopKrzysztof Kozlowski1-5/+2
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251224110702.61746-5-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (emc2305) Simplify with scoped for each OF child loopKrzysztof Kozlowski1-5/+2
Use scoped for-each loop when iterating over device nodes to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251224110702.61746-4-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (acpi_power_meter) Replace deprecated strcpy() with strscpy()Szymon Wilczek1-2/+2
strcpy() performs no bounds checking on the destination buffer, which could result in linear overflows beyond the end of the buffer. Although the source strings here are compile-time constants that fit within the destination buffers, using strscpy() is the preferred approach as it provides bounds checking and aligns with the kernel's deprecated API guidelines. This change converts the remaining strcpy() calls to strscpy(), matching the pattern already used throughout other ACPI drivers in drivers/acpi/*.c. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Szymon Wilczek <szymonwilczek@gmx.com> Reviewed-by: lihuisong@huawei.com Link: https://lore.kernel.org/r/20251220173041.377376-1-szymonwilczek@gmx.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (nct6775) Add ASUS Pro WS WRX90E-SAGE SEDenis Pauk1-0/+1
Boards Pro WS WRX90E-SAGE SE has got a nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. Add the board to the WMI monitoring list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk <pauk.denis@gmail.com> Tested-by: Marcus <shoes2ga@gmail.com> Link: https://lore.kernel.org/r/20251231155316.2048-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (asus-ec-sensors) Add VRM temperature for Pro WS WRX90E-SAGE SEJai Kith1-1/+4
Add VRM_E (0x33) and VRM_W (0x34) temperature sensor definitions to sensors_family_amd_wrx_90 and enable them in the board config. Signed-off-by: Jai Kith <kithfx@gmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260103085740.10644-1-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (mp2925) Add vid offset for vid modeWensheng Wang1-2/+21
In vid mode, the mp2925 vout telemetry has 49 vid step offset, add vid offset for this. Signed-off-by: Wensheng Wang <wenswang@yeah.net> Link: https://lore.kernel.org/r/20260106061348.170509-1-wenswang@yeah.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (dell-smm) Add support for Dell OptiPlex 7080Armin Wolf1-0/+7
The Dell OptiPlex 7080 supports the legacy SMM interface for reading sensors and performing fan control. Whitelist this machine so that this driver loads automatically. Closes: https://github.com/Wer-Wolf/i8kutils/issues/16 Signed-off-by: Armin Wolf <W_Armin@gmx.de> Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/20260104000654.6406-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (pmbus) Add mp5926 driverYuxi Wang3-0/+194
Add support for mps mp5926. Signed-off-by: Yuxi Wang <Yuxi.Wang@monolithicpower.com> Link: https://lore.kernel.org/r/20251219055413.1661-3-Yuxi.Wang@monolithicpower.com [groeck: Use consistent comment style, and use return value from dev_err_probe()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: Use sysfs_emit in show function callbacksKari Argillander1-3/+3
Use sysfs_emit() over sprintf() to prevent potential overflows. In hwmon_attr_show() that is totally impossible but looking other places many still use sysfs_emit(). Also according Documentation/filesystems/sysfs.rst code should use sysfs_emit(). Signed-off-by: Kari Argillander <kari.argillander@gmail.com> Link: https://lore.kernel.org/r/20251219-hwmon-fixes-v1-2-21b29097ea3b@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: Fix wrong return errno in *sanitize_name()Kari Argillander1-1/+4
Currently if user of *sanitize_name() function gives nullptr for name they get's ENOMEM. Logically it should be EINVAL. Signed-off-by: Kari Argillander <kari.argillander@gmail.com> Link: https://lore.kernel.org/r/20251219-hwmon-fixes-v1-1-21b29097ea3b@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (fam15h_power) Use generic power managementVaibhav Gupta1-6/+5
Switch to the generic PCI power management framework and remove legacy .resume() callback. With the generic framework, the standard PCI related work like: - pci_save/restore_state() - pci_enable/disable_device() - pci_set_power_state() is handled by the PCI core and this driver should implement only device specific operations in its respective callback function. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Link: https://lore.kernel.org/r/20251216181401.598273-1-vaibhavgupta40@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (sht3x) add support for SHT85Antoni Pokusinski2-2/+3
SHT85 is a temperature and humidity sensor with the same interface as SHT3x. Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com> Link: https://lore.kernel.org/r/20251211185842.66084-1-apokusinski01@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (asus-ec-sensors) add Pro WS TRX50-SAGE WIFI ARobert McIntyre1-0/+2
Adding support for Pro WS TRX50-SAGE WIFI A, which is identical sensors-wise to Pro WS TRX50-SAGE WIFI Signed-off-by: Robert McIntyre <rjmcinty@hotmail.com> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251213200531.259435-4-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (asus-ec-sensors) add ROG MAXIMUS X HEROReis Holmes1-0/+10
Add support for ROG MAXIMUS X HERO. The support is incomplete because the second EC, which provides part of the data, is inaccessible via the kernel ec module. Signed-off-by: Reis Holmes <reisholmes@pm.me> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20251213200531.259435-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31hwmon: (acpi_power_meter) Fix deadlocks related to acpi_power_meter_notify()Rafael J. Wysocki1-3/+14
The acpi_power_meter driver's .notify() callback function, acpi_power_meter_notify(), calls hwmon_device_unregister() under a lock that is also acquired by callbacks in sysfs attributes of the device being unregistered which is prone to deadlocks between sysfs access and device removal. Address this by moving the hwmon device removal in acpi_power_meter_notify() outside the lock in question, but notice that doing it alone is not sufficient because two concurrent METER_NOTIFY_CONFIG notifications may be attempting to remove the same device at the same time. To prevent that from happening, add a new lock serializing the execution of the switch () statement in acpi_power_meter_notify(). For simplicity, it is a static mutex which should not be a problem from the performance perspective. The new lock also allows the hwmon_device_register_with_info() in acpi_power_meter_notify() to be called outside the inner lock because it prevents the other notifications handled by that function from manipulating the "resource" object while the hwmon device based on it is being registered. The sending of ACPI netlink messages from acpi_power_meter_notify() is serialized by the new lock too which generally helps to ensure that the order of handling firmware notifications is the same as the order of sending netlink messages related to them. In addition, notice that hwmon_device_register_with_info() may fail in which case resource->hwmon_dev will become an error pointer, so add checks to avoid attempting to unregister the hwmon device pointer to by it in that case to acpi_power_meter_notify() and acpi_power_meter_remove(). Fixes: 16746ce8adfe ("hwmon: (acpi_power_meter) Replace the deprecated hwmon_device_register") Closes: https://lore.kernel.org/linux-hwmon/CAK8fFZ58fidGUCHi5WFX0uoTPzveUUDzT=k=AAm4yWo3bAuCFg@mail.gmail.com/ Reported-by: Jaroslav Pulchart <jaroslav.pulchart@gooddata.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-01-31ublk: remove "can't touch 'ublk_io' any more" commentsCaleb Sander Mateos1-2/+0
The struct ublk_io is in fact accessed in __ublk_complete_rq() after the comment. But it's not racy to access the ublk_io between clearing its UBLK_IO_FLAG_OWNED_BY_SRV flag and completing the request, as no other thread can use the ublk_io in the meantime. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-31ublk: add UBLK_F_NO_AUTO_PART_SCAN feature flagMing Lei1-4/+10
Add a new feature flag UBLK_F_NO_AUTO_PART_SCAN to allow users to suppress automatic partition scanning when starting a ublk device. This is useful for some cases in which user don't want to scan partitions. Users still can manually trigger partition scanning later when appropriate using standard tools (e.g., partprobe, blockdev --rereadpt). Reported-by: Yoav Cohen <yoav@nvidia.com> Link: https://lore.kernel.org/linux-block/DM4PR12MB63280C5637917C071C2F0D65A9A8A@DM4PR12MB6328.namprd12.prod.outlook.com/ Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-31ublk: check list membership before cancelling batch fetch commandMing Lei1-3/+13
Add !list_empty(&fcmd->node) check in ublk_batch_cancel_cmd() to ensure the fcmd hasn't already been removed from the list. Once an fcmd is removed from the list, it's considered claimed by whoever removed it and will be freed by that path. Meantime switch to list_del_init() for deleting it from list. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-31ublk: drop ublk_ctrl_start_recovery() header argumentCaleb Sander Mateos1-4/+3
ublk_ctrl_start_recovery() only uses its const struct ublksrv_ctrl_cmd * header argument to log the dev_id. But this value is already available in struct ublk_device's ub_number field. So log ub_number instead and drop the unused header argument. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-31ublk: use READ_ONCE() to read struct ublksrv_ctrl_cmdCaleb Sander Mateos1-25/+31
struct ublksrv_ctrl_cmd is part of the io_uring_sqe, which may lie in userspace-mapped memory. It's racy to access its fields with normal loads, as userspace may write to them concurrently. Use READ_ONCE() to copy the ublksrv_ctrl_cmd from the io_uring_sqe to the stack. Use the local copy in place of the one in the io_uring_sqe. Fixes: 87213b0d847c ("ublk: allow non-blocking ctrl cmds in IO_URING_F_NONBLOCK issue") Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-31ublk: Validate SQE128 flag before accessing the cmdGovindarajulu Varadarajan1-3/+3
ublk_ctrl_cmd_dump() accesses (header *)sqe->cmd before IO_URING_F_SQE128 flag check. This could cause out of boundary memory access. Move the SQE128 flag check earlier in ublk_ctrl_uring_cmd() to return -EINVAL immediately if the flag is not set. Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Signed-off-by: Govindarajulu Varadarajan <govind.varadar@gmail.com> Reviewed-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-01-31iommu/tegra241-cmdqv: Reset VCMDQ in tegra241_vcmdq_hw_init_user()Nicolin Chen1-0/+3
The Enable bits in CMDQV/VINTF/VCMDQ_CONFIG registers do not actually reset the HW registers. So, the driver explicitly clears all the registers when a VINTF or VCMDQ is being initialized calling its hw_deinit() function. However, a userspace VCMDQ is not properly reset, unlike an in-kernel VCMDQ getting reset in tegra241_vcmdq_hw_init(). Meanwhile, tegra241_vintf_hw_init() calling tegra241_vintf_hw_deinit() will not deinit any VCMDQ, since there is no userspace VCMDQ mapped to the VINTF at that stage. Then, this may result in dirty VCMDQ registers, which can fail the VM. Like tegra241_vcmdq_hw_init(), reset a VCMDQ in tegra241_vcmdq_hw_init() to fix this bug. This is required by a host kernel. Fixes: 6717f26ab1e7 ("iommu/tegra241-cmdqv: Add user-space use support") Cc: stable@vger.kernel.org Reported-by: Bao Nguyen <ncqb@google.com> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-01-31crypto: caam - fix netdev memory leak in dpaa2_caam_probeJianpeng Chang2-12/+17
When commit 0e1a4d427f58 ("crypto: caam: Unembed net_dev structure in dpaa2") converted embedded net_device to dynamically allocated pointers, it added cleanup in dpaa2_dpseci_disable() but missed adding cleanup in dpaa2_dpseci_free() for error paths. This causes memory leaks when dpaa2_dpseci_dpio_setup() fails during probe due to DPIO devices not being ready yet. The kernel's deferred probe mechanism handles the retry successfully, but the netdevs allocated during the failed probe attempt are never freed, resulting in kmemleak reports showing multiple leaked netdev-related allocations all traced back to dpaa2_caam_probe(). Fix this by preserving the CPU mask of allocated netdevs during setup and using it for cleanup in dpaa2_dpseci_free(). This approach ensures that only the CPUs that actually had netdevs allocated will be cleaned up, avoiding potential issues with CPU hotplug scenarios. Fixes: 0e1a4d427f58 ("crypto: caam: Unembed net_dev structure in dpaa2") Signed-off-by: Jianpeng Chang <jianpeng.chang.cn@windriver.com> Reviewed-by: Breno Leitao <leitao@debian.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: hisilicon/qm - increase wait time for mailboxWeili Qian1-10/+24
The device requires more time to process queue stop and function stop mailbox commands compared to other mailbox commands . In the current driver, the mailbox processing wait time for queue stop and function stop is less than the device timeout, which may cause the driver to incorrectly assume that the mailbox processing has failed. Therefore, the driver wait time for queue stop and function stop should be set to be greater than the device timeout. And PF and VF communication relies on mailbox, the communication wait time should also be modified. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: hisilicon/qm - obtain the mailbox configuration at one timeWeili Qian1-47/+86
The malibox needs to be triggered by a 128bit atomic operation. The reason is that the PF and VFs of the device share the mmio memory of the mailbox, and the mutex cannot lock mailbox operations in different functions, especially when passing through VFs to virtual machines. Currently, the write operation to the mailbox is already a 128-bit atomic write. The read operation also needs to be modified to a 128-bit atomic read. Since there is no general 128-bit IO memory access API in the current ARM64 architecture, and the stp and ldp instructions do not guarantee atomic access to device memory, they cannot be extracted as a general API. Therefore, the 128-bit atomic read and write operations need to be implemented in the driver. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: hisilicon/qm - remove unnecessary code in qm_mb_write()Weili Qian1-12/+2
Since the HiSilicon accelerator is used only on the ARM64 architectures, the implementations for other architectures are not needed, so remove the unnecessary code. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: hisilicon/qm - move the barrier before writing to the mailbox registerChenghai Huang1-1/+5
Before sending the data via the mailbox to the hardware, to ensure that the data accessed by the hardware is the most up-to-date, a write barrier should be added before writing to the mailbox register. The current memory barrier is placed after writing to the register, the barrier order should be modified to be before writing to the register. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: hisilicon/trng - support tfms sharing the deviceWeili Qian1-35/+86
Since the number of devices is limited, and the number of tfms may exceed the number of devices, to ensure that tfms can be successfully allocated, support tfms sharing the same device. Fixes: e4d9d10ef4be ("crypto: hisilicon/trng - add support for PRNG") Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: hisilicon/zip - add lz4 algorithm for hisi_zipChenghai Huang2-8/+84
Add the "hisi-lz4-acomp" algorithm by the crypto acomp. When the 8th bit of the capability register is 1, the lz4 algorithm will register to crypto acomp, and the window length is configured to 16K by default. Since the "hisi-lz4-acomp" currently only support compression direction, decompression is completed by the soft lz4 algorithm. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31s390/pkey: Support new xflag PKEY_XFLAG_NOCLEARKEYHarald Freudenberger3-3/+19
Introduce a new xflag PKEY_XFLAG_NOCLEARKEY which when given refuses the conversion of "clear key tokens" to protected key material. Some algorithms (PAES, PHMAC) have the need to construct "clear key tokens" to be used during selftest. But in general these algorithms should only support clear key material for testing purpose. So now the algorithm implementation can signal via xflag PKEY_XFLAG_NOCLEARKEY that a conversion of clear key material to protected key is not acceptable and thus the pkey layer (usually one of the handler modules) refuses clear key material with -EINVAL. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: stm32 - Replace min_t(size_t) with just min()Thorsten Blum1-15/+14
In most cases, min_t(size_t) and explicit casting are unnecessary because the values ->hw_blocksize, ->payload_{in,out}, and ->header_in are already of type 'size_t'. Use the simpler min() macro instead. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: virtio - Replace package id with numa node idBibo Mao1-1/+1
With multiple virtio crypto devices supported with different NUMA nodes, when crypto session is created, it will search virtio crypto device with the same numa node of current CPU. Here API topology_physical_package_id() is replaced with cpu_to_node() since package id is physical concept, and one package id have multiple memory numa id. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: virtio - Remove duplicated virtqueue_kick in ↵Bibo Mao1-2/+0
virtio_crypto_skcipher_crypt_req With function virtio_crypto_skcipher_crypt_req(), there is already virtqueue_kick() call with spinlock held in function __virtio_crypto_skcipher_do_req(). Remove duplicated virtqueue_kick() function call here. Fixes: d79b5d0bbf2e ("crypto: virtio - support crypto engine framework") Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-31crypto: virtio - Add spinlock protection with virtqueue notificationBibo Mao1-0/+5
When VM boots with one virtio-crypto PCI device and builtin backend, run openssl benchmark command with multiple processes, such as openssl speed -evp aes-128-cbc -engine afalg -seconds 10 -multi 32 openssl processes will hangup and there is error reported like this: virtio_crypto virtio0: dataq.0:id 3 is not a head! It seems that the data virtqueue need protection when it is handled for virtio done notification. If the spinlock protection is added in virtcrypto_done_task(), openssl benchmark with multiple processes works well. Fixes: fed93fb62e05 ("crypto: virtio - Handle dataq logic with tasklet") Cc: stable@vger.kernel.org Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-01-30net: usb: r8152: fix resume reset deadlockSergey Senozhatsky1-14/+15
rtl8152 can trigger device reset during reset which potentially can result in a deadlock: **** DPM device timeout after 10 seconds; 15 seconds until panic **** Call Trace: <TASK> schedule+0x483/0x1370 schedule_preempt_disabled+0x15/0x30 __mutex_lock_common+0x1fd/0x470 __rtl8152_set_mac_address+0x80/0x1f0 dev_set_mac_address+0x7f/0x150 rtl8152_post_reset+0x72/0x150 usb_reset_device+0x1d0/0x220 rtl8152_resume+0x99/0xc0 usb_resume_interface+0x3e/0xc0 usb_resume_both+0x104/0x150 usb_resume+0x22/0x110 The problem is that rtl8152 resume calls reset under tp->control mutex while reset basically re-enters rtl8152 and attempts to acquire the same tp->control lock once again. Reset INACCESSIBLE device outside of tp->control mutex scope to avoid recursive mutex_lock() deadlock. Fixes: 4933b066fefb ("r8152: If inaccessible at resume time, issue a reset") Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Link: https://patch.msgid.link/20260129031106.3805887-1-senozhatsky@chromium.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>