id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
13e3a882bc85d22861b87bfd140d11989fbe3f83
Analyze and fix the following issue in the Linux kernel code: dt-bindings: arm: arm,coresight-static-replicator: add optional clocks
Problem Details: As most other CoreSight devices the replicator can use either of the optional clocks. Document those optional clocks in the schema. Additionally document the one-off case of Zynq-7000 platforms which uses apb_pclk and two additional debug clocks. Fixes: 3c15fddf3121 ("dt-bindings: arm: Convert CoreSig...
```diff diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml index a6f793ea03b6..0c1017affbad 100644 --- a/Documentation/devicetree/bindings/arm/arm,coresight-static-replicator.yaml +++ b/Documentation/device...
9f52aecc952ddf307571517d5c91136c8c4e87c9
Analyze and fix the following issue in the Linux kernel code: coresight: Fixes device's owner field for registered using coresight_init_driver()
Problem Details: The coresight_init_driver() of the coresight-core module is called from the sub coresgiht device (such as tmc/stm/funnle/...) module. It calls amba_driver_register() and Platform_driver_register(), which are macro functions that use the coresight-core's module to initialize the caller's owner field. T...
```diff diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c index fa170c966bc3..96cb48b140af 100644 --- a/drivers/hwtracing/coresight/coresight-catu.c +++ b/drivers/hwtracing/coresight/coresight-catu.c @@ -702,7 +702,7 @@ static int __init catu_init(void) { int re...
fca6170f5a039543fa5f390f1895fde503b80f46
Analyze and fix the following issue in the Linux kernel code: ipv4: fib: Fix fib_info_hash_alloc() allocation type
Problem Details: In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) This was alloc...
```diff diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 2371f311a1e1..03959c60d128 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -365,7 +365,7 @@ static struct hlist_head *fib_info_laddrhash_bucket(const struct net *net, static struct hlist_head *fib_info_hash_alloc(uns...
11cdb506d0fbf5ac05bf55f5afcb3a215c316490
Analyze and fix the following issue in the Linux kernel code: Input: mtk-pmic-keys - fix possible null pointer dereference
Problem Details: In mtk_pmic_keys_probe, the regs parameter is only set if the button is parsed in the device tree. However, on hardware where the button is left floating, that node will most likely be removed not to enable that input. In that case the code will try to dereference a null pointer. Let's use the regs st...
```diff diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 5ad6be914160..061d48350df6 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -147,8 +147,8 @@ static void mtk_pmic_keys_lp_reset_setup(struct mtk_pmic_keys *keys, ...
2ef5c66cba6171feab05e62e1b22df970b238544
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Use 128kB size for aliased GIC400 register access on stm32mp23 SoCs
Problem Details: Adjust the size of 8kB GIC regions to 128kB so that each 4kB is mapped 16 times over a 64kB region. The offset is then adjusted in the irq-gic driver. see commit 12e14066f4835 ("irqchip/GIC: Add workaround for aliased GIC400") Fixes: e9b03ef21386e ("arm64: dts: st: introduce stm32mp23 SoCs family") S...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp231.dtsi b/arch/arm64/boot/dts/st/stm32mp231.dtsi index 3f73cf1d443d..75697acd1345 100644 --- a/arch/arm64/boot/dts/st/stm32mp231.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp231.dtsi @@ -1203,9 +1203,9 @@ intc: interrupt-controller@4ac10000 { compatible = "arm,gic-...
3a1e1082097b8fa2e5d420de105f4cce804c38b2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Adjust interrupt-controller for stm32mp23 SoCs
Problem Details: Use gic-400 compatible and remove address-cells = <1> for aarch64 Fixes: e9b03ef21386e ("arm64: dts: st: introduce stm32mp23 SoCs family") Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> Link: https://lore.kernel.org/r/20250415111654.2103767-6-christian.bruel@foss.st.com Signed-off-by: Al...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp231.dtsi b/arch/arm64/boot/dts/st/stm32mp231.dtsi index 8820d219a33e..3f73cf1d443d 100644 --- a/arch/arm64/boot/dts/st/stm32mp231.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp231.dtsi @@ -1201,13 +1201,12 @@ }; intc: interrupt-controller@4ac10000 { - compatible =...
1bc229e9bb9cd502caeec639cb3cff50aea078f0
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Use 128kB size for aliased GIC400 register access on stm32mp21 SoCs
Problem Details: Adjust the size of 8kB GIC regions to 128kB so that each 4kB is mapped 16 times over a 64kB region. The offset is then adjusted in the irq-gic driver. see commit 12e14066f4835 ("irqchip/GIC: Add workaround for aliased GIC400") Fixes: 7a57b1bb1afbf ("arm64: dts: st: introduce stm32mp21 SoCs family") S...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp211.dtsi b/arch/arm64/boot/dts/st/stm32mp211.dtsi index 52a8209471b8..bf888d60cd4f 100644 --- a/arch/arm64/boot/dts/st/stm32mp211.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp211.dtsi @@ -118,9 +118,9 @@ intc: interrupt-controller@4ac10000 { compatible = "arm,gic-40...
02dc83f09c7262533123e7e4dae9c4f9fc40ed17
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Adjust interrupt-controller for stm32mp21 SoCs
Problem Details: Use gic-400 compatible for aarch64 Fixes: 7a57b1bb1afbf ("arm64: dts: st: introduce stm32mp21 SoCs family") Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> Link: https://lore.kernel.org/r/20250415111654.2103767-4-christian.bruel@foss.st.com Signed-off-by: Alexandre Torgue <alexandre.torgu...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp211.dtsi b/arch/arm64/boot/dts/st/stm32mp211.dtsi index 6dd1377f3e1d..52a8209471b8 100644 --- a/arch/arm64/boot/dts/st/stm32mp211.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp211.dtsi @@ -116,7 +116,7 @@ }; intc: interrupt-controller@4ac10000 { - compatible = "ar...
06c231fe953a26f4bc9d7a37ba1b9b288a59c7c2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Use 128kB size for aliased GIC400 register access on stm32mp25 SoCs
Problem Details: Adjust the size of 8kB GIC regions to 128kB so that each 4kB is mapped 16 times over a 64kB region. The offset is then adjusted in the irq-gic driver. see commit 12e14066f4835 ("irqchip/GIC: Add workaround for aliased GIC400") Fixes: 5d30d03aaf785 ("arm64: dts: st: introduce stm32mp25 SoCs family") S...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index 379e290313dc..87110f91e489 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -119,9 +119,9 @@ #interrupt-cells = <3>; interrupt-controller; reg = <0x0 0x4...
de2b2107d5a41a91ab603e135fb6e408abbee28e
Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Adjust interrupt-controller for stm32mp25 SoCs
Problem Details: Use gic-400 compatible and remove address-cells = <1> on aarch64 Fixes: 5d30d03aaf785 ("arm64: dts: st: introduce stm32mp25 SoCs family") Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> Link: https://lore.kernel.org/r/20250415111654.2103767-2-christian.bruel@foss.st.com Signed-off-by: Ale...
```diff diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index f3c6cdfd7008..379e290313dc 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -115,9 +115,8 @@ }; intc: interrupt-controller@4ac00000 { - compatible = "arm,c...
c1a32a041aecffe41bf7a1d1696d90617528f082
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix build warning when DEBUG_FS is disabled
Problem Details: Commit a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS") causes a build warning and linking error when built without support for DebugFS, because of a non-inline non-static function declaration in a header file. On top of that, the function is only being used inside a...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c index 2dcf308094b2..7c00fd77758b 100644 --- a/drivers/gpu/drm/panthor/panthor_gem.c +++ b/drivers/gpu/drm/panthor/panthor_gem.c @@ -42,11 +42,16 @@ static void panthor_gem_debugfs_bo_rm(struct panthor_gem_object *bo) mu...
1bee4838eb3a2c689f23c7170ea66ae87ea7d93a
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Clear current_vmcb during vCPU free for all *possible* CPUs
Problem Details: When freeing a vCPU and thus its VMCB, clear current_vmcb for all possible CPUs, not just online CPUs, as it's theoretically possible a CPU could go offline and come back online in conjunction with KVM reusing the page for a new VMCB. Link: https://lore.kernel.org/all/20250320013759.3965869-1-yosry.ah...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 8eb482ca3359..e6802e33c54d 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1496,7 +1496,7 @@ static void svm_clear_current_vmcb(struct vmcb *vmcb) { int i; - for_each_online_cpu(i) + for_each_possible_cpu(i) cmpxchg(...
1a8bc0fe8039e1e57f68c4a588f0403d98bfeb1f
Analyze and fix the following issue in the Linux kernel code: drm/mipi-dbi: Fix blanking for non-16 bit formats
Problem Details: On r6x2b6x2g6x2 displays not enough blank data is sent to blank the entire screen. When support for these displays was added, the dirty function was updated to handle the different amount of data, but blanking was not, and remained hardcoded as 2 bytes per pixel. This change applies almost the same al...
```diff diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 89e05a5bed1d..a4cd476f9b30 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -404,12 +404,16 @@ static void mipi_dbi_blank(struct mipi_dbi_dev *dbidev) u16 height = drm->mode_config.min_height;...
48ccf21fa8dc595c8aa4f1d347b593dcae0727d0
Analyze and fix the following issue in the Linux kernel code: drm/tests: shmem: Fix memleak
Problem Details: The drm_gem_shmem_test_get_pages_sgt() gets a scatter-gather table using the drm_gem_shmem_get_sg_table() function and rightfully calls sg_free_table() on it. However, it's also supposed to kfree() the returned sg_table, but doesn't. This leads to a memory leak, reported by kmemleak. Fix it by adding ...
```diff diff --git a/drivers/gpu/drm/tests/drm_gem_shmem_test.c b/drivers/gpu/drm/tests/drm_gem_shmem_test.c index fd4215e2f982..925fbc2cda70 100644 --- a/drivers/gpu/drm/tests/drm_gem_shmem_test.c +++ b/drivers/gpu/drm/tests/drm_gem_shmem_test.c @@ -216,6 +216,9 @@ static void drm_gem_shmem_test_get_pages_sgt(struct k...
f101c56447717c595d803894ba0e215f56c6fba4
Analyze and fix the following issue in the Linux kernel code: arm64: Support ARM64_VA_BITS=52 when setting ARCH_MMAP_RND_BITS_MAX
Problem Details: When the 52-bit virtual addressing was introduced the select like ARCH_MMAP_RND_BITS_MAX logic was never updated to account for it. Because of that the rnd max bits knob is set to the default value of 18 when ARM64_VA_BITS=52. Fix this by setting ARCH_MMAP_RND_BITS_MAX to the same value that would be u...
```diff diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a182295e6f08..6527d0d5656a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -333,9 +333,9 @@ config ARCH_MMAP_RND_BITS_MAX default 24 if ARM64_VA_BITS=39 default 27 if ARM64_VA_BITS=42 default 30 if ARM64_VA_BITS=47 - default 29 if ARM6...
0581d384f344ed0a963dd27cbff3c7af80c189e7
Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/hsmp: Make amd_hsmp and hsmp_acpi as mutually exclusive drivers
Problem Details: amd_hsmp and hsmp_acpi are intended to be mutually exclusive drivers and amd_hsmp is for legacy platforms. To achieve this, it is essential to check for the presence of the ACPI device in plat.c. If the hsmp ACPI device entry is found, allow the hsmp_acpi driver to manage the hsmp and return an error f...
```diff diff --git a/drivers/platform/x86/amd/hsmp/acpi.c b/drivers/platform/x86/amd/hsmp/acpi.c index c1eccb3c80c5..eaae044e4f82 100644 --- a/drivers/platform/x86/amd/hsmp/acpi.c +++ b/drivers/platform/x86/amd/hsmp/acpi.c @@ -27,9 +27,8 @@ #include "hsmp.h" -#define DRIVER_NAME "amd_hsmp" +#define DRIVER_NAME "...
8e81b9cd6e95188d12c9cc25d40b61dd5ea05ace
Analyze and fix the following issue in the Linux kernel code: drivers/platform/x86/amd: pmf: Check for invalid Smart PC Policies
Problem Details: commit 376a8c2a14439 ("platform/x86/amd/pmf: Update PMF Driver for Compatibility with new PMF-TA") added support for platforms that support an updated TA, however it also exposed a number of platforms that although they have support for the updated TA don't actually populate a policy binary. Add an ex...
```diff diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c index e008ac079fad..d3bd12ad036a 100644 --- a/drivers/platform/x86/amd/pmf/tee-if.c +++ b/drivers/platform/x86/amd/pmf/tee-if.c @@ -334,6 +334,11 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev) return...
690d722e02819ef978f90cd7553973eba1007e6c
Analyze and fix the following issue in the Linux kernel code: drivers/platform/x86/amd: pmf: Check for invalid sideloaded Smart PC Policies
Problem Details: If a policy is passed into amd_pmf_get_pb_data() that causes the engine to fail to start there is a memory leak. Free the memory in this failure path. Fixes: 10817f28e5337 ("platform/x86/amd/pmf: Add capability to sideload of policy binary") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>...
```diff diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c index 14b99d8b63d2..e008ac079fad 100644 --- a/drivers/platform/x86/amd/pmf/tee-if.c +++ b/drivers/platform/x86/amd/pmf/tee-if.c @@ -364,9 +364,14 @@ static ssize_t amd_pmf_get_pb_data(struct file *filp, const char __user ...
ab35ad950d439ec3409509835d229b3d93d3c7f9
Analyze and fix the following issue in the Linux kernel code: nvme-pci: add quirks for WDC Blue SN550 15b7:5009
Problem Details: Add two quirks for the WDC Blue SN550 (PCI ID 15b7:5009) based on user reports and hardware analysis: - NVME_QUIRK_NO_DEEPEST_PS: liaozw talked to me the problem and solved with nvme_core.default_ps_max_latency_us=0, so add the quirk. I also found some reports in the following link. - NVME_QUIRK...
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index a8d4443edc49..2e30e9be7408 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3649,6 +3649,9 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE(0x15b7, 0x5008), /...
a75401227eeb827b1a162df1aa9d5b33da921c43
Analyze and fix the following issue in the Linux kernel code: nvme-pci: fix queue unquiesce check on slot_reset
Problem Details: A zero return means the reset was successfully scheduled. We don't want to unquiesce the queues while the reset_work is pending, as that will just flush out requeued requests to a failed completion. Fixes: 71a5bb153be104 ("nvme: ensure disabling pairs with unquiesce") Reported-by: Dhankaran Singh Ajra...
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index b178d52eac1b..c9e2a5450bc0 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3575,7 +3575,7 @@ static pci_ers_result_t nvme_slot_reset(struct pci_dev *pdev) dev_info(dev->ctrl.device, "restart after slot reset\n"); p...
56f1f30e6795b890463d9b20b11e576adf5a2f77
Analyze and fix the following issue in the Linux kernel code: ALSA: ump: Fix buffer overflow at UMP SysEx message conversion
Problem Details: The conversion function from MIDI 1.0 to UMP packet contains an internal buffer to keep the incoming MIDI bytes, and its size is 4, as it was supposed to be the max size for a MIDI1 UMP packet data. However, the implementation overlooked that SysEx is handled in a different format, and it can be up to ...
```diff diff --git a/include/sound/ump_convert.h b/include/sound/ump_convert.h index d099ae27f849..682499b871ea 100644 --- a/include/sound/ump_convert.h +++ b/include/sound/ump_convert.h @@ -19,7 +19,7 @@ struct ump_cvt_to_ump_bank { /* context for converting from MIDI1 byte stream to UMP packet */ struct ump_cvt_to_...
7ff37d29fd5c27617b9767e1b8946d115cf93a1e
Analyze and fix the following issue in the Linux kernel code: firmware: psci: Fix refcount leak in psci_dt_init
Problem Details: Fix a reference counter leak in psci_dt_init() where of_node_put(np) was missing after of_find_matching_node_and_match() when np is unavailable. Fixes: d09a0011ec0d ("drivers: psci: Allow PSCI node to be disabled") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Gavin Shan <gshan@redhat....
```diff diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index a1ebbe9b73b1..38ca190d4a22 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -804,8 +804,10 @@ int __init psci_dt_init(void) np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np); ...
70a2585e582058e94fe4381a337be42dec800337
Analyze and fix the following issue in the Linux kernel code: drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs
Problem Details: LNCF registers report wrong values when XE_FORCEWAKE_GT only is held. Holding XE_FORCEWAKE_ALL ensures correct operations on LNCF regs. V2(Himal): - Use xe_force_wake_ref_has_domain Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1999 Fixes: a6a4ea6d7d37 ("drm/xe: Add mocs kunit") Revi...
```diff diff --git a/drivers/gpu/drm/xe/tests/xe_mocs.c b/drivers/gpu/drm/xe/tests/xe_mocs.c index ef1e5256c56a..0e502feaca81 100644 --- a/drivers/gpu/drm/xe/tests/xe_mocs.c +++ b/drivers/gpu/drm/xe/tests/xe_mocs.c @@ -46,8 +46,11 @@ static void read_l3cc_table(struct xe_gt *gt, unsigned int fw_ref, i; u32 reg_val;...
6240f43b29f285a40eebeb789756673af7a7d67c
Analyze and fix the following issue in the Linux kernel code: ublk: enhance check for register/unregister io buffer command
Problem Details: The simple check of UBLK_IO_FLAG_OWNED_BY_SRV can avoid incorrect register/unregister io buffer easily, so check it before calling starting to register/un-register io buffer. Also only allow io buffer register/unregister uring_cmd in case of UBLK_F_SUPPORT_ZERO_COPY. Also mark argument 'ublk_queue *'...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 0a3a3c64316d..c624d8f653ae 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -201,7 +201,7 @@ struct ublk_params_header { static void ublk_stop_dev_unlocked(struct ublk_device *ub); static void ublk_abort_queue(struct...
69edf98be844375807f299397c516fb1e962b3cc
Analyze and fix the following issue in the Linux kernel code: ublk: decouple zero copy from user copy
Problem Details: UBLK_F_USER_COPY and UBLK_F_SUPPORT_ZERO_COPY are two different features, and shouldn't be coupled together. Commit 1f6540e2aabb ("ublk: zc register/unregister bvec") enables user copy automatically in case of UBLK_F_SUPPORT_ZERO_COPY, this way isn't correct. So decouple zero copy from user copy, and...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 40f971a66d3e..0a3a3c64316d 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -205,11 +205,6 @@ static inline struct request *__ublk_check_and_get_req(struct ublk_device *ub, static inline unsigned int ublk_req_build_fl...
730d837979bac203c786f2c5b0707f5426275c0d
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: fix UBLK_F_NEED_GET_DATA
Problem Details: Commit 57e13a2e8cd2 ("selftests: ublk: support user recovery") starts to support UBLK_F_NEED_GET_DATA for covering recovery feature, however the ublk utility implementation isn't done correctly. Fix it by supporting UBLK_F_NEED_GET_DATA correctly. Also add test generic_07 for covering UBLK_F_NEED_GET...
```diff diff --git a/tools/testing/selftests/ublk/Makefile b/tools/testing/selftests/ublk/Makefile index ec4624a283bc..f34ac0bac696 100644 --- a/tools/testing/selftests/ublk/Makefile +++ b/tools/testing/selftests/ublk/Makefile @@ -9,6 +9,7 @@ TEST_PROGS += test_generic_03.sh TEST_PROGS += test_generic_04.sh TEST_PROG...
9f81d707022c244c1930cc6da9f026d0f8acab6c
Analyze and fix the following issue in the Linux kernel code: fs: remove useless plus one in super_cache_scan()
Problem Details: After commit 475d0db742e3 ("fs: Fix theoretical division by 0 in super_cache_scan()."), there's no need to plus one to prevent division by zero. Remove it to simplify the code. Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com> Link: https://lore.kernel.org/20250428135050.267297-1-alexjlzheng@te...
```diff diff --git a/fs/super.c b/fs/super.c index 97a17f9d9023..6bbdb7e59a8d 100644 --- a/fs/super.c +++ b/fs/super.c @@ -201,7 +201,7 @@ static unsigned long super_cache_scan(struct shrinker *shrink, inodes = list_lru_shrink_count(&sb->s_inode_lru, sc); dentries = list_lru_shrink_count(&sb->s_dentry_lru, sc); -...
f2c8f90b4f676c1f860e6c2cdfe91e68fae64918
Analyze and fix the following issue in the Linux kernel code: drm/st7571-i2c: select CONFIG_DRM_CLIENT_SELECTION
Problem Details: The newly added driver calls drm_client_setup(), but that is not always built in: x86_64-linux-ld: vmlinux.o: in function `st7571_probe': st7571-i2c.c:(.text+0x7b7119): undefined reference to `drm_client_setup' Select the appropriate Kconfig symbol. Fixes: 4b35f0f41ee2 ("drm/st7571-i2c: add support ...
```diff diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index 9fa333709828..ad4dab525f93 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -215,6 +215,7 @@ config TINYDRM_ST7586 config DRM_ST7571_I2C tristate "DRM support for Sitronix ST7571 display panels (I2C)...
13a6d4265665201a795a2ff5a3e6e4d183fc9c33
Analyze and fix the following issue in the Linux kernel code: pmdomain: renesas: rcar: Remove obsolete nullify checks
Problem Details: All nullify users and helpers were removed, but the R-Car SYSC drivers still checked for nullified domains. Remove the obsolete checks. Fixes: c8d87704444a8ac7 ("pmdomain: renesas: rcar-sysc: Remove rcar_sysc_nullify() helper") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Cc: stable@vg...
```diff diff --git a/drivers/pmdomain/renesas/rcar-gen4-sysc.c b/drivers/pmdomain/renesas/rcar-gen4-sysc.c index 66409cff2083..e001b5c25bed 100644 --- a/drivers/pmdomain/renesas/rcar-gen4-sysc.c +++ b/drivers/pmdomain/renesas/rcar-gen4-sysc.c @@ -338,11 +338,6 @@ static int __init rcar_gen4_sysc_pd_init(void) struct...
e6031b11544b44966ba020c867fe438bccd3bdfa
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: qcom: Fix read len for onfi param page
Problem Details: The minimum size to fetch the data from device to QPIC buffer is 512-bytes. If size is less than 512-bytes the data will not be protected by ECC as per QPIC standard. So while reading onfi parameter page from NAND device set nandc->buf_count = 512. Cc: stable@vger.kernel.org Fixes: 89550beb098e ("mtd:...
```diff diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index a73bb154353f..1003cf118c01 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -1930,7 +1930,7 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_ qco...
47bddabbf69da50999ec68be92b58356c687e1d6
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: qcom: Fix last codeword read in qcom_param_page_type_exec()
Problem Details: For QPIC V2 onwards there is a separate register to read last code word "QPIC_NAND_READ_LOCATION_LAST_CW_n". qcom_param_page_type_exec() is used to read only one code word If it configures the number of code words to 1 in QPIC_NAND_DEV0_CFG0 register then QPIC controller thinks its reading the last co...
```diff diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index ef2dd158ca34..a73bb154353f 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -1863,7 +1863,12 @@ static int qcom_param_page_type_exec(struct nand_chip *chip, const struct nand_ con...
ee000969f28bf579d3772bf7c0ae8aff86586e20
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: qcom: Pass 18 bit offset from NANDc base to BAM base
Problem Details: The BAM command descriptor provides only 18 bits to specify the BAM register offset. Additionally, in the BAM command descriptor, the BAM register offset is supposed to be specified as "(NANDc base - BAM base) + reg_off". Since, the BAM controller expecting the value in the form of "NANDc base - BAM ba...
```diff diff --git a/drivers/mtd/nand/qpic_common.c b/drivers/mtd/nand/qpic_common.c index e0ed25b5afea..4dc4d65e7d32 100644 --- a/drivers/mtd/nand/qpic_common.c +++ b/drivers/mtd/nand/qpic_common.c @@ -236,21 +236,21 @@ int qcom_prep_bam_dma_desc_cmd(struct qcom_nand_controller *nandc, bool read, int i, ret; struc...
d95846350aac72303036a70c4cdc69ae314aa26d
Analyze and fix the following issue in the Linux kernel code: mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
Problem Details: If ctx->steps is zero, the loop processing ECC steps is skipped, and the variable ret remains uninitialized. It is later checked and returned, which leads to undefined behavior and may cause unpredictable results in user space or kernel crashes. This scenario can be triggered in edge cases such as mis...
```diff diff --git a/drivers/mtd/nand/ecc-mxic.c b/drivers/mtd/nand/ecc-mxic.c index 56b56f726b99..1bf9a5a64b87 100644 --- a/drivers/mtd/nand/ecc-mxic.c +++ b/drivers/mtd/nand/ecc-mxic.c @@ -614,7 +614,7 @@ static int mxic_ecc_finish_io_req_external(struct nand_device *nand, { struct mxic_ecc_engine *mxic = nand_to_...
ac3a4b17e03b079c00eb61456364bcdbf65f3436
Analyze and fix the following issue in the Linux kernel code: mtd: spinand: Use more specific naming for the (quad) program load op
Problem Details: SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operatio...
```diff diff --git a/drivers/mtd/nand/spi/alliancememory.c b/drivers/mtd/nand/spi/alliancememory.c index 437e935aefab..2ee498230ec1 100644 --- a/drivers/mtd/nand/spi/alliancememory.c +++ b/drivers/mtd/nand/spi/alliancememory.c @@ -25,11 +25,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants, SPINAND_PAGE_READ_FROM...
07cdbae7f84190983f9b07133ce5b6f2634c95cd
Analyze and fix the following issue in the Linux kernel code: mtd: spinand: Use more specific naming for the (single) program load op
Problem Details: SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operatio...
```diff diff --git a/drivers/mtd/nand/spi/alliancememory.c b/drivers/mtd/nand/spi/alliancememory.c index 0f9522009843..437e935aefab 100644 --- a/drivers/mtd/nand/spi/alliancememory.c +++ b/drivers/mtd/nand/spi/alliancememory.c @@ -26,11 +26,11 @@ static SPINAND_OP_VARIANTS(read_cache_variants, static SPINAND_OP_VARI...
12b8a672d2aa053064151659f49e7310674d42d3
Analyze and fix the following issue in the Linux kernel code: pinctrl: qcom: Fix PINGROUP definition for sm8750
Problem Details: On newer SoCs intr_target_bit position is at 8 instead of 5. Fix it. Also add missing intr_wakeup_present_bit and intr_wakeup_enable_bit which enables forwarding of GPIO interrupts to parent PDC interrupt controller. Fixes: afe9803e3b82 ("pinctrl: qcom: Add sm8750 pinctrl driver") Signed-off-by: Maul...
```diff diff --git a/drivers/pinctrl/qcom/pinctrl-sm8750.c b/drivers/pinctrl/qcom/pinctrl-sm8750.c index 1af11cd95fb0..b94fb4ee0ec3 100644 --- a/drivers/pinctrl/qcom/pinctrl-sm8750.c +++ b/drivers/pinctrl/qcom/pinctrl-sm8750.c @@ -46,7 +46,9 @@ .out_bit = 1, \ .intr_enable_...
b1852c5de2f2a37dd4462f7837c9e3e678f9e546
Analyze and fix the following issue in the Linux kernel code: i2c: imx-lpi2c: Fix clock count when probe defers
Problem Details: Deferred probe with pm_runtime_put() may delay clock disable, causing incorrect clock usage count. Use pm_runtime_put_sync() to ensure the clock is disabled immediately. Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support") Signed-off-by: Clark Wang <xiaoning.wang@nxp.com> Signed-off-by: Carl...
```diff diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c index 0d4b3935e687..342d47e67586 100644 --- a/drivers/i2c/busses/i2c-imx-lpi2c.c +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c @@ -1380,9 +1380,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev) return 0; rpm_disable...
882b25af265de8e05c66f72b9a29f6047102958f
Analyze and fix the following issue in the Linux kernel code: powerpc/crash: Fix non-smp kexec preparation
Problem Details: In non-smp configurations, crash_kexec_prepare is never called in the crash shutdown path. One result of this is that the crashing_cpu variable is never set, preventing crash_save_cpu from storing the NT_PRSTATUS elf note in the core dump. Fixes: c7255058b543 ("powerpc/crash: save cpu register data in...
```diff diff --git a/arch/powerpc/kexec/crash.c b/arch/powerpc/kexec/crash.c index 9ac3266e4965..a325c1c02f96 100644 --- a/arch/powerpc/kexec/crash.c +++ b/arch/powerpc/kexec/crash.c @@ -359,7 +359,10 @@ void default_machine_crash_shutdown(struct pt_regs *regs) if (TRAP(regs) == INTERRUPT_SYSTEM_RESET) is_via_syst...
497b7794aef03d525a5be05ae78dd7137c6861a5
Analyze and fix the following issue in the Linux kernel code: powerpc: do not build ppc_save_regs.o always
Problem Details: The Fixes commit below tried to add CONFIG_PPC_BOOK3S to one of the conditions to enable the build of ppc_save_regs.o. But it failed to do so, in fact. The commit omitted to add a dollar sign. Therefore, ppc_save_regs.o is built always these days (as "(CONFIG_PPC_BOOK3S)" is never an empty string). F...
```diff diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 6ac621155ec3..0c26b2412d17 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -160,7 +160,7 @@ endif obj64-$(CONFIG_PPC_TRANSACTIONAL_MEM) += tm.o -ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC_CORE)(CONFIG_PP...
9cc0eafd28c7faef300822992bb08d79cab2a36c
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries/msi: Avoid reading PCI device registers in reduced power states
Problem Details: When a system is being suspended to RAM, the PCI devices are also suspended and the PPC code ends up calling pseries_msi_compose_msg() and this triggers the BUG_ON() in __pci_read_msi_msg() because the device at this point is in reduced power state. In reduced power state, the memory mapped registers o...
```diff diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index f9d80111c322..957c0c03d259 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -525,7 +525,12 @@ static struct msi_domain_info pseries_msi_domain_info = { static void pse...
59ba025948be2a92e8bc9ae1cbdaf197660bd508
Analyze and fix the following issue in the Linux kernel code: powerpc/bpf: fix JIT code size calculation of bpf trampoline
Problem Details: arch_bpf_trampoline_size() provides JIT size of the BPF trampoline before the buffer for JIT'ing it is allocated. The total number of instructions emitted for BPF trampoline JIT code depends on where the final image is located. So, the size arrived at with the dummy pass in arch_bpf_trampoline_size() c...
```diff diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index 6beacaec63d3..4c26912c2e3c 100644 --- a/arch/powerpc/net/bpf_jit.h +++ b/arch/powerpc/net/bpf_jit.h @@ -51,8 +51,16 @@ EMIT(PPC_INST_BRANCH_COND | (((cond) & 0x3ff) << 16) | (offset & 0xfffc)); \ } while (0) -/* Sign-extended ...
cb5b691f8273432297611863ac142e17119279e0
Analyze and fix the following issue in the Linux kernel code: powerpc64/ftrace: fix clobbered r15 during livepatching
Problem Details: While r15 is clobbered always with PPC_FTRACE_OUT_OF_LINE, it is not restored in livepatch sequence leading to not so obvious fails like below: BUG: Unable to handle kernel data access on write at 0xc0000000000f9078 Faulting instruction address: 0xc0000000018ff958 Oops: Kernel access of bad area...
```diff diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S b/arch/powerpc/kernel/trace/ftrace_entry.S index 2c1b24100eca..3565c67fc638 100644 --- a/arch/powerpc/kernel/trace/ftrace_entry.S +++ b/arch/powerpc/kernel/trace/ftrace_entry.S @@ -212,10 +212,10 @@ bne- 1f mr r3, r15 +1: mtlr r3 .if \allregs == 0 ...
5e639707ddb8f080fbde805a1bfa6668a1b45298
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Fix capture of steering registers
Problem Details: The list of registers to capture on a GPU hang includes some that require steering. Unfortunately, the flag to say this was being wiped to due a missing OR on the assignment of the next flag field. Fix that. Fixes: b170d696c1e2 ("drm/xe/guc: Add XE_LP steered register lists") Cc: Zhanjun Dong <zhanju...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_capture.c b/drivers/gpu/drm/xe/xe_guc_capture.c index f6d523e4c5fe..9095618648bc 100644 --- a/drivers/gpu/drm/xe/xe_guc_capture.c +++ b/drivers/gpu/drm/xe/xe_guc_capture.c @@ -359,7 +359,7 @@ static void __fill_ext_reg(struct __guc_mmio_reg_descr *ext, ext->reg = XE_RE...
c1c9cad50c5c35cd4de1b54af59a28bf07451593
Analyze and fix the following issue in the Linux kernel code: drm/xe/svm: fix dereferencing error pointer in drm_gpusvm_range_alloc()
Problem Details: xe_svm_range_alloc() returns ERR_PTR(-ENOMEM) on failure and there is a dereference of "range" after that: --> range->gpusvm = gpusvm; In xe_svm_range_alloc(), when memory allocation fails return NULL instead to handle this situation. Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index f8c128524d9f..0b6547c06961 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -79,7 +79,7 @@ xe_svm_range_alloc(struct drm_gpusvm *gpusvm) range = kzalloc(sizeof(*range), GFP_KERNEL); if (!range) - ret...
bbfe756dc3062c1e934f06e5ba39c239aa953b92
Analyze and fix the following issue in the Linux kernel code: fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()
Problem Details: If bio_add_folio() fails (because it is full), erofs_fileio_scan_folio() needs to submit the I/O request via erofs_fileio_rq_submit() and allocate a new I/O request with an empty `struct bio`. Then it retries the bio_add_folio() call. However, at this point, erofs_onlinefolio_split() has already been...
```diff diff --git a/fs/erofs/fileio.c b/fs/erofs/fileio.c index 4fa0a0121288..60c7cc4c105c 100644 --- a/fs/erofs/fileio.c +++ b/fs/erofs/fileio.c @@ -150,10 +150,10 @@ io_retry: io->rq->bio.bi_iter.bi_sector = io->dev.m_pa >> 9; attached = 0; } - if (!attached++) - erofs_onlinefolio_split(folio); ...
a9635ef0ca12e7914f42bfa7ca6a019f606c2817
Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_ec_typec: Set Pin Assignment E in DP PORT VDO
Problem Details: Pin C and D are used on C-to-C cable applications including docks, and for USB-C adapters that convert from DP over USB-C to other video standards. Pin Assignment E is intended to be used with adapter from USB-C to DP plugs or receptacles. All Chromebook USB-C DFPs support DisplayPort Alternate Mode ...
```diff diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index d2228720991f..7678e3d05fd3 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -22,8 +22,10 @@ #define DRV_NAME "cros-ec-typec" -#define DP_PORT_VDO (DP_CON...
dbe4674802ec8e43835900490b3492299464ad27
Analyze and fix the following issue in the Linux kernel code: bcachefs: Topology error after insert is now an ERO
Problem Details: A user hit this, and this will naturally be easier to debug if we don't panic. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index 44b5fe430370..00307356d7c8 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -1389,7 +1389,7 @@ static void bch2_insert_fixup_btree_ptr(struct btree_update *as, printbuf_exi...
652dd6558b8b5a1a04fef129e0231ee493e24951
Analyze and fix the following issue in the Linux kernel code: bcachefs: btree_root_unreadable_and_scan_found_nothing autofix for non data btrees
Problem Details: If loosing a btree won't cause data loss - i.e. it's an alloc btree, or we can easily reconstruct it - we shouldn't require user action to continue repair. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 7b98ba2dec64..37b69d89341f 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -47,6 +47,27 @@ #define DROP_PREV_NODE 11 #define DID_FILL_FROM_SCAN 12 +/* + * Returns true if it's a btree we can easily reconstruct, or otherw...
04f79c113ae77732e7e6674bd814e76c7a3453cf
Analyze and fix the following issue in the Linux kernel code: scsi: mpi3mr: Event processing debug improvement
Problem Details: Improve event process debugging. Implement more verbose event logging throughout the driver. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20250423092139.110206-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
```diff diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 261d7550d5a6..ce444efd859e 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -985,6 +985,10 @@ static int mpi3mr_report_tgtdev_to_host(struct mpi3mr_ioc *mrioc, goto out; } } + d...
42d033cf4b517e91c187ad2fbd7b30fdc6d2d62c
Analyze and fix the following issue in the Linux kernel code: scsi: smartpqi: Fix smp_processor_id() call trace for preemptible kernels
Problem Details: Correct kernel call trace when calling smp_processor_id() when called in preemptible kernels by using raw_smp_processor_id(). smp_processor_id() checks to see if preemption is disabled and if not, issue an error message followed by a call to dump_stack(). Brief example of call trace: kernel: check_p...
```diff diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index efc042071ec0..e8abfc56d0f0 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6003,7 +6003,7 @@ static bool pqi_is_parity_write_stream(struct pqi_ctrl_info *ctrl_info,...
b5162bb6aa1ec04dff4509b025883524b6d7e7ca
Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Avoid potential ndlp use-after-free in dev_loss_tmo_callbk
Problem Details: Smatch detected a potential use-after-free of an ndlp oject in dev_loss_tmo_callbk during driver unload or fatal error handling. Fix by reordering code to avoid potential use-after-free if initial nodelist reference has been previously removed. Fixes: 4281f44ea8bf ("scsi: lpfc: Prevent NDLP reference...
```diff diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 9e585af05bec..3d15a964f5c9 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -161,7 +161,7 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport) struct lpfc_hba *phba; struct lpfc_wor...
05ae6c9c7315d844fbc15afe393f5ba5e5771126
Analyze and fix the following issue in the Linux kernel code: scsi: lpfc: Fix lpfc_check_sli_ndlp() handling for GEN_REQUEST64 commands
Problem Details: In lpfc_check_sli_ndlp(), the get_job_els_rsp64_did remote_id assignment does not apply for GEN_REQUEST64 commands as it only has meaning for a ELS_REQUEST64 command. So, if (iocb->ndlp == ndlp) is false, we could erroneously return the wrong value. Fix by replacing the fallthrough statement with a b...
```diff diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 179be6c5a43e..b5273cb1adbd 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -5053,7 +5053,7 @@ lpfc_check_sli_ndlp(struct lpfc_hba *phba, case CMD_GEN_REQUEST64_CR: if (iocb->ndlp...
0e9693b97a0eee1df7bae33aec207c975fbcbdb8
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Remove redundant query_complete trace
Problem Details: The query_complete trace was not removed after ufshcd_issue_dev_cmd() was called from the bsg path, resulting in duplicate output. Below is an example of the trace: ufs-utils-773 [000] ..... 218.176933: ufshcd_upiu: query_send: 0000:00:04.0: HDR:16 00 00 1f 00 01 00 00 00 00 00 00, OSF:03 07 0...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 5cb6132b8147..7735421e3991 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -7265,8 +7265,6 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba, err = -EINVAL; } } - ufshcd_add_query_upiu_trace(...
a84a12d34f824fdff06d8191990a94cdb1c17dae
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Fix WB resize using wrong offset
Problem Details: Commit 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize support") incorrectly reads the value of offset DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP to determine whether WB resize is supported. Fix the issue by reading the value of DEVICE_DESC_PARAM_EXT_WB_SUP to determine whether the device supports WB ...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index dc55c94fa45e..1c53ccf5a616 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -8143,7 +8143,7 @@ static void ufshcd_wb_probe(struct ufs_hba *hba, const u8 *desc_buf) dev_info->wb_buffer_type = desc_buf[DEVICE_DESC_...
9c51f24c1ac7cbde9cc94a54137775dc52aae491
Analyze and fix the following issue in the Linux kernel code: scsi: myrb: Fix spelling mistake "statux" -> "status"
Problem Details: There is a spelling mistake in a dev_err() message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20250422170347.66792-1-colin.i.king@gmail.com Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
```diff diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index dc4bd422b601..486db5b2f05d 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -891,7 +891,7 @@ static bool myrb_enable_mmio(struct myrb_hba *cb, mbox_mmio_init_t mmio_init_fn) status = mmio_init_fn(pdev, base, &mbox); if (status != MY...
c0fe189b590c754f69e0cb87c5b5674cad535cf6
Analyze and fix the following issue in the Linux kernel code: docs: namespace: Tweak and reword resource control doc
Problem Details: Fix the document title and reword the phrasing to active voice. Signed-off-by: Joel Savitz <jsavitz@redhat.com> Message-ID: <20250421161723.1138903-1-jsavitz@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
```diff diff --git a/Documentation/admin-guide/namespaces/resource-control.rst b/Documentation/admin-guide/namespaces/resource-control.rst index 369556e00f0c..553a44803231 100644 --- a/Documentation/admin-guide/namespaces/resource-control.rst +++ b/Documentation/admin-guide/namespaces/resource-control.rst @@ -1,17 +1,1...
292c39b4d78c296e29220a928d05a53f5e64747d
Analyze and fix the following issue in the Linux kernel code: Documentation: x86: Fix a typo in fsgs.rst
Problem Details: Fix a spelling typo in fsgs.rst. Signed-off-by: Adrian Bütler <buetlera123@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20250426122303.15905-1-buetlera123@gmail.com>
```diff diff --git a/Documentation/arch/x86/x86_64/fsgs.rst b/Documentation/arch/x86/x86_64/fsgs.rst index d07e445dac5c..6bda4d16d3f7 100644 --- a/Documentation/arch/x86/x86_64/fsgs.rst +++ b/Documentation/arch/x86/x86_64/fsgs.rst @@ -130,7 +130,7 @@ instructions. Clang 5 supports them as well. ===================...
6382f4e4e7bd65b829d1d598b1315e905accc15c
Analyze and fix the following issue in the Linux kernel code: Documentation: fix speculation.rst chapter
Problem Details: 'Mitigating speculation side-channels' should be a chapter rather than title. Signed-off-by: Cui Wei <chris.wei.cui@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20250426135609.735-1-chris.wei.cui@gmail.com>
```diff diff --git a/Documentation/staging/speculation.rst b/Documentation/staging/speculation.rst index 8045d99bcf12..0d526ba55d14 100644 --- a/Documentation/staging/speculation.rst +++ b/Documentation/staging/speculation.rst @@ -63,7 +63,6 @@ of an out-of-bounds address, while the second call will influence microarc...
713dd6c2deca88cba0596b1e2576f7b7a8e5c59e
Analyze and fix the following issue in the Linux kernel code: idpf: fix offloads support for encapsulated packets
Problem Details: Split offloads into csum, tso and other offloads so that tunneled packets do not by default have all the offloads enabled. Stateless offloads for encapsulated packets are not yet supported in firmware/software but in the driver we were setting the features same as non encapsulated features. Fixed nam...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf.h b/drivers/net/ethernet/intel/idpf/idpf.h index 66544faab710..aef0e9775a33 100644 --- a/drivers/net/ethernet/intel/idpf/idpf.h +++ b/drivers/net/ethernet/intel/idpf/idpf.h @@ -629,13 +629,13 @@ bool idpf_is_capability_ena(struct idpf_adapter *adapter, bool all,...
425c5f266b2edeee0ce16fedd8466410cdcfcfe3
Analyze and fix the following issue in the Linux kernel code: ice: Check VF VSI Pointer Value in ice_vc_add_fdir_fltr()
Problem Details: As mentioned in the commit baeb705fd6a7 ("ice: always check VF VSI pointer values"), we need to perform a null pointer check on the return value of ice_get_vf_vsi() before using it. Fixes: 6ebbe97a4881 ("ice: Add a per-VF limit on number of FDIR filters") Signed-off-by: Xuanqiang Luo <luoxuanqiang@kyl...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c index 7752920d7a8e..1cca9b2262e8 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c @@ -2097,6 +2097,11 @@ int ice_vc_add_fdi...
3ffcd7b657c9d96eb3ffe174449b4248dd7fc6a9
Analyze and fix the following issue in the Linux kernel code: ice: fix Get Tx Topology AQ command error on E830
Problem Details: The Get Tx Topology AQ command (opcode 0x0418) has different read flag requirements depending on the hardware/firmware. For E810, E822, and E823 firmware the read flag must be set, and for newer hardware (E825 and E830) it must not be set. This results in failure to configure Tx topology and the follo...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c index 69d5b1a28491..59323c019544 100644 --- a/drivers/net/ethernet/intel/ice/ice_ddp.c +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c @@ -2345,15 +2345,15 @@ ice_get_set_tx_topo(struct ice_hw *hw, u8 *buf, u16 buf_s...
f139f37dcdf34b67f5bf92bc8e0f7f6b3ac63aa4
Analyze and fix the following issue in the Linux kernel code: net_sched: qfq: Fix double list add in class with netem as child qdisc
Problem Details: As described in Gerrard's report [1], there are use cases where a netem child qdisc will make the parent qdisc's enqueue callback reentrant. In the case of qfq, there won't be a UAF, but the code will add the same classifier to the list twice, which will cause memory corruption. This patch checks whet...
```diff diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index 687a932eb9b2..bf1282cb22eb 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -202,6 +202,11 @@ struct qfq_sched { */ enum update_reason {enqueue, requeue}; +static bool cl_is_active(struct qfq_class *cl) +{ + return !list_empty(&cl->a...
1a6d0c00fa07972384b0c308c72db091d49988b6
Analyze and fix the following issue in the Linux kernel code: net_sched: ets: Fix double list add in class with netem as child qdisc
Problem Details: As described in Gerrard's report [1], there are use cases where a netem child qdisc will make the parent qdisc's enqueue callback reentrant. In the case of ets, there won't be a UAF, but the code will add the same classifier to the list twice, which will cause memory corruption. In addition to checkin...
```diff diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c index c3bdeb14185b..2c069f0181c6 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c @@ -74,6 +74,11 @@ static const struct nla_policy ets_class_policy[TCA_ETS_MAX + 1] = { [TCA_ETS_QUANTA_BAND] = { .type = NLA_U32 }, }; +static bool cl_is_activ...
141d34391abbb315d68556b7c67ad97885407547
Analyze and fix the following issue in the Linux kernel code: net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc
Problem Details: As described in Gerrard's report [1], we have a UAF case when an hfsc class has a netem child qdisc. The crux of the issue is that hfsc is assuming that checking for cl->qdisc->q.qlen == 0 guarantees that it hasn't inserted the class in the vttree or eltree (which is not true for the netem duplicate ca...
```diff diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 6c8ef826cec0..cb8c525ea20e 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1569,7 +1569,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) return err; } - if (first) { + if (first && !cl->cl_n...
f99a3fbf023e20b626be4b0f042463d598050c9a
Analyze and fix the following issue in the Linux kernel code: net_sched: drr: Fix double list add in class with netem as child qdisc
Problem Details: As described in Gerrard's report [1], there are use cases where a netem child qdisc will make the parent qdisc's enqueue callback reentrant. In the case of drr, there won't be a UAF, but the code will add the same classifier to the list twice, which will cause memory corruption. In addition to checkin...
```diff diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index e0a81d313aa7..9b6d79bd8737 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -35,6 +35,11 @@ struct drr_sched { struct Qdisc_class_hash clhash; }; +static bool cl_is_active(struct drr_class *cl) +{ + return !list_empty(&cl->alist); +...
dfd76010f8e821b66116dec3c7d90dd2403d1396
Analyze and fix the following issue in the Linux kernel code: pds_core: remove write-after-free of client_id
Problem Details: A use-after-free error popped up in stress testing: [Mon Apr 21 21:21:33 2025] BUG: KFENCE: use-after-free write in pdsc_auxbus_dev_del+0xef/0x160 [pds_core] [Mon Apr 21 21:21:33 2025] Use-after-free write at 0x000000007013ecd1 (in kfence-#47): [Mon Apr 21 21:21:33 2025] pdsc_auxbus_dev_del+0xef/0x16...
```diff diff --git a/drivers/net/ethernet/amd/pds_core/auxbus.c b/drivers/net/ethernet/amd/pds_core/auxbus.c index c9aac27883a3..92f359f2b449 100644 --- a/drivers/net/ethernet/amd/pds_core/auxbus.c +++ b/drivers/net/ethernet/amd/pds_core/auxbus.c @@ -186,7 +186,6 @@ void pdsc_auxbus_dev_del(struct pdsc *cf, struct pdsc...
10c34b7d71a4ff8c06d926f1846edf8295ed75bf
Analyze and fix the following issue in the Linux kernel code: netlink: specs: ethtool: Remove UAPI duplication of phy-upstream enum
Problem Details: The phy-upstream enum is already defined in the ethtool.h UAPI header and used by the ethtool userspace tool. However, the ethtool spec does not reference it, causing YNL to auto-generate a duplicate and redundant enum. Fix this by updating the spec to reference the existing UAPI enum in ethtool.h. S...
```diff diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml index 655d8d10fe24..c650cd3dcb80 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -89,8 +89,10 @@ definitions: doc: Group of short_detected states ...
c347fb0ff844f2c72fa779c76ec8b2d7385127e6
Analyze and fix the following issue in the Linux kernel code: selftests: net: add a virtio_net deadlock selftest
Problem Details: The selftest reproduces the deadlock scenario when binding/unbinding XDP program, XDP socket, rx ring resize on virtio_net interface. Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Link: https://patch.msgid.link/20250425071018.36078-5-minhquangbu...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile index 07cddb19ba35..5447785c286e 100644 --- a/tools/testing/selftests/drivers/net/hw/Makefile +++ b/tools/testing/selftests/drivers/net/hw/Makefile @@ -21,6 +21,7 @@ TEST_PROGS = \ rss_ctx.py \ rss...
11741b8e382d34b13277497ab91123d8b0b5c2db
Analyze and fix the following issue in the Linux kernel code: power: supply: max77705: Fix workqueue error handling in probe
Problem Details: The create_singlethread_workqueue() doesn't return error pointers, it returns NULL. Also cleanup the workqueue on the error paths. Fixes: a6a494c8e3ce ("power: supply: max77705: Add charger driver for Maxim 77705") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Krzysztof Kozlows...
```diff diff --git a/drivers/power/supply/max77705_charger.c b/drivers/power/supply/max77705_charger.c index eec5e9ef795e..329b430d0e50 100644 --- a/drivers/power/supply/max77705_charger.c +++ b/drivers/power/supply/max77705_charger.c @@ -545,20 +545,28 @@ static int max77705_charger_probe(struct i2c_client *i2c) re...
0014af802193aa3547484b5db0f1a258bad28c81
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: export set count and backend name to userspace
Problem Details: nf_tables picks a suitable set backend implementation (bitmap, hash, rbtree..) based on the userspace requirements. Figuring out the chosen backend requires information about the set flags and the kernel version. Export this to userspace so nft can include this information in '--debug=netlink' output...
```diff diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 49c944e78463..7d6bc19a0153 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h @@ -394,6 +394,8 @@ enum nft_set_field_attributes { * @NFTA_SET_HANDLE: set han...
149a133a548158586058d14963b4e3a699d0de70
Analyze and fix the following issue in the Linux kernel code: docs: tproxy: fix formatting for nft code block
Problem Details: The nft command snippet for redirecting traffic isn't formatted in a literal code block like the rest of snippets. Fix the formatting inconsistency. Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilt...
```diff diff --git a/Documentation/networking/tproxy.rst b/Documentation/networking/tproxy.rst index 7f7c1ff6f159..75e4990cc3db 100644 --- a/Documentation/networking/tproxy.rst +++ b/Documentation/networking/tproxy.rst @@ -69,9 +69,9 @@ add rules like this to the iptables ruleset above:: # iptables -t mangle -A PR...
98b52c6b0b528764b454350a11c53f757304afbc
Analyze and fix the following issue in the Linux kernel code: cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver
Problem Details: Rename and use the existing amd_pstate_epp callbacks for amd_pstate driver as well. Remove the debug print in online callback while at it. These callbacks will be needed to support the "Requested CPU Min Frequency" BIOS option. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by:...
```diff diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 12b2736bf62a..9a80040e3acf 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1559,19 +1559,17 @@ static int amd_pstate_epp_set_policy(struct cpufreq_policy *policy) return 0; } -static int amd_psta...
ccc25158c22bf9aaf1242182b852bb6c73e88ac3
Analyze and fix the following issue in the Linux kernel code: mdio: fix CONFIG_MDIO_DEVRES selects
Problem Details: The newly added rtl9300 driver needs MDIO_DEVRES: x86_64-linux-ld: drivers/net/mdio/mdio-realtek-rtl9300.o: in function `rtl9300_mdiobus_probe': mdio-realtek-rtl9300.c:(.text+0x941): undefined reference to `devm_mdiobus_alloc_size' x86_64-linux-ld: mdio-realtek-rtl9300.c:(.text+0x9e2): undefined refer...
```diff diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig index 6c2779047dcd..5367e8af1e1a 100644 --- a/drivers/net/ethernet/freescale/enetc/Kconfig +++ b/drivers/net/ethernet/freescale/enetc/Kconfig @@ -73,7 +73,8 @@ config FSL_ENETC_IERB config FSL_ENETC_MDIO ...
8c47d5753a119f1c986bc3ed92e9178d2624e1e8
Analyze and fix the following issue in the Linux kernel code: net: ethernet: mtk_eth_soc: sync mtk_clks_source_name array
Problem Details: When removing the clock bits for clocks which aren't used by the Ethernet driver their names should also have been removed from the mtk_clks_source_name array. Remove them now as enum mtk_clks_map needs to match the mtk_clks_source_name array so the driver can make sure that all required clocks are pr...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 47807b202310..83068925c589 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -269,12 +269,8 @@ static const char * const mtk_clks_source_name[]...
f04dd30f1bef1ed2e74a4050af6e5e5e3869bac3
Analyze and fix the following issue in the Linux kernel code: amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload
Problem Details: According to the XGMAC specification, enabling features such as Layer 3 and Layer 4 Packet Filtering, Split Header and Virtualized Network support automatically selects the IPC Full Checksum Offload Engine on the receive side. When RX checksum offload is disabled, these dependent features must also be...
```diff diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c index 230726d7b74f..d41b58fad37b 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c @@ -373,8 +373,13 @@ static int xgbe_map_rx_buffer(struct xgbe_prv_data *pdat...
c366b1672d74cb008974f6e36e34dc191621f3bb
Analyze and fix the following issue in the Linux kernel code: bcachefs: btree_node_data_missing is now autofix
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sb-errors_format.h b/fs/bcachefs/sb-errors_format.h index 3711aa5009ac..a4ad5924107b 100644 --- a/fs/bcachefs/sb-errors_format.h +++ b/fs/bcachefs/sb-errors_format.h @@ -46,7 +46,7 @@ enum bch_fsck_flags { x(btree_node_unsupported_version, 34, 0) \ x(btree_node_bset_older_than_s...
002466446abae31a15e8b89adb54ee08653eccd1
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix bch2_dev_buckets_resize()
Problem Details: The resize memcpy path was totally busted. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 4ef261e8db4f..e1efae43982a 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -1307,13 +1307,11 @@ int bch2_dev_buckets_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets) old_bucket_gens = rcu_dereference_protected(ca->buc...
9e9c28acfdc78292100fdd0e46587bf43a174451
Analyze and fix the following issue in the Linux kernel code: bcachefs: Add upgrade table entry from 0.14
Problem Details: There are a few errors that needed to be marked as autofix. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sb-downgrade.c b/fs/bcachefs/sb-downgrade.c index acb5d845841e..badd0e17ada5 100644 --- a/fs/bcachefs/sb-downgrade.c +++ b/fs/bcachefs/sb-downgrade.c @@ -20,6 +20,10 @@ * x(version, recovery_passes, errors...) */ #define UPGRADE_TABLE() \ + x(snapshot_2, \ + RECOVERY_PA...
3c24020119a5f55ec902b5fdc24d8666d76340b3
Analyze and fix the following issue in the Linux kernel code: bcachefs: Run BCH_RECOVERY_PASS_reconstruct_snapshots on missing subvol -> snapshot
Problem Details: Fix this repair path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c index 5537283d0bea..d0209f7658bb 100644 --- a/fs/bcachefs/subvolume.c +++ b/fs/bcachefs/subvolume.c @@ -6,6 +6,7 @@ #include "errcode.h" #include "error.h" #include "fs.h" +#include "recovery_passes.h" #include "snapshot.h" #include "subvolume....
a2f546330ef9f3471ab9dd5f59e9685733b6c0dc
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix losing return code in next_fiemap_extent()
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 0f1d61aab90b..72b722d80813 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -1464,8 +1464,8 @@ static int bch2_next_fiemap_extent(struct btree_trans *trans, unsigned sectors = cur->kbuf.k->k.size; s64 offset_into_extent = 0; enum btree_id da...
52ae3f5da7e5adbe3d1319573b55dac470abb83c
Analyze and fix the following issue in the Linux kernel code: m68k: mac: Fix macintosh_config for Mac II
Problem Details: When booted on my Mac II, the kernel prints this: Detected Macintosh model: 6 Apple Macintosh Unknown The catch-all entry ("Unknown") is mac_data_table[0] which is only needed in the unlikely event that the bootinfo model ID can't be matched. When model ID is 6, the search should begin and en...
```diff diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index e324410ef239..d26c7f4f8c36 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -793,7 +793,7 @@ static void __init mac_identify(void) } macintosh_config = mac_data_table; - for (m = macintosh_config; m->ident != -1; m++) { ...
b376108e1f88df9fbbb3867634150a3dd71e3acb
Analyze and fix the following issue in the Linux kernel code: arm64/fpsimd: signal: Clear TPIDR2 when delivering signals
Problem Details: Linux is intended to be compatible with userspace written to Arm's AAPCS64 procedure call standard [1,2]. For the Scalable Matrix Extension (SME), AAPCS64 was extended with a "ZA lazy saving scheme", where SME's ZA tile is lazily callee-saved and caller-restored. In this scheme, TPIDR2_EL0 indicates wh...
```diff diff --git a/Documentation/arch/arm64/sme.rst b/Documentation/arch/arm64/sme.rst index b2fa01f85cb5..3a98aed92732 100644 --- a/Documentation/arch/arm64/sme.rst +++ b/Documentation/arch/arm64/sme.rst @@ -115,7 +115,7 @@ be zeroed. 5. Signal handling ------------------- -* Signal handlers are invoked with st...
7675b5efd81fe6d524e29d5a541f43201e98afa8
Analyze and fix the following issue in the Linux kernel code: Input: cyttsp5 - fix power control issue on wakeup
Problem Details: The power control function ignores the "on" argument when setting the report ID, and thus is always sending HID_POWER_SLEEP. This causes a problem when trying to wakeup. Fix by sending the state variable, which contains the proper HID_POWER_ON or HID_POWER_SLEEP based on the "on" argument. Fixes: 3c9...
```diff diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c index 14c43f0a6c21..071b7c9bf566 100644 --- a/drivers/input/touchscreen/cyttsp5.c +++ b/drivers/input/touchscreen/cyttsp5.c @@ -580,7 +580,7 @@ static int cyttsp5_power_control(struct cyttsp5 *ts, bool on) int rc; SET_C...
32dce6b1949a696dc7abddc04de8cbe35c260217
Analyze and fix the following issue in the Linux kernel code: drm: Select DRM_KMS_HELPER from DRM_DEBUG_DP_MST_TOPOLOGY_REFS
Problem Details: Using "depends on" and "select" for the same Kconfig symbol is known to cause circular dependencies (cmp. "Kconfig recursive dependency limitations" in Documentation/kbuild/kconfig-language.rst. DRM drivers are selecting drm helpers so do the same for DRM_DEBUG_DP_MST_TOPOLOGY_REFS. Fixes following cir...
```diff diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 2cba2b6ebe1c..f01925ed8176 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -188,7 +188,7 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS bool "Enable refcount backtrace history in the DP MST helpers" depends on STACKT...
8f6dfc4d7037e88cc0a4be4f290829946999341f
Analyze and fix the following issue in the Linux kernel code: drm: adp: Remove pointless irq_lock spin lock
Problem Details: Interrupt handlers run with interrupts disabled so it is not necessary to protect them against reentrancy. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://lore.kernel.org/r/20250428-drm_adp_fixes-v2-4-912e081e55d8@jannau.net Signed-off-by:...
```diff diff --git a/drivers/gpu/drm/adp/adp_drv.c b/drivers/gpu/drm/adp/adp_drv.c index 50d26c73301c..54cde090c3f4 100644 --- a/drivers/gpu/drm/adp/adp_drv.c +++ b/drivers/gpu/drm/adp/adp_drv.c @@ -121,7 +121,6 @@ struct adp_drv_private { dma_addr_t mask_iova; int be_irq; int fe_irq; - spinlock_t irq_lock; str...
c082a52125d9007b488d590c412fd126aa78c345
Analyze and fix the following issue in the Linux kernel code: drm: adp: Enable vblank interrupts in crtc's .atomic_enable
Problem Details: Calling drm_crtc_vblank_on() drm_crtc_helper_funcs' atomic_enable is expected to enable vblank interrupts. It may have been avoided here to due to drm_crtc_vblank_get()'s error behavior after drm_crtc_vblank_reset(). With that fixed in the preceding change the driver can call drm_crtc_vblank_on() from ...
```diff diff --git a/drivers/gpu/drm/adp/adp_drv.c b/drivers/gpu/drm/adp/adp_drv.c index bdf27ee742ea..50d26c73301c 100644 --- a/drivers/gpu/drm/adp/adp_drv.c +++ b/drivers/gpu/drm/adp/adp_drv.c @@ -288,6 +288,7 @@ static void adp_crtc_atomic_enable(struct drm_crtc *crtc, writel(BIT(0), adp->be + ADBE_BLEND_EN3); w...
7a7d6681d5adde7dc7e648dcc6b9e9be6ca93d5d
Analyze and fix the following issue in the Linux kernel code: drm: adp: Handle drm_crtc_vblank_get() errors
Problem Details: drm_crtc_vblank_get() may fail when it's called before drm_crtc_vblank_on() on a resetted CRTC. This occurs in drm_crtc_helper_funcs' atomic_flush() calls after drm_atomic_helper_crtc_reset() for example directly after probe. Send the vblank event directly in such cases. Avoids following warning in t...
```diff diff --git a/drivers/gpu/drm/adp/adp_drv.c b/drivers/gpu/drm/adp/adp_drv.c index 157298a8ff42..bdf27ee742ea 100644 --- a/drivers/gpu/drm/adp/adp_drv.c +++ b/drivers/gpu/drm/adp/adp_drv.c @@ -331,13 +331,19 @@ static void adp_crtc_atomic_flush(struct drm_crtc *crtc, } writel(ADBE_FIFO_SYNC | frame_num, adp->...
bc43f7114a0e8173968085b21535d57b8030d571
Analyze and fix the following issue in the Linux kernel code: drm: adp: Use spin_lock_irqsave for drm device event_lock
Problem Details: The lock is used in the interrupt handler so use spin_lock_irqsave to disable interrupts and avoid deadlocks with the irq handler. Fixes: 332122eba628 ("drm: adp: Add Apple Display Pipe driver") Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Janne Grunau <j@jannau.net> Link: http...
```diff diff --git a/drivers/gpu/drm/adp/adp_drv.c b/drivers/gpu/drm/adp/adp_drv.c index c98c647f981d..157298a8ff42 100644 --- a/drivers/gpu/drm/adp/adp_drv.c +++ b/drivers/gpu/drm/adp/adp_drv.c @@ -310,6 +310,7 @@ static void adp_crtc_atomic_flush(struct drm_crtc *crtc, struct drm_atomic_state *state) { u32 ...
20a6cff3b283f0601048ace87ad1bc89627e36f2
Analyze and fix the following issue in the Linux kernel code: KVM: x86/mmu: Check and free obsolete roots in kvm_mmu_reload()
Problem Details: Check request KVM_REQ_MMU_FREE_OBSOLETE_ROOTS to free obsolete roots in kvm_mmu_reload() to prevent kvm_mmu_reload() from seeing a stale obsolete root. Since kvm_mmu_reload() can be called outside the vcpu_enter_guest() path (e.g., kvm_arch_vcpu_pre_fault_memory()), it may be invoked after a root has ...
```diff diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h index 050a0e229a4d..f2b36d32ef40 100644 --- a/arch/x86/kvm/mmu.h +++ b/arch/x86/kvm/mmu.h @@ -104,6 +104,9 @@ void kvm_mmu_track_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new, static inline int kvm_mmu_reload(struct kvm_vcpu *vcpu) { + if (kvm_che...
5b1834d6202f86180e451ad1a2a8a193a1da18fc
Analyze and fix the following issue in the Linux kernel code: drm/fdinfo: Protect against driver unbind
Problem Details: If we unbind a driver from the PCI device with an active DRM client, subsequent read of the fdinfo data associated with the file descriptor in question will not end well. Protect the path with a drm_dev_enter/exit() pair. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Christian König <...
```diff diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index c299cd94d3f7..cf2463090d3a 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -964,6 +964,10 @@ void drm_show_fdinfo(struct seq_file *m, struct file *f) struct drm_file *file = f->private_data; struct drm_dev...
988da7820206405ef2d8afde83c2c2cd7af503a2
Analyze and fix the following issue in the Linux kernel code: KVM: x86/tdp_mmu: WARN if PFN changes for spurious faults
Problem Details: Add a WARN() to assert that KVM does _not_ change the PFN of a shadow-present SPTE during spurious fault handling. KVM should _never_ change the PFN of a shadow-present SPTE and TDP MMU already BUG()s on this. However, spurious faults just return early before the existing BUG() could be hit. Suggeste...
```diff diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c index d16e3e6e46a5..1e2db4917459 100644 --- a/arch/x86/kvm/mmu/tdp_mmu.c +++ b/arch/x86/kvm/mmu/tdp_mmu.c @@ -1155,8 +1155,10 @@ static int tdp_mmu_map_handle_target_level(struct kvm_vcpu *vcpu, if (is_shadow_present_pte(iter->old_spte) &&...
a0ee1d5faff135e28810f29e0f06328c66f89852
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Flush shadow VMCS on emergency reboot
Problem Details: Ensure the shadow VMCS cache is evicted during an emergency reboot to prevent potential memory corruption if the cache is evicted after reboot. This issue was identified through code inspection, as __loaded_vmcs_clear() flushes both the normal VMCS and the shadow VMCS. Avoid checking the "launched" s...
```diff diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index ef2d7208dd20..848c4963bdb8 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -770,8 +770,11 @@ void vmx_emergency_disable_virtualization_cpu(void) return; list_for_each_entry(v, &per_cpu(loaded_vmcss_on_cpu, cpu), - ...
27d2fed790ce6407e321e89aac3c8c0e28986fff
Analyze and fix the following issue in the Linux kernel code: io_uring: delete misleading comment in io_fill_cqe_aux()
Problem Details: io_fill_cqe_aux() doesn't overflow completions, however it might fail them and lets the caller handle it. Remove the comment, which doesn't make any sense. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/021aa8c1d8f20ef2b66da6aeabb6b511938fd2c5.1745843119.git.asm...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 2e4d8e76316a..703251f6f4d8 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -814,11 +814,6 @@ static bool io_fill_cqe_aux(struct io_ring_ctx *ctx, u64 user_data, s32 res, ctx->cq_extra++; - /* - * If we can't get a cq entry, usersp...
8e28276a569addb8a2324439ae473848ee52b056
Analyze and fix the following issue in the Linux kernel code: watchdog: exar: Shorten identity name to fit correctly
Problem Details: The static initializer for struct watchdog_info::identity is too long and gets initialized without a trailing NUL byte. Since the length of "identity" is part of UAPI and tied to ioctls, just shorten the name of the device. Avoids the warning seen with GCC 15's -Wunterminated-string-initialization opti...
```diff diff --git a/drivers/watchdog/exar_wdt.c b/drivers/watchdog/exar_wdt.c index 7c61ff343271..c2e3bb08df89 100644 --- a/drivers/watchdog/exar_wdt.c +++ b/drivers/watchdog/exar_wdt.c @@ -221,7 +221,7 @@ static const struct watchdog_info exar_wdt_info = { .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | ...
9a93048476e7cbdde00cdeebe66b6504995eac92
Analyze and fix the following issue in the Linux kernel code: overflow: Clarify expectations for getting DEFINE_FLEX variable sizes
Problem Details: Mention the use of __member_size() for DEFINE_FLEX variables as a hint for getting at the compile-time size of the resulting flexible array member. Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20250416172911.work.854-kees@kernel.org Signed-off-by: Kees Cook ...
```diff diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 0c7e3dcfe867..6ee67c20b575 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -419,6 +419,7 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend) * Define a zeroed, on-stack, instance of @typ...
0d6efa20e384a41a7f4afdcd8a0aec442c19d33e
Analyze and fix the following issue in the Linux kernel code: kunit/usercopy: Disable u64 test on 32-bit SPARC
Problem Details: usercopy of 64 bit values does not work on 32-bit SPARC: # usercopy_test_valid: EXPECTATION FAILED at lib/tests/usercopy_kunit.c:209 Expected val_u64 == 0x5a5b5c5d6a6b6c6d, but val_u64 == 1515936861 (0x5a5b5c5d) 0x5a5b5c5d6a6b6c6d == 6510899242581322861 (0x5a5b5c5d6a6b6c6d) Di...
```diff diff --git a/lib/tests/usercopy_kunit.c b/lib/tests/usercopy_kunit.c index 77fa00a13df7..80f8abe10968 100644 --- a/lib/tests/usercopy_kunit.c +++ b/lib/tests/usercopy_kunit.c @@ -27,6 +27,7 @@ !defined(CONFIG_MICROBLAZE) && \ !defined(CONFIG_NIOS2) && \ !defined(CONFIG_PPC32) && \ + ...
46e3311607d6c18a760fba4afbd5d24d42abb0f3
Analyze and fix the following issue in the Linux kernel code: crypto: crc32 - remove "generic" from file and module names
Problem Details: Since crc32_generic.c and crc32c_generic.c now expose both the generic and architecture-optimized implementations via the crypto_shash API, rather than just the generic implementations as they originally did, remove the "generic" part of the filenames and module names: crypto/crc32-generic.c => cr...
```diff diff --git a/crypto/Makefile b/crypto/Makefile index 0e6ab5ffd3f7..186f968baa39 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -152,10 +152,12 @@ obj-$(CONFIG_CRYPTO_CHACHA20) += chacha_generic.o obj-$(CONFIG_CRYPTO_POLY1305) += poly1305_generic.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG...
fa7ab64f1e2fdc8f2603aab8e0dd20de89cb10d9
Analyze and fix the following issue in the Linux kernel code: NFS/localio: Fix a race in nfs_local_open_fh()
Problem Details: Once the clp->cl_uuid.lock has been dropped, another CPU could come in and free the struct nfsd_file that was just added. To prevent that from happening, take the RCU read lock before dropping the spin lock. Fixes: 86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client") Signed-off-by: Tron...
```diff diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c index 5c21caeae075..4ec952f9f47d 100644 --- a/fs/nfs/localio.c +++ b/fs/nfs/localio.c @@ -278,6 +278,7 @@ nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred, new = __nfs_local_open_fh(clp, cred, fh, nfl, mode); if (IS_ERR(new)) return NUL...
dc6d9ef57fcf42fac1b3be4bff5ac5b3f1e8f9f3
Analyze and fix the following issue in the Linux kernel code: f2fs: zone: fix to calculate first_zoned_segno correctly
Problem Details: A zoned device can has both conventional zones and sequential zones, so we should not treat first segment of zoned device as first_zoned_segno, instead, we need to check zone type for each zone during traversing zoned device to find first_zoned_segno. Otherwise, for below case, first_zoned_segno will ...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 895b29fe2c4f..08a8a107adcb 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3967,7 +3967,7 @@ retry: if ((pblock - SM_I(sbi)->main_blkaddr) % blks_per_sec || nr_pblocks % blks_per_sec || - !f2fs_valid_pinned_area(sbi, pblock)) { + f2fs_is_se...
5db0d252c64e91ba1929c70112352e85dc5751e7
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to do sanity check on sit_bitmap_size
Problem Details: w/ below testcase, resize will generate a corrupted image which contains inconsistent metadata, so when mounting such image, it will trigger kernel panic: touch img truncate -s $((512*1024*1024*1024)) img mkfs.f2fs -f img $((256*1024*1024)) resize.f2fs -s -i img -t $((1024*1024*1024)) mount img /mnt/f...
```diff diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8315016914e8..232e2fc63274 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3716,6 +3716,7 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi) block_t user_block_count, valid_user_blocks; block_t avail_node_count, valid_node_count; unsigned in...