id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
382dd7d23d1af3be58f07c9fabd571b760a3aff1
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Setup MTYPE on SOC models for GFX 12.1
Problem Details: Fix it to apply for all models. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Alex Sierra <alex.sierra@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c index 86c084678093..695f3cf05b6f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c @@ -482,7 +482,6 @@ static void gmc_v12_1_get_vm_pde(struct amdgpu_device *adev, int leve...
1a856863b6f2830cb4561865cf5a8e28ae58a9f5
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: adjust xcc_cp_resume function for gfx_v12_1
Problem Details: Adjust gfx_v12_1_xcc_cp_resume function to program cp resume per xcc_id (logic xcc number) to fix for xcp_resume. V2: Allocate compute microcode bo when sw init Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd....
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c index c2b931183164..c43f9a9fe662 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c @@ -89,6 +89,7 @@ static void gfx_v12_1_update_perf_clk(struct amdgpu_device *adev, ...
03a4c89db2ff0caf208e72425280b96762a7ac38
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix a couple of spelling mistakes
Problem Details: There are a couple of spelling mistakes, one in a pr_warn message and one in a seq_printf message. Fix these. 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/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 2f66ebb5b029..adffa44fff2c 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -830,7 +830,7 @@ int kfd_create_process_sysfs(struct kfd_process *process) i...
d8ccbb5e228b093eba19027a281274e7faf2da4c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Describe @AMD_IP_BLOCK_TYPE_RAS in amd_ip_block_type enum
Problem Details: Sphinx reports kernel-doc warning: WARNING: ./drivers/gpu/drm/amd/include/amd_shared.h:113 Enum value 'AMD_IP_BLOCK_TYPE_RAS' not described in enum 'amd_ip_block_type' Describe the value to fix it. Fixes: 7169e706c82d ("drm/amdgpu: Add ras module ip block to amdgpu discovery") Signed-off-by: Bagas S...
```diff diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h index 17945094a138..ac2d3701e2bd 100644 --- a/drivers/gpu/drm/amd/include/amd_shared.h +++ b/drivers/gpu/drm/amd/include/amd_shared.h @@ -89,6 +89,7 @@ enum amd_apu_flags { * @AMD_IP_BLOCK_TYPE_VPE: Video Processin...
b1e2a6a57aa95f8192e8edb9edaecfd326745d32
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Don't use kernel-doc comment in dc_register_software_state struct
Problem Details: Sphinx reports kernel-doc warning: WARNING: ./drivers/gpu/drm/amd/display/dc/dc.h:2796 This comment starts with '/**', but isn't a kernel-doc comment. Refer to Documentation/doc-guide/kernel-doc.rst * Software state variables used to program register fields across the display pipeline Don't use kern...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index f1036a06b778..30e913607aea 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -2854,7 +2854,7 @@ void dc_get_underflow_debug_data_for_otg(struct dc *dc, int primary_otg_inst, s...
b490ddf27be28e64a39c08ae643d7b22561beaf6
Analyze and fix the following issue in the Linux kernel code: remoteproc: imx_dsp_rproc: Only reset carveout memory at RPROC_OFFLINE state
Problem Details: Do not reset memory at suspend and resume stage, because some memory is used to save the software state for resume, if it is cleared, the resume operation can fail. Fixes: c4c432dfb00f ("remoteproc: imx_dsp_rproc: Add support of recovery and coredump process") Signed-off-by: Shengjiu Wang <shengjiu.wa...
```diff diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index 8426d7af9c75..008741af9f11 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -1000,9 +1000,11 @@ static int imx_dsp_rproc_load(struct rproc *rproc, const struct firmware *fw) *...
e97e3e31d898833b2396310056cbf82e23956b36
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Update the maintainers for ARM64 ACPI
Problem Details: ARM64 ACPI patches go via ARM64 tree, but the listed maintainers for ARM64 ACPI don't include Catalin and Will, and there is no F: line under the ARM64 architecture entry, so emails will not route to Catalin and Will in an automatic way. Adding Catalin and Will to the maintainers entry for ARM64 ACPI ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 5b11839cba9d..6050d94a50ec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -335,6 +335,8 @@ ACPI FOR ARM64 (ACPI/arm64) M: Lorenzo Pieralisi <lpieralisi@kernel.org> M: Hanjun Guo <guohanjun@huawei.com> M: Sudeep Holla <sudeep.holla@arm.com> +M: Catalin Marinas <cata...
dc717e24deb4e626f4ad4896dd722815ef32311a
Analyze and fix the following issue in the Linux kernel code: ARM: omap1: drop unused Kconfig symbol
Problem Details: "select ARCH_HAS_HOLES_MEMORYMODEL" was mistakenly merged here due to a botched rebase (says Arnd [1]). Drop that line since that symbol is not used anywhere else in the kernel source tree. [1] https://lore.kernel.org/all/5e335232-89b4-4c35-93bd-efad7e4d8995@app.fastmail.com/ Fixes: 7036440eab3e ("A...
```diff diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index 08ec6bd84ada..b114f7ca2173 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig @@ -4,7 +4,6 @@ menuconfig ARCH_OMAP1 depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 depends on CPU_LITTLE_ENDIAN depends on ATAGS ...
1e79c330713efba3f4200c80e4aa68d7393edfac
Analyze and fix the following issue in the Linux kernel code: ARM: dts: ti/omap: omap*: fix watchdog node names
Problem Details: Watchdog nodes should be named watchdog@ and not wdg@. Fix that. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20251224093457.558477-1-andreas@kemnade.info Signed-off-by: Kevin Hilman <khilman@baylibre.com>
```diff diff --git a/arch/arm/boot/dts/ti/omap/omap2430.dtsi b/arch/arm/boot/dts/ti/omap/omap2430.dtsi index b9a9e6e45266..222613d2a4d1 100644 --- a/arch/arm/boot/dts/ti/omap/omap2430.dtsi +++ b/arch/arm/boot/dts/ti/omap/omap2430.dtsi @@ -332,7 +332,7 @@ interrupts = <93>; }; - wd_timer2: wdt@49016000 { + wd...
93a04ab480c8bbcb7d9004be139c538c8a0c1bc8
Analyze and fix the following issue in the Linux kernel code: ARM: omap2: Fix reference count leaks in omap_control_init()
Problem Details: The of_get_child_by_name() function increments the reference count of child nodes, causing multiple reference leaks in omap_control_init(): 1. scm_conf node never released in normal/error paths 2. clocks node leak when checking existence 3. Missing scm_conf release before np in error paths Fix these ...
```diff diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 79860b23030d..eb6fc7c61b6e 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -732,7 +732,7 @@ int __init omap2_control_base_init(void) */ int __init omap_control_init(void) { - struct device_node...
3d43205d0efb4da3e799e969c92e70e4d9e4d124
Analyze and fix the following issue in the Linux kernel code: ARM: dts: Drop am335x-base0033 devicetree
Problem Details: Remove the am335x-base0033 devicetree as it has been non-functional since 2017 (Linunx v4.14) when the ti,tilcdc,slave binding was removed. The HDMI output on this board has been broken for over 8 years without any reported issues or attempts to fix it, indicating this devicetree is no longer in active...
```diff diff --git a/arch/arm/boot/dts/ti/omap/Makefile b/arch/arm/boot/dts/ti/omap/Makefile index 14e500846875..3f54b515c471 100644 --- a/arch/arm/boot/dts/ti/omap/Makefile +++ b/arch/arm/boot/dts/ti/omap/Makefile @@ -86,7 +86,6 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-baltos-ir2110.dtb \ am335x-baltos-ir3220.dtb \...
7966cf0ebe32c981bfa3db252cb5fc3bb1bf2e77
Analyze and fix the following issue in the Linux kernel code: PM: hibernate: Fix crash when freeing invalid crypto compressor
Problem Details: When crypto_alloc_acomp() fails, it returns an ERR_PTR value, not NULL. The cleanup code in save_compressed_image() and load_compressed_image() unconditionally calls crypto_free_acomp() without checking for ERR_PTR, which causes crypto_acomp_tfm() to dereference an invalid pointer and crash the kernel...
```diff diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 33a186373bef..8050e5182835 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -902,8 +902,11 @@ out_clean: for (thr = 0; thr < nr_threads; thr++) { if (data[thr].thr) kthread_stop(data[thr].thr); - acomp_request_free(data[thr]...
1ca8677d9f3491e51395b0e6b9a2b7a75089dc6f
Analyze and fix the following issue in the Linux kernel code: ACPI: PCI: IRQ: Fix INTx GSIs signedness
Problem Details: In ACPI Global System Interrupts (GSIs) are described using a 32-bit value. ACPI/PCI legacy interrupts (INTx) parsing code treats GSIs as 'int', which poses issues if the GSI interrupt value is a 32-bit value with the MSB set (as required in some interrupt configurations - eg ARM64 GICv5 systems) beca...
```diff diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index ad81aa03fe2f..c416942ff3e2 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -188,7 +188,7 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev, * the IRQ value, which is hardwired to specific inter...
df27c03b9e3ef2baa9e9c9f56a771d463a84489d
Analyze and fix the following issue in the Linux kernel code: PCI: meson: Report that link is up while in ASPM L0s and L1 states
Problem Details: Previously meson_pcie_link_up() only returned true if the link was in the L0 state. This was incorrect because hardware autonomously manages transitions between L0, L0s, and L1 while both components on the link stay in D0. Those states should all be treated as "link is active". Returning false when ...
```diff diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c index 54b6a4196f17..0694084f612b 100644 --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -37,7 +37,6 @@ #define PCIE_CFG_STATUS17 0x44 #define PM_CURRENT_STATE(x) (((x) >>...
10016118b6fade907143a32a7aeaa777063dc79c
Analyze and fix the following issue in the Linux kernel code: cxl/mem: Fix devm_cxl_memdev_edac_release() confusion
Problem Details: A device release method is only for undoing allocations on the path to preparing the device for device_add(). In contrast, devm allocations are post device_add(), are acquired during / after ->probe() and are released synchronous with ->remove(). So, a "devm" helper in a "release" method is a clear an...
```diff diff --git a/drivers/cxl/core/edac.c b/drivers/cxl/core/edac.c index 79994ca9bc9f..81160260e26b 100644 --- a/drivers/cxl/core/edac.c +++ b/drivers/cxl/core/edac.c @@ -1988,6 +1988,40 @@ static int cxl_memdev_soft_ppr_init(struct cxl_memdev *cxlmd, return 0; } +static void err_rec_free(void *_cxlmd) +{ + st...
a089d585a7f4fa85b5e1d78c5308e27a0d875b17
Analyze and fix the following issue in the Linux kernel code: coresight: tpda: add sysfs node to flush specific port
Problem Details: Setting bit i in the TPDA_FLUSH_CR register initiates a flush request for port i, forcing the data to synchronize and be transmitted to the sink device. Signed-off-by: Tao Zhang <tao.zhang@oss.qualcomm.com> Reviewed-by: James Clark <james.clark@linaro.org> Co-developed-by: Jie Gan <jie.gan@oss.qualcom...
```diff diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda index bd86e6fd961d..54f05964a360 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda @@ -59,3 ...
33f04ead7c498f29bca875783f13542e5ccd17ac
Analyze and fix the following issue in the Linux kernel code: coresight: tpda: add logic to configure TPDA_SYNCR register
Problem Details: The TPDA_SYNC counter tracks the number of bytes transferred from the aggregator. When this count reaches the value programmed in the TPDA_SYNCR register, an ASYNC request is triggered, allowing userspace tools to accurately parse each valid packet. Signed-off-by: Tao Zhang <tao.zhang@oss.qualcomm.com...
```diff diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda index acd354d7bdfa..bd86e6fd961d 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda @@ -41,3 ...
8e1c358a3b0e69eb527bb6723366b92e982235c3
Analyze and fix the following issue in the Linux kernel code: coresight: tpda: add global_flush_req sysfs node
Problem Details: Setting the global_flush_req register to 1 initiates a flush request for all enabled TPDA input ports. The register remains set until the flush operation is complete. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com> [ Fix kernel version in the Documentation ] Signed-off-by: Suzuki K Poulose <suzuki.p...
```diff diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda index 8519a08444ab..acd354d7bdfa 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda @@ -33,3 ...
f9cc5b5a9e9a84d423cdc48882f1c93f1f90a32b
Analyze and fix the following issue in the Linux kernel code: coresight: tpda: add sysfs nodes for tpda cross-trigger configuration
Problem Details: Introduce sysfs nodes to configure cross-trigger parameters for TPDA. These registers define the characteristics of cross-trigger packets, including generation frequency and flag values. Signed-off-by: Tao Zhang <tao.zhang@oss.qualcomm.com> Reviewed-by: James Clark <james.clark@linaro.org> Co-develope...
```diff diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda new file mode 100644 index 000000000000..8519a08444ab --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-tpda @@ -0,0 +1,35 @@ +What: /sys/bus/coresight/de...
1c6192ec9c4ab8bdb7b2cf8763b7ef7e38671ffe
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8750: Fix BAM DMA probing
Problem Details: Bindings always required "qcom,num-ees" and "num-channels" properties, as reported by dtbs_check: sm8750-mtp.dtb: dma-controller@1dc4000 (qcom,bam-v1.7.4): 'anyOf' conditional failed, one must be fixed: 'qcom,powered-remotely' is a required property 'num-channels' is a required property ...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8750.dtsi b/arch/arm64/boot/dts/qcom/sm8750.dtsi index 8a471b2349be..0a6f2a449c20 100644 --- a/arch/arm64/boot/dts/qcom/sm8750.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8750.dtsi @@ -2088,6 +2088,8 @@ <&apps_smmu 0x481 0>; qcom,ee = <0>; + qcom,num-ees = <4>; + ...
35c3dcb1ac2c7e347b38f3b0bccb0a2d1dbda25c
Analyze and fix the following issue in the Linux kernel code: syscall.h: Remove unused SYSCALL_MAX_ARGS
Problem Details: The "SYSCALL_MAX_ARGS" appears to have been unused since commit 32d92586629a ("syscalls: Remove start and number from syscall_set_arguments() args"), so remove it. Fixes: 32d92586629a ("syscalls: Remove start and number from syscall_set_arguments() args") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei....
```diff diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index 18b102a30741..574bbcc55382 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h @@ -92,8 +92,6 @@ static inline void syscall_set_nr(struct task_struct *task, (nr & __NR_SYSCALL_MASK); } -#define ...
a1a515c21dd70d1b761ccbf6efc9dd1ba6d26d77
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100-medion-sprchrgd-14-s1: correct firmware paths
Problem Details: Per the agreement, the firmware paths (even for devices not supported in linux-firmware) should follow the SoC/Vendor/device pattern. Update firmware names for Medion SPRCHRGD 14 S1 to follow that pattern. Fixes: 8cf65490cdb0 ("arm64: dts: qcom: Add dts for Medion SPRCHRGD 14 S1") Cc: Georg Gottleuber...
```diff diff --git a/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts b/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts index 9155435484fb..20a33e6f27ee 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts @@ -7...
7db5fbe508deedec6c183d5056cf3c504c027f40
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: msm8994-octagon: Fix Analog Devices vendor prefix of AD7147
Problem Details: Trivial change, Analog Devices vendor prefix is "adi", but there is a valid "ad" vendor prefix of another company, this may explain why the issue hasn't been discovered by the automatic tests. A problem of not described compatible value is out of this change scope. Fixes: c636eeb751f6 ("arm64: dts: q...
```diff diff --git a/arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi b/arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi index 4c983b10dd92..7ace3540ef0a 100644 --- a/arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8994-msft-lumia-octagon.dtsi @@ -378,7 +378,7 ...
0907cab01ff9746ecf08592edd9bd85d2636be58
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: x1e80100: Add missing TCSR ref clock to the DP PHYs
Problem Details: The DP PHYs on X1E80100 need the ref clock which is provided by the TCSR CC. The current X Elite devices supported upstream work fine without this clock, because the boot firmware leaves this clock enabled. But we should not rely on that. Also, even though this change breaks the ABI, it is needed in o...
```diff diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi index 51ad2b2e6375..03629639dcfb 100644 --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi @@ -5929,9 +5929,11 @@ <0 0x0aec2000 0 0x1c8>; clocks = <&dispcc DISP_CC_MDSS_DPTX2_A...
623ba6ea45979fb1d06c5c8f03417ecc3565a851
Analyze and fix the following issue in the Linux kernel code: perf symbol: Remove Rust symbol workarounds
Problem Details: Due to an off-by-one error introduced in commit 73bbb94466fd3f8b ("kallsyms: support "big" kernel symbols"), long symbols (which are currently only produced by Rust) can have their symbol type being wrongly parsed by kernel/kallsyms.c. This has been fixed in commit f3f9f42232dee596 ("kallsyms: Fix wro...
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 814f960fa8f8..8662001e1e25 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -104,21 +104,10 @@ static enum dso_binary_type binary_type_symtab[] = { #define DSO_BINARY_TYPE__SYMTAB_CNT ARRAY_SIZE(binary_type_symtab) ...
4f109baeea4dc6fa1426ab559159d3bb35e05343
Analyze and fix the following issue in the Linux kernel code: um: Fix incorrect __acquires/__releases annotations
Problem Details: With Clang's context analysis, the compiler is a bit more strict about what goes into the __acquires/__releases annotations and can't refer to non-existent variables. On an UM build, mm_id.h is transitively included into mm_types.h, and we can observe the following error (if context analysis is enable...
```diff diff --git a/arch/um/include/shared/skas/mm_id.h b/arch/um/include/shared/skas/mm_id.h index fb96c0bd8222..18c0621430d2 100644 --- a/arch/um/include/shared/skas/mm_id.h +++ b/arch/um/include/shared/skas/mm_id.h @@ -21,8 +21,9 @@ struct mm_id { int syscall_fd_map[STUB_MAX_FDS]; }; -void enter_turnstile(stru...
d6205a1878dd4cc9664c4b4829b68a29c0426efc
Analyze and fix the following issue in the Linux kernel code: clk: qcom: rcg2: compute 2d using duty fraction directly
Problem Details: The duty-cycle calculation in clk_rcg2_set_duty_cycle() currently derives an intermediate percentage `duty_per = (num * 100) / den` and then computes: d = DIV_ROUND_CLOSEST(n * duty_per * 2, 100); This introduces integer truncation at the percentage step (division by `den`) and a redundant scalin...
```diff diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index e18cb8807d73..2838d4cb2d58 100644 --- a/drivers/clk/qcom/clk-rcg2.c +++ b/drivers/clk/qcom/clk-rcg2.c @@ -755,7 +755,7 @@ static int clk_rcg2_get_duty_cycle(struct clk_hw *hw, struct clk_duty *duty) static int clk_rcg2_set_duty_cycle(...
c957072d44a735ebbe8385fc3511a4f5e6ccea93
Analyze and fix the following issue in the Linux kernel code: x86/platform/olpc: Replace strcpy() with strscpy() in xo15_sci_add()
Problem Details: strcpy() has been deprecated¹ because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Use the safer strscpy() instead. ¹ https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-...
```diff diff --git a/arch/x86/platform/olpc/olpc-xo15-sci.c b/arch/x86/platform/olpc/olpc-xo15-sci.c index 68244a3422d1..82c51b6ec528 100644 --- a/arch/x86/platform/olpc/olpc-xo15-sci.c +++ b/arch/x86/platform/olpc/olpc-xo15-sci.c @@ -7,6 +7,7 @@ #include <linux/device.h> #include <linux/slab.h> +#include <linux/st...
5cd2a743ce384a5a4a1b5b09d4983df2592fbe1c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: cache: qcom,llcc: Remove duplicate llcc7_base for Glymur
Problem Details: Drop redundant llcc7_base entry from Glymur LLCC reg-items Fixes: bd0b8028ce5f ("dt-bindings: cache: qcom,llcc: Document Glymur LLCC block") Signed-off-by: Pankaj Patil <pankaj.patil@oss.qualcomm.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://lore.kernel.org...
```diff diff --git a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml index 4e99c405aea3..6671e461e34a 100644 --- a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml @@ -119,7 +119,6 @@ allOf...
336367fab9b96db7b0ee174443c426fc6c53b912
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix Potential Probe Resource Leak
Problem Details: After kthread creation during probe sequence, a handful of other failures could occur. If this were to happen, the kthread is never explicitly deleted which results in a resource leak. Add explicit cleanup of this resource. Signed-off-by: Brandon Brnich <b-brnich@ti.com> Signed-off-by: Nicolas Dufresn...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c index 3216b4997644..76d57c6b636a 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -362,7 +362,7 @@ static int wa...
cb3f945c012ab152fd2323e0df34c2b640071738
Analyze and fix the following issue in the Linux kernel code: media: verisilicon: AV1: Fix tx mode bit setting
Problem Details: AV1 specification describes 3 possibles tx modes: 4x4 only, largest and select. The hardware allows 5 possibles tx modes: 4x4 only, 8x8, 16x16, 32x32 and select. Since the both aren't exactly matching we need to add a mapping function to set the correct mode on hardware. Signed-off-by: Benjamin Gaigna...
```diff diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c index f4f7cb45b1f1..f52b8208e6b9 100644 --- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c +++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw...
e0f99b810e1181374370f91cd996d761549e147f
Analyze and fix the following issue in the Linux kernel code: media: verisilicon: AV1: Fix enable cdef computation
Problem Details: If all the fields of the CDEF parameters are zero (which is the default), then av1_enable_cdef register needs to be unset (despite the V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF possibly being set). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Fixes: 727a400686a2c ("media: verisilicon: A...
```diff diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c index e4703bb6be7c..f4f7cb45b1f1 100644 --- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c +++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw...
e0203ddf9af7c8e170e1e99ce83b4dc07f0cd765
Analyze and fix the following issue in the Linux kernel code: media: verisilicon: Avoid G2 bus error while decoding H.264 and HEVC
Problem Details: For the i.MX8MQ platform, there is a hardware limitation: the g1 VPU and g2 VPU cannot decode simultaneously; otherwise, it will cause below bus error and produce corrupted pictures, even potentially lead to system hang. [ 110.527986] hantro-vpu 38310000.video-codec: frame decode timed out. [ 110.58...
```diff diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h index e0fdc4535b2d..0353de154a1e 100644 --- a/drivers/media/platform/verisilicon/hantro.h +++ b/drivers/media/platform/verisilicon/hantro.h @@ -77,6 +77,7 @@ struct hantro_irq { * @double_buffer: core needs...
db6b97a4f8041e479be9ef4b8b07022636c96f50
Analyze and fix the following issue in the Linux kernel code: media: v4l2-mem2mem: Add a kref to the v4l2_m2m_dev structure
Problem Details: Adding a reference count to the v4l2_m2m_dev structure allow safely sharing it across multiple hardware nodes. This can be used to prevent running jobs concurrently on m2m cores that have some internal resource sharing. Signed-off-by: Ming Qian <ming.qian@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@n...
```diff diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index fec93c1a9231..ae0de54d4c3e 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -90,6 +90,7 @@ static const char * const m2m_entity_name[] = { * @job_work: worker ...
a519e21e32398459ba357e67b541402f7295ee1b
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix memory leak on codec_info allocation failure
Problem Details: In wave5_vpu_open_enc() and wave5_vpu_open_dec(), a vpu instance is allocated via kzalloc(). If the subsequent allocation for inst->codec_info fails, the functions return -ENOMEM without freeing the previously allocated instance, causing a memory leak. Fix this by calling kfree() on the instance in th...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index e75770912e21..8917542b993c 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -1835,8 +1835,...
a07ce1e22d6ec437029ad1868836573376655a0d
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Add WARN_ON to check if dec_output_info is NULL
Problem Details: The dec_output_info should not be a null pointer, WARN_ON around it to indicates a driver issue. Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com> Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com> Tested-by: Brandon Brnich <b-brnich@ti.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@c...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c index e94d6ebc9f81..5b10f9f49b9f 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c @@ -485,7 +485,7 @@ i...
e66ff2b08e4ee1c4d3b84f24818e5bcc178cc3a4
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix Null reference while testing fluster
Problem Details: When multi instances are created/destroyed, many interrupts happens and structures for decoder are removed. "struct vpu_instance" this structure is shared for all flow in the decoder, so if the structure is not protected by lock, Null dereference could happens sometimes. IRQ Handler was spilt to two ph...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-helper.c b/drivers/media/platform/chips-media/wave5/wave5-helper.c index f03ad9c0de22..53a0ac068c2e 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-helper.c +++ b/drivers/media/platform/chips-media/wave5/wave5-helper.c @@ -27,6 +27,11 @@ co...
cbb9c0d50e471483cced55f5b7db4569dcd959a6
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix SError of kernel panic when closed
Problem Details: SError of kernel panic rarely happened while testing fluster. The root cause was to enter suspend mode because timeout of autosuspend delay happened. [ 48.834439] SError Interrupt on CPU0, code 0x00000000bf000000 -- SError [ 48.834455] CPU: 0 UID: 0 PID: 1067 Comm: v4l2h265dec0:sr Not tainted 6.12...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c index e3038c18ca36..528387c6ecf6 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c @@ -1243,6 +1243,...
b74cedac643b02aefa7da881b58a3792859d9748
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix device cleanup order to prevent kernel panic
Problem Details: Move video device unregistration to the beginning of the remove function to ensure all video operations are stopped before cleaning up the worker thread and disabling PM runtime. This prevents hardware register access after the device has been powered down. In polling mode, the hrtimer periodically tr...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c index 0bcd48df49d0..77d6c934d0b9 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -351,6 +351,10 @@ static void ...
5a0c122e834b2f7f029526422c71be922960bf03
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix kthread worker destruction in polling mode
Problem Details: Fix the cleanup order in polling mode (irq < 0) to prevent kernel warnings during module removal. Cancel the hrtimer before destroying the kthread worker to ensure work queues are empty. In polling mode, the driver uses hrtimer to periodically trigger wave5_vpu_timer_callback() which queues work via k...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c index 23aa3ab51a0e..0bcd48df49d0 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -352,8 +352,9 @@ static void w...
9cf4452e824c1e2d41c9c0b13cc8a32a0a7dec38
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix PM runtime usage count underflow
Problem Details: Replace pm_runtime_put_sync() with pm_runtime_dont_use_autosuspend() in the remove path to properly pair with pm_runtime_use_autosuspend() from probe. This allows pm_runtime_disable() to handle reference count cleanup correctly regardless of current suspend state. The driver calls pm_runtime_put_sync(...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c index e1715d3f43b0..23aa3ab51a0e 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c @@ -356,7 +356,7 @@ static void w...
b4e26c6fc1b3c225caf80d4a95c6f9fcbe959e17
Analyze and fix the following issue in the Linux kernel code: media: chips-media: wave5: Fix conditional in start_streaming
Problem Details: When STREAMON(CAP) is called after STREAMON(OUT), the driver was failing to switch states from VPU_INST_STATE_OPEN to VPU_INST_STATE_INIT_SEQ and VPU_INST_STATE_PIC_RUN because the capture queue streaming boolean had not yet been set to true. This led to a hang in the encoder since the state was stuck ...
```diff diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c index 9bfaa9fb3ceb..bca881a0a161 100644 --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c @@ -1367,7 +1367,...
241e75fe6b9db206e8df14d305ea7e42fd3a2846
Analyze and fix the following issue in the Linux kernel code: media: imx-jpeg: Add support for descriptor allocation from SRAM
Problem Details: Add support for optional allocation of bitstream descriptors from SRAM instead of DRAM. In case the encoder/decoder DT node contains 'sram' property which points to 'mmio-sram', the driver will attempt to use the SRAM instead of DRAM for descriptor allocation, which might improve performance. This als...
```diff diff --git a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c index 9e4a813489c0..b558700d1d96 100644 --- a/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +++ b/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c @@ -44,6 +44,7 @@ #include <linux/module.h> #include <l...
f128bab57b8018e526b7eda854ca20069863af47
Analyze and fix the following issue in the Linux kernel code: media: mtk-mdp: Fix a reference leak bug in mtk_mdp_remove()
Problem Details: In mtk_mdp_probe(), vpu_get_plat_device() increases the reference count of the returned platform device. Add platform_device_put() to prevent reference leak. Fixes: c8eb2d7e8202 ("[media] media: Add Mediatek MDP Driver") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> S...
```diff diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c index f78fa30f1864..8432833814f3 100644 --- a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c @@ -254,6 +254,7 @@ static void mtk_mdp_r...
8a8a3232abac5b972058a5f2cb3e33199d2a8648
Analyze and fix the following issue in the Linux kernel code: media: mtk-mdp: Fix error handling in probe function
Problem Details: Add mtk_mdp_unregister_m2m_device() on the error handling path to prevent resource leak. Add check for the return value of vpu_get_plat_device() to prevent null pointer dereference. And vpu_get_plat_device() increases the reference count of the returned platform device. Add platform_device_put() to pr...
```diff diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c index 80fdc6ff57e0..f78fa30f1864 100644 --- a/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mediatek/mdp/mtk_mdp_core.c @@ -194,11 +194,17 @@ static int mtk_mdp_...
88e935de7cf8795d7a6a51385db87ecb361a7050
Analyze and fix the following issue in the Linux kernel code: media: mediatek: encoder: Fix uninitialized scalar variable issue
Problem Details: UNINIT checker finds some instances of variables that are used without being initialized, for example using the uninitialized value enc_result.is_key_frm can result in unpredictable behavior, so initialize these variables after declaring. Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c index 6faf3f659e75..b3a0a1d8b7a8 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vc...
17e1e1641f74a89824d4de3aa38c78daa5686cc1
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: isppreview: always clamp in preview_try_format()
Problem Details: If prev->input != PREVIEW_INPUT_MEMORY the width and height weren't clamped. Just always clamp. This fixes a v4l2-compliance error: fail: v4l2-test-subdevs.cpp(171): fse.max_width == ~0U || fse.max_height == ~0U fail: v4l2-test-subdevs.cpp(270): ret && ret != ENOTTY test Try VIDIOC_SUBDEV_ENUM_MBUS...
```diff diff --git a/drivers/media/platform/ti/omap3isp/isppreview.c b/drivers/media/platform/ti/omap3isp/isppreview.c index 3e9e213c6d8a..3f3b5bd9cdc7 100644 --- a/drivers/media/platform/ti/omap3isp/isppreview.c +++ b/drivers/media/platform/ti/omap3isp/isppreview.c @@ -1742,22 +1742,17 @@ static void preview_try_forma...
ccd797968922e5e6d0e59aa4883c432e5c906a4b
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: ispccp2: always clamp in ccp2_try_format()
Problem Details: If ccp2->input == CCP2_INPUT_NONE, then try_format didn't clamp the width and height. This can happen with v4l2-compliance tests. Always clamp. This fixes this v4l2-compliance error: fail: v4l2-test-subdevs.cpp(171): fse.max_width == ~0U || fse.max_height == ~0U fail: v4l2-test-subdevs.cpp(270): r...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispccp2.c b/drivers/media/platform/ti/omap3isp/ispccp2.c index f4147c79639c..d668111b44f4 100644 --- a/drivers/media/platform/ti/omap3isp/ispccp2.c +++ b/drivers/media/platform/ti/omap3isp/ispccp2.c @@ -658,7 +658,7 @@ static void ccp2_try_format(struct isp_ccp2_d...
44c383116d3587662661e94e75842d92fb3a4bee
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: support ctrl events for isppreview
Problem Details: The preview subdev device was missing V4L2_SUBDEV_FL_HAS_EVENTS, and that prevented VIDIOC_SUBSCRIBE_EVENT from working. Fixes a v4l2-compliance error: fail: v4l2-test-controls.cpp(1128): subscribe event for control 'User Controls' failed test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL Signed-off-by:...
```diff diff --git a/drivers/media/platform/ti/omap3isp/isppreview.c b/drivers/media/platform/ti/omap3isp/isppreview.c index 9992db782870..3e9e213c6d8a 100644 --- a/drivers/media/platform/ti/omap3isp/isppreview.c +++ b/drivers/media/platform/ti/omap3isp/isppreview.c @@ -2277,7 +2277,7 @@ static int preview_init_entitie...
335d7956f739d70f78ae803cb618d85e4444fb36
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: better VIDIOC_G/S_PARM handling
Problem Details: Fix various v4l2-compliance errors relating to timeperframe. VIDIOC_G/S_PARM is only supported for Video Output, so disable these ioctls for Capture devices. Ensure numerator and denominator are never 0. Set missing V4L2_CAP_TIMEPERFRAME capability for VIDIOC_S_PARM. v4l2-compliance: fail: v4l2-t...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c index ac170ef4fa01..86cb27b6ca4e 100644 --- a/drivers/media/platform/ti/omap3isp/ispvideo.c +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c @@ -928,7 +928,10 @@ isp_video_set_param(struct file *file, v...
93ee7d61dc311cfa382cf3461fc7647e0ff62bff
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: rework isp_video_try/set_format
Problem Details: isp_video_set_format now calls isp_video_try_format first, ensuring consistent behavior and removing duplicate code in both functions. This fixes an v4l2-compliance error: fail: v4l2-test-formats.cpp(519): !pix.sizeimage test VIDIOC_S_FMT: FAIL Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c index c52312b39598..adea39b6d930 100644 --- a/drivers/media/platform/ti/omap3isp/ispvideo.c +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c @@ -700,11 +700,15 @@ isp_video_get_format(struct file *file,...
7575b8dfa91f82fcb34ffd5568ff415ac4685794
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: set initial format
Problem Details: Initialize the v4l2_format to a default. Empty formats are not allowed in V4L2, so this fixes v4l2-compliance issues: fail: v4l2-test-formats.cpp(514): !pix.width || !pix.height test VIDIOC_G_FMT: FAIL Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Acked-by: Sakari Ailus <sakari.ailus@linux...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c index 5ce8736ca5bd..c52312b39598 100644 --- a/drivers/media/platform/ti/omap3isp/ispvideo.c +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c @@ -1319,6 +1319,7 @@ static const struct v4l2_ioctl_ops isp_...
2c422fd1a431feb0d8918b11ff37ec613e111d66
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: use V4L2_COLORSPACE_SRGB instead of _JPEG
Problem Details: JPEG colorspace should generally not be used unless it is actually dealing with JPG data. This fixes v4l2-compliance errors: fail: v4l2-test-formats.cpp(416): pixelformat != V4L2_PIX_FMT_JPEG && pixelformat != V4L2_PIX_FMT_MJPEG && colorspace == V4L2_COLORSPACE_JPEG fail: v4l2-test-formats.cpp(521):...
```diff diff --git a/drivers/media/platform/ti/omap3isp/isppreview.c b/drivers/media/platform/ti/omap3isp/isppreview.c index 26f7167d1f4f..9992db782870 100644 --- a/drivers/media/platform/ti/omap3isp/isppreview.c +++ b/drivers/media/platform/ti/omap3isp/isppreview.c @@ -1796,7 +1796,7 @@ static void preview_try_format(...
44c03802a5191626996ee9db4bac090b164ca340
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: isp_video_mbus_to_pix/pix_to_mbus fixes
Problem Details: The isp_video_mbus_to_pix/pix_to_mbus functions did not take the last empty entry { 0, } of the formats array into account. As a result, isp_video_mbus_to_pix would accept code 0 and isp_video_pix_to_mbus would select code 0 if no match was found. Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.or...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c index 46609045e2c8..864d38140b87 100644 --- a/drivers/media/platform/ti/omap3isp/ispvideo.c +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c @@ -148,12 +148,12 @@ static unsigned int isp_video_mbus_to_p...
a03c909815639875f214c9d680839d48fa7cb29f
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: add V4L2_CAP_IO_MC and don't set bus_info
Problem Details: Since this is a media-centric device set the V4L2_CAP_IO_MC capability. Also don't set bus_info, leave that to the v4l2 core. This fixes v4l2-compliance errors: test MC information (see 'Media Driver Info' above): OK fail: v4l2-compliance.cpp(661): missing bus_info prefix ('media') Signed-off-by: H...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c index 0e7f0bf2b346..46609045e2c8 100644 --- a/drivers/media/platform/ti/omap3isp/ispvideo.c +++ b/drivers/media/platform/ti/omap3isp/ispvideo.c @@ -645,11 +645,9 @@ isp_video_querycap(struct file *file, vo...
e0ac618fff090ea8fd4423f1e3c7eb7d34d8b184
Analyze and fix the following issue in the Linux kernel code: media: omap3isp: configure entity functions
Problem Details: For the various subdevices, set the function field. This fixes v4l2-compliance errors: $ v4l2-compliance -M0 v4l2-compliance 1.33.0-5410, 32 bits, 64-bit time_t v4l2-compliance SHA: c12c89c5bd70 2025-10-05 09:58:42 Compliance test for omap3isp device /dev/media0: Media Driver Info: Driver name ...
```diff diff --git a/drivers/media/platform/ti/omap3isp/ispccdc.c b/drivers/media/platform/ti/omap3isp/ispccdc.c index 55ee14e8b449..9dbf06ac058d 100644 --- a/drivers/media/platform/ti/omap3isp/ispccdc.c +++ b/drivers/media/platform/ti/omap3isp/ispccdc.c @@ -2675,6 +2675,7 @@ static int ccdc_init_entities(struct isp_cc...
c92724b40c2f36ca0f2a789cf8cb80dd51107f25
Analyze and fix the following issue in the Linux kernel code: docs: fix PPR for AMD EPYC broken link
Problem Details: As 'AMD Documentation Hub' [1] announced: "All technical documentation, including for AMD EPYC™ processors ..., and more is now hosted on the AMD Technical Information Portal (TIP) [2]". By searching the No.55898, update the new URL. [1] https://www.amd.com/en/search/documentation/hub.html [2] https:...
```diff diff --git a/Documentation/arch/x86/amd_hsmp.rst b/Documentation/arch/x86/amd_hsmp.rst index a094f55c10b0..8bb411f0d70d 100644 --- a/Documentation/arch/x86/amd_hsmp.rst +++ b/Documentation/arch/x86/amd_hsmp.rst @@ -14,7 +14,7 @@ set of mailbox registers. More details on the interface can be found in chapter ...
efbc288d15ca85fecbe6c19d1e55249138d68ca9
Analyze and fix the following issue in the Linux kernel code: docs: alienware-wmi: fix typo
Problem Details: Fix a typo in the manual fan control description ("aproximate" -> "approximate"). Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Kurt Borja <kuurtb@gmail.com> Link: https://patch.msgid.link/20251230213431.656106-1-weibu@redadmin.org S...
```diff diff --git a/Documentation/admin-guide/laptops/alienware-wmi.rst b/Documentation/admin-guide/laptops/alienware-wmi.rst index 27a32a8057da..e532c60db8e2 100644 --- a/Documentation/admin-guide/laptops/alienware-wmi.rst +++ b/Documentation/admin-guide/laptops/alienware-wmi.rst @@ -105,7 +105,7 @@ information. M...
487764a514e97e3b921c4eb13ab35920e09f6b7d
Analyze and fix the following issue in the Linux kernel code: asus-armoury: fix ppt data for GA403U* renaming to GA403UI
Problem Details: As some GA403U may have different limits restrict the DMI match to the specific GA403UI model. Fixes: 39ae6c50e599 ("platform/x86: asus-armoury: add ppt_* and nv_* tuning knobs") Signed-off-by: Denis Benato <denis.benato@linux.dev> Link: https://patch.msgid.link/20260103003731.404383-3-denis.benato@li...
```diff diff --git a/drivers/platform/x86/asus-armoury.h b/drivers/platform/x86/asus-armoury.h index 8184107e565f..774aa696be4e 100644 --- a/drivers/platform/x86/asus-armoury.h +++ b/drivers/platform/x86/asus-armoury.h @@ -843,7 +843,7 @@ static const struct dmi_system_id power_limits[] = { }, { .matches = { - ...
44cfd102ce28e749a07bb0f1668cf932077b1175
Analyze and fix the following issue in the Linux kernel code: arm64: dts: renesas: r9a09g047e57-smarc: Remove duplicate SW_LCD_EN
Problem Details: SW_LCD_EN is defined twice. Fixes: 9e95446b0cf93a91 ("arm64: dts: renesas: r9a09g047e57-smarc: Add gpio keys") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/1f93558c62f4461f50935644ec831a7d2cb52630.1764089463.git.geert+renesas@glider.be
```diff diff --git a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts index 0fd90d79b020..805c0f67b70d 100644 --- a/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts +++ b/arch/arm64/boot/dts/renesas/r9a09g047e57-smarc.dts @@ -8,7 +8,6 @@ /dts-v1/; /* Switch s...
7786b10688ac0ebeaff655923cbb2c7d34a98995
Analyze and fix the following issue in the Linux kernel code: ASoC: nau8821: Cancel pending work before suspend
Problem Details: A jack detection work that is unscheduled or in progress while executing the suspend handler could trigger a race condition. Ensure state consistency by cancelling any pending work or wait for its execution to complete before processing the suspend. Since driver (re)enables both insert and eject inte...
```diff diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 2e2714b47501..58d2d5e77c8f 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -1605,6 +1605,10 @@ static int __maybe_unused nau8821_suspend(struct snd_soc_component *component) if (nau8821->irq) disable_ir...
dbd3fd05cddfdeec1e49b0a66269881c09eebd17
Analyze and fix the following issue in the Linux kernel code: ASoC: nau8821: Cancel delayed work on component remove
Problem Details: Attempting to unload the driver while a jack detection work is pending would likely crash the kernel when it is eventually scheduled for execution: [ 1984.896308] BUG: unable to handle page fault for address: ffffffffc10c2a20 [...] [ 1984.896388] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/3...
```diff diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 2d25a182f4ab..2e2714b47501 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -1264,6 +1264,14 @@ static int nau8821_component_probe(struct snd_soc_component *component) return 0; } +static void nau8821_comp...
70237853edf0a69773a7370eb74ea2a44dfe3050
Analyze and fix the following issue in the Linux kernel code: ASoC: nau8821: Fixup nau8821_enable_jack_detect()
Problem Details: The nau8821_enable_jack_detect() function was supposed to allow enabling or disabling jack events reporting. However, once enabled, any subsequent invocation would fail and the following splat is shown: [ 3136.996771] Hardware name: Valve Jupiter/Jupiter, BIOS F7A0131 01/30/2024 [ 3136.996773] Workqu...
```diff diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 3beb3c44dc2c..2d25a182f4ab 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -1655,8 +1655,13 @@ int nau8821_enable_jack_detect(struct snd_soc_component *component, int ret; nau8821->jack = jack; + + if (n...
46a16d89d097ac2c93b63382a37d60aa7f21dc71
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wsa883x: suppress variant printk
Problem Details: Drivers should generally be silent on successful probe. Demote the codec variant printk to debug level and instead add a warning in case an unknown variant is ever encountered. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Revie...
```diff diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index 3ffea56aeb0f..468d2b38a22a 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -1058,22 +1058,23 @@ static int wsa883x_init(struct wsa883x_priv *wsa883x) switch (variant) { case WSA8830: - dev_info(wsa883x-...
120f3e6ff76209ee2f62a64e5e7e9d70274df42b
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wsa884x: fix codec initialisation
Problem Details: The soundwire update_status() callback may be called multiple times with the same ATTACHED status but initialisation should only be done when transitioning from UNATTACHED to ATTACHED. Fix the inverted hw_init flag which was set to false instead of true after initialisation which defeats its purpose a...
```diff diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c index 887edd2be705..6c6b497657d0 100644 --- a/sound/soc/codecs/wsa884x.c +++ b/sound/soc/codecs/wsa884x.c @@ -1534,7 +1534,7 @@ static void wsa884x_init(struct wsa884x_priv *wsa884x) wsa884x_set_gain_parameters(wsa884x); - wsa884x->hw_in...
29d71b8a5a40708b3eed9ba4953bfc2312c9c776
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wsa881x: fix unnecessary initialisation
Problem Details: The soundwire update_status() callback may be called multiple times with the same ATTACHED status but initialisation should only be done when transitioning from UNATTACHED to ATTACHED. Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Cc: stable@vger.kernel.org # 5.6 Cc: Srinivas Kan...
```diff diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index d7aca6567c2d..2fc234adca5f 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -678,6 +678,7 @@ struct wsa881x_priv { */ unsigned int sd_n_val; int active_ports; + bool hw_init; bool port_prepared[WSA881X...
49aadf830eb048134d33ad7329d92ecff45d8dbb
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: wsa883x: fix unnecessary initialisation
Problem Details: The soundwire update_status() callback may be called multiple times with the same ATTACHED status but initialisation should only be done when transitioning from UNATTACHED to ATTACHED. This avoids repeated initialisation of the codecs during boot of machines like the Lenovo ThinkPad X13s: [ 11.6145...
```diff diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index c3046e260cb9..3ffea56aeb0f 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -475,6 +475,7 @@ struct wsa883x_priv { int active_ports; int dev_mode; int comp_offset; + bool hw_init; /* * Protects tempe...
e3fe30e57649c551757a02e1cad073c47e1e075e
Analyze and fix the following issue in the Linux kernel code: libceph: make free_choose_arg_map() resilient to partial allocation
Problem Details: free_choose_arg_map() may dereference a NULL pointer if its caller fails after a partial allocation. For example, in decode_choose_args(), if allocation of arg_map->args fails, execution jumps to the fail label and free_choose_arg_map() is called. Since arg_map->size is updated to a non-zero value bef...
```diff diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 3377a22e3f6c..92a44026de29 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -241,22 +241,26 @@ static struct crush_choose_arg_map *alloc_choose_arg_map(void) static void free_choose_arg_map(struct crush_choose_arg_map *arg_map) { - if (arg_ma...
e00c3f71b5cf75681dbd74ee3f982a99cb690c2b
Analyze and fix the following issue in the Linux kernel code: libceph: replace overzealous BUG_ON in osdmap_apply_incremental()
Problem Details: If the osdmap is (maliciously) corrupted such that the incremental osdmap epoch is different from what is expected, there is no need to BUG. Instead, just declare the incremental osdmap to be invalid. Cc: stable@vger.kernel.org Reported-by: ziming zhang <ezrakiez@gmail.com> Signed-off-by: Ilya Dryomo...
```diff diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index 34b3ab59602f..3377a22e3f6c 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -1979,11 +1979,13 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, bool msgr2, sizeof(u64) + sizeof(u32), e_inval); ceph_decode_copy(p, &fsid, ...
818156caffbf55cb4d368f9c3cac64e458fb49c9
Analyze and fix the following issue in the Linux kernel code: libceph: prevent potential out-of-bounds reads in handle_auth_done()
Problem Details: Perform an explicit bounds check on payload_len to avoid a possible out-of-bounds access in the callout. [ idryomov: changelog ] Cc: stable@vger.kernel.org Signed-off-by: ziming zhang <ezrakiez@gmail.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
```diff diff --git a/net/ceph/messenger_v2.c b/net/ceph/messenger_v2.c index 833e57849c1d..c9d50c0dcd33 100644 --- a/net/ceph/messenger_v2.c +++ b/net/ceph/messenger_v2.c @@ -2376,7 +2376,9 @@ static int process_auth_done(struct ceph_connection *con, void *p, void *end) ceph_decode_64_safe(&p, end, global_id, bad);...
f0487a90b2c50d4021c578a809144d800a703676
Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: UVC minimum relative pan/tilt/zoom speed fix.
Problem Details: In Video4Linux, a negative value in V4L2_CID_ZOOM_CONTINUOUS, V4L2_CID_PAN_SPEED and V4L2_CID_TILT_SPEED indicates a movement in the "opposite" direction to the standard direction. Currently, we were using -UVC_GET_MIN as the negative value, which resulted in the camera moving in the slowest possible ...
```diff diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index ec5aaeb99928..f0f6f8454d9c 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -483,6 +483,7 @@ static int uvc_ctrl_get_zoom(struct uvc_control_mapping *mapping, u8 query, return 0; ...
4238bd6dc6ba36f44d89a60338223d5a4f708cbf
Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: Fix support for V4L2_CTRL_FLAG_HAS_WHICH_MIN_MAX
Problem Details: The VIDIOC_G_EXT_CTRLS with which V4L2_CTRL_WHICH_(MIN|MAX)_VAL can only work for controls that have previously announced support for it. This patch fixes the following v4l2-compliance error: info: checking extended control 'User Controls' (0x00980001) fail: v4l2-test-controls.cpp(980): ret != EI...
```diff diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index d58bd888f0bf..ec5aaeb99928 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -1432,7 +1432,7 @@ static bool uvc_ctrl_is_readable(u32 which, struct uvc_control *ctrl, * auto_exposure=1, ...
85883141d3bea47e5bce688cc300800da7b1ea61
Analyze and fix the following issue in the Linux kernel code: media: uvcvideo: Replace dev_dbg() with uvc_dbg()
Problem Details: The uvcvideo driver uses a uvc_dbg() macro that supports enabling debug message categories selectively, and prints a KERN_DEBUG message. The macro is used through the driver, but one direct dev_dbg() call creeped in. Replace it with uvc_dbg(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonb...
```diff diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 2905505c240c..d58bd888f0bf 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -2929,8 +2929,7 @@ int uvc_ctrl_restore_values(struct uvc_device *dev) if (!ctrl->initialized || !ctrl->mo...
be05f571464404432a0f8fe1c81a86a0862da283
Analyze and fix the following issue in the Linux kernel code: memblock test: include <linux/sizes.h> from tools mm.h stub
Problem Details: memblock test compilation fails: memblock.c: In function ‘memblock_validate_numa_coverage’: memblock.c:784:58: error: ‘SZ_1M’ undeclared (first use in this function) 784 | mem_size_mb = memblock_phys_mem_size() / SZ_1M; | ...
```diff diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index 677c37e4a18c..028f3faf46e7 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -4,6 +4,7 @@ #include <linux/align.h> #include <linux/mmzone.h> +#include <linux/sizes.h> #define PAGE_SHIFT 12 #define PAGE_SIZE (_...
9efb74f84ba82a9de81fc921baf3c5e2decf8256
Analyze and fix the following issue in the Linux kernel code: x86/sev: Disable GCOV on noinstr object
Problem Details: With Debian clang version 19.1.7 (3+build5) there are calls to kasan_check_write() from __sev_es_nmi_complete(), which violates noinstr. Fix it by disabling GCOV for the noinstr object, as has been done for previous such instrumentation issues. Note that this file already disables __SANITIZE_ADDRESS_...
```diff diff --git a/arch/x86/coco/sev/Makefile b/arch/x86/coco/sev/Makefile index 3b8ae214a6a6..b2e9ec2f6901 100644 --- a/arch/x86/coco/sev/Makefile +++ b/arch/x86/coco/sev/Makefile @@ -8,3 +8,5 @@ UBSAN_SANITIZE_noinstr.o := n # GCC may fail to respect __no_sanitize_address or __no_kcsan when inlining KASAN_SANITIZ...
1c05d9a4cab2abfb93ebce5edaa17752126b6d35
Analyze and fix the following issue in the Linux kernel code: tee: qcomtee: user: Fix confusing cleanup.h syntax
Problem Details: Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this pot...
```diff diff --git a/drivers/tee/qcomtee/user_obj.c b/drivers/tee/qcomtee/user_obj.c index 0139905f2684..6aa3aefd67f0 100644 --- a/drivers/tee/qcomtee/user_obj.c +++ b/drivers/tee/qcomtee/user_obj.c @@ -228,10 +228,10 @@ static int qcomtee_user_object_dispatch(struct qcomtee_object_invoke_ctx *oic, { struct qcomtee_...
7c4c14ad3d8cbc3507231e3f3bc090dfbfcabf9d
Analyze and fix the following issue in the Linux kernel code: tee: qcomtee: mem: Fix confusing cleanup.h syntax
Problem Details: Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this pot...
```diff diff --git a/drivers/tee/qcomtee/mem_obj.c b/drivers/tee/qcomtee/mem_obj.c index 228a3e30a31b..a16f8fc39b8d 100644 --- a/drivers/tee/qcomtee/mem_obj.c +++ b/drivers/tee/qcomtee/mem_obj.c @@ -88,11 +88,11 @@ int qcomtee_memobj_param_to_object(struct qcomtee_object **object, struct tee_param *param, ...
4cc19518da40573fc1057c618a5b1acf8a941472
Analyze and fix the following issue in the Linux kernel code: tee: qcomtee: call: Fix confusing cleanup.h syntax
Problem Details: Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this pot...
```diff diff --git a/drivers/tee/qcomtee/call.c b/drivers/tee/qcomtee/call.c index 65f9140d4e1f..8f8830f0df26 100644 --- a/drivers/tee/qcomtee/call.c +++ b/drivers/tee/qcomtee/call.c @@ -395,9 +395,7 @@ static int qcomtee_object_invoke(struct tee_context *ctx, struct tee_ioctl_object_invoke_arg *arg, struct...
6dc78c53de99e4ed9868d4f0fc6da6e46f52fe4d
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix ucaps init error flow
Problem Details: In mlx5_ib_stage_caps_init(), if mlx5_ib_init_ucaps() fails after mlx5_ib_init_var_table() succeeds, the VAR bitmap is leaked since the function returns without cleanup. Thus, cleanup the var table bitmap in case of error of initializing ucaps before exiting, preventing the leak above. Fixes: cf7174e...
```diff diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 47c19d527fa2..e81080622283 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -4598,12 +4598,16 @@ static int mlx5_ib_stage_caps_init(struct mlx5_ib_dev *dev) MLX5_HCA_CAP_2_GENE...
ff5860f5088e9076ebcccf05a6ca709d5935cfa9
Analyze and fix the following issue in the Linux kernel code: perf: Ensure swevent hrtimer is properly destroyed
Problem Details: With the change to hrtimer_try_to_cancel() in perf_swevent_cancel_hrtimer() it appears possible for the hrtimer to still be active by the time the event gets freed. Make sure the event does a full hrtimer_cancel() on the free path by installing a perf_event::destroy handler. Fixes: eb3182ef0405 ("per...
```diff diff --git a/kernel/events/core.c b/kernel/events/core.c index dad0d3d2e85f..e3d8338fd51c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -11906,6 +11906,11 @@ static void perf_swevent_cancel_hrtimer(struct perf_event *event) } } +static void perf_swevent_destroy_hrtimer(struct perf_event *...
50f1d188c580222d7a73e96a338a5dc82360ccc0
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Propagate LAG effective max_tx_speed to vports
Problem Details: Currently, vports report only their parent's uplink speed, which in LAG setups does not reflect the true aggregated bandwidth. This makes it hard for upper-layer software to optimize load balancing decisions based on accurate bandwidth information. Fix the issue by calculating the possible maximum spe...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c index a459a30f36ca..c9d943a230b5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c @@ -996,6 +996,126 @@ static bool mlx5_lag_sh...
3f77eda548c82564ae4a23c76b51d36c6e39c865
Analyze and fix the following issue in the Linux kernel code: NFSv4: Don't free slots prematurely if requesting a directory delegation
Problem Details: When requesting a directory delegation, it is imperative to hold the slot until the delegation state has been recorded. Otherwise, if a recall comes in, the call to referring_call_exists() will assume the processing is done, and when it doesn't find a delegation, it will assume it has been returned. F...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 51da62ba6559..a0885ae55abc 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4494,6 +4494,25 @@ static bool should_request_dir_deleg(struct inode *inode) } #endif /* CONFIG_NFS_V4_1 */ +static void nfs4_call_getattr_prepare(struct rpc_task *t...
105c2db2474f50f109082ab8d070efcc8c3d52bd
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix nfs_clear_verifier_delegated() for delegated directories
Problem Details: If the client returns a directory delegation, then look up all the child dentries, and clear their 'verifier delegated' bit, unless subject to a file delegation. Similarly, if a file delegation is being returned, check if there is a directory delegation before clearing a 'verifier delegated' bit. Rep...
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index c0e9d5a45cd0..8f9ea79b7882 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1440,7 +1440,8 @@ static void nfs_set_verifier_locked(struct dentry *dentry, unsigned long verf) if (!dir || !nfs_verify_change_attribute(dir, verf)) return; - if (inode && NFS_PROTO...
6f9bda2337f8b0a4c10ed5630e85eceb126a2c5c
Analyze and fix the following issue in the Linux kernel code: NFS: Fix directory delegation verifier checks
Problem Details: Doing this check in nfs_check_verifier() resulted in many, many more lookups on the wire when running Christoph's delegation benchmarking script. After some experimentation, I found that we can treat directory delegations exactly the same as having a delegated verifier when we reach nfs4_lookup_revalid...
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 23a78a742b61..c0e9d5a45cd0 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1516,14 +1516,6 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry, if (!nfs_dentry_verify_change(dir, dentry)) return 0; - /* - * If we have a directory dele...
5a74af51c3a6f4cd22c128b0c1c019f68fa90011
Analyze and fix the following issue in the Linux kernel code: pnfs/blocklayout: Fix memory leak in bl_parse_scsi()
Problem Details: In bl_parse_scsi(), if the block device length is zero, the function returns immediately without releasing the file reference obtained via bl_open_path(), leading to a memory leak. Fix this by jumping to the out_blkdev_put label to ensure the file reference is properly released. Fixes: d76c769c8db4c ...
```diff diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c index ab76120705e2..134d7f760a33 100644 --- a/fs/nfs/blocklayout/dev.c +++ b/fs/nfs/blocklayout/dev.c @@ -417,8 +417,10 @@ bl_parse_scsi(struct nfs_server *server, struct pnfs_block_dev *d, d->map = bl_map_simple; d->pr_key = v->scsi.pr_key; ...
0c728083654f0066f5e10a1d2b0bd0907af19a58
Analyze and fix the following issue in the Linux kernel code: pnfs/flexfiles: Fix memory leak in nfs4_ff_alloc_deviceid_node()
Problem Details: In nfs4_ff_alloc_deviceid_node(), if the allocation for ds_versions fails, the function jumps to the out_scratch label without freeing the already allocated dsaddrs list, leading to a memory leak. Fix this by jumping to the out_err_drain_dsaddrs label, which properly frees the dsaddrs list before clea...
```diff diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index c55ea8fa3bfa..c2d8a13a9dbd 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -103,7 +103,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, st...
cce0be6eb4971456b703aaeafd571650d314bcca
Analyze and fix the following issue in the Linux kernel code: NFS: Fix a deadlock involving nfs_release_folio()
Problem Details: Wang Zhaolong reports a deadlock involving NFSv4.1 state recovery waiting on kthreadd, which is attempting to reclaim memory by calling nfs_release_folio(). The latter cannot make progress due to state recovery being needed. It seems that the only safe thing to do here is to kick off a writeback of th...
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index d020aab40c64..d1c138a416cf 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -511,7 +511,8 @@ static bool nfs_release_folio(struct folio *folio, gfp_t gfp) if ((current_gfp_context(gfp) & GFP_KERNEL) != GFP_KERNEL || current_is_kswapd() || current_is_kc...
857bf9056291a16785ae3be1d291026b2437fc48
Analyze and fix the following issue in the Linux kernel code: pNFS: Fix a deadlock when returning a delegation during open()
Problem Details: Ben Coddington reports seeing a hang in the following stack trace: 0 [ffffd0b50e1774e0] __schedule at ffffffff9ca05415 1 [ffffd0b50e177548] schedule at ffffffff9ca05717 2 [ffffd0b50e177558] bit_wait at ffffffff9ca061e1 3 [ffffd0b50e177568] __wait_on_bit at ffffffff9ca05cfb 4 [ffffd0b50e1775c8...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index ec1ce593dea2..51da62ba6559 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3894,8 +3894,8 @@ int nfs4_do_close(struct nfs4_state *state, gfp_t gfp_mask, int wait) calldata->res.seqid = calldata->arg.seqid; calldata->res.server = server; c...
c18f35e4904920db4c51620ba634e4d175b24741
Analyze and fix the following issue in the Linux kernel code: objtool/rust: add one more `noreturn` Rust function
Problem Details: Fix the following warning: rust/kernel.o: warning: objtool: _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix14from_str_radix() falls through to next function _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix16from_u64_negated() The commit 51d9ee90ea9...
```diff diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 3f7999317f4d..719ec727efd4 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -197,7 +197,8 @@ static bool is_rust_noreturn(const struct symbol *func) * as well as changes to the source code itself between versions (since * th...
f1db6538794f5af081940850a7976319d376110a
Analyze and fix the following issue in the Linux kernel code: rust: fmt: fix formatting expressions
Problem Details: Allow usage like `pr_info!("one + 1 = {}", one + 1)` to compile by ensuring that a reference is taken to the entire expression. [ The errors we would get otherwise look like: error[E0277]: `kernel::fmt::Adapter<i32>` doesn't implement `core::fmt::Display` --> ../samples/rust/rust_minimal.rs...
```diff diff --git a/rust/macros/fmt.rs b/rust/macros/fmt.rs index 2f4b9f6e2211..8354abd54502 100644 --- a/rust/macros/fmt.rs +++ b/rust/macros/fmt.rs @@ -67,7 +67,7 @@ pub(crate) fn fmt(input: TokenStream) -> TokenStream { } (None, acc) })(); - ...
946c5efe6a059f7d3303442644ee38384453ff68
Analyze and fix the following issue in the Linux kernel code: rust: fix off-by-one line number in rustdoc tests
Problem Details: When the `#![allow]` line was added, the doctest line number anchor isn't updated which causes the line number printed in kunit test to be off-by-one. Fixes: ab844cf32058 ("rust: allow `unreachable_pub` for doctests") Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: David Gow <davidgow@google.c...
```diff diff --git a/scripts/rustdoc_test_gen.rs b/scripts/rustdoc_test_gen.rs index be0561049660..6fd9f5c84e2e 100644 --- a/scripts/rustdoc_test_gen.rs +++ b/scripts/rustdoc_test_gen.rs @@ -206,7 +206,7 @@ pub extern "C" fn {kunit_name}(__kunit_test: *mut ::kernel::bindings::kunit) {{ /// The anchor where the t...
f6b8d4b7e54ffa1492db476c299c7058603108cb
Analyze and fix the following issue in the Linux kernel code: rust: num: fix typos in Bounded documentation
Problem Details: Fix several typos and grammatical errors in the Bounded type documentation: - "less significant bits" -> "least significant bits" - "with in" -> "within" - "withheld" -> "upheld" - "// This" -> "// This" (double space) - "doesn't fits" -> "doesn't fit" (2 occurrences) Reported-by: Miguel Ojeda <ojeda...
```diff diff --git a/rust/kernel/num/bounded.rs b/rust/kernel/num/bounded.rs index f870080af8ac..c3ee79ba9746 100644 --- a/rust/kernel/num/bounded.rs +++ b/rust/kernel/num/bounded.rs @@ -40,11 +40,11 @@ fn fits_within<T: Integer>(value: T, num_bits: u32) -> bool { fits_within!(value, T, num_bits) } -/// An inte...
1e4e2a847f3c0bb3f34f3b20229be5c0214b80fa
Analyze and fix the following issue in the Linux kernel code: rust: fmt: Fix grammar in Adapter description
Problem Details: Add a missing `and` in the description of the `Adapter`. Fixes: c5cf01ba8dfe ("rust: support formatting of foreign types") Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com> Acked-by: Tamir Duberstein <tamird@gmail.com> Link: https://patch.msgid.link/20260102084821.1077864-1-dirk.behme@de.bosch.com [...
```diff diff --git a/rust/kernel/fmt.rs b/rust/kernel/fmt.rs index 84d634201d90..1e8725eb44ed 100644 --- a/rust/kernel/fmt.rs +++ b/rust/kernel/fmt.rs @@ -6,7 +6,7 @@ pub use core::fmt::{Arguments, Debug, Error, Formatter, Result, Write}; -/// Internal adapter used to route allow implementations of formatting trai...
45f6aed8a835ee2bdd0a5d5ee626a91fe285014f
Analyze and fix the following issue in the Linux kernel code: rust: rbtree: fix documentation typo in CursorMut peek_next method
Problem Details: The peek_next method's doc comment incorrectly stated it accesses the "previous" node when it actually accesses the next node. Fix the documentation to accurately reflect the method's behavior. Fixes: 98c14e40e07a ("rust: rbtree: add cursor") Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-...
```diff diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs index 6c3dbb2e6f0d..312cecab72e7 100644 --- a/rust/kernel/rbtree.rs +++ b/rust/kernel/rbtree.rs @@ -985,7 +985,7 @@ impl<'a, K, V> CursorMut<'a, K, V> { self.peek(Direction::Prev) } - /// Access the previous node without moving the cu...
600559b9817f6eaa927035eebb12534fadb35ee8
Analyze and fix the following issue in the Linux kernel code: rust: rbtree: fix minor typo in comment
Problem Details: Fix a typo in a comment to improve clarity and readability. Suggested-by: Miguel Ojeda <ojeda@kernel.org> Link: https://github.com/Rust-for-Linux/linux/issues/1206 Signed-off-by: Atharv Dubey <atharvd440@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/202512011...
```diff diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs index 4729eb56827a..6c3dbb2e6f0d 100644 --- a/rust/kernel/rbtree.rs +++ b/rust/kernel/rbtree.rs @@ -1130,7 +1130,7 @@ pub struct IterMut<'a, K, V> { } // SAFETY: The [`IterMut`] has exclusive access to both `K` and `V`, so it is sufficient to requir...
8e8e8e7e8406e96a0189e116eb04f67f776f947f
Analyze and fix the following issue in the Linux kernel code: scsi: target: sbp: Potential integer overflow in sbp_make_tpg()
Problem Details: The variable tpgt in sbp_make_tpg() is defined as unsigned long and is assigned to tpgt->tport_tpgt, which is defined as u16. This may cause an integer overflow when tpgt is greater than USHRT_MAX (65535). I haven't tried to trigger it myself, but it is possible to trigger it by calling sbp_make_tpg() ...
```diff diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c index 9f167ff8da7b..09120a538a40 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c @@ -1960,12 +1960,12 @@ static struct se_portal_group *sbp_make_tpg(struct se_wwn *wwn, container_of(wwn, struct s...
ee229e7c256ab5d7b277abf8d48a732c10571750
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Configure MCQ after link startup
Problem Details: Commit f46b9a595fa9 ("scsi: ufs: core: Allocate the SCSI host earlier") did not only cause scsi_add_host() to be called earlier. It also swapped the order of link startup and enabling and configuring MCQ mode. Before that commit, the call chains for link startup and enabling MCQ were as follows: ufshc...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 0babb7035200..604043a7533d 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -10736,9 +10736,7 @@ static int ufshcd_add_scsi_host(struct ufs_hba *hba) if (is_mcq_supported(hba)) { ufshcd_mcq_enable(hba); err...
9a49157deeb23581fc5c8189b486340d7343264a
Analyze and fix the following issue in the Linux kernel code: scsi: core: Fix error handler encryption support
Problem Details: Some low-level drivers (LLD) access block layer crypto fields, such as rq->crypt_keyslot and rq->crypt_ctx within `struct request`, to configure hardware for inline encryption. However, SCSI Error Handling (EH) commands (e.g., TEST UNIT READY, START STOP UNIT) should not involve any encryption setup. ...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index f869108fd969..eebca96c1fc1 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1063,6 +1063,9 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses, unsigned char *cmnd, int cmnd_size, unsign...
be4b7e584a0cc6715fbb14dfb2a9a39bf07cfbab
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: dt-bindings: Fix several grammar errors
Problem Details: Fix several grammar errors. Signed-off-by: Zhaoming Luo <zhml@posteo.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20251217-fix-minor-grammar-err-v3-1-9be220cdd56a@posteo.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
```diff diff --git a/Documentation/devicetree/bindings/ufs/ufs-common.yaml b/Documentation/devicetree/bindings/ufs/ufs-common.yaml index 9f04f34d8c5a..ed97f5682509 100644 --- a/Documentation/devicetree/bindings/ufs/ufs-common.yaml +++ b/Documentation/devicetree/bindings/ufs/ufs-common.yaml @@ -48,8 +48,8 @@ properties:...
8fbb8fe75d4cf92eaa7b21828ec39c1bf79a262f
Analyze and fix the following issue in the Linux kernel code: dm-verity: allow REED_SOLOMON to be 'm' if DM_VERITY is 'm'
Problem Details: The dm-verity kconfig options make the common mistake of selecting a dependency from a bool "sub-option" rather than the main tristate option. This unnecessarily forces the dependency to built-in ('y'). Fix this by moving the selections of REED_SOLOMON and REED_SOLOMON_DEC8 into DM_VERITY, conditiona...
```diff diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 239c1744a926..c58a9a8ea54e 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig @@ -549,6 +549,8 @@ config DM_VERITY select CRYPTO_HASH select CRYPTO_LIB_SHA256 select DM_BUFIO + select REED_SOLOMON if DM_VERITY_FEC + select REED_SOLOMON_DEC8 ...