id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a59a56cc4fb1f7d101f7ce1f5396ceaa2e304b71
Analyze and fix the following issue in the Linux kernel code: mfd: max77705: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-5-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c index 60c457c21d95..6b263bacb8c2 100644 --- a/drivers/mfd/max77705.c +++ b/drivers/mfd/max77705.c @@ -131,7 +131,9 @@ static int max77705_i2c_probe(struct i2c_client *i2c) if (ret) return dev_err_probe(dev, ret, "Failed to register child devices\...
6c7115cdf6440e1e2f15e21efe92e2b757940627
Analyze and fix the following issue in the Linux kernel code: mfd: max77541: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-4-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/max77541.c b/drivers/mfd/max77541.c index d77c31c86e43..f91b4f5373ce 100644 --- a/drivers/mfd/max77541.c +++ b/drivers/mfd/max77541.c @@ -152,7 +152,7 @@ static int max77541_pmic_setup(struct device *dev) if (ret) return dev_err_probe(dev, ret, "Failed to initialize IRQ\n"); - re...
d905d06e64b0eb3da43af6186c132f5282197998
Analyze and fix the following issue in the Linux kernel code: mfd: max14577: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-3-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c index 6fce79ec2dc6..7e7e8af9af22 100644 --- a/drivers/mfd/max14577.c +++ b/drivers/mfd/max14577.c @@ -456,6 +456,7 @@ static void max14577_i2c_remove(struct i2c_client *i2c) { struct max14577 *max14577 = i2c_get_clientdata(i2c); + device_init_wak...
2c8294c9aaa0f799c440d10e3582ef410be881bd
Analyze and fix the following issue in the Linux kernel code: mfd: as3722: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-2-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/as3722.c b/drivers/mfd/as3722.c index 6c0d89b0c7e3..7ab6fcc9c27c 100644 --- a/drivers/mfd/as3722.c +++ b/drivers/mfd/as3722.c @@ -394,7 +394,9 @@ static int as3722_i2c_probe(struct i2c_client *i2c) return ret; } - device_init_wakeup(as3722->dev, true); + ret = devm_device_init_wa...
6d0b2398b2638208d68ba06601f776cd5d983b75
Analyze and fix the following issue in the Linux kernel code: mfd: 88pm886: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Karel Balej <balejk@matfyz.cz> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-1-318e14bdba0a@linaro.org Signed-off-by: ...
```diff diff --git a/drivers/mfd/88pm886.c b/drivers/mfd/88pm886.c index 891fdce5d8c1..177878aa32f8 100644 --- a/drivers/mfd/88pm886.c +++ b/drivers/mfd/88pm886.c @@ -124,7 +124,11 @@ static int pm886_probe(struct i2c_client *client) if (err) return dev_err_probe(dev, err, "Failed to register power off handler\n")...
70becbeb7f064a47a1d02ea9b1443be17f4de7af
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mfd: syscon: Add qcom,apq8064-sps-sic
Problem Details: Add compat for Smart Peripheral System (SPS) Interrupt Controller (SIC) present on Qualcomm APQ8064 SoC. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Link: https://lore.kernel.org/r/20250425-fix-nexus-4-v3-3-da4e39e86d41@oss.qualco...
```diff diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml index 6bbebd7dd651..0f784f469835 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -100,6 +100,7 @@ select: - nuvo...
6d31da9b65006912757cdc48a0e6e91665344865
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mfd: syscon: Add qcom,apq8064-mmss-sfpb
Problem Details: Add compat string for Qualcomm MultiMedia SubSystem System FPB. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Link: https://lore.kernel.org/r/20250425-fix-nexus-4-v3-2-da4e39e86d41@oss.qualcomm.com Signed-off-by: Lee Jones <lee@kern...
```diff diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml index 4f3d522bc3de..6bbebd7dd651 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -99,6 +99,7 @@ select: - mstar,...
59d60c16ed41475f3b5f7b605e75fbf8e3628720
Analyze and fix the following issue in the Linux kernel code: mfd: stmpe-spi: Correct the name used in MODULE_DEVICE_TABLE
Problem Details: The name used in the macro does not exist. drivers/mfd/stmpe-spi.c:132:26: error: use of undeclared identifier 'stmpe_id' 132 | MODULE_DEVICE_TABLE(spi, stmpe_id); Fixes: e789995d5c61 ("mfd: Add support for STMPE SPI interface") Signed-off-by: Alexey Gladkov <legion@kernel.org> Reviewed-by: Krzyszt...
```diff diff --git a/drivers/mfd/stmpe-spi.c b/drivers/mfd/stmpe-spi.c index 792236f56399..b9cc85ea2c40 100644 --- a/drivers/mfd/stmpe-spi.c +++ b/drivers/mfd/stmpe-spi.c @@ -129,7 +129,7 @@ static const struct spi_device_id stmpe_spi_id[] = { { "stmpe2403", STMPE2403 }, { } }; -MODULE_DEVICE_TABLE(spi, stmpe_id);...
f41cc37f4bc0e8cd424697bf6e26586cadcf4b9b
Analyze and fix the following issue in the Linux kernel code: mfd: exynos-lpass: Fix another error handling path in exynos_lpass_probe()
Problem Details: If devm_of_platform_populate() fails, some clean-up needs to be done, as already done in the remove function. Add a new devm_add_action_or_reset() to fix the leak in the probe and remove the need of a remove function. Fixes: c695abab2429 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver") Si...
```diff diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index a2785ceea8bf..44797001a432 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -104,11 +104,22 @@ static const struct regmap_config exynos_lpass_reg_conf = { .fast_io = true, }; +static void exynos_lpass_disa...
b70b84556eeca5262d290e8619fe0af5b7664a52
Analyze and fix the following issue in the Linux kernel code: mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in exynos_lpass_remove()
Problem Details: exynos_lpass_disable() is called twice in the remove function. Remove one of these calls. Fixes: 90f447170c6f ("mfd: exynos-lpass: Add runtime PM support") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://...
```diff diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 6b95927e99be..a2785ceea8bf 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -141,7 +141,6 @@ static void exynos_lpass_remove(struct platform_device *pdev) { struct exynos_lpass *lpass = platform_get_drvdata(...
484f0f59f09edd1f6fa63703c12eb30d72a519ac
Analyze and fix the following issue in the Linux kernel code: mfd: exynos-lpass: Fix an error handling path in exynos_lpass_probe()
Problem Details: If an error occurs after a successful regmap_init_mmio(), regmap_exit() should be called as already done in the .remove() function. Switch to devm_regmap_init_mmio() to avoid the leak and simplify the .remove() function. Fixes: c414df12bdf7 ("mfd: exynos-lpass: Add missing remove() function") Signed-...
```diff diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 6a585173230b..6b95927e99be 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -122,8 +122,8 @@ static int exynos_lpass_probe(struct platform_device *pdev) if (IS_ERR(lpass->sfr0_clk)) return PTR_ERR(lpass->s...
1cea1b6b2c89ef67ebd09e43d85d7308f86a538c
Analyze and fix the following issue in the Linux kernel code: mfd: sec-i2c: s2dos05/s2mpu05: Use explicit regmap config and drop default
Problem Details: When support for PMICs without compatibles was removed in commit f736d2c0caa8 ("mfd: sec: Remove PMICs without compatibles"), sec_regmap_config effectively became an orphan, because S5M8763X was the only user left of it before removal, using the default: case of the switch statement. When s2dos05 and ...
```diff diff --git a/drivers/mfd/sec-i2c.c b/drivers/mfd/sec-i2c.c index a107a9c1e760..81f90003eea2 100644 --- a/drivers/mfd/sec-i2c.c +++ b/drivers/mfd/sec-i2c.c @@ -61,7 +61,7 @@ static bool s2mpu02_volatile(struct device *dev, unsigned int reg) } } -static const struct regmap_config sec_regmap_config = { +stati...
d58b81c436f00259019ad11f2a9af19d84496de3
Analyze and fix the following issue in the Linux kernel code: mfd: sec-common: Fix multiple trivial whitespace issues
Problem Details: Rectify a couple of alignment problems reported by Checkpatch. Signed-off-by: André Draszik <andre.draszik@linaro.org> Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-11-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/sec-common.c b/drivers/mfd/sec-common.c index 782dec1956a5..1a6f14dda825 100644 --- a/drivers/mfd/sec-common.c +++ b/drivers/mfd/sec-common.c @@ -149,9 +149,9 @@ sec_pmic_parse_dt_pdata(struct device *dev) return ERR_PTR(-ENOMEM); pd->manual_poweroff = of_property_read_bool(dev->...
879ede53958f7bab79a88888f77e0ca91f0f77da
Analyze and fix the following issue in the Linux kernel code: drm/xe: Default auto_link_downgrade status to false
Problem Details: xe_pcode_read() can return back successfully without updating the variable 'val'. This can cause an arbitrary value to show up in the sysfs file. Allow the auto_link_downgrade_status to default to 0 to avoid any arbitrary value from coming up. Fixes: 0e414bf7ad01 ("drm/xe: Expose PCIe link downgrade ...
```diff diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c index 9628e9a0a0af..2e657692e5b5 100644 --- a/drivers/gpu/drm/xe/xe_device_sysfs.c +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c @@ -124,7 +124,8 @@ auto_link_downgrade_status_show(struct device *dev, struct device_attribute *...
e22d7acf9f47b01c9a538f3dac5c8e8d46fbca96
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Make creation of SLPC debugfs files conditional
Problem Details: Platforms that do not support SLPC are exempted from the GuC PC support. The GuC PC does not get initialized, and neither do its BOs get created. This causes a problem because the GuC PC debugfs file is still being created. Whenever the file is attempted to read, it causes a NULL pointer dereference o...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_debugfs.c b/drivers/gpu/drm/xe/xe_guc_debugfs.c index f33013f8a0f3..0b102ab46c4d 100644 --- a/drivers/gpu/drm/xe/xe_guc_debugfs.c +++ b/drivers/gpu/drm/xe/xe_guc_debugfs.c @@ -113,23 +113,34 @@ static const struct drm_info_list vf_safe_debugfs_list[] = { { "guc_ctb", .sh...
7f9bbc1140ff8796230bc2634055763e271fd692
Analyze and fix the following issue in the Linux kernel code: xen/arm: call uaccess_ttbr0_enable for dm_op hypercall
Problem Details: dm_op hypercalls might come from userspace and pass memory addresses as parameters. The memory addresses typically correspond to buffers allocated in userspace to hold extra hypercall parameters. On ARM, when CONFIG_ARM64_SW_TTBR0_PAN is enabled, they might not be accessible by Xen, as a result ioreq ...
```diff diff --git a/arch/arm64/xen/hypercall.S b/arch/arm64/xen/hypercall.S index 9d01361696a1..ae551b857137 100644 --- a/arch/arm64/xen/hypercall.S +++ b/arch/arm64/xen/hypercall.S @@ -83,7 +83,26 @@ HYPERCALL3(vcpu_op); HYPERCALL1(platform_op_raw); HYPERCALL2(multicall); HYPERCALL2(vm_assist); -HYPERCALL3(dm_op);...
74287971dbb3fe322bb316afd9e7fb5807e23bee
Analyze and fix the following issue in the Linux kernel code: xen/x86: fix initial memory balloon target
Problem Details: When adding extra memory regions as ballooned pages also adjust the balloon target, otherwise when the balloon driver is started it will populate memory to match the target value and consume all the extra memory regions added. This made the usage of the Xen `dom0_mem=,max:` command line parameter for ...
```diff diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 8c852807ba1c..2de37dcd7556 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -704,15 +704,18 @@ static int __init balloon_add_regions(void) /* * Extra regions are accounted for in the physmap, but need - * decreasing fro...
84b6f8503b29a6cc5a82848253a97c09a95fdf49
Analyze and fix the following issue in the Linux kernel code: drm/xe: Use xe_mmio_read32() to read mtcfg register
Problem Details: The mtcfg register is a 32-bit register and should therefore be accessed using xe_mmio_read32(). Other 3 changes per codestyle suggestion: " xe_mmio.c:83: CHECK: Alignment should match open parenthesis xe_mmio.c:131: CHECK: Comparison to NULL could be written "!xe->mmio.regs" xe_mmio.c:315: CHECK: lin...
```diff diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c index 70a36e777546..46301f341773 100644 --- a/drivers/gpu/drm/xe/xe_mmio.c +++ b/drivers/gpu/drm/xe/xe_mmio.c @@ -75,12 +75,12 @@ static void mmio_multi_tile_setup(struct xe_device *xe, size_t tile_mmio_size) * is fine as it's going to...
57b34cba8ec01e22d2f3628ffa979e0cb9169238
Analyze and fix the following issue in the Linux kernel code: drm/xe/mocs: Check if all domains awake
Problem Details: Check if all domains are awake specially for LNCF regs Fixes: 298661cd9cea ("drm/xe: Fix MOCS debugfs LNCF readout") Improvements-suggested-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Link: https://patchwork.freedesktop.org/patch/msg...
```diff diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c index 31dade91a089..0c737413fcb6 100644 --- a/drivers/gpu/drm/xe/xe_mocs.c +++ b/drivers/gpu/drm/xe/xe_mocs.c @@ -775,22 +775,23 @@ void xe_mocs_init(struct xe_gt *gt) void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p) { struct...
8259eb0e06d8f64c700f5fbdb28a5c18e10de291
Analyze and fix the following issue in the Linux kernel code: bpf, sockmap: Avoid using sk_socket after free when sending
Problem Details: The sk->sk_socket is not locked or referenced in backlog thread, and during the call to skb_send_sock(), there is a race condition with the release of sk_socket. All types of sockets(tcp/udp/unix/vsock) will be affected. Race conditions: ''' CPU0 CPU1 backlog::skb_send_s...
```diff diff --git a/net/core/skmsg.c b/net/core/skmsg.c index 276934673066..34c51eb1a14f 100644 --- a/net/core/skmsg.c +++ b/net/core/skmsg.c @@ -656,6 +656,13 @@ static void sk_psock_backlog(struct work_struct *work) bool ingress; int ret; + /* Increment the psock refcnt to synchronize with close(fd) path in + ...
977c4308ee4270cf46e2c66b37de8e04670daa0c
Analyze and fix the following issue in the Linux kernel code: rust: arm: fix unknown (to Clang) argument '-mno-fdpic'
Problem Details: Currently rust on arm fails to compile due to '-mno-fdpic'. This flag disables a GCC feature that we don't want for kernel builds, so let's skip it as it doesn't apply to Clang. UPD include/generated/asm-offsets.h CALL scripts/checksyscalls.sh RUSTC L rust/core.o BINDGEN rust/bi...
```diff diff --git a/rust/Makefile b/rust/Makefile index 3aca903a7d08..f207ba0ed466 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -273,7 +273,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \ -fzero-call-used-regs=% -fno-stack-clash-protection \ -fno-inline-functions-called-once -fs...
200577f69f29a58c90c67c83a0df6d12850e1d09
Analyze and fix the following issue in the Linux kernel code: memcg: objcg stock trylock without irq disabling
Problem Details: There is no need to disable irqs to use objcg per-cpu stock, so let's just not do that but consume_obj_stock() and refill_obj_stock() will need to use trylock instead to avoid deadlock against irq. One consequence of this change is that the charge request from irq context may take slowpath more often ...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d8508b57d0fa..35db91fddd1f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1880,18 +1880,17 @@ static void drain_local_memcg_stock(struct work_struct *dummy) static void drain_local_obj_stock(struct work_struct *dummy) { struct obj_stock_pcp *stock...
8a4b42b955286c122c4402b458acbc1d92953fbd
Analyze and fix the following issue in the Linux kernel code: memcg: memcg_rstat_updated re-entrant safe against irqs
Problem Details: Patch series "memcg: make memcg stats irq safe", v2. This series converts memcg stats to be irq safe i.e. memcg stats can be updated in any context (task, softirq or hardirq) without disabling the irqs. This is still not nmi-safe on all architectures but after this series converting memcg charging a...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 2b6768f0e916..01560e22dd06 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -503,8 +503,8 @@ struct memcg_vmstats_percpu { unsigned int stats_updates; /* Cached pointers for fast iteration in memcg_rstat_updated() */ - struct memcg_vmstats_percpu...
a82cf30010665a3602cc6051d760e19e9174ae3d
Analyze and fix the following issue in the Linux kernel code: mm/damon/paddr: remove unused variable, folio_list, in damon_pa_stat()
Problem Details: Commit c0cb9d91bf297 ("mm/damon/paddr: report filter-passed bytes back for DAMOS_STAT action") added unused variable in damon_pa_stat(), due to a copy-and-paste error. Remove it. Link: https://lkml.kernel.org/r/20250513002715.40126-4-sj@kernel.org Fixes: c0cb9d91bf29 ("mm/damon/paddr: report filter-p...
```diff diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 1b70d3f36046..e8464f7e0014 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -548,7 +548,6 @@ static unsigned long damon_pa_stat(struct damon_region *r, struct damos *s, unsigned long *sz_filter_passed) { unsigned long addr; - LIST_HEAD(folio_li...
0bac6b1a1111977c769e1933e0b0fc24e3647d97
Analyze and fix the following issue in the Linux kernel code: mm/damon/sysfs-schemes: fix wrong comment on damons_sysfs_quota_goal_metric_strs
Problem Details: A comment on damos_sysfs_quota_goal_metric_strs is simply wrong, due to a copy-and-paste error. Fix it. Link: https://lkml.kernel.org/r/20250513002715.40126-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendan.higgins@linux.dev> Cc: David Gow <davidgow@google.com>...
```diff diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index c2b8a9cb44ec..0f6c9e1fec0b 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -940,7 +940,7 @@ struct damos_sysfs_quota_goal { int nid; }; -/* This should match with enum damos_action */ +/* This should match with e...
591c4c78be06360fe31b31401564bdb2d2b79995
Analyze and fix the following issue in the Linux kernel code: mm/damon/core: warn and fix nr_accesses[_bp] corruption
Problem Details: Patch series "mm/damon: minor fixups and improvements for code, tests, and documents". Yet another batch of miscellaneous DAMON changes. Fix and improve minor problems in code, tests and documents. This patch (of 6): For a bug such as double aggregation reset[1], ->nr_accesses and/or ->nr_accesses...
```diff diff --git a/mm/damon/core.c b/mm/damon/core.c index 587fb9a4fef8..0bb71e2ab713 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1391,6 +1391,19 @@ int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control) return 0; } +/* + * Warn and fix corrupted ->nr_accesses[_bp] for investigation...
2aad4edf6e1018b28b7000faec56b7b6e585c8e1
Analyze and fix the following issue in the Linux kernel code: mm: rename try_alloc_pages() to alloc_pages_nolock()
Problem Details: The "try_" prefix is confusing, since it made people believe that try_alloc_pages() is analogous to spin_trylock() and NULL return means EAGAIN. This is not the case. If it returns NULL there is no reason to call it again. It will most likely return NULL again. Hence rename it to alloc_pages_nolock...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index c9fa6309c903..be160e8d8bcb 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -45,13 +45,13 @@ static inline bool gfpflags_allow_spinning(const gfp_t gfp_flags) * !__GFP_DIRECT_RECLAIM -> direct claim is not allowed. * !__GFP_KSWAPD_R...
6669d1aaa0c45a50a4cc5f1756ab03578eaebd18
Analyze and fix the following issue in the Linux kernel code: mm: remove WARN_ON_ONCE() in file_has_valid_mmap_hooks()
Problem Details: Having encountered a trinity report in linux-next (Linked in the 'Closes' tag) it appears that there are legitimate situations where a file-backed mapping can be acquired but no file->f_op->mmap or file->f_op->mmap_prepare is set, at which point do_mmap() should simply error out with -ENODEV. Since pr...
```diff diff --git a/include/linux/fs.h b/include/linux/fs.h index e2721a1ff13d..09c8495dacdb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2248,7 +2248,7 @@ static inline bool file_has_valid_mmap_hooks(struct file *file) /* Hooks are mutually exclusive. */ if (WARN_ON_ONCE(has_mmap && has_mmap_prepa...
5c5f0468d172ddec2e333d738d2a1f85402cf0bc
Analyze and fix the following issue in the Linux kernel code: mm/vmalloc: fix data race in show_numa_info()
Problem Details: The following data-race was found in show_numa_info(): ================================================================== BUG: KCSAN: data-race in vmalloc_info_show / vmalloc_info_show read to 0xffff88800971fe30 of 4 bytes by task 8289 on cpu 0: show_numa_info mm/vmalloc.c:4936 [inline] vmalloc_inf...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 701ea4ec8950..49df04e1fbe1 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -3109,7 +3109,7 @@ static void clear_vm_uninitialized_flag(struct vm_struct *vm) /* * Before removing VM_UNINITIALIZED, * we should make sure that vm has proper values. - * Pair wit...
b57482b0fe8e370e2895b9925a733c21cfec183a
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add u32()/u64() to sockmap_helpers
Problem Details: Add integer wrappers for convenient sockmap usage. While there, fix misaligned trailing slashes. Suggested-by: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com> A...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h b/tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h index 3e5571dd578d..d815efac52fd 100644 --- a/tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_helpers.h @@ -5,12 +5,15 @@...
aca89f1be6bd3196dedc368e257351c1e561082e
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: acpi: Make driver's match data const static
Problem Details: The driver's match data, nvidia_hda_data, is referred only locally, and should be static. Also, as it's a read-only data, it can be gracefully const, too. Fixes: 4b214c9bbe26 ("ALSA: hda - Add new driver for HDA controllers listed via ACPI") Reported-by: kernel test robot <lkp@intel.com> Closes: http...
```diff diff --git a/sound/pci/hda/hda_acpi.c b/sound/pci/hda/hda_acpi.c index 513f8fde198b..505cc97e0ee9 100644 --- a/sound/pci/hda/hda_acpi.c +++ b/sound/pci/hda/hda_acpi.c @@ -296,7 +296,7 @@ static const struct dev_pm_ops hda_acpi_pm = { SYSTEM_SLEEP_PM_OPS(hda_acpi_suspend, hda_acpi_resume) }; -struct hda_dat...
ebaa3bf415e7faaf41f5a440aa00574539f0c2ab
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: acpi: Use SYSTEM_SLEEP_PM_OPS()
Problem Details: The dev_pm_ops definition must be SYSTEM_SLEEP_PM_OPS() instead of SET_SYSTEM_SLEEP_PM_OPS(); otherwise it leads compile warnings without CONFIG_PM_SLEEP. The latest patch version I took was back to an old macro (likely mistakenly), and I overlooked it at applying. Fix it now. Fixes: 4b214c9bbe26 ("...
```diff diff --git a/sound/pci/hda/hda_acpi.c b/sound/pci/hda/hda_acpi.c index c90865ca876e..513f8fde198b 100644 --- a/sound/pci/hda/hda_acpi.c +++ b/sound/pci/hda/hda_acpi.c @@ -293,7 +293,7 @@ static int hda_acpi_resume(struct device *dev) } static const struct dev_pm_ops hda_acpi_pm = { - SET_SYSTEM_SLEEP_PM_OPS...
273cc949655c70001778eb0b9e7db993df845912
Analyze and fix the following issue in the Linux kernel code: sched_ext: Call ops.update_idle() after updating builtin idle bits
Problem Details: BPF schedulers that use both builtin CPU idle mechanism and ops.update_idle() may want to use the latter to create interlocking between ops.enqueue() and CPU idle transitions so that either ops.enqueue() sees the idle bit or ops.update_idle() sees the task queued somewhere. This can prevent race condit...
```diff diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c index ae30de383913..66da03cc0b33 100644 --- a/kernel/sched/ext_idle.c +++ b/kernel/sched/ext_idle.c @@ -738,16 +738,6 @@ void __scx_update_idle(struct rq *rq, bool idle, bool do_notify) lockdep_assert_rq_held(rq); - /* - * Trigger ops.update_...
2b6d96503255a3ed676cd70f8368870c6d6a25c6
Analyze and fix the following issue in the Linux kernel code: jffs2: check jffs2_prealloc_raw_node_refs() result in few other places
Problem Details: Fuzzing hit another invalid pointer dereference due to the lack of checking whether jffs2_prealloc_raw_node_refs() completed successfully. Subsequent logic implies that the node refs have been allocated. Handle that. The code is ready for propagating the error upwards. KASAN: null-ptr-deref in range ...
```diff diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index ef3a1e1b6cb0..fda9f4d6093f 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -425,7 +425,9 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb .totlen = cpu_to_je32(c->cleanmarker_size) }; - jffs2_prealloc_raw...
ec9e6f22bce433b260ea226de127ec68042849b0
Analyze and fix the following issue in the Linux kernel code: jffs2: check that raw node were preallocated before writing summary
Problem Details: Syzkaller detected a kernel bug in jffs2_link_node_ref, caused by fault injection in jffs2_prealloc_raw_node_refs. jffs2_sum_write_sumnode doesn't check return value of jffs2_prealloc_raw_node_refs and simply lets any error propagate into jffs2_sum_write_data, which eventually calls jffs2_link_node_ref...
```diff diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index 4fe64519870f..d83372d3e1a0 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c @@ -858,7 +858,10 @@ int jffs2_sum_write_sumnode(struct jffs2_sb_info *c) spin_unlock(&c->erase_completion_lock); jeb = c->nextblock; - jffs2_prealloc_raw_node_ref...
73e9bb465f4ab8cdfc99a1a2252ae80d7587bfc0
Analyze and fix the following issue in the Linux kernel code: ubifs: Fix grammar in error message
Problem Details: s/much/many/ Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Richard Weinberger <richard@nod.at>
```diff diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index ee954e64ce7f..e28ab4395e5c 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -985,7 +985,7 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode) dbg_jnl("ino %lu, nlink %u", inode->i_ino, inode->i_nlink); if (kill...
62f134ab190c5fd5c9f68fe638ad8e13bb8a4cb4
Analyze and fix the following issue in the Linux kernel code: ALSA: core: fix up bus match const issues.
Problem Details: In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match bus callback was changed to have the driver be a const pointer. Unfortunately that const attribute was thrown away when container_of() is called, which is not correct and was not caught by the co...
```diff diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index b098ceadbe74..9a70048adbc0 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -223,7 +223,7 @@ struct hdac_driver { struct device_driver driver; int type; const struct hda_device_id *id_table; - int (*match)(struct hda...
3aa1dc3c9060e335e82e9c182bf3d1db29220b1b
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Check dsbr size from EFI variable
Problem Details: Since the size of struct btintel_dsbr is already known, we can just start there instead of querying the EFI variable size. If the final result doesn't match what we expect also fail. This fixes a stack buffer overflow when the EFI variable is larger than struct btintel_dsbr. Reported-by: zepta <z3ptaa...
```diff diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index ae92490d0c78..55cc1652bfe4 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -2719,7 +2719,7 @@ static int btintel_uefi_get_dsbr(u32 *dsbr_var) } __packed data; efi_status_t status; - unsigned long dat...
3bb88524b7d030160bb3c9b35f928b2778092111
Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: iterate over mesh commands in mgmt_mesh_foreach()
Problem Details: In 'mgmt_mesh_foreach()', iterate over mesh commands rather than generic mgmt ones. Compile tested only. Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c index e5ff65e424b5..3713ff490c65 100644 --- a/net/bluetooth/mgmt_util.c +++ b/net/bluetooth/mgmt_util.c @@ -304,7 +304,7 @@ void mgmt_mesh_foreach(struct hci_dev *hdev, { struct mgmt_mesh_tx *mesh_tx, *tmp; - list_for_each_entry_safe(mesh_t...
c27046c98bd26d4270c076e7d851d68aaaf964a3
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling
Problem Details: Use skb_pull() and skb_pull_data() to safely parse QCA dump packets. This avoids direct pointer math on skb->data, which could lead to invalid access if the packet is shorter than expected. Fixes: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support") Signed-off-by: En-Wei Wu <en-wei.wu@c...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 357b18dae8de..ef44817cad34 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2979,9 +2979,8 @@ static void btusb_coredump_qca(struct hci_dev *hdev) static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_bu...
631c8682c3b8ce2678b2d849b3f28e5568853591
Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix not checking l2cap_chan security level
Problem Details: l2cap_check_enc_key_size shall check the security level of the l2cap_chan rather than the hci_conn since for incoming connection request that may be different as hci_conn may already been encrypted using a different security level. Fixes: 522e9ed157e3 ("Bluetooth: l2cap: Check encryption key size on i...
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 73472756618a..042d3ac3b4a3 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -1411,7 +1411,8 @@ static void l2cap_request_info(struct l2cap_conn *conn) sizeof(req), &req); } -static bool l2cap_check...
4518e5a60c7fbf0cdff393c2681db39d77b4f87e
Analyze and fix the following issue in the Linux kernel code: vfio/type1: Fix error unwind in migration dirty bitmap allocation
Problem Details: When setting up dirty page tracking at the vfio IOMMU backend for device migration, if an error is encountered allocating a tracking bitmap, the unwind loop fails to free previously allocated tracking bitmaps. This occurs because the wrong loop index is used to generate the tracking object. This resu...
```diff diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index afc1449335c3..1136d7ac6b59 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -292,7 +292,7 @@ static int vfio_dma_bitmap_alloc_all(struct vfio_iommu *iommu, size_t pgsize) struct rb_node ...
8f7b00307bf14676b7e7f0210110a36aa0ff3e93
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Convert mlx5 netdevs to instance locking
Problem Details: This patch convert mlx5 to use the new netdev instance lock in addition to the pre-existing state_lock (and the RTNL). mlx5e_priv.state_lock was already used throughout mlx5 to protect against concurrent state modifications on the same netdev, usually in addition to the RTNL. The new netdev instance l...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c index 81523825faa2..cb972b2d46e2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c @@ -114,6 +114,7 @@ int mlx5e_health_...
463e5176969795a1d80205842e210c539c16fc81
Analyze and fix the following issue in the Linux kernel code: IB/IPoIB: Replace vlan_rwsem with the netdev instance lock
Problem Details: vlan_rwsem was added more than a decade ago to work around a deadlock involving the original mutex being acquired twice, once from the wq. Subsequent changes then tweaked it to partially protect access to ipoib_dev_priv->child_intfs together with the RTNL. Flushing the wq synchronously was also since t...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index 2e05e9c9317d..91f866e3fb8b 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -329,14 +329,6 @@ struct ipoib_dev_priv { unsigned long flags; - /* - * This protects a...
5f85120e7462c9fc51cb9c52bc6e81b13d4c93e1
Analyze and fix the following issue in the Linux kernel code: IB/IPoIB: Enqueue separate work_structs for each flushed interface
Problem Details: Previously, flushing a netdevice involved first flushing all child devices from the flush task itself. That requires holding the lock that protects the list for the entire duration of the flush. This poses a problem when converting from vlan_rwsem to the netdev instance lock (next patch), because hold...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index abe0522b7df4..2e05e9c9317d 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -512,6 +512,8 @@ int ipoib_intf_init(struct ib_device *hca, u32 port, const char *format, voi...
7e7cb7a13c81073d38a10fa7b450d23712281ec4
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd: Keep display off while going into S4"
Problem Details: commit 68bfdc8dc0a1a ("drm/amd: Keep display off while going into S4") attempted to keep displays off during the S4 sequence by not resuming display IP. This however leads to hangs because DRM clients such as the console can try to access registers and cause a hang. Closes: https://gitlab.freedesktop...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index cc01b9c68b47..a187cdb43e7e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3469,11 +3469,6 @@ static int dm_resume(s...
28be240c763a44932bfe573f09e145d182e52609
Analyze and fix the following issue in the Linux kernel code: trace/io_uring: fix io_uring_local_work_run ctx documentation
Problem Details: The comment for the tracepoint io_uring_local_work_run refers to a field "tctx" and a type "io_uring_ctx", neither of which exist. "tctx" looks to mean "ctx" and "io_uring_ctx" should be "io_ring_ctx". Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Link: https://lore.kernel.org/r/2025052...
```diff diff --git a/include/trace/events/io_uring.h b/include/trace/events/io_uring.h index fb81c533b310..178ab6f611be 100644 --- a/include/trace/events/io_uring.h +++ b/include/trace/events/io_uring.h @@ -645,7 +645,7 @@ TRACE_EVENT(io_uring_short_write, /* * io_uring_local_work_run - ran ring local task work * ...
0b261d7c1cd32dc93cbc92425fb55e67b24c6638
Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Break endless pagefault loop for RO pages
Problem Details: RO pages has "perm" equal to 0, that caused to the situation where such pages were marked as needed to have fault and caused to infinite loop. Fixes: eedd5b1276e7 ("RDMA/umem: Store ODP access mask information in PFN") Reported-by: Daisuke Matsuda <dskmtsd@gmail.com> Closes: https://lore.kernel.org/al...
```diff diff --git a/drivers/infiniband/sw/rxe/rxe_odp.c b/drivers/infiniband/sw/rxe/rxe_odp.c index a1416626f61a..dbc5a5600eb7 100644 --- a/drivers/infiniband/sw/rxe/rxe_odp.c +++ b/drivers/infiniband/sw/rxe/rxe_odp.c @@ -124,8 +124,8 @@ int rxe_odp_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, return err...
e485502c37b097b0bd773baa7e2741bf7bd2909a
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd: Keep display off while going into S4"
Problem Details: commit 68bfdc8dc0a1a ("drm/amd: Keep display off while going into S4") attempted to keep displays off during the S4 sequence by not resuming display IP. This however leads to hangs because DRM clients such as the console can try to access registers and cause a hang. Closes: https://gitlab.freedesktop...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 2bb347771aa1..90889f6867aa 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3383,11 +3383,6 @@ static int dm_resume(s...
914e0dc5082a335ea5e7d905e99e1a1cde001369
Analyze and fix the following issue in the Linux kernel code: ublk: run auto buf unregisgering in same io_ring_ctx with registering
Problem Details: UBLK_F_AUTO_BUF_REG requires that the buffer registered automatically is unregistered in same `io_ring_ctx`, so check it explicitly. Document this requirement for UBLK_F_AUTO_BUF_REG. Drop WARN_ON_ONCE() which is triggered from userspace code path. Fixes: 99c1e4eb6a3f ("ublk: register buffer to loca...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index f818733901dc..33fadca3ee90 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -84,6 +84,7 @@ struct ublk_rq_data { /* for auto-unregister buffer in case of UBLK_F_AUTO_BUF_REG */ u16 buf_index; + void *buf_ctx_hand...
a359288ccb4dd8edb086e7de8fdf6e36f544c922
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: seq64 memory unmap uses uninterruptible lock
Problem Details: To unmap and free seq64 memory when drm node close to free vm, if there is signal accepted, then taking vm lock failed and leaking seq64 va mapping, and then dmesg has error log "still active bo inside vm". Change to use uninterruptible lock fix the mapping leaking and no dmesg error log. Signed-off-...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c index 3939761be31c..d45ebfb642ca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c @@ -139,7 +139,7 @@ void amdgpu_seq64_unmap(struct amdgpu_device *adev, struc...
f9f403218e1ca947a1a017be01da6ae7fb637eba
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: only collect data if debug gamut_remap is available
Problem Details: Color gamut_remap state log may be not available for some hw versions, so prevent null pointer dereference by checking if there is a function to collect data for this hw version. Signed-off-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexan...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c index 858288c3b1ac..c277df12c817 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c @@ -76,6 +76,7 @@ voi...
05daa7c739f43aec4358f5a4c291e1b2d0fc7885
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix typo in comments
Problem Details: Fix double 'u' in 'frequuency' Signed-off-by: Daniil Ryabov <daniilryabov4@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c index 681799468487..d897f8a30ede 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c +++ b/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c @@ -1393,7 +1393,7 @@ static void calculate_b...
57d4100cc94fe5a8dcabd72a66ed1d5c6f14291a
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Adjust set_value function with prefix to help in ftrace
Problem Details: Adjust set_value function in hw_hpd.c file to have prefix to help in ftrace, the name change from 'set_value' to 'dal_hw_hpd_set_value' Signed-off-by: Leonardo da Silva Gomes <leonardodasigomes@gmail.com> Co-developed-by: Derick Frias <derick.william.moraes@gmail.com> Signed-off-by: Derick Frias <deri...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c index 886dd05b012f..01ec451004f7 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c @@ -85,7 +85,7 @@ static enum gpio_result dal_hw_hpd_get_value( ...
f0e9c6f67a02eea72aab9f598b884395876b971b
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Adjust get_value function with prefix to help in ftrace
Problem Details: Adjust get_value function in hw_hpd.c file to have prefix to help in ftrace, the name change from 'get_value' to 'dal_hw_hpd_get_value' Signed-off-by: Leonardo da Silva Gomes <leonardodasigomes@gmail.com> Co-developed-by: Derick Frias <derick.william.moraes@gmail.com> Signed-off-by: Derick Frias <deri...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c b/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c index 3f13a744d07d..886dd05b012f 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c +++ b/drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c @@ -62,7 +62,7 @@ static void dal_hw_hpd_destroy( *ptr = NULL; ...
0132ba7ff0f613915d332a30fcf14cf66e317f98
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix eviction fence worker race during fd close
Problem Details: The current cleanup order during file descriptor close can lead to a race condition where the eviction fence worker attempts to access a destroyed mutex from the user queue manager: [ 517.294055] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 517.294060] WARNING: CPU: 8 PID: 2030 at kernel/locking/mutex...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 4ddd08ce8885..4db92e0a60da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2913,8 +2913,8 @@ static int amdgpu_drm_release(struct inode *inode, struct file ...
ea3b0b7f541b9511abe2b89547c95458804f38e2
Analyze and fix the following issue in the Linux kernel code: EDAC/bluefield: Don't use bluefield_edac_readl() result on error
Problem Details: The bluefield_edac_readl() routine returns an uninitialized result on error paths. In those cases the calling routine should not use the uninitialized result. The driver should simply log the error, and then return early. Fixes: e41967575474 ("EDAC/bluefield: Use Arm SMC for EMI access on BlueField-2"...
```diff diff --git a/drivers/edac/bluefield_edac.c b/drivers/edac/bluefield_edac.c index 4942a240c30f..ae3bb7afa103 100644 --- a/drivers/edac/bluefield_edac.c +++ b/drivers/edac/bluefield_edac.c @@ -199,8 +199,10 @@ static void bluefield_gather_report_ecc(struct mem_ctl_info *mci, * error without the detailed inform...
db807e5ef8eea6948bb4993466623046f52d3056
Analyze and fix the following issue in the Linux kernel code: eth: bnxt: fix deadlock when xdp is attached or detached
Problem Details: When xdp is attached or detached, dev->ndo_bpf() is called by do_setlink(), and it acquires netdev_lock() if needed. Unlike other drivers, the bnxt driver is protected by netdev_lock while xdp is attached/detached because it sets dev->request_ops_lock to true. So, the bnxt_xdp(), that is callback of -...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c index e675611777b5..4a6d8cb9f970 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c @@ -425,9 +425,9 @@ static int bnxt_xdp_set(struct bnxt *bp, ...
8b53f46eb430fe5b42d485873b85331d2de2c469
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: nft_fib_ipv6: fix VRF ipv4/ipv6 result discrepancy
Problem Details: With a VRF, ipv4 and ipv6 FIB expression behave differently. fib daddr . iif oif Will return the input interface name for ipv4, but the real device for ipv6. Example: If VRF device name is tvrf and real (incoming) device is veth0. First round is ok, both ipv4 and ipv6 will yield 'veth0'. But in...
```diff diff --git a/net/ipv6/netfilter/nft_fib_ipv6.c b/net/ipv6/netfilter/nft_fib_ipv6.c index 7fd9d7b21cd4..f1f5640da672 100644 --- a/net/ipv6/netfilter/nft_fib_ipv6.c +++ b/net/ipv6/netfilter/nft_fib_ipv6.c @@ -158,6 +158,7 @@ void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs, { const struct ...
c38eb2973c18d34a8081d173a6ad298461f4a37c
Analyze and fix the following issue in the Linux kernel code: netfilter: xtables: support arpt_mark and ipv6 optstrip for iptables-nft only builds
Problem Details: Its now possible to build a kernel that has no support for the classic xtables get/setsockopt interfaces and builtin tables. In this case, we have CONFIG_IP6_NF_MANGLE=n and CONFIG_IP_NF_ARPTABLES=n. For optstript, the ipv6 code is so small that we can enable it if netfilter ipv6 support exists. For ...
```diff diff --git a/net/netfilter/xt_TCPOPTSTRIP.c b/net/netfilter/xt_TCPOPTSTRIP.c index 30e99464171b..93f064306901 100644 --- a/net/netfilter/xt_TCPOPTSTRIP.c +++ b/net/netfilter/xt_TCPOPTSTRIP.c @@ -91,7 +91,7 @@ tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_action_param *par) return tcpoptstrip_mangle_pac...
d31c1cafc4a7b790f752f2816e275d14fcb9aeef
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: nft_concat_range.sh: add coverage for 4bit group representation
Problem Details: Pipapo supports a more compact '4 bit group' format that is chosen when the memory needed for the default exceeds a threshold (2mb). Add coverage for those code paths, the existing tests use small sets that are handled by the default representation. This comes with a test script run-time increase, bu...
```diff diff --git a/tools/testing/selftests/net/netfilter/nft_concat_range.sh b/tools/testing/selftests/net/netfilter/nft_concat_range.sh index 1f5979c1510c..efea93cf23d4 100755 --- a/tools/testing/selftests/net/netfilter/nft_concat_range.sh +++ b/tools/testing/selftests/net/netfilter/nft_concat_range.sh @@ -15,10 +15...
7aba292eb15389073c7f3bd7847e3862dfdf604d
Analyze and fix the following issue in the Linux kernel code: spi: spi-fsl-dspi: Reset SR flags before sending a new message
Problem Details: If, in a previous transfer, the controller sends more data than expected by the DSPI target, SR.RFDF (RX FIFO is not empty) will remain asserted. When flushing the FIFOs at the beginning of a new transfer (writing 1 into MCR.CLR_TXF and MCR.CLR_RXF), SR.RFDF should also be cleared. Otherwise, when runn...
```diff diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 1fa96e8189cf..863781ba6c16 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -975,6 +975,8 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr, SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF, ...
8a30a6d35a11ff5ccdede7d6740765685385a917
Analyze and fix the following issue in the Linux kernel code: spi: spi-fsl-dspi: Halt the module after a new message transfer
Problem Details: The XSPI mode implementation in this driver still uses the EOQ flag to signal the last word in a transmission and deassert the PCS signal. However, at speeds lower than ~200kHZ, the PCS signal seems to remain asserted even when SR[EOQF] = 1 indicates the end of a transmission. This is a problem for tar...
```diff diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index effb460d436d..1fa96e8189cf 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -62,6 +62,7 @@ #define SPI_SR_TFIWF BIT(18) #define SPI_SR_RFDF BIT(17) #define SPI_SR_CMDFFF BIT(16) +#define SPI_SR_TXRXS ...
283ae0c65e9c592f4a1ba4f31917f5e766da7f31
Analyze and fix the following issue in the Linux kernel code: spi: spi-fsl-dspi: restrict register range for regmap access
Problem Details: DSPI registers are NOT continuous, some registers are reserved and accessing them from userspace will trigger external abort, add regmap register access table to avoid below abort. For example on S32G: # cat /sys/kernel/debug/regmap/401d8000.spi/registers Internal error: synchronous external a...
```diff diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 067c954cb6ea..effb460d436d 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ // // Copyright 2013 Freescale Semiconductor, Inc. -// Copyright 2020 NXP +// Cop...
471db2c2d4f80ee94225a1ef246e4f5011733e50
Analyze and fix the following issue in the Linux kernel code: drm/scheduler: signal scheduled fence when kill job
Problem Details: When an entity from application B is killed, drm_sched_entity_kill() removes all jobs belonging to that entity through drm_sched_entity_kill_jobs_work(). If application A's job depends on a scheduled fence from application B's job, and that fence is not properly signaled during the killing process, app...
```diff diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index bd39db7bb240..e671aa241720 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -176,6 +176,7 @@ static void drm_sched_entity_kill_jobs_work(struct work_struc...
4e2e6841ff761cc15a54e8bebcf35d7325ec78a2
Analyze and fix the following issue in the Linux kernel code: bpf: Revert "bpf: remove unnecessary rcu_read_{lock,unlock}() in multi-uprobe attach logic"
Problem Details: This reverts commit 4a8f635a6054. Althought get_pid_task() internally already calls rcu_read_lock() and rcu_read_unlock(), the find_vpid() was not. The documentation for find_vpid() clearly states: "Must be called with the tasklist_lock or rcu_read_lock() held." Add proper rcu_read_lock/unlock() to ...
```diff diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index b0eb721fcfb5..289ff0caa83e 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -3318,7 +3318,9 @@ int bpf_uprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr } if (pid) { + rcu_read_lock(); ...
774a1fa880bc949d88b5ddec9494a13be733dfa8
Analyze and fix the following issue in the Linux kernel code: s390/pci: Serialize device addition and removal
Problem Details: Prior changes ensured that when zpci_release_device() is called and it removed the zdev from the zpci_list this instance can not be found via the zpci_list anymore even while allowing re-add of reserved devices. This only accounts for the overall lifetime and zpci_list addition and removal, it does not...
```diff diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 4602abd0c6f1..cd6676c2d602 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -45,6 +45,7 @@ /* list of all detected zpci devices */ static LIST_HEAD(zpci_list); static DEFINE_SPINLOCK(zpci_list_lock); +static DEFINE_MUTEX(zpci_add_remov...
4b1815a52d7eb03b3e0e6742c6728bc16a4b2d1d
Analyze and fix the following issue in the Linux kernel code: s390/pci: Allow re-add of a reserved but not yet removed device
Problem Details: The architecture assumes that PCI functions can be removed synchronously as PCI events are processed. This however clashes with the reference counting of struct pci_dev which allows device drivers to hold on to a struct pci_dev reference even as the underlying device is removed. To bridge this gap comm...
```diff diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 9fcc6d3180f2..4602abd0c6f1 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -70,6 +70,13 @@ EXPORT_SYMBOL_GPL(zpci_aipb); struct airq_iv *zpci_aif_sbv; EXPORT_SYMBOL_GPL(zpci_aif_sbv); +void zpci_zdev_put(struct zpci_dev *zdev) +{ + i...
47c397844869ad0e6738afb5879c7492f4691122
Analyze and fix the following issue in the Linux kernel code: s390/pci: Prevent self deletion in disable_slot()
Problem Details: As disable_slot() takes a struct zpci_dev from the Configured to the Standby state. In Standby there is still a hotplug slot so this is not usually a case of sysfs self deletion. This is important because self deletion gets very hairy in terms of locking (see for example recover_store() in arch/s390/pc...
```diff diff --git a/drivers/pci/hotplug/s390_pci_hpc.c b/drivers/pci/hotplug/s390_pci_hpc.c index 055518ee354d..3d26d273f29d 100644 --- a/drivers/pci/hotplug/s390_pci_hpc.c +++ b/drivers/pci/hotplug/s390_pci_hpc.c @@ -66,9 +66,9 @@ static int disable_slot(struct hotplug_slot *hotplug_slot) rc = zpci_deconfigure_de...
d76f9633296785343d45f85199f4138cb724b6d2
Analyze and fix the following issue in the Linux kernel code: s390/pci: Remove redundant bus removal and disable from zpci_release_device()
Problem Details: Remove zpci_bus_remove_device() and zpci_disable_device() calls from zpci_release_device(). These calls were done when the device transitioned into the ZPCI_FN_STATE_STANDBY state which is guaranteed to happen before it enters the ZPCI_FN_STATE_RESERVED state. When zpci_release_device() is called the d...
```diff diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 5bbdc4190b8b..9fcc6d3180f2 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -949,12 +949,6 @@ void zpci_release_device(struct kref *kref) WARN_ON(zdev->state != ZPCI_FN_STATE_RESERVED); - if (zdev->zbus->bus) - zpci_bus_remove_devi...
fd4b6c0fdf71d71f2bbc2f9aceb6f0814b4d93e2
Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: Make cirrus_dir const
Problem Details: The cirrus_dir pointer should be const data but was missing the second const needed to achieve this. I haven't marked this as a 'Fixes' because it isn't causing any bugs, it's only a code improvement. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250522...
```diff diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index e822979e6a19..3c580faab3b7 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -775,7 +775,7 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp, return ret; } -static const char *cirrus_dir = "ci...
e7f3d11567c2c79c4342791ba91c500b434ce147
Analyze and fix the following issue in the Linux kernel code: spi: loopback-test: fix up const pointer issue in rx_ranges_cmp()
Problem Details: When a list head is a const pointer, the list entry for that head also must remain a const pointer, otherwise we are just "throwing it away" for no good reason. Fix this up by properly marking these structures as const. Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@lin...
```diff diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 369cdb707fad..f02d56fd917d 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -494,8 +494,8 @@ struct rx_ranges { static int rx_ranges_cmp(void *priv, const struct list_head *a, const st...
2712a7d362904d0c4283ae91fac8cea6ecd6f9c2
Analyze and fix the following issue in the Linux kernel code: spi: gpio: fix const issue in spi_to_spi_gpio()
Problem Details: While the struct spi_device * passed into spi_to_spi_gpio() is a const one, the struct spi_bitbang * that is retrieved from the controller field in the spi_device is NOT a const pointer, as it is coming from the spi_controller_get_devdata() call, and then passed to container_of() which would strip off ...
```diff diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 405deb6677c1..ea5f1b10b79e 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -46,7 +46,7 @@ struct spi_gpio { static inline struct spi_gpio *__pure spi_to_spi_gpio(const struct spi_device *spi) { - const struct spi_bitbang *...
1007ae0d464ceb55a3740634790521d3543aaab9
Analyze and fix the following issue in the Linux kernel code: spi: use container_of_cont() for to_spi_device()
Problem Details: Some places in the spi core pass in a const pointer to a device and the default container_of() casts that away, which is not a good idea. Preserve the proper const attribute by using container_of_const() for to_spi_device() instead, which is what it was designed for. Note, this removes the NULL check ...
```diff diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 0ba5e49bace4..6e64f0193777 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -249,10 +249,7 @@ struct spi_device { static_assert((SPI_MODE_KERNEL_MASK & SPI_MODE_USER_MASK) == 0, "SPI_MODE_USER_MASK & SPI_MODE_KERN...
631b2af2f35737750af284be22e63da56bf20139
Analyze and fix the following issue in the Linux kernel code: PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()
Problem Details: In the pci_acpi_scan_root() function, when creating a PCI bus fails, we need to free up the previously allocated memory, which can avoid invalid memory usage and save resources. Fixes: 789befdfa389 ("arm64: PCI: Migrate ACPI related functions to pci-acpi.c") Signed-off-by: Zhe Qiao <qiaozhe@iscas.ac.c...
```diff diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index af370628e583..b78e0e417324 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -1676,24 +1676,19 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) return NULL; root_ops = kzalloc(sizeof(*root_ops), GFP_KERN...
249173e94dd5edef9e704f89513de7d9715ddf22
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: fix available_antennas setting
Problem Details: Check if available_antennas_tx and available_antennas_rx are already set during the per-chip initialization phase; otherwise, they could be overwritten with incorrect values. Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Signed-off-by: Shayne Chen <shayne.chen@mediatek...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index b88d7e10742e..e9605dc22291 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -449,8 +449,10 @@ mt76_phy_init(struct mt76_phy *phy, stru...
42cb27af34de4acf680606fad2c1f2932110591f
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix RX buffer size of MCU event
Problem Details: Some management frames are first processed by the firmware and then passed to the driver through the MCU event rings. In CONNAC3, event rings do not support scatter-gather and have a size limitation of 2048 bytes. If a packet sized between 1728 and 2048 bytes arrives from an event ring, the ring will h...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c index fe8cc1d3f738..c8bef0b2a144 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c @@ -531,7 +531,7 @@ int mt7996_dma_init(struct mt7996...
d5012734fc4bd5371e2e8dea8c2f3d28287573b8
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS
Problem Details: The maximum TX path and NSS may differ on a band. For example, one variant of the MT7992 has 5 TX paths and 4 NSS on the 5 GHz band. To address this, add orig_antenna_mask to record the maximum NSS and prevent setting an invalid NSS in mt7996_set_antenna(). Fixes: 69d54ce7491d ("wifi: mt76: mt7996: sw...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c index 7bfd19ed9594..87c6192b6384 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c @@ -310,6 +310,7 @@ int mt7996_eeprom_par...
80fda1cd7b0a1edd0849dc71403a070d0922118d
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
Problem Details: IEEE 802.11 fragmentation can only be applied to unicast frames. Therefore, drop fragments with multicast or broadcast RA. This patch addresses vulnerabilities such as CVE-2020-26145. Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com> Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Link:...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c index 771c16e8d10c..0dbd4662bc84 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c @@ -647,6 +647,14 @@ mt7996_mac_fill_rx(struct mt7996...
8b2f574845e33d02e7fbad2d3192a8b717567afa
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: set EHT max ampdu length capability
Problem Details: Set the max AMPDU length in the EHT MAC CAP. Without this patch, the peer station cannot obtain the correct capability, which prevents achieving peak throughput on the 2 GHz band. Fixes: 1816ad9381e0 ("wifi: mt76: mt7996: add max mpdu len capability") Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek....
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c index 5c545293f294..213c7bcd4ade 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c @@ -1326,6 +1326,9 @@ mt7996_init_eht_caps(struct...
5c78949fc7cd772d483a8abe126fe90937c0f002
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix beamformee SS field
Problem Details: Fix the beamformee SS field for the mt7996, mt7992 and mt7990 chipsets. For the mt7992, this value shall be set to 0x4, while the others shall be set to 0x3. Fixes: 5b20557593d4 ("wifi: mt76: connac: adjust phy capabilities based on band constraints") Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek....
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c index b77fa94df8c7..5c545293f294 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c @@ -1121,12 +1121,12 @@ mt7996_set_stream_he_txbf...
aa97ff5782cf01cf2163593e1f57bbde63a06047
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: ensure all MCU commands wait for response
Problem Details: Modify MCU command sending functions to wait for a response, ensuring consistent behavior across all commands and improves reliability by confirming that each command is processed successfully. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Micha...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index b19898aee64c..0a1a8dff3f9c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -783,7 +783,7 @@ int mt7925_mcu_fw_log_2_host(stru...
bd02eebfc0b3502fe8322cf229b4c801416d1007
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: refine the sniffer commnad
Problem Details: Remove a duplicate call to `mt76_mcu_send_msg` to fix redundant operations in the sniffer command handling. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250414013954.1...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index c45eec44d859..b19898aee64c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -2063,8 +2063,6 @@ int mt7925_mcu_set_sniffer(stru...
122f270aca2c86d7de264ab67161c845e0691d73
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: prevent multiple scan commands
Problem Details: Add a check to ensure only one scan command is active at a time by testing the MT76_HW_SCANNING state. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20250414013954.115177...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index eed2dd56b5d0..c45eec44d859 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -2840,6 +2840,9 @@ int mt7925_mcu_hw_scan(struct m...
efb95439c1477bbc955cacd0179c35e7861b437c
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init()
Problem Details: devm_ioremap() returns NULL on error. Currently, mt7915_mmio_wed_init() does not check for this case, which results in a NULL pointer dereference. Prevent null pointer dereference in mt7915_mmio_wed_init(). Fixes: 4f831d18d12d ("wifi: mt76: mt7915: enable WED RX support") Signed-off-by: Henry Martin ...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c index 876f0692850a..9c4d5cea0c42 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c @@ -651,6 +651,9 @@ int mt7915_mmio_wed_init(stru...
8f30e2b059757d8711a823e4c9c023db62a1d171
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
Problem Details: devm_ioremap() returns NULL on error. Currently, mt7996_mmio_wed_init() does not check for this case, which results in a NULL pointer dereference. Prevent null pointer dereference in mt7996_mmio_wed_init() Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support") Signed-off-by: Henry Martin <bsd...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c index 51dd9a5f83cc..30b40f4a91be 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c @@ -477,6 +477,9 @@ int mt7996_mmio_wed_init(stru...
7e1fcf687c2fb22ad25cf3fae322a37452f5f560
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: scan: Fix 'mlink' dereferenced before IS_ERR_OR_NULL check
Problem Details: Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202504011739.HvUKtUUe-lkp@intel.com/ Fixes: 3ba20af886d1 ("wifi: mt76: scan: set vif offchannel link for scanning/roc") Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>...
```diff diff --git a/drivers/net/wireless/mediatek/mt76/channel.c b/drivers/net/wireless/mediatek/mt76/channel.c index e7b839e74290..cc2d888e3f17 100644 --- a/drivers/net/wireless/mediatek/mt76/channel.c +++ b/drivers/net/wireless/mediatek/mt76/channel.c @@ -302,11 +302,13 @@ void mt76_put_vif_phy_link(struct mt76_phy ...
80834997154271da58fd69fa7fdfe8238750960e
Analyze and fix the following issue in the Linux kernel code: arm64: el2_setup.h: Make __init_el2_fgt labels consistent, again
Problem Details: Commit 5b39db6037e7 ("arm64: el2_setup.h: Rename some labels to be more diff-friendly") reworked the labels in __init_el2_fgt to say what's skipped rather than what the target location is. The exception was "set_fgt_" which is where registers are written. In reviewing the BRBE additions, Will suggested...
```diff diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h index ebceaae3c749..30f57b0334a3 100644 --- a/arch/arm64/include/asm/el2_setup.h +++ b/arch/arm64/include/asm/el2_setup.h @@ -204,19 +204,21 @@ orr x0, x0, #(1 << 62) .Lskip_spe_fgt_\@: + +.Lset_debug_fgt_\@: msr_s SYS_H...
a6ae7129819ad20788e610261246e71736543b8b
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
Problem Details: The current implementation maps the APR table using a fixed size, which can lead to incorrect mapping when the number of PFs and VFs varies. This patch corrects the mapping by calculating the APR table size dynamically based on the values configured in the APR_LMT_CFG register, ensuring accurate repres...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c index 3838c04b78c2..4a3370a40dd8 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c @@ -13,7 +13,6 @@ /* RVU LMT...
0eefa27b493306928d88af6368193b134c98fd64
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: Set LMT_ENA bit for APR table entries
Problem Details: This patch enables the LMT line for a PF/VF by setting the LMT_ENA bit in the APR_LMT_MAP_ENTRY_S structure. Additionally, it simplifies the logic for calculating the LMTST table index by consistently using the maximum number of hw supported VFs (i.e., 256). Fixes: 873a1e3d207a ("octeontx2-af: cn10k:...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c index 7fa98aeb3663..3838c04b78c2 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c @@ -15,13 +15,17 @@ #define ...
20a07782dacf7348a259efcc4a2ab56ecbe7aeb1
Analyze and fix the following issue in the Linux kernel code: drm/xe/vf: Fail migration recovery if fixups needed but platform not supported
Problem Details: The post-migration recovery needs to be fully implemented for a specific platform in order to make continuation of workloads possible. New platforms introduce changes which affect the recovery procedure, and without a clear verification of support this leads to errors with no straight forward error me...
```diff diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c index 2674fa948fda..46466932375c 100644 --- a/drivers/gpu/drm/xe/xe_sriov_vf.c +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c @@ -123,6 +123,15 @@ * | | | */ +static bo...
37240f703041439cd8a39abd670dbfc0e75b725c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: ASoC: admaif: Add missing properties
Problem Details: Add optional interconnect and iommu properties to admaif yaml. These properties are supported from Tegra186 SoC onwards. This fixes below dtbs_check error for Tegra194 and Tegra234: 'interconnect-names', 'interconnects', 'iommus' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Sheet...
```diff diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml index 15ab40aeab1e..bcecac5d9018 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml +++ b/Documentation/devicetree/bindings/sound/n...
cbeaa41dfe26b72639141e87183cb23e00d4b0dd
Analyze and fix the following issue in the Linux kernel code: objtool/rust: relax slice condition to cover more `noreturn` Rust functions
Problem Details: Developers are indeed hitting other of the `noreturn` slice symbols in Nova [1], thus relax the last check in the list so that we catch all of them, i.e. *_4core5slice5index22slice_index_order_fail *_4core5slice5index24slice_end_index_len_fail *_4core5slice5index26slice_start_index_len_fai...
```diff diff --git a/tools/objtool/check.c b/tools/objtool/check.c index b21b12ec88d9..f23bdda737aa 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -230,7 +230,8 @@ static bool is_rust_noreturn(const struct symbol *func) str_ends_with(func->name, "_7___rustc17rust_begin_unwind") || ...
ee1855582e5e0f8d73428875b91a30785bcc4b7c
Analyze and fix the following issue in the Linux kernel code: drm/bridge: fix build with CONFIG_OF=n
Problem Details: Commit 5164553d739e ("drm/bridge: add devm_drm_put_bridge()") adds two declarations for devm_drm_put_bridge(): 1) an inline declaration in the #else branch of '#if defined(CONFIG_OF)...' 2) one outside of the same #if This results in a build failure with CONFIG_OF=n: ../drivers/gpu/drm/drm_b...
```diff diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 464da28f9134..0af5db244db8 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -1311,8 +1311,6 @@ static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, return ERR_PTR(-ENODEV); } -static inline ...
d92f474420e5bb2c8b773a4fe9cf93b6051dc1ff
Analyze and fix the following issue in the Linux kernel code: regulator: bcm590xx: Rename BCM59056-specific data as such
Problem Details: Previously, the driver used the BCM590XX prefix for register data specific to the BCM59056. As we will be introducing other regulators to this driver as well, make the BCM59056-specific values use the BCM59056 prefix. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Reviewed-by: Stanislav Jakubek ...
```diff diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c index c2427ea16662..f35b2b72e46f 100644 --- a/drivers/regulator/bcm590xx-regulator.c +++ b/drivers/regulator/bcm590xx-regulator.c @@ -18,146 +18,11 @@ #include <linux/regulator/of_regulator.h> #include <linux/slab.h> ...
ae3392c0f12f179b969ce17856ed18bf8d69a35e
Analyze and fix the following issue in the Linux kernel code: counter: microchip-tcb-capture: Add watch validation support
Problem Details: The Timer Counter Block (TCB) exposes several kinds of events to the Counter framework, but not every event is meaningful on every hardware channel. Add a `watch_validate()` callback so userspace may register only the combinations actually supported: * Channel 0 (COUNTER_MCHP_EVCHN_CV, COUNTER_MCHP_EV...
```diff diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c index 1de3c50b9804..1a299d1f350b 100644 --- a/drivers/counter/microchip-tcb-capture.c +++ b/drivers/counter/microchip-tcb-capture.c @@ -337,6 +337,28 @@ static struct counter_comp mchp_tc_count_ext[] = { COUNTER_COM...
e279024617134c94fd3e37470156534d5f2b3472
Analyze and fix the following issue in the Linux kernel code: net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
Problem Details: Syzbot reported a slab-use-after-free with the following call trace: ================================================================== BUG: KASAN: slab-use-after-free in tipc_aead_encrypt_done+0x4bd/0x510 net/tipc/crypto.c:840 Read of size 8 at addr ffff88807a733000 by task kworker/1:0/25 Ca...
```diff diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index c524421ec652..8584893b4785 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -817,12 +817,16 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb, goto exit; } + /* Get net to avoid freed tipc_crypto when delete names...
184fb40f731bd3353b0887731f7caba66609e9cd
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: Avoid adding dcbnl_ops for LBK and SDP vf
Problem Details: Priority flow control is not supported for LBK and SDP vf. This patch adds support to not add dcbnl_ops for LBK and SDP vf. Fixes: 8e67558177f8 ("octeontx2-pf: PFC config support with DCBx") Signed-off-by: Suman Ghosh <sumang@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patc...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c index 7ef3ba477d49..9b28be4c4a5d 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c @@ -729,9 +729,12 @@ static int o...
3f981138109f63232a5fb7165938d4c945cc1b9d
Analyze and fix the following issue in the Linux kernel code: sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Problem Details: When enqueuing the first packet to an HFSC class, hfsc_enqueue() calls the child qdisc's peek() operation before incrementing sch->q.qlen and sch->qstats.backlog. If the child qdisc uses qdisc_peek_dequeued(), this may trigger an immediate dequeue and potential packet drop. In such cases, qdisc_tree_re...
```diff diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index cb8c525ea20e..7986145a527c 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -1569,6 +1569,9 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) return err; } + sch->qstats.backlog += len; + sch->q....
ec8c1b92eaec3efebff717b5c13da3b5e87f2dcc
Analyze and fix the following issue in the Linux kernel code: i2c: atr: Fix lockdep for nested ATRs
Problem Details: When we have an ATR, and another ATR as a subdevice of the first ATR, we get lockdep warnings for the i2c_atr.lock and i2c_atr_chan.orig_addrs_lock. This is because lockdep uses a static key for the locks, and doesn't see the locks of the separate ATR instances as separate. Fix this by generating a dy...
```diff diff --git a/drivers/i2c/i2c-atr.c b/drivers/i2c/i2c-atr.c index 4f78e75b63a0..9ec167876106 100644 --- a/drivers/i2c/i2c-atr.c +++ b/drivers/i2c/i2c-atr.c @@ -68,11 +68,13 @@ struct i2c_atr_alias_pool { * @atr: The parent I2C ATR * @chan_id: The ID of this channel * @alias_pairs_lock: ...