id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
75400f8d6e36afc88d59db8a1f3e4b7d90d836ad
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix random data corruption for sdma 7
Problem Details: There is random data corruption caused by const fill, this is caused by write compression mode not correctly configured. So correct compression mode for const fill. Signed-off-by: Frank Min <Frank.Min@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexande...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c index 24f24974ac1d..d2ce6b6a7ff6 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c @@ -51,6 +51,12 @@ MODULE_FIRMWARE("amdgpu/sdma_7_0_1.bin"); #define SDMA0_HYP_DEC_REG_E...
418b93a74d95ba26f7500f7f998d612661577ac6
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: 3.2.306
Problem Details: This version brings along following fixes: - Fix dcn401 idle optimization problem - Fix cursor corruption on dcn35 - Fix DP LL compliance failures - Fix SubVP Phantom VBlank End calculation Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Wayne Li...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 6ba167d4c785..6d76dc110d38 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -55,7 +55,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
6c5bb04858105f3ad346bf4af5617ae6c9ea0085
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add a Precise Delay Routine
Problem Details: Fix DP compliance failures 4.2.2.12, 4.3.1.21, 4.9.1.19 caused by imprecise delay on fsleep(). Reviewed-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deu...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c index a42c56a57253..754c895e1bfb 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link...
8a79f7cdbb41bb0ddfd4d7662b4428d4a9d5306d
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: temp w/a for DP Link Layer compliance
Problem Details: [Why&How] Disabling P-State support on full updates for DCN401 results in introducing additional communication with SMU. A UCLK hard min message to SMU takes 4 seconds to go through, which was due to DCN not allowing pstate switch, which was caused by incorrect value for TTU watermark before blanking t...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index 8eaf292bc4eb..b0fea0856866 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -46,6 +46,...
9b47278cec98e9894adf39229e91aaf4ab9140c5
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: temp w/a for dGPU to enter idle optimizations
Problem Details: [Why&How] vblank immediate disable currently does not work for all asics. On DCN401, the vblank interrupts never stop coming, and hence we never get a chance to trigger idle optimizations. Add a workaround to enable immediate disable only on APUs for now. This adds a 2-frame delay for triggering idle ...
```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 8fdef03b04a1..cc2d34333bfa 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -8389,7 +8389,8 @@ static void manage_dm_i...
86b5be6ea20a9c8f4b23bf4377be48e5d7facfcb
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add hpd_source index check for dcn401 link encoder setup
Problem Details: This patch adds a boundary check for the hpd_source index during the link encoder creation process for all dcn401 ip. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Rodrigo Siqueira ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c index 46feff9348d9..b425b34dc7f5 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn...
a3fc44b98043df7a843e43eb217bc937f3d7a9d8
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add hpd_source index check for dcn10 link encoder setup
Problem Details: This patch adds a boundary check for the hpd_source index during the link encoder creation process for all dcn10 ip. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Rodrigo Siqueira <...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c index 563c5eec83ff..05d6d41ef9d3 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_reso...
7c8fb3b8e9ba7e1aeb98a96640d62adc44809383
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add hpd_source index check for DCE60/80/100/110/112/120 link encoders
Problem Details: This patch adds a boundary check for the hpd_source index during the link encoder creation process for all DCExxx IP's. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Rodrigo Siqueir...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c b/drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c index 8db9f7514466..889f314cac65 100644 --- a/drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c @@ -717,7 +717,7 @@ static st...
785504dd7fa108c15d87278fa426d55086c8babf
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Use SPX as default in partition config
Problem Details: In certain cases - ex: when a reset is required on initialization - XCP manager won't have a valid partition mode. In such cases, use SPX as the default selected mode for which partition configuration details are populated. Fixes: 4ae86dc87850 ("drm/amdgpu: Add sysfs nodes to get xcp details") Signed-...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c index 111bf897e72e..83a16918ea76 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c @@ -606,7 +606,7 @@ void amdgpu_xcp_cfg_sysfs_init(struct amdgpu_device *adev) { s...
40d7299c72666e0ec21426ded2a5c8abec36c35b
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Ensure HPD source index is valid for dcn20/dcn201 link encoders
Problem Details: This patch adds a boundary check for the hpd_source index during the link encoder creation process for dcn20/dcn201 IP's. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Rodrigo Sique...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c index eea2b3b307cd..288189913e1e 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_reso...
df9174ef4a7cbb162891ea4dc1252a451bc05772
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix spelling mistake "tunndeling" -> "tunneling"
Problem Details: There is a spelling mistake in a dm_error message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c index 518e5d1f3d90..e05b8fddf2af 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocol...
32f00289698189b813942f37626218fd473e7302
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amdgpu/gfx9: put queue resets behind a debug option"
Problem Details: This reverts commit 7c1a2d8aba6cadde0cc542b2d805edc0be667e79. Extended validation has completed successfully, so enable these features by default. Acked-by: Jiadong Zhu <Jiadong.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Jonathan Kim <jonathan.kim@amd.com> Cc: Jiadong Zh...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c index e216f49283e4..cc66ebb7bae1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c @@ -1131,10 +1131,6 @@ uint64_t kgd_gfx_v9_hq...
d2f57b6d8913df979a8cf719164c372b8e52c709
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/discovery: add ISP discovery entries for old APUs
Problem Details: Raven1/2 and Picasso have ISP 2.0.0, however their ISP blocks are not in the IP discovery table yet. This commit fixes this issue by adding new ISP entries for Raven and Picasso in the IP discovery table. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Zhu Lingshan <lingshan.zh...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index 9f9a1867da72..73f4d56c5de4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -2530,6 +2530,7 @@ int amdgpu_discovery_set_ip_blocks(stru...
c9b7c809b89f24e9372a4e7f02d64c950b07fdee
Analyze and fix the following issue in the Linux kernel code: drm/amd: Guard against bad data for ATIF ACPI method
Problem Details: If a BIOS provides bad data in response to an ATIF method call this causes a NULL pointer dereference in the caller. ``` ? show_regs (arch/x86/kernel/dumpstack.c:478 (discriminator 1)) ? __die (arch/x86/kernel/dumpstack.c:423 arch/x86/kernel/dumpstack.c:434) ? page_fault_oops (arch/x86/mm/fault.c:544 ...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c index f85ace0384d2..1f5a296f5ed2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -147,6 +147,7 @@ static union acpi_object *amdgpu_atif_call(struct amdgpu_atif...
94e6fdd028a12ff2abe7d915f8b6bbdb923cc04d
Analyze and fix the following issue in the Linux kernel code: clk: Allow kunit tests to run without OF_OVERLAY enabled
Problem Details: Some configurations want to enable CONFIG_KUNIT without enabling CONFIG_OF_OVERLAY. The kunit overlay code already skips if CONFIG_OF_OVERLAY isn't enabled, so these selects here aren't really doing anything besides making it easier to run the tests without them skipping. Remove the select and move the...
```diff diff --git a/drivers/clk/.kunitconfig b/drivers/clk/.kunitconfig index 54ece9207055..08e26137f3d9 100644 --- a/drivers/clk/.kunitconfig +++ b/drivers/clk/.kunitconfig @@ -1,5 +1,6 @@ CONFIG_KUNIT=y CONFIG_OF=y +CONFIG_OF_OVERLAY=y CONFIG_COMMON_CLK=y CONFIG_CLK_KUNIT_TEST=y CONFIG_CLK_FIXED_RATE_KUNIT_TEST...
92a22842ecd804d7ac456f8862f4b5f618cc53c3
Analyze and fix the following issue in the Linux kernel code: Input: userio - remove unneeded semicolon
Problem Details: Remove a redundant semicolon from the code. ./drivers/input/serio/userio.c:89:35-36: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11431 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/2...
```diff diff --git a/drivers/input/serio/userio.c b/drivers/input/serio/userio.c index 66c9838a1fa7..a54ddb2758b6 100644 --- a/drivers/input/serio/userio.c +++ b/drivers/input/serio/userio.c @@ -86,7 +86,7 @@ static int userio_char_open(struct inode *inode, struct file *file) return -ENOMEM; userio->serio->write...
51e32e897539663957f7a0950f66b48f8896efee
Analyze and fix the following issue in the Linux kernel code: clk: Provide devm_clk_bulk_get_all_enabled() helper
Problem Details: Commit 265b07df758a ("clk: Provide managed helper to get and enable bulk clocks") added devm_clk_bulk_get_all_enable() function, but missed to return the number of clocks stored in the clk_bulk_data table referenced by the clks argument. Without knowing the number, it's not possible to iterate these c...
```diff diff --git a/drivers/clk/clk-devres.c b/drivers/clk/clk-devres.c index 82ae1f26e634..5368d92d9b39 100644 --- a/drivers/clk/clk-devres.c +++ b/drivers/clk/clk-devres.c @@ -218,8 +218,8 @@ static void devm_clk_bulk_release_all_enable(struct device *dev, void *res) clk_bulk_put_all(devres->num_clks, devres->clks...
787ade24cc3af4a8ec9498c9cd8a6d47a4d86485
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-crd Rename "Twitter" to "Tweeter"
Problem Details: This makes the name consistent with both other x1e80100 devices and the dictionary. A UCM fix was merged already and is required in order for sound to work after this commit. Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-b...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts index 10b28d870f08..004353220dc5 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts @@ -177,9 +177,9 @@ compatible = "qcom,x1e80100-sndcard"; model = "X1E8...
6b3d104e52893493964a5eefa50dd0fdb472515a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm7325: Add device-tree for Nothing Phone 1
Problem Details: Add device tree for the Nothing Phone 1 (nothing,spacewar) smartphone which is based on the SM7325 SoC. Supported features are, as of now: * USB & UFS * Debug UART * Display via SimpleFB * Power & volume buttons * PMIC GLink * Remoteprocs (ADSP, CDSP, MPSS, WPSS) * WiFi & Bluetooth * IPA * VPU Iris (V...
```diff diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index 065bb19481c1..ac199f809b0d 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -236,6 +236,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm6375-sony-xperia-murray-pdx225.dtb dtb-$(CONFIG_ARCH_QCOM) ...
7e20ecc8de9354c1e8742d37f06e152549f4c439
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add Nothing Technology Limited
Problem Details: Add entry for Nothing Technology Limited (https://nothing.tech/) Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241020205615.211256-5-danila@jiaxyga.com Signed-off-by: Bjorn Andersson <andersson@kerne...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index b320a39de7fe..62493b41a157 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1045,6 +1045,8 @@ pat...
11cf9a72bc0b31c16d0cca7487966710a452b6e2
Analyze and fix the following issue in the Linux kernel code: soc: qcom: smem: Fix up kerneldoc
Problem Details: Fix warnings like: smem.c:504: warning: No description found for return value of 'qcom_smem_alloc' Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241021-topic-smem_kerneldoc-v1-1-4825904a7e25@...
```diff diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index e4411771f482..0d1ccf3ef108 100644 --- a/drivers/soc/qcom/smem.c +++ b/drivers/soc/qcom/smem.c @@ -499,6 +499,8 @@ static int qcom_smem_alloc_global(struct qcom_smem *smem, * * Allocate space for a given smem item of size @size, given that ...
e7f37a7d16310d3c9474825de26a67f00983ebea
Analyze and fix the following issue in the Linux kernel code: clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags
Problem Details: Allowing these GDSCs to collapse makes the QMP combo PHYs lose their configuration on machine suspend. Currently, the QMP combo PHY driver doesn't reinitialise the HW on resume. Under such conditions, the USB SuperSpeed support is broken. To avoid this, mark the pwrsts flags with RET_ON. This has been ...
```diff diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c index 81ba5ceab342..8ea25aa25dff 100644 --- a/drivers/clk/qcom/gcc-x1e80100.c +++ b/drivers/clk/qcom/gcc-x1e80100.c @@ -6155,7 +6155,7 @@ static struct gdsc gcc_usb3_mp_ss1_phy_gdsc = { .pd = { .name = "gcc_usb3_mp_ss1_phy_gdsc"...
0d214f27c0e3d9694284c95bac1502c2d247355b
Analyze and fix the following issue in the Linux kernel code: regulator: rk808: Restrict DVS GPIOs to the RK808 variant only
Problem Details: The rk808-regulator driver supports multiple PMIC variants from the Rockckip RK80x and RK81x series, but the DVS GPIOs are supported on the RK808 variant only, according to the DT bindings [1][2][3][4][5][6] and the datasheets for the supported PMIC variants. [7][8][9][10][11][12] Thus, change the pro...
```diff diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index f241bb538e27..76f9a426450d 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -1849,7 +1849,7 @@ static int rk808_regulator_dt_parse_pdata(struct device *dev, struct regmap *ma...
db7e59e6a39a4d3d54ca8197c796557e6d480b0d
Analyze and fix the following issue in the Linux kernel code: ASoC: qcom: sc7280: Fix missing Soundwire runtime stream alloc
Problem Details: Commit 15c7fab0e047 ("ASoC: qcom: Move Soundwire runtime stream alloc to soundcards") moved the allocation of Soundwire stream runtime from the Qualcomm Soundwire driver to each individual machine sound card driver, except that it forgot to update SC7280 card. Just like for other Qualcomm sound cards ...
```diff diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig index 3687b9db5ed4..ca7a30ebd26a 100644 --- a/sound/soc/qcom/Kconfig +++ b/sound/soc/qcom/Kconfig @@ -209,6 +209,7 @@ config SND_SOC_SC7280 tristate "SoC Machine driver for SC7280 boards" depends on I2C && SOUNDWIRE select SND_SOC_QCOM_COMMON + ...
1f97c03f43fadc407de5b5cb01c07755053e1c22
Analyze and fix the following issue in the Linux kernel code: bpf: Preserve param->string when parsing mount options
Problem Details: In bpf_parse_param(), keep the value of param->string intact so it can be freed later. Otherwise, the kmalloc area pointed to by param->string will be leaked as shown below: unreferenced object 0xffff888118c46d20 (size 8): comm "new_name", pid 12109, jiffies 4295580214 hex dump (first 8 bytes): ...
```diff diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index d8fc5eba529d..9aaf5124648b 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -880,7 +880,7 @@ static int bpf_parse_param(struct fs_context *fc, struct fs_parameter *param) const struct btf_type *enum_t; const char *enum_pfx; u64 *dele...
d0ccf760a405d243a49485be0a43bd5b66ed17e2
Analyze and fix the following issue in the Linux kernel code: spi: geni-qcom: Fix boot warning related to pm_runtime and devres
Problem Details: During boot, users sometimes observe the following warning: [7.841431] WARNING: CPU: 4 PID: 492 at drivers/interconnect/core.c:685 __icc_enable (drivers/interconnect/core.c:685 (discriminator 7)) [..] [7.841541] Call trace: [7.841542] __icc_enable (drivers/interconnect/core.c:685 (discriminator 7)) [7...
```diff diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c index f6e40f90418f..768d7482102a 100644 --- a/drivers/spi/spi-geni-qcom.c +++ b/drivers/spi/spi-geni-qcom.c @@ -1116,6 +1116,11 @@ static int spi_geni_probe(struct platform_device *pdev) init_completion(&mas->tx_reset_done); init_complet...
387285530d1d4bdba8c5dff5aeabd8d71638173f
Analyze and fix the following issue in the Linux kernel code: samples/landlock: Fix port parsing in sandboxer
Problem Details: If you want to specify that no port can be bind()ed, you would think (looking quickly at both help message and code) that setting LL_TCP_BIND="" would do it. However the code splits on ":" then applies atoi(), which does not allow checking for errors. Passing an empty string returns 0, which is interp...
```diff diff --git a/samples/landlock/sandboxer.c b/samples/landlock/sandboxer.c index f847e832ba14..4cbef9d2f15b 100644 --- a/samples/landlock/sandboxer.c +++ b/samples/landlock/sandboxer.c @@ -60,6 +60,25 @@ static inline int landlock_restrict_self(const int ruleset_fd, #define ENV_SCOPED_NAME "LL_SCOPED" #define E...
28e848386b92645f93b9f2fdba5882c3ca7fb3e2
Analyze and fix the following issue in the Linux kernel code: rust: block: fix formatting of `kernel::block::mq::request` module
Problem Details: Fix several issues with rustdoc formatting for the `kernel::block::mq::Request` module, in particular: - An ordered list not rendering correctly, fixed by using numbers prefixes instead of letters. - Code snippets formatted as regular text, fixed by wrapping the code with `back-ticks`. ...
```diff diff --git a/rust/kernel/block/mq/request.rs b/rust/kernel/block/mq/request.rs index a0e22827f3f4..7943f43b9575 100644 --- a/rust/kernel/block/mq/request.rs +++ b/rust/kernel/block/mq/request.rs @@ -16,50 +16,55 @@ use core::{ sync::atomic::{AtomicU64, Ordering}, }; -/// A wrapper around a blk-mq `struc...
233679b58c0bfe7bafeb6e048b90af08bb9e7fc1
Analyze and fix the following issue in the Linux kernel code: RAS/AMD/ATL: Add debug prints for DF register reads
Problem Details: The ATL will fail early if the DF register access fails due to missing PCI IDs in the amd_nb code. There aren't any clear indicators on why the ATL will fail to load in this case. Add a couple of debug print statements to highlight reasons for failure. A common scenario is missing support for new har...
```diff diff --git a/drivers/ras/amd/atl/access.c b/drivers/ras/amd/atl/access.c index ee4661ed28ba..c2334f8f9add 100644 --- a/drivers/ras/amd/atl/access.c +++ b/drivers/ras/amd/atl/access.c @@ -70,12 +70,16 @@ static int __df_indirect_read(u16 node, u8 func, u16 reg, u8 instance_id, u32 *l u32 ficaa = 0; node = ...
88bc63d00eb6defb661b9fd79957660b4dfa4b50
Analyze and fix the following issue in the Linux kernel code: perf tools: Do not set exclude_guest for precise_ip
Problem Details: It seems perf sets the exclude_guest bit because of Intel PEBS implementation which uses a virtual address. IIUC now kernel disables PEBS when it goes to the guest mode regardless of this bit so we don't need to set it explicitly. At least for the other archs/vendors. I found the commit 1342798cc13e...
```diff diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 727683f249f6..82a19674a38f 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -898,8 +898,7 @@ static int test__group1(struct evlist *evlist) TEST_ASSERT_VAL("wrong exclude_user", !evsel->c...
d9e0970f77b92b0e2afff5e4a9e379bc9885df56
Analyze and fix the following issue in the Linux kernel code: perf tools: Simplify evsel__add_modifier()
Problem Details: Since it doesn't set the exclude_guest, no need to special handle the bit and simply show only if one of host or guest bit is set. Now the default event name might not have :H prefix anymore so change the dlfilter test not to compare the ":" at the end. Reviewed-by: Ian Rogers <irogers@google.com> Re...
```diff diff --git a/tools/perf/dlfilters/dlfilter-test-api-v0.c b/tools/perf/dlfilters/dlfilter-test-api-v0.c index 4083b1abeaab..4ca2d7b2ea6c 100644 --- a/tools/perf/dlfilters/dlfilter-test-api-v0.c +++ b/tools/perf/dlfilters/dlfilter-test-api-v0.c @@ -220,7 +220,7 @@ static int check_sample(struct filter_data *d, co...
bb6e7cb11d97ce1957894d30d13bfad3e8bfefe9
Analyze and fix the following issue in the Linux kernel code: perf tools: Add fallback for exclude_guest
Problem Details: Commit 7b100989b4f6bce70 ("perf evlist: Remove __evlist__add_default") changed to parse "cycles:P" event instead of creating a new cycles event for perf record. But it also changed the way how modifiers are handled so it doesn't set the exclude_guest bit by default. It seems Apple M1 PMU requires exc...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 7639ecda6c05..c12158d99353 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -640,8 +640,7 @@ static enum counter_recovery stat_handle_error(struct evsel *counter) * (behavior changed with commit b0a873e). */ ...
59766286b6e54f8ad334dcef7d2e743b7550df0e
Analyze and fix the following issue in the Linux kernel code: selftests: livepatch: save and restore kprobe state
Problem Details: Save the state of /sys/kernel/debug/kprobes/enabled during setup_config() and restore it during cleanup(). This is in preparation for a future commit that will add a test that should confirm that we cannot livepatch a kprobed function if that kprobe has a post handler. Signed-off-by: Michael Vetter <...
```diff diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index 7bdfe668127b..e5d06fb40233 100644 --- a/tools/testing/selftests/livepatch/functions.sh +++ b/tools/testing/selftests/livepatch/functions.sh @@ -6,7 +6,10 @@ MAX_RETRIES=600 RETRY_INTERVAL=".1" ...
637c730998b8f440dc5d0c6bae254fbf19143ea4
Analyze and fix the following issue in the Linux kernel code: selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
Problem Details: This naming makes more sense according to the directory structure. Especially when we later add more paths. Addtionally replace `/sys/kernel/livepatch` with `$SYSFS_KLP_DIR` in the livepatch test files. Signed-off-by: Michael Vetter <mvetter@suse.com> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Revi...
```diff diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index fc4c6a016d38..7bdfe668127b 100644 --- a/tools/testing/selftests/livepatch/functions.sh +++ b/tools/testing/selftests/livepatch/functions.sh @@ -6,7 +6,7 @@ MAX_RETRIES=600 RETRY_INTERVAL=".1" #...
5a02413a4586a7cfa10b7380377138e66db9df4b
Analyze and fix the following issue in the Linux kernel code: PCI: cpqphp: Simplify PCI_ScanBusForNonBridge()
Problem Details: PCI_ScanBusForNonBridge() has two loops, one to search for non-bridges and a second to look for bridges. The second loop has hints in a debug print it should do recursion for buses underneath the bridge, but no recursion is attempted. Since the second loop is quite useless in its current form, just el...
```diff diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 558866c15e03..ef7534a3ca40 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c @@ -12,8 +12,11 @@ * */ +#define pr_fmt(fmt) "cpqphp: " fmt + #include <linux/module.h> #include <linux/k...
e2226dbc4a4919d9c8bd9293299b532090bdf020
Analyze and fix the following issue in the Linux kernel code: PCI: cpqphp: Fix PCIBIOS_* return value confusion
Problem Details: Code in and related to PCI_RefinedAccessConfig() has three types of return type confusion: - PCI_RefinedAccessConfig() tests pci_bus_read_config_dword() return value against -1. - PCI_RefinedAccessConfig() returns both -1 and PCIBIOS_* return codes. - Callers of PCI_RefinedAccessConfig() only ...
```diff diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c index 718bc6cf12cb..974c7db3265b 100644 --- a/drivers/pci/hotplug/cpqphp_pci.c +++ b/drivers/pci/hotplug/cpqphp_pci.c @@ -135,11 +135,13 @@ int cpqhp_unconfigure_device(struct pci_func *func) static int PCI_RefinedAccessConfig(str...
1d81d85d1a19e50d5237dc67d6b825c34ae13de8
Analyze and fix the following issue in the Linux kernel code: x86/microcode/AMD: Split load_microcode_amd()
Problem Details: This function should've been split a long time ago because it is used in two paths: 1) On the late loading path, when the microcode is loaded through the request_firmware interface 2) In the save_microcode_in_initrd() path which collects all the microcode patches which are relevant for the curr...
```diff diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index 1ae36ab37fe8..31a73715d755 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -584,7 +584,7 @@ void __init load_ucode_amd_bsp(struct early_load_data *ed, unsigned int cpuid_1_ ...
ca68ce0d9f4bcd032fd1334441175ae399642a06
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix warning when unbinding
Problem Details: If there is an error during some initialization related to firmware, the buffers dp->tx_ring[i].tx_status are released. However this is released again when the device is unbinded (ath12k_pci), and we get: WARNING: CPU: 0 PID: 2098 at mm/slub.c:4689 free_large_kmalloc+0x4d/0x80 Call Trace: free_large_km...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c index 959bc516f8b8..c99e9ceb1a6e 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -1286,8 +1286,10 @@ void ath12k_dp_free(struct ath12k_base *ab) ath12k_dp_rx_reo_cmd_list_...
1304446f67863385dc4c914b6e0194f6664ee764
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix crash when unbinding
Problem Details: If there is an error during some initialization related to firmware, the function ath12k_dp_cc_cleanup is called to release resources. However this is released again when the device is unbinded (ath12k_pci), and we get: BUG: kernel NULL pointer dereference, address: 0000000000000020 at RIP: 0010:ath12k...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c index 1125362bfea6..959bc516f8b8 100644 --- a/drivers/net/wireless/ath/ath12k/dp.c +++ b/drivers/net/wireless/ath/ath12k/dp.c @@ -1250,6 +1250,7 @@ static void ath12k_dp_cc_cleanup(struct ath12k_base *ab) } kfree(dp->...
fd01ace1140476e97f1801a26e8e96a5626e3385
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: remove msdu_end structure for WCN7850
Problem Details: Currently, when ath12k retrieves values from the structure rx_msdu_end_wcn7850, the information obtained is incorrect. This is because the definition of the rx_msdu_end_wcn7850 structure in ath12k is incorrect. In fact, the rx_msdu_end structure used by WCN7850 is the same as the rx_msdu_end structure ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c index ca04bfae8bdc..fd98fac16dd5 100644 --- a/drivers/net/wireless/ath/ath12k/hal.c +++ b/drivers/net/wireless/ath/ath12k/hal.c @@ -385,13 +385,13 @@ static u8 ath12k_hw_qcn9274_rx_desc_get_msdu_pkt_type(struct hal_rx_des...
67373ca8404fe57eb1bb4b57f314cff77ce54932
Analyze and fix the following issue in the Linux kernel code: jfs: Fix sanity check in dbMount
Problem Details: MAXAG is a legitimate value for bmp->db_numag Fixes: e63866a47556 ("jfs: fix out-of-bounds in dbNextAG() and diAlloc()") Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
```diff diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 974ecf5e0d95..3ab410059dc2 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -187,7 +187,7 @@ int dbMount(struct inode *ipbmap) } bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag); - if (!bmp->db_numag || bmp->db_numag >= MAXAG) { + if (!bmp->d...
d1744a4c975b1acbe8b498356d28afbc46c88428
Analyze and fix the following issue in the Linux kernel code: x86/microcode/AMD: Pay attention to the stepping dynamically
Problem Details: Commit in Fixes changed how a microcode patch is loaded on Zen and newer but the patch matching needs to happen with different rigidity, depending on what is being done: 1) When the patch is added to the patches cache, the stepping must be ignored because the driver still supports different steppin...
```diff diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index f63b051f25a0..1ae36ab37fe8 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -613,16 +613,19 @@ static int __init save_microcode_in_initrd(void) } early_initcall(save_microc...
96a9fe64bfd486ebeeacf1e6011801ffe89dae18
Analyze and fix the following issue in the Linux kernel code: block: fix ordering between checking BLK_MQ_S_STOPPED request adding
Problem Details: Supposing first scenario with a virtio_blk driver. CPU0 CPU1 blk_mq_try_issue_directly() __blk_mq_issue_directly() q->mq_ops->queue_rq() virtio_queue_rq() blk_mq_stop_hw_queue() virtblk_done() blk_mq_request_bypass_insert() 1) ...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index bb4ee2380dce..022653320c18 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2438,6 +2438,12 @@ void blk_mq_start_stopped_hw_queue(struct blk_mq_hw_ctx *hctx, bool async) return; clear_bit(BLK_MQ_S_STOPPED, &hctx->state); + /* + * Pairs with the smp_...
6bda857bcbb86fb9d0e54fbef93a093d51172acc
Analyze and fix the following issue in the Linux kernel code: block: fix ordering between checking QUEUE_FLAG_QUIESCED request adding
Problem Details: Supposing the following scenario. CPU0 CPU1 blk_mq_insert_request() 1) store blk_mq_unquiesce_queue() blk_queue_flag_clear() 3) store blk_mq_run_hw_queues() ...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index 5deb9dffca0a..bb4ee2380dce 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2227,6 +2227,24 @@ void blk_mq_delay_run_hw_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs) } EXPORT_SYMBOL(blk_mq_delay_run_hw_queue); +static inline bool blk_mq_hw_queu...
2003ee8a9aa14d766b06088156978d53c2e9be3d
Analyze and fix the following issue in the Linux kernel code: block: fix missing dispatching request when queue is started or unquiesced
Problem Details: Supposing the following scenario with a virtio_blk driver. CPU0 CPU1 CPU2 blk_mq_try_issue_directly() __blk_mq_issue_directly() q->mq_ops->queue_rq() virtio_queue_rq() blk_mq_stop_hw_queue() virt...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index 7d05a56e3639..5deb9dffca0a 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2647,6 +2647,7 @@ static void blk_mq_try_issue_directly(struct blk_mq_hw_ctx *hctx, if (blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(rq->q)) { blk_mq_insert_request(rq, 0)...
732312e1836b9bd80828cda6417df203c1d94218
Analyze and fix the following issue in the Linux kernel code: Revert "blk-throttle: Fix IO hang for a corner case"
Problem Details: This reverts commit 5b7048b89745c3c5fb4b3080fb7bced61dba2a2b. The main purpose of this patch is cleanup. The throtl_adjusted_limit function was removed after commit bf20ab538c81 ("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW"), so the problem of not being able to scale after setting bps or iops ...
```diff diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 2c4192e12efa..443d1f47c2ce 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1485,13 +1485,13 @@ static ssize_t tg_set_limit(struct kernfs_open_file *of, goto out_finish; ret = -EINVAL; - if (!strcmp(tok, "rbps") && val > 1)...
148e6968f6789e42a318ce7d11ea506d75567c1d
Analyze and fix the following issue in the Linux kernel code: block: set issue time stamp based on queue state
Problem Details: A previous commit moved RQF_IO_STAT into blk_account_io_done(), where it's being set rather than at allocation time. Unfortunately we do check for that flag in blk_mq_rq_time_init(), and hence setting the start_time_ns wasn't being done. This lead to unwieldy inflight IO counts and times, as IO complet...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index b249514c2d63..9a3a9a370618 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -331,7 +331,7 @@ EXPORT_SYMBOL(blk_rq_init); /* Set start and alloc time when the allocated request is actually used */ static inline void blk_mq_rq_time_init(struct request *rq, u...
75f49c3dc7b7423d3734f2e4dabe3dac8d064338
Analyze and fix the following issue in the Linux kernel code: btrfs: fix passing 0 to ERR_PTR in btrfs_search_dir_index_item()
Problem Details: The ret may be zero in btrfs_search_dir_index_item() and should not passed to ERR_PTR(). Now btrfs_unlink_subvol() is the only caller to this, reconstructed it to check ERR_PTR(-ENOENT) while ret >= 0. This fixes smatch warnings: fs/btrfs/dir-item.c:353 btrfs_search_dir_index_item() warn: passing z...
```diff diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index 001c0c2f872c..1e8cd7c9472e 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c @@ -347,8 +347,8 @@ btrfs_search_dir_index_item(struct btrfs_root *root, struct btrfs_path *path, return di; } /* Adjust return code if the key was not found...
3c36a72c1d27de6618c1c480c793d9924640f5bb
Analyze and fix the following issue in the Linux kernel code: btrfs: reject ro->rw reconfiguration if there are hard ro requirements
Problem Details: [BUG] Syzbot reports the following crash: BTRFS info (device loop0 state MCS): disabling free space tree BTRFS info (device loop0 state MCS): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1) BTRFS info (device loop0 state MCS): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (...
```diff diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3f8673f97432..926d7a9ed99d 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1507,8 +1507,7 @@ static int btrfs_reconfigure(struct fs_context *fc) sync_filesystem(sb); set_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state); - if (!mount_reconfi...
e684f02492f99d6f6f037a35a613607339cf8e8f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix the pcie refclock oscillator on Rock 5 ITX
Problem Details: The Rock 5 ITX uses two PCIe controllers to drive both a M.2 slot and its SATA controller with 2 lanes each. The supply for the refclk oscillator is the same that supplies the M.2 slot, but the SATA controller port is supplied by a different rail. This leads to the effect that if the PCIe30x4 controll...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts index e4e6c23c6684..6d68f70284e4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts @@ -72,6 +72,15 @@ }; }; + /* Unna...
7a2339058ed71f54c1e12e1b3c25aab1b1ba7943
Analyze and fix the following issue in the Linux kernel code: btrfs: fix read corruption due to race with extent map merging
Problem Details: In debugging some corrupt squashfs files, we observed symptoms of corrupt page cache pages but correct on-disk contents. Further investigation revealed that the exact symptom was a correct page followed by an incorrect, duplicate, page. This got us thinking about extent maps. commit ac05ca913e9f ("Btr...
```diff diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 25d191f1ac10..668c617444a5 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -243,13 +243,19 @@ static bool mergeable_maps(const struct extent_map *prev, const struct extent_ma /* * Handle the on-disk data extents merge for @pre...
b99ac7e2a1cc53e5588cd63c3882d1fc724fe322
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Drop rockchip prefix of s-p-c PMIC prop from rk356x
Problem Details: Property 'rockchip,system-power-controller' was deprecated in commit 961748bb1555 ("dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller") in the "rockchip,rk{805,808,809,817,818}.yaml" mtd bindings and its replacement is (just) 'system-power-controller'. Update the rk356x DT files whi...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lckfb-tspi.dts b/arch/arm64/boot/dts/rockchip/rk3566-lckfb-tspi.dts index 7cd91f8000cb..ed65d3120444 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lckfb-tspi.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-lckfb-tspi.dts @@ -245,7 +245,7 @@ interrupts = <RK_P...
5a49e05b2926fb2ee85eb778783eaf2436438259
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Drop rockchip prefix of s-p-c PMIC prop from rk3399
Problem Details: Property 'rockchip,system-power-controller' was deprecated in commit 961748bb1555 ("dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller") in the "rockchip,rk{805,808,809,817,818}.yaml" mtd bindings and its replacement is (just) 'system-power-controller'. Update the rk3399 DT files whi...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts b/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts index 80150ff25e02..fe069770f346 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts @@ -309,7 +309,7 @@ interrupts = <21 IRQ_T...
f10f59f91a6278e9637327d1206140d28e2d5004
Analyze and fix the following issue in the Linux kernel code: btrfs: fix the delalloc range locking if sector size < page size
Problem Details: Inside lock_delalloc_folios(), there are several problems related to sector size < page size handling: - Set the writer locks without checking if the folio is still valid We call btrfs_folio_start_writer_lock() just like it's folio_lock(). But since the folio may not even be the folio of the curre...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 309a8ae48434..872cca54cc6c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -262,22 +262,23 @@ static noinline int lock_delalloc_folios(struct inode *inode, for (i = 0; i < found_folios; i++) { struct folio *folio = fbatch.fo...
e24b9355738105e2b97cc3159a68fca9f1baf863
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Drop rockchip prefix of s-p-c PMIC prop from rk3368
Problem Details: Property 'rockchip,system-power-controller' was deprecated in commit 961748bb1555 ("dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller") in the "rockchip,rk{805,808,809,817,818}.yaml" mtd bindings and its replacement is (just) 'system-power-controller'. Update the rk3368 DT files whi...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts index 029b8e22e709..03ebf66e9bfc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +++ b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts @@ -113,7 +113,7 @@ pinctrl-0 = <&pmic_int>, <&pmi...
cdb98af8c23cf525f08375365e6eb743866586a8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Drop rockchip prefix of s-p-c PMIC prop from rk3328
Problem Details: Property 'rockchip,system-power-controller' was deprecated in commit 961748bb1555 ("dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller") in the "rockchip,rk{805,808,809,817,818}.yaml" mtd bindings and its replacement is (just) 'system-power-controller'. Update the rk3328 DT files whi...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts index 824183e515da..9406a887652d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328-a1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-a1.dts @@ -159,7 +159,7 @@ interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>; pinct...
c84fe61583d77cafa9a59fb0825bfd71692e6a1f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Drop rockchip prefix of s-p-c PMIC prop from px30
Problem Details: Property 'rockchip,system-power-controller' was deprecated in commit 961748bb1555 ("dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller") in the "rockchip,rk{805,808,809,817,818}.yaml" mtd bindings and its replacement is (just) 'system-power-controller'. Update the px30 DT files which...
```diff diff --git a/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core.dtsi b/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core.dtsi index 5eecbefa8a33..dd715d22d4d2 100644 --- a/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core.dtsi @@ -50,7 +50,7 @@...
2320c9e6a768d135c7b0039995182bb1a4e4fd22
Analyze and fix the following issue in the Linux kernel code: drm/sched: memset() 'job' in drm_sched_job_init()
Problem Details: drm_sched_job_init() has no control over how users allocate struct drm_sched_job. Unfortunately, the function can also not set some struct members such as job->sched. This could theoretically lead to UB by users dereferencing the struct's pointer members too early. It is easier to debug such issues i...
```diff diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index dab8cca79eb7..2e0e5a9577d1 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -796,6 +796,14 @@ int drm_sched_job_init(struct drm_sched_job *job, return -EINVAL;...
d811ac148f0afd2f3f7e1cd7f54de8da973ec5e3
Analyze and fix the following issue in the Linux kernel code: virtchnl: fix m68k build.
Problem Details: The kernel test robot reported a build failure on m68k in the intel driver due to the recent shapers-related changes. The mentioned arch has funny alignment properties, let's be explicit about the binary layout expectation introducing a padding field. Fixes: 608a5c05c39b ("virtchnl: support queue rat...
```diff diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h index 223e433c39fe..13a11f3c09b8 100644 --- a/include/linux/avf/virtchnl.h +++ b/include/linux/avf/virtchnl.h @@ -1499,6 +1499,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_queue_chunk); struct virtchnl_quanta_cfg { u16 quanta_size; + u1...
bd5ee6bcc51b617d28e54069fef818751763962b
Analyze and fix the following issue in the Linux kernel code: rust: miscdevice: add missing safety comments
Problem Details: This fixes the following four warnings: warning: unsafe block missing a safety comment --> /home/aliceryhl/rust-for-linux/rust/kernel/miscdevice.rs:168:15 | 168 | ..unsafe { MaybeUninit::zeroed().assume_init() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
```diff diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs index 50885fb511bf..7e2a79b3ae26 100644 --- a/rust/kernel/miscdevice.rs +++ b/rust/kernel/miscdevice.rs @@ -165,6 +165,7 @@ const fn create_vtable<T: MiscDevice>() -> &'static bindings::file_operations { } else { No...
df606be44c168417604a708e3d895f94b262d407
Analyze and fix the following issue in the Linux kernel code: drm/imx: legacy-bridge: add MODULE_DESCRIPTION
Problem Details: Every module should have a description, without this we get a build time warning. Fixes: cc3e8a216d6b ("drm/imx: add internal bridge handling display-timings DT node") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Robert Foss <r...
```diff diff --git a/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c index 07a78a02a884..3ebf0b9866de 100644 --- a/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c +++ b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c @@ -85,3 +85,4 @@ struct drm_bridge *devm_imx_drm_legacy_...
ef214002e6b38c428cb2b973951c254ba3260de6
Analyze and fix the following issue in the Linux kernel code: drm/imx: parallel-display: add legacy bridge Kconfig dependency
Problem Details: The driver now uses the legacy bridge helper code but can be configured to get built without it: ERROR: modpost: "devm_imx_drm_legacy_bridge" [drivers/gpu/drm/imx/ipuv3/parallel-display.ko] undefined! Add the required dependency, same as in the ldb driver. Fixes: f94b9707a1c9 ("drm/imx: parallel-dis...
```diff diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 0ea1feb84672..acaf25089001 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -15,6 +15,7 @@ config DRM_IMX_PARALLEL_DISPLAY depends on DRM_IMX select DRM_BRIDGE select DRM_BRIDG...
655c6c1b7afe6d29f386f415594ee643e5e3d755
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: Fix color format MACROs in OVL
Problem Details: In commit 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL"), some new color formats are defined in the MACROs to make the switch statement more concise. That commit was intended to be a no-op cleanup. However, there are typos in these formats MACROs, which cause the return value to be i...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 9786ce94de0e..e0c0bb01f65a 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -65,8 +65,8 @@ #define OVL_CON_CLRFMT_RGB (1 << 12) #define OVL_CON_CLRFMT_ARGB8...
333ab43616ff46694b46b4137acd0e19dc291a7f
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: ovl: Add blend_modes to driver data
Problem Details: OVL_CON_CLRFMT_MAN is a configuration for extending color format settings of DISP_REG_OVL_CON(n). It will change some of the original color format settings. Take the settings of (3 << 12) for example. - If OVL_CON_CLRFMT_MAN = 0 means OVL_CON_CLRFMT_RGBA8888. - If OVL_CON_CLRFMT_MAN = 1 means OVL_CON_...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 1ccb700858cf..fab23b1904bd 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -146,6 +146,7 @@ struct mtk_disp_ovl_data { bool fmt_rgb565_is_0; bool smi_id_...
41607c3ceb0e527e0985387bc41bbf291dc9a3d8
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: ovl: Remove the color format comment for ovl_fmt_convert()
Problem Details: Since we changed MACROs to be consistent with DRM input color format naming, the comment for ovl_fmt_conver() is no longer needed. Fixes: 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL") Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Re...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 0d3a9c5e8d26..1ccb700858cf 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -389,11 +389,6 @@ void mtk_ovl_layer_off(struct device *dev, unsigned int idx, st...
995d4d558eea79f8d2e8e46d0914c3940b7463ac
Analyze and fix the following issue in the Linux kernel code: drm/mediatek: ovl: Fix XRGB format breakage for blend_modes unsupported SoCs
Problem Details: OVL_CON_AEN is for alpha blending enable. For the SoC that is supported the blend_modes, OVL_CON_AEN will always enabled to use constant alpha and then use the ignore_pixel_alpha bit to do the alpha blending for XRGB8888 format. Note that ignore pixel alpha bit is not supported if the SoC is not suppor...
```diff diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 89b439dcf3a6..047cd1796a51 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -473,8 +473,14 @@ void mtk_ovl_layer_config(struct device *dev, unsigned int idx, ...
f9417fcfca3c5e30a0b961e7250fab92cfa5d123
Analyze and fix the following issue in the Linux kernel code: KMSAN: uninit-value in inode_go_dump (5)
Problem Details: When mounting of a corrupted disk image fails, the error message printed can reference uninitialized inode fields. To prevent that from happening, always initialize those fields. Reported-by: syzbot+aa0730b0a42646eb1359@syzkaller.appspotmail.com Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com> Si...
```diff diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index e22c1edc32b3..b9cef63c7871 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1537,11 +1537,13 @@ static struct inode *gfs2_alloc_inode(struct super_block *sb) if (!ip) return NULL; ip->i_no_addr = 0; + ip->i_no_formal_ino = 0; ip->i_flags = 0; ...
af8512c5277d17aae09be5305daa9118d2fa8881
Analyze and fix the following issue in the Linux kernel code: xfs: don't fail repairs on metadata files with no attr fork
Problem Details: Fix a minor bug where we fail repairs on metadata files that do not have attr forks because xrep_metadata_inode_subtype doesn't filter ENOENT. Cc: stable@vger.kernel.org # v6.8 Fixes: 5a8e07e799721b ("xfs: repair the inode core and forks of a metadata inode") Signed-off-by: Darrick J. Wong <djwong@ker...
```diff diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index 67478294f11a..155bbaaa496e 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -1084,9 +1084,11 @@ xrep_metadata_inode_forks( return error; /* Make sure the attr fork looks ok before we delete it. */ - error = xrep_metadata_in...
8a7d12d674ac6f2147c18f36d1e15f1a48060edf
Analyze and fix the following issue in the Linux kernel code: net: usb: usbnet: fix name regression
Problem Details: The fix for MAC addresses broke detection of the naming convention because it gave network devices no random MAC before bind() was called. This means that the check for the local assignment bit was always negative as the address was zeroed from allocation, instead of from overwriting the MAC with a uni...
```diff diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index ee1b5fd7b491..44179f4e807f 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1767,7 +1767,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) // can rename the link if it knows better. ...
f7b4cf0306bbea500a613e4b618576452c1df4ba
Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum_router: fix xa_store() error checking
Problem Details: It is meant to use xa_err() to extract the error encoded in the return value of xa_store(). Fixes: 44c2fbebe18a ("mlxsw: spectrum_router: Share nexthop counters in resilient groups") Signed-off-by: Yuan Can <yuancan@huawei.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Przemek Kitszel ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 800dfb64ec83..7d6d859cef3f 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -3197,7 +3197,6 @@ mlxsw_s...
f260c442676310329b8b4482d3be59fe0e742220
Analyze and fix the following issue in the Linux kernel code: arm64: preserve pt_regs::stackframe during exec*()
Problem Details: When performing an exec*(), there's a transient period before the return to userspace where any stacktrace will result in a warning triggered by kunwind_next_frame_record_meta() encountering a struct frame_record_meta with an unknown type. This can be seen fairly reliably by enabling KASAN or KFENCE, e...
```diff diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 03b99164f7f4..e277105fb87a 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -285,22 +285,44 @@ void tls_preserve_current_state(void); .fpsimd_cpu = NR_CPUS, \ } -static in...
d10f1a4e44c3bf874701f86f8cc43490e1956acf
Analyze and fix the following issue in the Linux kernel code: net: stmmac: Programming sequence for VLAN packets with split header
Problem Details: Currently reset state configuration of split header works fine for non-tagged packets and we see no corruption in payload of any size We need additional programming sequence with reset configuration to handle VLAN tagged packets to avoid corruption in payload for packets of size greater than 256 bytes...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index 93a78fd0737b..28fff6cab812 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -44,6 +44,7 @@ #define GMAC_MDIO_DATA 0x00000204 #define G...
04e82100156d33dc8aebdc5a400375ba2ca3c3c1
Analyze and fix the following issue in the Linux kernel code: drm/i915/ddi: use string choice helpers
Problem Details: Use str_enabled_disabled string helpers for better readability and to fix cocci warning. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202410071601.TFpXoqgW-lkp@intel.com/ Signed-off-by: R Sundar <prosunofficial@gmail...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index fe1ded6707f9..ff4c633c8546 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -2236,7 +2236,7 @@ static void intel_dp_sink_set_fec_ready(struct intel_dp *in...
df6bbcb19ff8d3e659537e1ca0cba054df5fb1bb
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: use string choice helpers
Problem Details: Use str_on_off string helpers for better readability and to fix cocci warning. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202410071252.cWILJzrH-lkp@intel.com/ Signed-off-by: R Sundar <prosunofficial@gmail.com> Link...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 7e04913bc2ff..6aba1d03a9d2 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2476,7 +2476,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_...
cdf771ab476bd9acb0948f3088a277d5c3cacc6b
Analyze and fix the following issue in the Linux kernel code: thermal: core: Fix race between zone registration and system suspend
Problem Details: If the registration of a thermal zone takes place at the time when system suspend is started, thermal_pm_notify() can run before the new thermal zone is added to thermal_tz_list and its "suspended" flag will not be set. Consequently, if __thermal_zone_device_update() is called for that thermal zone, i...
```diff diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index f43fc7b54a91..d1f5c165c561 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -40,6 +40,8 @@ static DEFINE_MUTEX(thermal_governor_lock); static struct thermal_governor *def_governor; +static ...
7837fa8115e0273d3cfbd3d17b3f7b7291ceac08
Analyze and fix the following issue in the Linux kernel code: thermal: core: Mark thermal zones as initializing to start with
Problem Details: After thermal_zone_device_register_with_trips() has called device_register() and it has registered the new thermal zone device with the driver core, user space may access its sysfs attributes and, among other things, it may enable the thermal zone before it is ready. To address this, introduce a new t...
```diff diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 225fa8ec6bee..f43fc7b54a91 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1334,6 +1334,16 @@ int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp) } EXPORT_SYMBOL_GPL(th...
26c9ab8090cda1eb3d42f491cc32d227404897da
Analyze and fix the following issue in the Linux kernel code: thermal: core: Represent suspend-related thermal zone flags as bits
Problem Details: Instead of using two separate fields in struct thermal_zone_device for representing flags related to thermal zone suspend, represent them explicitly as bits in one u8 "state" field. Subsequently, that field will be used for addressing race conditions related to thermal zone initialization and exit. N...
```diff diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index f54c2d2544a4..225fa8ec6bee 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -547,7 +547,7 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz, int low = -INT_MAX, high = INT_MA...
662f920f7e390db5d1a6792a2b0ffa59b6c962fc
Analyze and fix the following issue in the Linux kernel code: thermal: core: Initialize thermal zones before registering them
Problem Details: Since user space can start interacting with a new thermal zone as soon as device_register() called by thermal_zone_device_register_with_trips() returns, it is better to initialize the thermal zone before calling device_register() on it. Fixes: d0df264fbd3c ("thermal/core: Remove pointless thermal_zone...
```diff diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 1e87256e86be..03f5ac996a7a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1467,6 +1467,7 @@ thermal_zone_device_register_with_trips(const char *type, thermal_zone_destroy_device_groups(tz)...
98f3ac9ba0ec35ff276e6c64ac9f173efa27df78
Analyze and fix the following issue in the Linux kernel code: mm/page-writeback.c: Fix comment of wb_domain_writeout_add()
Problem Details: __bdi_writeout_inc() has undergone multiple renamings, but the comment within the function body have not been updated accordingly. Update it to reflect the latest wb_domain_writeout_add(). Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com> Link: https://lore.kernel.org/r/20241009151728.300477-3-yizho...
```diff diff --git a/mm/page-writeback.c b/mm/page-writeback.c index c7c6b58a8461..72a5d8836425 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -586,7 +586,7 @@ static void wb_domain_writeout_add(struct wb_domain *dom, /* First event after period switching was turned off? */ if (unlikely(!dom->period_...
80d3ab22277e6dea72c0715a6698d12f2682ec38
Analyze and fix the following issue in the Linux kernel code: fs/inode: Fix a typo
Problem Details: Fix a typo in comments: wether v-> whether. Signed-off-by: Andrew Kreimer <algonell@gmail.com> Link: https://lore.kernel.org/r/20241008121602.16778-1-algonell@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/inode.c b/fs/inode.c index 6b3ff38df7f7..d7a0c36e1ba6 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2669,7 +2669,7 @@ EXPORT_SYMBOL(inode_set_ctime_current); * @inode: inode to check * @vfsgid: the new/current vfsgid of @inode * - * Check wether @vfsgid is in the caller's group list or if t...
2714b0d1f36999dbd99a3474a24e7301acbd74f1
Analyze and fix the following issue in the Linux kernel code: fcntl: make F_DUPFD_QUERY associative
Problem Details: Currently when passing a closed file descriptor to fcntl(fd, F_DUPFD_QUERY, fd_dup) the order matters: fd = open("/dev/null"); fd_dup = dup(fd); When we now close one of the file descriptors we get: (1) fcntl(fd, fd_dup) // -EBADF (2) fcntl(fd_dup, fd) // 0 aka not equal depending o...
```diff diff --git a/fs/fcntl.c b/fs/fcntl.c index 22dd9dcce7ec..3d89de31066a 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -397,6 +397,9 @@ static long f_dupfd_query(int fd, struct file *filp) { CLASS(fd_raw, f)(fd); + if (fd_empty(f)) + return -EBADF; + /* * We can do the 'fdput()' immediately, as the only t...
6474353a5e3d0b2cf610153cea0c61f576a36d0a
Analyze and fix the following issue in the Linux kernel code: epoll: annotate racy check
Problem Details: Epoll relies on a racy fastpath check during __fput() in eventpoll_release() to avoid the hit of pointlessly acquiring a semaphore. Annotate that race by using WRITE_ONCE() and READ_ONCE(). Link: https://lore.kernel.org/r/66edfb3c.050a0220.3195df.001a.GAE@google.com Link: https://lore.kernel.org/r/202...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 1ae4542f0bd8..90fbab6b6f03 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -823,7 +823,8 @@ static bool __ep_remove(struct eventpoll *ep, struct epitem *epi, bool force) to_free = NULL; head = file->f_ep; if (head->first == &epi->fllink && !epi->fllin...
a081908ba4a534ad0f1961291850b3cba85bdc53
Analyze and fix the following issue in the Linux kernel code: drm/xe: fix build failure originating from backmerge
Problem Details: ../drivers/gpu/drm/xe/display/xe_display.c: In function ‘xe_display_pm_shutdown’: ../drivers/gpu/drm/xe/display/xe_display.c:382:27: error: passing argument 1 of ‘intel_dmc_suspend’ from incompatible pointer type [-Werror=incompatible-pointer-types] 382 | intel_dmc_suspend(xe); | ...
```diff diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 957ae763531d..ca00a365080f 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -379,7 +379,7 @@ void xe_display_pm_shutdown(struct xe_device *xe) intel_opreg...
295416091e44806760ccf753aeafdafc0ae268f3
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier()
Problem Details: The scmi_dev->name is released prematurely in __scmi_device_destroy(), which causes slab-use-after-free when accessing scmi_dev->name in scmi_bus_notifier(). So move the release of scmi_dev->name to scmi_device_release() to avoid slab-use-after-free. | BUG: KASAN: slab-use-after-free in strncmp+0xe...
```diff diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index 96b2e5f9a8ef..157172a5f2b5 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -325,7 +325,10 @@ EXPORT_SYMBOL_GPL(scmi_driver_unregister); static void scmi_device_release(struct device *dev...
3ccddc3991beef2705e8097b01ae07054bf11022
Analyze and fix the following issue in the Linux kernel code: drm/fbdev: fix drm_fb_helper_deferred_io() build failure
Problem Details: The drm_fb_helper_deferred_io() uses struct fb_deferred_io_pageref, which isn't available without CONFIG_FB_DEFERRED_IO. Put the function under corresponding #ifdef to fix build failure if deferred I/O isn't enabled. Fixes: 8058944f5226 ("drm/fbdev: Select fbdev I/O helpers from modules that require t...
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index d5e8994345bb..c9008113111b 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -697,6 +697,7 @@ void drm_fb_helper_damage_area(struct fb_info *info, u32 x, u32 y, u32 width, u3 } EXPORT_SYMBO...
05123e3299dd6aa02508469b303262338c2a661c
Analyze and fix the following issue in the Linux kernel code: interconnect: qcom: icc-rpmh: probe defer incase of missing QoS clock dependency
Problem Details: Return -EPROBE_DEFER from interconnect provider incase probe defer is received from devm_clk_bulk_get_all(). This would help in reattempting the inteconnect driver probe, once the required QoS clocks are available. Suggested-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Raviteja Laggyshett...
```diff diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c index f49a8e0cb03c..adacd6f7d6a8 100644 --- a/drivers/interconnect/qcom/icc-rpmh.c +++ b/drivers/interconnect/qcom/icc-rpmh.c @@ -311,6 +311,9 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev) } qp->num_clks ...
339cb28b9ee6679aea359620b0508170d815a1b1
Analyze and fix the following issue in the Linux kernel code: eeprom: at24: add ST M24256E Additional Write lockable page support
Problem Details: The ST M24256E behaves as a regular M24C256, except for the E variant which uses up another I2C address for Additional Write lockable page. This page is 64 Bytes long and can contain additional data. Add entry for it, so users can describe that page in DT. Note that users still have to describe the mai...
```diff diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index ca872e3465ed..0a7c7f29406c 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -207,6 +207,8 @@ AT24_CHIP_DATA(at24_data_24cs64, 16, AT24_FLAG_ADDR16 | AT24_FLAG_SERIAL | AT24_FLAG_READONLY); AT24_CHIP_DATA(at2...
89d671dbb1e49836cf2420fab9f74e9aa2b5dad2
Analyze and fix the following issue in the Linux kernel code: dt-bindings: at24: add ST M24256E Additional Write lockable page support
Problem Details: The ST M24256E behaves as a regular M24C256, except for the E variant which uses up another I2C address for Additional Write lockable page. This page is 64 Bytes long and can contain additional data. Add entry for it, so users can describe that page in DT. Note that users still have to describe the mai...
```diff diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml index b6239ec3512b..590ba0ef5fa2 100644 --- a/Documentation/devicetree/bindings/eeprom/at24.yaml +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml @@ -141,6 +141,8 @@ properties: ...
a5c45d49932a856fa709027cbc07a9060f2960bc
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6sll: fix anatop thermal dtbs_check warnings
Problem Details: Fix anatop thermal related dtbs_check warnings about node name and missing thermal-cells property. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi index ddeb5b37fb78..85fe2a4ab97a 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6sll.dtsi @@ -525,7 +525,7 @@ anatop-enable-bit = <0>; }; - tempmon: temperature-se...
aff1871bfc81e9dffa7d2a77e67cc5441cc37f81
Analyze and fix the following issue in the Linux kernel code: objpool: fix choosing allocation for percpu slots
Problem Details: objpool intends to use vmalloc for default (non-atomic) allocations of percpu slots and objects. However, the condition checking if GFP flags set any bit of GFP_ATOMIC is wrong b/c GFP_ATOMIC is a combination of bits (__GFP_HIGH|__GFP_KSWAPD_RECLAIM) and so `pool->gfp & GFP_ATOMIC` will be true if eith...
```diff diff --git a/lib/objpool.c b/lib/objpool.c index 234f9d0bd081..fd108fe0d095 100644 --- a/lib/objpool.c +++ b/lib/objpool.c @@ -76,7 +76,7 @@ objpool_init_percpu_slots(struct objpool_head *pool, int nr_objs, * mimimal size of vmalloc is one page since vmalloc would * always align the requested size to pa...
393271aa712a5b6292ae9122eec8e1b789a382b6
Analyze and fix the following issue in the Linux kernel code: arm64: dts: colibri-imx8x: Fix typo "rewritting"
Problem Details: There is a spelling mistake of 'rewritting' in comments which should be 'rewriting'. Suggested-by: Simon Horman <horms@kernel.org> Signed-off-by: WangYuli <wangyuli@uniontech.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi index 4ea47a576b1c..d5abfdb8ede2 100644 --- a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi @@ -698,7 +698,7 @@ /* * This pin is used ...
4fbb73416b10778adfd2c1319e9c5829780d8535
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz
Problem Details: The LVDS panel on this device uses 72.4 MHz pixel clock, set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB serializer and LCDIFv3 scanout engine can reach accurate pixel clock of exactly 72.4 MHz. Without this patch, the Video PLL1 frequency is the default set in imx8mp.dtsi which is 1039.5 MHz...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts index 50debe821c42..9c102acb8052 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts @...
8a00ce563c30ea86707344614430e7909068d98c
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-dhcom-pdk2: Fill in missing panel power-supply
Problem Details: Add missing panel power-supply property to DT to fix the following warning. The power supply on this device is very simple chain of regulators from the main 24V input, describe those. " arch/arm/boot/dts/nxp/imx/imx6q-dhcom-pdk2.dtb: panel: 'power-supply' is a required property " Signed-off-by: Marek...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-dhcom-pdk2.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-dhcom-pdk2.dtsi index 773fdcfcd001..d7c2b30aecfd 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-dhcom-pdk2.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-dhcom-pdk2.dtsi @@ -143,6 +143,7 @@ panel { backlight = ...
eab6ba2aa3bbaf598a66e31f709bf84b7bb7dc8a
Analyze and fix the following issue in the Linux kernel code: arm64: dts: imx8mp: correct sdhc ipg clk
Problem Details: The ipg clk for sdhc sources from IPG_CLK_ROOT per i.MX 8M Plus Applications Processor Reference Manual, Table 5-2. System Clocks. Fixes: 6d9b8d20431f ("arm64: dts: freescale: Add i.MX8MP dtsi support") Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-o...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index f3531cfb0d79..40e847bc0b7f 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1261,7 +1261,7 @@ compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc...
1fd79762a943785b1e4e54eab6c7aed02d78c814
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-colibri: Update audio card name
Problem Details: Update the audio card name for Colibri iMX6 to match its specific SoM name, making it less than 15 characters to fix the following warning fsl-asoc-card sound: ASoC: driver name too long 'imx6dl-colibri-sgtl5000' -> 'imx6dl-colibri-' making it compliant with the ALSA configuration specification [1]. ...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-colibri.dtsi index b01670cdd52c..9f33419c260b 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-colibri.dtsi @@ -136,7 +136,7 @@ "LINE_IN", "Line In Jack", "M...
20fb48894fa91d3c51739caf027f2e990cdd7fd4
Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx6qdl-apalis: Update audio card name
Problem Details: Update the audio card name for Apalis iMX6 to match its specific SoM name, making it less than 15 characters to fix the following warning fsl-asoc-card sound: ASoC: driver name too long 'imx6q-apalis-sgtl5000' -> 'imx6q-apalis-sg' making it compliant with the ALSA configuration specification [1]. Wh...
```diff diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi index edf55760a5c1..1c72da417011 100644 --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi @@ -191,7 +191,7 @@ "MIC_IN", "Mic Jack", "Mic Jack",...
c2ee9f594da826bea183ed14f2cc029c719bf4da
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Fix build on on non-x86 architectures
Problem Details: Commit 9a400068a158 ("KVM: selftests: x86: Avoid using SSE/AVX instructions") unconditionally added -march=x86-64-v2 to the CFLAGS used to build the KVM selftests which does not work on non-x86 architectures: cc1: error: unknown value ‘x86-64-v2’ for ‘-march’ Fix this by making the addition of this...
```diff diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index e6b7e01d5708..156fbfae940f 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -244,11 +244,13 @@ CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ -...
a360f311f57a36e96d88fa8086b749159714dcd2
Analyze and fix the following issue in the Linux kernel code: 9p: fix slab cache name creation for real
Problem Details: This was attempted by using the dev_name in the slab cache name, but as Omar Sandoval pointed out, that can be an arbitrary string, eg something like "/dev/root". Which in turn trips verify_dirent_name(), which fails if a filename contains a slash. So just make it use a sequence counter, and make it ...
```diff diff --git a/net/9p/client.c b/net/9p/client.c index 9e7b9151816d..09f8ced9f8bb 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -977,6 +977,7 @@ error: struct p9_client *p9_client_create(const char *dev_name, char *options) { int err; + static atomic_t seqno = ATOMIC_INIT(0); struct p9_client *clnt;...
8a5cd986023547b3499072e17ff1ddae2c7c66a4
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: add ipv4 and dual ipv4/ipv6 support in btf_skc_cls_ingress
Problem Details: btf_skc_cls_ingress test currently checks that syncookie and bpf_sk_assign/release helpers behave correctly in multiple scenarios, but only with ipv6 socket. Increase those helpers coverage by adding testing support for IPv4 sockets and IPv4/IPv6 sockets. The rework is mostly based on features brought...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c index 426c9d5402fa..29b946d84816 100644 --- a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c +++ b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c @...
2190df6c91373fdec6db9fc07e427084f232f57e
Analyze and fix the following issue in the Linux kernel code: cgroup/bpf: only cgroup v2 can be attached by bpf programs
Problem Details: Only cgroup v2 can be attached by bpf programs, so this patch introduces that cgroup_bpf_inherit and cgroup_bpf_offline can only be called in cgroup v2, and this can fix the memleak mentioned by commit 04f8ef5643bc ("cgroup: Fix memory leak caused by missing cgroup_bpf_offline"), which has been reverte...
```diff diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 5c6d32054e07..0758bf0c9468 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2140,8 +2140,10 @@ int cgroup_setup_root(struct cgroup_root *root, u16 ss_mask) if (ret) goto exit_stats; - ret = cgroup_bpf_inherit(root_cgrp...