id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
250f5402e636a5cec9e0e95df252c3d54307210f
Analyze and fix the following issue in the Linux kernel code: parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check
Problem Details: Fixes a bug revealed by -Wmissing-prototypes when CONFIG_FUNCTION_GRAPH_TRACER is enabled but not CONFIG_DYNAMIC_FTRACE: arch/parisc/kernel/ftrace.c:82:5: error: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Werror=missing-prototypes] 82 | int ftrace_enable_ftrace_graph_caller(v...
```diff diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c index d1defb9ede70..621a4b386ae4 100644 --- a/arch/parisc/kernel/ftrace.c +++ b/arch/parisc/kernel/ftrace.c @@ -78,7 +78,7 @@ asmlinkage void notrace __hot ftrace_function_trampoline(unsigned long parent, #endif } -#ifdef CONFIG_FUNCTION...
b50155cb0d609437236c88201206267835c6f965
Analyze and fix the following issue in the Linux kernel code: powercap: dtpm_cpu: Fix error check against freq_qos_add_request()
Problem Details: The caller of the function freq_qos_add_request() checks again a non zero value but freq_qos_add_request() can return '1' if the request already exists. Therefore, the setup function fails while the QoS request actually did not failed. Fix that by changing the check against a negative value like all t...
```diff diff --git a/drivers/powercap/dtpm_cpu.c b/drivers/powercap/dtpm_cpu.c index 9193c3b8edeb..ae7ee611978b 100644 --- a/drivers/powercap/dtpm_cpu.c +++ b/drivers/powercap/dtpm_cpu.c @@ -219,7 +219,7 @@ static int __dtpm_cpu_setup(int cpu, struct dtpm *parent) ret = freq_qos_add_request(&policy->constraints, ...
eeff1d4f118bdf0870227fee5a770f03056e3adc
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Move domain helper migration into resctrl_offline_cpu()
Problem Details: When a CPU is taken offline the resctrl filesystem code needs to check if it was the CPU nominated to perform the periodic overflow and limbo work. If so, another CPU needs to be chosen to do this work. This is currently done in core.c, mixed in with the code that removes the CPU from the domain's mas...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 4aedefa22f61..b03a6c658ae5 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -580,22 +580,6 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r) return; } - - ...
978fcca954cb52249babbc14e53de53c88dd6433
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Allow overflow/limbo handlers to be scheduled on any-but CPU
Problem Details: When a CPU is taken offline resctrl may need to move the overflow or limbo handlers to run on a different CPU. Once the offline callbacks have been split, cqm_setup_limbo_handler() will be called while the CPU that is going offline is still present in the CPU mask. Pass the CPU to exclude to cqm_setu...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c index 4627d447bc3d..55322ba629da 100644 --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -584,12 +584,16 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r) if (r == &rdt_reso...
09909e098113bed99c9f63e1df89073e92c69891
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Queue mon_event_read() instead of sending an IPI
Problem Details: Intel is blessed with an abundance of monitors, one per RMID, that can be read from any CPU in the domain. MPAMs monitors reside in the MMIO MSC, the number implemented is up to the manufacturer. This means when there are fewer monitors than needed, they need to be allocated and freed. MPAM's CSU moni...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c index beccb0e87ba7..e933e1cdb1c9 100644 --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c @@ -19,6 +19,8 @@ #include <linux/kernfs.h> #include <linux/seq_file.h> #i...
a4846aaf39455fe69fce3522b385319383666eef
Analyze and fix the following issue in the Linux kernel code: x86/resctrl: Add cpumask_any_housekeeping() for limbo/overflow
Problem Details: The limbo and overflow code picks a CPU to use from the domain's list of online CPUs. Work is then scheduled on these CPUs to maintain the limbo list and any counters that may overflow. cpumask_any() may pick a CPU that is marked nohz_full, which will either penalise the work that CPU was dedicated to...
```diff diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index b7b9d9230bef..81f5de916db8 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -7,6 +7,7 @@ #include <linux/kernfs.h> #include <linux/fs_context.h> #include <linu...
7c38989d0f7a35c83e7c4781271d42662903fa8d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm8150: correct PCIe wake-gpios
Problem Details: Bindings allow a "wake", not "enable", GPIO. Schematics also use WAKE name for the pin: sa8155p-adp.dtb: pcie@1c00000: Unevaluated properties are not allowed ('enable-gpio' was unexpected) Fixes: a1c86c680533 ("arm64: dts: qcom: sm8150: Add PCIe nodes") Signed-off-by: Krzysztof Kozlowski <krzyszto...
```diff diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index eb1acea2631b..7ff75f696c3b 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -1895,7 +1895,7 @@ phy-names = "pciephy"; perst-gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;...
584a327c5cffc36369b2a8953d9448826240f1ac
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sdm845-db845c: correct PCIe wake-gpios
Problem Details: Bindings allow a "wake", not "enable", GPIO. Schematics also use WAKE name for the pin: sdm845-db845c.dtb: pcie@1c00000: Unevaluated properties are not allowed ('enable-gpio' was unexpected) Fixes: 4a657c264b78 ("arm64: dts: qcom: db845c: Enable PCIe controllers") Signed-off-by: Krzysztof Kozlowsk...
```diff diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index ab6220456513..1f517328199b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -580,7 +580,7 @@ &pcie0 { status = "okay"; perst-gpios = <&tlmm 3...
65323796debe49a1922ba507020f7530a4b3f9af
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/mmu/r535: uninitialized variable in r535_bar_new_()
Problem Details: If gf100_bar_new_() fails then "bar" is not initialized. Fixes: 5bf0257136a2 ("drm/nouveau/mmu/r535: initial support") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/dab21df7-4d90-4479-97d8-9...
```diff diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/r535.c index 4135690326f4..3a30bea30e36 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/r535.c @@ -168,12 +168,11 @@ r535_bar_new_(const struct nvkm_bar...
117e7dc697c2739d754db8fe0c1e2d4f1f5d5f82
Analyze and fix the following issue in the Linux kernel code: clk: qcom: dispcc-sdm845: Adjust internal GDSC wait times
Problem Details: SDM845 downstream uses non-default values for GDSC internal waits. Program them accordingly to avoid surprises. Fixes: 81351776c9fb ("clk: qcom: Add display clock controller driver for SDM845") Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Tested-by: Caleb Connolly <caleb.connolly@linaro.org...
```diff diff --git a/drivers/clk/qcom/dispcc-sdm845.c b/drivers/clk/qcom/dispcc-sdm845.c index 501dc29f8054..b84fdd17c3d8 100644 --- a/drivers/clk/qcom/dispcc-sdm845.c +++ b/drivers/clk/qcom/dispcc-sdm845.c @@ -759,6 +759,8 @@ static struct clk_branch disp_cc_mdss_vsync_clk = { static struct gdsc mdss_gdsc = { .gd...
0affdba22aca5573f9d989bcb1d71d32a6a03efe
Analyze and fix the following issue in the Linux kernel code: nouveau: fix function cast warnings
Problem Details: clang-16 warns about casting between incompatible function types: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c:161:10: error: cast from 'void (*)(const struct firmware *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 161 | .fini = (v...
```diff diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c index 19188683c8fc..8c2bf1c16f2a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c @@ -154,11 +154,17 @@ shadow_fw_init(struct n...
f09cbb6c94e47b4be985bfd3c8cf453818f5ef9d
Analyze and fix the following issue in the Linux kernel code: i40e: Remove VEB recursion
Problem Details: The VEB (virtual embedded switch) as a switch element can be connected according datasheet though its uplink to: - Physical port - Port Virtualizer (not used directly by i40e driver but can be present in MFP mode where the physical port is shared between PFs) - No uplink (aka floating VEB) But VEB...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 2990ff4f0306..ba24f3fa92c3 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h @@ -783,7 +783,6 @@ struct i40e_new_mac_filter { struct i40e_veb { struct i40e_pf *pf;...
08cdde310e2252ea9381a37c3faa2125a5a663a3
Analyze and fix the following issue in the Linux kernel code: i40e: Fix broken support for floating VEBs
Problem Details: Although the i40e supports so-called floating VEB (VEB without an uplink connection to external network), this support is broken. This functionality is currently unused (except debugfs) but it will be used by subsequent series for switchdev mode slow-path. Fix this by following: 1) Handle correctly fl...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c index 990a60889eef..921a97d5479e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c @@ -829,10 +829,14 @@ static ssize_t i40e_dbg_command_wri...
fd0a68a2337b79a7bd4dad5e7d9dc726828527af
Analyze and fix the following issue in the Linux kernel code: workqueue, irq_work: Build fix for !CONFIG_IRQ_WORK
Problem Details: 2f34d7337d98 ("workqueue: Fix queue_work_on() with BH workqueues") added irq_work usage to workqueue; however, it turns out irq_work is actually optional and the change breaks build on configuration which doesn't have CONFIG_IRQ_WORK enabled. Fix build by making workqueue use irq_work only when CONFIG...
```diff diff --git a/init/Kconfig b/init/Kconfig index 8df18f3a9748..0d21c9e0398f 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -106,7 +106,7 @@ config CONSTRUCTORS bool config IRQ_WORK - bool + def_bool y if SMP config BUILDTIME_TABLE_SORT bool diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 04e...
626db6ee8ee1edac206610db407114aa83b53fd3
Analyze and fix the following issue in the Linux kernel code: sparc: select FRAME_POINTER instead of redefining it
Problem Details: Because FRAME_POINTER is defined in lib/Kconfig.debug, the arch Kconfig should select it. Add 'select FRAME_POINTER' to MCOUNT. ARCH_WANT_FRAME_POINTERS must also be selected to avoid the unmet dependency warning. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Randy Dunlap <rdunla...
```diff diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug index 37e003665de6..d475a056a2e0 100644 --- a/arch/sparc/Kconfig.debug +++ b/arch/sparc/Kconfig.debug @@ -8,11 +8,8 @@ config MCOUNT bool depends on SPARC64 depends on FUNCTION_TRACER - default y - -config FRAME_POINTER - bool - depends on M...
5378f00c935bebb846b1fdb0e79cb76c137c56b5
Analyze and fix the following issue in the Linux kernel code: sparc: vDSO: fix return value of __setup handler
Problem Details: __setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes do...
```diff diff --git a/arch/sparc/vdso/vma.c b/arch/sparc/vdso/vma.c index 136c78f28f8b..1bbf4335de45 100644 --- a/arch/sparc/vdso/vma.c +++ b/arch/sparc/vdso/vma.c @@ -449,9 +449,8 @@ static __init int vdso_setup(char *s) unsigned long val; err = kstrtoul(s, 10, &val); - if (err) - return err; - vdso_enabled = va...
3ed7c61e49d65dacb96db798c0ab6fcd55a1f20f
Analyze and fix the following issue in the Linux kernel code: sparc64: NMI watchdog: fix return value of __setup handler
Problem Details: __setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes do...
```diff diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 17cdfdbf1f3b..149adc094753 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c @@ -279,7 +279,7 @@ static int __init setup_nmi_watchdog(char *str) if (!strncmp(str, "panic", 5)) panic_on_timeout = 1; - return 0; + return ...
3cc208ffa84a77650561efc7a851ee0e979bbdb9
Analyze and fix the following issue in the Linux kernel code: sparc: Fix typos
Problem Details: Fix typos, most reported by "codespell arch/sparc". Only touches comments, no code changes. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: sparclinux@vger.kernel.org Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andreas Larsson <andreas@gaisler.com> Link: https://lore.kerne...
```diff diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index 08650d503cc2..f220edcf17c7 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h @@ -430,7 +430,7 @@ unsigned long sun4v_cpu_mondo_send(unsigned long cpu_count, * ERRORS: No errors...
e1ea6db35fc3ba5ff063f097385e9f7a88c25356
Analyze and fix the following issue in the Linux kernel code: wifi: brcmsmac: avoid function pointer casts
Problem Details: An old cleanup went a little too far and causes a warning with clang-16 and higher as it breaks control flow integrity (KCFI) rules: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c:64:34: error: cast from 'void (*)(struct brcms_phy *)' to 'void (*)(void *)' converts to incompatible functio...
```diff diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c index 07f83ff5a54a..a27d6f0b8819 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy...
cc7338e9d807e20e60e6720a62956f0e9d46f0f8
Analyze and fix the following issue in the Linux kernel code: iommu: Refine locking for per-device fault data management
Problem Details: The per-device fault data is a data structure that is used to store information about faults that occur on a device. This data is allocated when IOPF is enabled on the device and freed when IOPF is disabled. The data is used in the paths of iopf reporting, handling, responding, and draining. The fault...
```diff diff --git a/drivers/iommu/io-pgfault.c b/drivers/iommu/io-pgfault.c index c1e88da973ce..5aea8402be47 100644 --- a/drivers/iommu/io-pgfault.c +++ b/drivers/iommu/io-pgfault.c @@ -53,7 +53,7 @@ static struct iommu_domain *get_domain_for_iopf(struct device *dev, /** * iommu_handle_iopf - IO Page Fault handler ...
b07cd3b746cfe9a4524a5a7337fcf4ccb933509b
Analyze and fix the following issue in the Linux kernel code: iommu/mtk_iommu: Use devm_kcalloc() instead of devm_kzalloc()
Problem Details: This is an effort to get rid of all multiplications from allocation functions in order to prevent integer overflows [1]. Here the multiplication is obviously safe because MTK_PROTECT_PA_ALIGN is defined as a literal value of 256 or 128. For the "mtk_iommu.c" file: 256 For the "mtk_iommu_v1.c" file: 1...
```diff diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 7abe9e85a570..9aae6eb604b1 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1264,7 +1264,7 @@ static int mtk_iommu_probe(struct platform_device *pdev) data->plat_data = of_device_get_match_data(dev); /* Prot...
0feda94c868d396fac3b3cb14089d2d989a07c72
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Mark interrupt as managed
Problem Details: On many systems that have an AMD IOMMU the following sequence of warnings is observed during bootup. ``` pci 0000:00:00.2 can't derive routing for PCI INT A pci 0000:00:00.2: PCI INT A: not connected ``` This series of events happens because of the IOMMU initialization sequence order and the lack of...
```diff diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index cb8486c9f8f4..db8d563af444 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2068,6 +2068,9 @@ static int __init iommu_init_pci(struct amd_iommu *iommu) /* Prevent binding other PCI device drivers to IOMMU devices */...
ba00e413fa1515e4d0890803c01ebc555f500f15
Analyze and fix the following issue in the Linux kernel code: ALSA: virtio: Fix "Coverity: virtsnd_kctl_tlv_op(): Uninitialized variables" warning.
Problem Details: This commit fixes the following warning when building virtio_snd driver. " *** CID 1583619: Uninitialized variables (UNINIT) sound/virtio/virtio_kctl.c:294 in virtsnd_kctl_tlv_op() 288 289 break; 290 } 291 292 kfree(tlv); 293 vvv CID 1583619: Uninitialized variables (UNINIT) vv...
```diff diff --git a/sound/virtio/virtio_kctl.c b/sound/virtio/virtio_kctl.c index 0c6ac74aca1e..7aa79c05b464 100644 --- a/sound/virtio/virtio_kctl.c +++ b/sound/virtio/virtio_kctl.c @@ -253,8 +253,8 @@ static int virtsnd_kctl_tlv_op(struct snd_kcontrol *kcontrol, int op_flag, tlv = kzalloc(size, GFP_KERNEL); if ...
f63f24488571fdd6f6aa910f2db5a7f3d44a4da6
Analyze and fix the following issue in the Linux kernel code: drm: bridge: dw_hdmi: Set DRM bridge type
Problem Details: The bridge type was set to default (Unknown). Set proper bridge type. With this fixed, debugfs output imx8mp looks proper. $ cat /sys/kernel/debug/dri/1/encoder-0/bridges bridge[0]: imx_hdmi_pvi_bridge_funcs [imx8mp_hdmi_pvi] type: [0] Unknown OF: /soc@0/bus@32c00000/display-bridge@32fc...
```diff diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 0e59b30d5227..cceb5aab6c83 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3549,6 +3549,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *p...
13a8a519cacf04e970907687dcb1e85c03073ba8
Analyze and fix the following issue in the Linux kernel code: s390/fpu: use lfpc instead of sfpc instruction
Problem Details: The only user of sfpc_safe() needs to read the new fpc register value from memory before it is set with sfpc. Avoid this indirection and use lfpc, which reads the new value from memory. Also add the "fpu_" prefix to have a common name space for fpu related inline assemblies, and provide memory access ...
```diff diff --git a/arch/s390/include/asm/fpu-insn.h b/arch/s390/include/asm/fpu-insn.h index ccdaacdeaa97..64ba3d9bcd14 100644 --- a/arch/s390/include/asm/fpu-insn.h +++ b/arch/s390/include/asm/fpu-insn.h @@ -11,6 +11,7 @@ #ifndef __ASSEMBLY__ +#include <linux/instrumented.h> #include <asm/asm-extable.h> asm...
b6b842becd734301349b2fbe8d31099ea3d22a0f
Analyze and fix the following issue in the Linux kernel code: s390/fpu: use KERNEL_VXR_LOW instead of KERNEL_VXR_V0V7
Problem Details: Use KERNEL_VXR_LOW instead of KERNEL_VXR_V0V7 for configurations without vector registers in order to decide if floating point registers need to be saved and restored. Kernel FPU areas which use floating point registers are supposed to use the KERNEL_FPR mask, however users may also open-code this and...
```diff diff --git a/arch/s390/kernel/fpu.c b/arch/s390/kernel/fpu.c index a4f3449cc814..21c9885cfb21 100644 --- a/arch/s390/kernel/fpu.c +++ b/arch/s390/kernel/fpu.c @@ -25,7 +25,7 @@ void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags) asm volatile("stfpc %0" : "=Q" (state->fpc)); if (!cpu_has_vx()) { ...
39ceca158802f0891805f4e4e6724716294d36f2
Analyze and fix the following issue in the Linux kernel code: s390/fpu: fix VLGV macro
Problem Details: The VLGV macro generates the VLGV instruction and has a vr parameter which correlates to the V3 vector register field of the instruction (bits 12-15). Due to its position in the VRS-c instruction format of the VLGV instruction, this field correlates to the second bit of the RXB byte of the instruction ...
```diff diff --git a/arch/s390/include/asm/vx-insn-asm.h b/arch/s390/include/asm/vx-insn-asm.h index 360f8b36d962..d01be91e228b 100644 --- a/arch/s390/include/asm/vx-insn-asm.h +++ b/arch/s390/include/asm/vx-insn-asm.h @@ -350,7 +350,7 @@ VX_NUM v3, \vr .word 0xE700 | (r1 << 4) | (v3&15) .word (b2 << 12) | (\disp...
b69b65f51148531ff3dd942a038614f77d9d60e3
Analyze and fix the following issue in the Linux kernel code: s390/zcrypt: add debug possibility for CCA and EP11 messages
Problem Details: This patch introduces dynamic debug hexdump invocation possibilities to be able to: - dump an CCA or EP11 CPRB request as early as possible when received via ioctl from userspace but after the ap message has been collected together. - dump an CCA or EP11 CPRB reply short before it is transferred ...
```diff diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 00e7e05a289c..e8742757085b 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c @@ -866,6 +866,8 @@ static long _zcrypt_send_cprb(bool userspace, struct ap_perms *perms, rc = prep_cca_ap_msg(...
6a2892d09df545c6ea828bc8ad08112961b88f6d
Analyze and fix the following issue in the Linux kernel code: s390/ap: add debug possibility for AP messages
Problem Details: This patch introduces two dynamic debug hexdump invocation possibilities to be able to a) dump an AP message immediately before it goes into the firmware queue and b) dump a fresh from the firmware queue received AP message. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Holge...
```diff diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c index d8268fee3bd5..6e4e8d324a6d 100644 --- a/drivers/s390/crypto/ap_queue.c +++ b/drivers/s390/crypto/ap_queue.c @@ -136,6 +136,8 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq) switch (status.response_code) { c...
6d749b4e02087fa4a68092eef260d31a345603c6
Analyze and fix the following issue in the Linux kernel code: s390/pkey: introduce dynamic debugging for pkey
Problem Details: This patch replaces all the s390 debug feature calls with debug level by dynamic debug calls pr_debug. These calls are much more flexible and each single invocation can get enabled/disabled at runtime wheres the s390 debug feature debug calls have only one knob - enable or disable all in one bunch. Th...
```diff diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c index 050cecac7191..4c60b5acbae1 100644 --- a/drivers/s390/crypto/pkey_api.c +++ b/drivers/s390/crypto/pkey_api.c @@ -44,7 +44,6 @@ MODULE_DESCRIPTION("s390 protected key interface"); static debug_info_t *pkey_dbf_info; -#define P...
0ccac45295403a7730d7bdd8b047a824b7a23a2e
Analyze and fix the following issue in the Linux kernel code: s390/pkey: harmonize pkey s390 debug feature calls
Problem Details: Cleanup and harmonize the s390 debug feature calls and defines for the pkey module to be similar to the debug feature as it is used in the zcrypt device driver and AP bus. More or less only renaming but no functional changes. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Hol...
```diff diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c index 6cfb6b2340c9..050cecac7191 100644 --- a/drivers/s390/crypto/pkey_api.c +++ b/drivers/s390/crypto/pkey_api.c @@ -42,24 +42,24 @@ MODULE_DESCRIPTION("s390 protected key interface"); * debug feature data and functions */ -stat...
08b2c3706de21d77cfe88017536f790a86bed397
Analyze and fix the following issue in the Linux kernel code: s390/zcrypt: introduce dynamic debugging for AP and zcrypt code
Problem Details: This patch replaces all the s390 debug feature calls with debug level by dynamic debug calls pr_debug. These calls are much more flexible and each single invocation can get enabled/disabled at runtime wheres the s390 debug feature debug calls have only one knob - enable or disable all in one bunch. The...
```diff diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 732cd8200d0e..fdc0f1036544 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -826,8 +826,8 @@ static int __ap_revise_reserved(struct device *dev, void *dummy) drvres = to_ap_drv(dev->driver)->flags ...
88e4c0da9b08fb8dd52840922837589157455449
Analyze and fix the following issue in the Linux kernel code: s390/zcrypt: harmonize debug feature calls and defines
Problem Details: This patch harmonizes the calls and defines around the s390 debug feature as it is used in the AP bus and zcrypt device driver code. More or less cleanup and renaming, no functional changes. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Holger Dengler <dengler@linux.ibm.com>...
```diff diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 2ecf4d36e78b..732cd8200d0e 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -2190,7 +2190,7 @@ static void ap_config_timeout(struct timer_list *unused) static int __init ap_debug_init(void) { ap_dbf...
e8054eaeb5a57d1aa930962185e74060db0e9308
Analyze and fix the following issue in the Linux kernel code: s390/setup: fix virtual vs physical address confusion
Problem Details: Fix virtual vs physical address confusion. This does not fix a bug since virtual and physical address spaces are currently the same. /proc/iomem should report the physical address ranges, so use __pa_symbol() for resource registration, similar to other architectures. Signed-off-by: Gerald Schaefer <g...
```diff diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index d1f3b56e7afc..24ed33f044ec 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -504,12 +504,12 @@ static void __init setup_resources(void) int j; u64 i; - code_resource.start = (unsigned long) _text; - code_resource...
91510d5959ad9eac451685e3bfc8385b89c23908
Analyze and fix the following issue in the Linux kernel code: gpio: cdev: fix a NULL-pointer dereference with DEBUG enabled
Problem Details: We are actually passing the gc pointer to chip_dbg() so we have to srcu_dereference() it. Fixes: 8574b5b47610 ("gpio: cdev: use correct pointer accessors with SRCU") Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Closes: https://lore.kernel.org/lkml/179caa10-5f86-4707-8bb0-fe1b316326d6@samsu...
```diff diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 85037fa4925e..f384fa278764 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2795,8 +2795,8 @@ int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt) return ret; guard(srcu)(&gdev->srcu); - ...
85445b96429057d87446bcb24ec0cac9ea9c7fdf
Analyze and fix the following issue in the Linux kernel code: integrity: eliminate unnecessary "Problem loading X.509 certificate" msg
Problem Details: Currently when the kernel fails to add a cert to the .machine keyring, it will throw an error immediately in the function integrity_add_key. Since the kernel will try adding to the .platform keyring next or throw an error (in the caller of integrity_add_key i.e. add_to_machine_keyring), so there is no...
```diff diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c index df387de29bfa..45c3e5dda355 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c @@ -179,7 +179,8 @@ static int __init integrity_add_key(const unsigned int id, const void *data, KEY_ALLOC_NOT_IN_QUOTA); i...
5d101654226d64ac0a6928019fbf476b46e9d14b
Analyze and fix the following issue in the Linux kernel code: arm64: defconfig: Enable LPA2 support
Problem Details: We typically enable support in defconfig for all architectural features for which we can detect at runtime if the hardware actually supports them. Now that we have implemented support for LPA2 based 52-bit virtual addressing in a way that should not impact 48-bit operation on non-LPA2 CPU, we can do t...
```diff diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index eed8fef08a10..160856de9bbb 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1283,9 +1283,7 @@ endchoice choice prompt "Virtual address space size" - default ARM64_VA_BITS_39 if ARM64_4K_PAGES - default ARM64_VA_BITS_47 if ARM64_16K_PAGE...
48157aa39286b8eddfb81eeaab4d64d0231450e7
Analyze and fix the following issue in the Linux kernel code: arm64: kernel: Manage absolute relocations in code built under pi/
Problem Details: The mini C runtime runs before relocations are processed, and so it cannot rely on statically initialized pointer variables. Add a check to ensure that such code does not get introduced by accident, by going over the relocations in each object, identifying the ones that operate on data sections that a...
```diff diff --git a/arch/arm64/kernel/pi/Makefile b/arch/arm64/kernel/pi/Makefile index c844a0546d7f..bc32a431fe35 100644 --- a/arch/arm64/kernel/pi/Makefile +++ b/arch/arm64/kernel/pi/Makefile @@ -22,11 +22,16 @@ KCSAN_SANITIZE := n UBSAN_SANITIZE := n KCOV_INSTRUMENT := n +hostprogs := relacheck + +quiet_cmd_pio...
a79f949a5ce1d45329d63742c2a995f2b47f9852
Analyze and fix the following issue in the Linux kernel code: dmaengine: fsl-edma: correct max_segment_size setting
Problem Details: Correcting the previous setting of 0x3fff to the actual value of 0x7fff. Introduced new macro 'EDMA_TCD_ITER_MASK' for improved code clarity and utilization of FIELD_GET to obtain the accurate maximum value. Cc: stable@vger.kernel.org Fixes: e06748539432 ("dmaengine: fsl-edma: support edma memcpy") S...
```diff diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index bb5221158a77..f5e216b157c7 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -30,8 +30,9 @@ #define EDMA_TCD_ATTR_SSIZE(x) (((x) & GENMASK(2, 0)) << 8) #define EDMA_TCD_ATTR_SMOD(x) (((x) & GENMA...
ecec7c9f29a7114a3e23a14020b1149ea7dffb4f
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: Remove shadow Event Log head stored in idxd
Problem Details: head is defined in idxd->evl as a shadow of head in the EVLSTATUS register. There are two issues related to the shadow head: 1. Mismatch between the shadow head and the state of the EVLSTATUS register: If Event Log is supported, upon completion of the Enable Device command, the Event Log head...
```diff diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c index 77f8885cf407..e5a94a93a3cc 100644 --- a/drivers/dma/idxd/cdev.c +++ b/drivers/dma/idxd/cdev.c @@ -345,7 +345,7 @@ static void idxd_cdev_evl_drain_pasid(struct idxd_wq *wq, u32 pasid) spin_lock(&evl->lock); status.bits = ioread64(idxd->reg_...
02f76a9cd4494719600baf1ab278930df39431ab
Analyze and fix the following issue in the Linux kernel code: drm/buddy: Modify duplicate list_splice_tail call
Problem Details: Remove the duplicate list_splice_tail call when the total_allocated < size condition is true. Cc: <stable@vger.kernel.org> # 6.7+ Fixes: 8746c6c9dfa3 ("drm/buddy: Fix alloc_range() error handling code") Reported-by: Bert Karwatzki <spasswolf@web.de> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin....
```diff diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index c1a99bf4dffd..c4222b886db7 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/drm/drm_buddy.c @@ -538,13 +538,13 @@ static int __alloc_range(struct drm_buddy *mm, list_add(&block->left->tmp_link, dfs); } while (1); - lis...
d4c08d8b23b22807c712208cd05cb047e92e7672
Analyze and fix the following issue in the Linux kernel code: phy: qcom-qmp-usb: fix v3 offsets data
Problem Details: The MSM8996 platform has registers setup different to the rest of QMP v3 USB platforms. It has PCS region at 0x600 and no PCS_MISC region, while other platforms have PCS region at 0x800 and PCS_MISC at 0x600. This results in the malfunctioning USB host on some of the platforms. The commit f74c35b630d...
```diff diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 6621246e4ddf..5c003988c35d 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1556,7 +1556,7 @@ static const char * const qmp_phy_vreg_l[] = { "vdda-phy", "v...
4acd21a45c1446277e2abaece97d7fa7c2e692a9
Analyze and fix the following issue in the Linux kernel code: bus: tegra-aconnect: Update dependency to ARCH_TEGRA
Problem Details: Update the architecture dependency to be the generic Tegra because the driver works on the four latest Tegra generations not just Tegra210, if you build a kernel with a specific ARCH_TEGRA_xxx_SOC option that excludes Tegra210 you don't get this driver. Fixes: 46a88534afb59 ("bus: Add support for Tegr...
```diff diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index e6742998f372..d5e7fa9173a1 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -186,11 +186,12 @@ config SUNXI_RSB config TEGRA_ACONNECT tristate "Tegra ACONNECT Bus Driver" - depends on ARCH_TEGRA_210_SOC + depends on ARCH_TEGRA depe...
2e00fd5487c796db8b8324e80bc5fe8a02c15a15
Analyze and fix the following issue in the Linux kernel code: PCI: epf-mhi: Add "pci_epf_mhi_" prefix to the function names
Problem Details: Without the prefix, the function name would appear as "/sys/kernel/config/functions/{sdx55/sm8450}". This will be a problem if multiple functions are supported for this endpoint device. So let's add the "pci_epf_mhi_" prefix to identify _this_ function uniquely. Even though it is an ABI breakage, this...
```diff diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index 1c3e4ea76bd2..5c0dba5ba602 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -913,8 +913,8 @@ static int pci_epf_mhi_probe(struct pci_epf *...
e0b8eb0f6d652981bfd9ba7c619c9d81ed087ad0
Analyze and fix the following issue in the Linux kernel code: media: visl: Add codec specific variability on output frames
Problem Details: When running tests with different input data, the stable output frames could be too similar and hide possible issues. This commit adds variation by using some codec specific parameters. Only HEVC and H.264 support this. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Detlev...
```diff diff --git a/drivers/media/test-drivers/visl/visl-dec.c b/drivers/media/test-drivers/visl/visl-dec.c index e9fa80f18a15..6a9639bd4d61 100644 --- a/drivers/media/test-drivers/visl/visl-dec.c +++ b/drivers/media/test-drivers/visl/visl-dec.c @@ -295,6 +295,35 @@ static void visl_tpg_fill_sequence(struct visl_ctx *...
ce7e79acb6b351a5573d6da4b5ccf047a0accc60
Analyze and fix the following issue in the Linux kernel code: doc: media: visl: Document tpg_verbose parameter
Problem Details: Also document stable frames and what it means for testing tools. Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: add media: prefix to Subject]
```diff diff --git a/Documentation/admin-guide/media/visl.rst b/Documentation/admin-guide/media/visl.rst index db1ef29438e1..cd45145cde68 100644 --- a/Documentation/admin-guide/media/visl.rst +++ b/Documentation/admin-guide/media/visl.rst @@ -49,6 +49,10 @@ Module parameters visl_dprintk_frame_start, visl_dprintk_nf...
9fb86bee963b744e8e25a11a710e1fcf7278278f
Analyze and fix the following issue in the Linux kernel code: media: v4l: marvell: select CONFIG_V4L2_ASYNC where needed
Problem Details: Drivers that call v4l2_async_nf_init() need to select the corresponding Kconfig symbol: ERROR: modpost: "v4l2_async_nf_init" [drivers/media/platform/marvell/cafe_ccic.ko] undefined! ERROR: modpost: "__v4l2_async_nf_add_i2c" [drivers/media/platform/marvell/cafe_ccic.ko] undefined! ERROR: modpost: "v4l2...
```diff diff --git a/drivers/media/platform/marvell/Kconfig b/drivers/media/platform/marvell/Kconfig index d6499ffe30e8..d31f4730f2a3 100644 --- a/drivers/media/platform/marvell/Kconfig +++ b/drivers/media/platform/marvell/Kconfig @@ -7,6 +7,7 @@ config VIDEO_CAFE_CCIC depends on V4L_PLATFORM_DRIVERS depends on PCI...
30baa4a96b23add91a87305baaeba82c4e109e1f
Analyze and fix the following issue in the Linux kernel code: media: pvrusb2: fix pvr2_stream_callback casts
Problem Details: clang-16 complains about a control flow integrity (KCFI) issue in pvrusb2, which casts three different prototypes into pvr2_stream_callback: drivers/media/usb/pvrusb2/pvrusb2-v4l2.c:1070:30: error: cast from 'void (*)(struct pvr2_v4l2_fh *)' to 'pvr2_stream_callback' (aka 'void (*)(void *)') converts ...
```diff diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c index 1764674de98b..58f2f3ff10ee 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-context.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-context.c @@ -90,8 +90,10 @@ static void pvr2_context_destroy(struct pvr2_conte...
3de49ae81c3a0f83a554ecbce4c08e019f30168e
Analyze and fix the following issue in the Linux kernel code: media: sta2x11: fix irq handler cast
Problem Details: clang-16 warns about casting incompatible function pointers: drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: error: cast from 'irqreturn_t (*)(int, struct sta2x11_vip *)' (aka 'enum irqreturn (*)(int, struct sta2x11_vip *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incomp...
```diff diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index e4cf9d63e926..364ce9e57018 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -757,7 +757,7 @@ static const struct video_device video_dev_template = { /** * ...
26a3a10342748862dcc8d22222563f6ca03d6ca3
Analyze and fix the following issue in the Linux kernel code: media: videobuf2: Add missing doc comment for waiting_in_dqbuf
Problem Details: While at it rearrange other comments to match the order of struct members. Fixes: d65842f7126a ("media: vb2: add waiting_in_dqbuf flag") Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Acked-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index d9c6b5d4e990..8b86996b2719 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -72,6 +72,10 @@ struct vb2_buffer; * argument to other ops in this structure. * @put_userptr: inform the allocat...
95ac1210fb2753f968ebce0730d4fbc553c2a3dc
Analyze and fix the following issue in the Linux kernel code: media: pvrusb2: remove redundant NULL check
Problem Details: Pointer dip->stream cannot be NULL due to a shift, thus remove redundant NULL check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c74e0062684b ("V4L/DVB (5059): Pvrusb2: Be smarter about mode restoration") Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru> Signed-off-by: Han...
```diff diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index c04ab7258d64..d195bd6a2248 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c @@ -1198,11 +1198,6 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, ...
0b70530ee740861f4776ff724fcc25023df1799a
Analyze and fix the following issue in the Linux kernel code: media: go7007: add check of return value of go7007_read_addr()
Problem Details: If go7007_read_addr() returns error channel is not assigned a value. In this case go to allocfail. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 866b8695d67e ("Staging: add the go7007 video driver") Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru> Signed-off-by: Hans Verkui...
```diff diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c index eeb85981e02b..762c13e49bfa 100644 --- a/drivers/media/usb/go7007/go7007-usb.c +++ b/drivers/media/usb/go7007/go7007-usb.c @@ -1201,7 +1201,9 @@ static int go7007_usb_probe(struct usb_interface *intf, u16 channe...
45d6ed917020855f0ca3ffbe549aba96ba992983
Analyze and fix the following issue in the Linux kernel code: docs: media: fix typo in docs
Problem Details: This patch resolves a spelling error in the documentation. It is submitted as part of my application to the "Linux Kernel Bug Fixing Spring Unpaid 2024" mentorship program of the Linux Kernel Foundation. Signed-off-by: Vincenzo Mezzela <vincenzo.mezzela@gmail.com> Signed-off-by: Hans Verkuil <hverkui...
```diff diff --git a/Documentation/driver-api/media/v4l2-subdev.rst b/Documentation/driver-api/media/v4l2-subdev.rst index 1db2ba27c54c..13aec460e802 100644 --- a/Documentation/driver-api/media/v4l2-subdev.rst +++ b/Documentation/driver-api/media/v4l2-subdev.rst @@ -229,7 +229,7 @@ Asynchronous sub-device notifier for ...
4797a3dd46f220e6d83daf54d70c5b33db6deb01
Analyze and fix the following issue in the Linux kernel code: media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak
Problem Details: Free the memory allocated in v4l2_ctrl_handler_init on release. Fixes: a8ef0488cc59 ("media: imx: add csc/scaler mem2mem device") Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c index 1fd39a2fca98..95cca281e8a3 100644 --- a/drivers/staging/media/imx/imx-media-csc-scaler.c +++ b/drivers/staging/media/imx/imx-media-csc-scaler.c @@ -803,6 +803,7 @@ static int ipu_csc_scaler_rel...
a38cd27c9ee8c25308b71ea16393d0c231e9bde4
Analyze and fix the following issue in the Linux kernel code: staging: media: starfive: Set 16 bpp for capture_raw device
Problem Details: For StarFive JH7110 Camera Subsystem, capture_raw video device output raw10 pixelformat requires 16bit of alignment. Fixes: e080f339c80a ("media: staging: media: starfive: camss: Add capture driver") Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com> Signed-off-by: Hans Verkuil <hverk...
```diff diff --git a/drivers/staging/media/starfive/camss/stf-capture.c b/drivers/staging/media/starfive/camss/stf-capture.c index 70c24b050a1b..ec5169e7b391 100644 --- a/drivers/staging/media/starfive/camss/stf-capture.c +++ b/drivers/staging/media/starfive/camss/stf-capture.c @@ -20,28 +20,28 @@ static const struct s...
7d62ebc6541491acbb316254abcfda79faffa8ac
Analyze and fix the following issue in the Linux kernel code: media: dvb-frontends: Clean up errors in tda8083.h
Problem Details: Fix the following errors reported by checkpatch: ERROR: "foo* bar" should be "foo *bar" Signed-off-by: XueBing Chen <chenxb_99091@126.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/dvb-frontends/tda8083.h b/drivers/media/dvb-frontends/tda8083.h index 3a671ec3f45e..b635ac7ef688 100644 --- a/drivers/media/dvb-frontends/tda8083.h +++ b/drivers/media/dvb-frontends/tda8083.h @@ -24,11 +24,11 @@ struct tda8083_config }; #if IS_REACHABLE(CONFIG_DVB_TDA8083) -extern...
9e996dc3f1dcb4d3f8c8d057f61c86f8eb2e7051
Analyze and fix the following issue in the Linux kernel code: media: Clean up errors in bcm3510_priv.h
Problem Details: Fix the following errors reported by checkpatch: ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: XueBing Chen <chenxb_99091@126.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/dvb-frontends/bcm3510_priv.h b/drivers/media/dvb-frontends/bcm3510_priv.h index 2c9f3c430a82..89c71bc42a0f 100644 --- a/drivers/media/dvb-frontends/bcm3510_priv.h +++ b/drivers/media/dvb-frontends/bcm3510_priv.h @@ -12,11 +12,11 @@ #define PACKED __attribute__((packed)) #undef err...
6dfb8796e305283e0f1de3724cea668b0cc1aa43
Analyze and fix the following issue in the Linux kernel code: media: stv6110x: Clean up errors in stv6110x.h
Problem Details: Fix the following errors reported by checkpatch: ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: XueBing Chen <chenxb_99091@126.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/dvb-frontends/stv6110x_priv.h b/drivers/media/dvb-frontends/stv6110x_priv.h index b27769558f78..81410595820a 100644 --- a/drivers/media/dvb-frontends/stv6110x_priv.h +++ b/drivers/media/dvb-frontends/stv6110x_priv.h @@ -20,13 +20,13 @@ #define dprintk(__y, __z, format, arg...) do { ...
732cbefc5a3ddb4ad6e844e16445e786b08f10f7
Analyze and fix the following issue in the Linux kernel code: media: dvb-frontends: Clean up errors in cx24110.h
Problem Details: Fix the following errors reported by checkpatch: ERROR: "foo* bar" should be "foo *bar" Signed-off-by: XueBing Chen <chenxb_99091@126.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/dvb-frontends/cx24110.h b/drivers/media/dvb-frontends/cx24110.h index 834b011d3462..839551841893 100644 --- a/drivers/media/dvb-frontends/cx24110.h +++ b/drivers/media/dvb-frontends/cx24110.h @@ -34,11 +34,11 @@ static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val) } ...
75ee3c49f8fd8ed4901b4b45f8ce4aadc8b41f40
Analyze and fix the following issue in the Linux kernel code: media: zl10036: Fix my email address
Problem Details: It has been wrong from the beginning. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Reported-by: Ulrich Mueller <ulm@gentoo.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/dvb-frontends/zl10036.c b/drivers/media/dvb-frontends/zl10036.c index 7ba575e9c55f..3df055be66d6 100644 --- a/drivers/media/dvb-frontends/zl10036.c +++ b/drivers/media/dvb-frontends/zl10036.c @@ -3,7 +3,7 @@ * Driver for Zarlink zl10036 DVB-S silicon tuner * * Copyright (C) 2006...
856525e8db272b0ce6d9c6e6c2eeb97892b485a6
Analyze and fix the following issue in the Linux kernel code: media: sun8i-di: Fix chroma difference threshold
Problem Details: While there is no good explanation what this value does, vendor driver uses value 31 for it. Align driver with it. Fixes: a4260ea49547 ("media: sun4i: Add H3 deinterlace driver") Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
```diff diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index 5d58a5e78137..a1c35a2b68ed 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -304,7 +304,7 @@ static void deinterlace_init(...
cff104e33bad38f4b2c8d58816a7accfaa2879f9
Analyze and fix the following issue in the Linux kernel code: media: sun8i-di: Fix power on/off sequences
Problem Details: According to user manual, reset line should be deasserted before clocks are enabled. Also fix power down sequence to be reverse of that. Fixes: a4260ea49547 ("media: sun4i: Add H3 deinterlace driver") Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@...
```diff diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index 26f6964996f2..5d58a5e78137 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -929,11 +929,18 @@ static int deinterlace_runt...
794b581f8c6eb7b60fe468ccb96dd3cd38ff779f
Analyze and fix the following issue in the Linux kernel code: media: sun8i-di: Fix coefficient writes
Problem Details: Currently coefficients are applied only once, since they don't change. However, this is done before enable bit is set and thus it doesn't get applied properly. Fix that by applying coefficients after enable bit is set. While this means that it will be done evey time, it doesn't bring much time penalty...
```diff diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c index 954fabec27f6..26f6964996f2 100644 --- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c @@ -66,6 +66,7 @@ static void deinterlace_device_...
3a11887f7f11a6bb1f05e7f67b3ea20dadfec443
Analyze and fix the following issue in the Linux kernel code: media: cedrus: h265: Fix configuring bitstream size
Problem Details: bit_size field holds size of slice, not slice + header. Because of HW quirks, driver can't program in just slice, but also preceding header. But that means that currently used bit_size is wrong (too small). Instead, just use size of whole buffer. There is no harm in doing this. Fixes: 86caab29da78 ("m...
```diff diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c index 52e94c8f2f01..780da4a8b5af 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c @@ -427,11 +427,11 @@ static int cedrus_h265_setu...
1b69c938310958e9a0a46d481247f6765422c40a
Analyze and fix the following issue in the Linux kernel code: media: mediatek: vcodec: Remove unneeded semicolon
Problem Details: ./drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c:569:2-3: Unneeded semicolon ./drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c:583:2-3: Unneeded semicolon ./drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c:599:2-3: Unneeded s...
```diff diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c index d54b3833790d..b903e39fee89 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c +++ b/drivers/media/platform/...
aebfdfe39b9327a3077d0df8db3beb3160c9bdd0
Analyze and fix the following issue in the Linux kernel code: NTB: fix possible name leak in ntb_register_device()
Problem Details: If device_register() fails in ntb_register_device(), the device name allocated by dev_set_name() should be freed. As per the comment in device_register(), callers should use put_device() to give up the reference in the error path. So fix this by calling put_device() in the error path so that the name c...
```diff diff --git a/drivers/ntb/core.c b/drivers/ntb/core.c index 27dd93deff6e..d702bee78082 100644 --- a/drivers/ntb/core.c +++ b/drivers/ntb/core.c @@ -100,6 +100,8 @@ EXPORT_SYMBOL(ntb_unregister_client); int ntb_register_device(struct ntb_dev *ntb) { + int ret; + if (!ntb) return -EINVAL; if (!ntb->pdev...
166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210
Analyze and fix the following issue in the Linux kernel code: net/sched: act_mirred: don't override retval if we already lost the skb
Problem Details: If we're redirecting the skb, and haven't called tcf_mirred_forward(), yet, we need to tell the core to drop the skb by setting the retcode to SHOT. If we have called tcf_mirred_forward(), however, the skb is out of our hands and returning SHOT will lead to UaF. Move the retval override to the error p...
```diff diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 291d47c9eb69..6faa7d00da09 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -266,8 +266,7 @@ static int tcf_mirred_to_dev(struct sk_buff *skb, struct tcf_mirred *m, if (unlikely(!(dev->flags & IFF_UP)) || !netif_carrier_ok(d...
52f671db18823089a02f07efc04efdb2272ddc17
Analyze and fix the following issue in the Linux kernel code: net/sched: act_mirred: use the backlog for mirred ingress
Problem Details: The test Davide added in commit ca22da2fbd69 ("act_mirred: use the backlog for nested calls to mirred ingress") hangs our testing VMs every 10 or so runs, with the familiar tcp_v4_rcv -> tcp_v4_rcv deadlock reported by lockdep. The problem as previously described by Davide (see Link) is that if we rev...
```diff diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 0a1a9e40f237..291d47c9eb69 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c @@ -232,18 +232,14 @@ release_idr: return err; } -static bool is_mirred_nested(void) -{ - return unlikely(__this_cpu_read(mirred_nest_level) > 1); -...
21bd52ea38a873b9dce2da86e9d63a95cdbe1275
Analyze and fix the following issue in the Linux kernel code: tcp: Spelling s/curcuit/circuit/
Problem Details: Fix a misspelling of "circuit". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index b1c4462a0798..74c03f0a6c0c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1164,7 +1164,7 @@ static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered, * L|R 1 - orig is lost, retransmit is in flight. * S|R 1 - orig ...
a9f80df4f51440303d063b55bb98720857693821
Analyze and fix the following issue in the Linux kernel code: net: ethernet: adi: requires PHYLIB support
Problem Details: This driver uses functions that are supplied by the Kconfig symbol PHYLIB, so select it to ensure that they are built as needed. When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build (linker) errors that are resolved by this Kconfig change: ld: drivers/net/ethernet/adi/adin1110.o: i...
```diff diff --git a/drivers/net/ethernet/adi/Kconfig b/drivers/net/ethernet/adi/Kconfig index da3bdd302502..c91b4dcef4ec 100644 --- a/drivers/net/ethernet/adi/Kconfig +++ b/drivers/net/ethernet/adi/Kconfig @@ -7,6 +7,7 @@ config NET_VENDOR_ADI bool "Analog Devices devices" default y depends on SPI + select PHYLI...
66b60b0c8c4a163b022a9f0ad6769b0fd3dc662f
Analyze and fix the following issue in the Linux kernel code: dccp/tcp: Unhash sk from ehash for tb2 alloc failure after check_estalblished().
Problem Details: syzkaller reported a warning [0] in inet_csk_destroy_sock() with no repro. WARN_ON(inet_sk(sk)->inet_num && !inet_csk(sk)->icsk_bind_hash); However, the syzkaller's log hinted that connect() failed just before the warning due to FAULT_INJECTION. [1] When connect() is called for an unbound socket,...
```diff diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 93e9193df544..308ff34002ea 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -1130,10 +1130,33 @@ ok: return 0; error: + if (sk_hashed(sk)) { + spinlock_t *lock = inet_ehash_lockp(hinfo, sk->sk_hash); + + ...
f7a70d650b0b6b0134ccba763d672c8439d9f09b
Analyze and fix the following issue in the Linux kernel code: net: bridge: switchdev: Ensure deferred event delivery on unoffload
Problem Details: When unoffloading a device, it is important to ensure that all relevant deferred events are delivered to it before it disassociates itself from the bridge. Before this change, this was true for the normal case when a device maps 1:1 to a net_bridge_port, i.e. br0 / swp0 When swp0 leaves br0, t...
```diff diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index 6a7cb01f121c..7b41ee8740cb 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -804,6 +804,16 @@ static void nbp_switchdev_unsync_objs(struct net_bridge_port *p, br_switchdev_mdb_replay(br_dev, dev, ctx, false, bloc...
dc489f86257cab5056e747344f17a164f63bff4b
Analyze and fix the following issue in the Linux kernel code: net: bridge: switchdev: Skip MDB replays of deferred events on offload
Problem Details: Before this change, generation of the list of MDB events to replay would race against the creation of new group memberships, either from the IGMP/MLD snooping logic or from user configuration. While new memberships are immediately visible to walkers of br->mdb_list, the notification of their existence...
```diff diff --git a/include/net/switchdev.h b/include/net/switchdev.h index a43062d4c734..8346b0d29542 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -308,6 +308,9 @@ void switchdev_deferred_process(void); int switchdev_port_attr_set(struct net_device *dev, const struct switchdev_attr *...
b4ea9b6a18ebf7f9f3a7a60f82e925186978cfcf
Analyze and fix the following issue in the Linux kernel code: net/iucv: fix the allocation size of iucv_path_table array
Problem Details: iucv_path_table is a dynamically allocated array of pointers to struct iucv_path items. Yet, its size is calculated as if it was an array of struct iucv_path items. Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Reviewed-by: Alexandra Winter <wintera@linux.ibm.com> Signed-off-by: David S. M...
```diff diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 6334f64f04d5..b0b3e9c5af44 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -156,7 +156,7 @@ static char iucv_error_pathid[16] = "INVALID PATHID"; static LIST_HEAD(iucv_handler_list); /* - * iucv_path_table: an array of iucv_path structures. + * iucv...
2210c5485e4331d0abd7a0296f10178d1dc25cd2
Analyze and fix the following issue in the Linux kernel code: net/iucv: fix virtual vs physical address confusion
Problem Details: Fix virtual vs physical address confusion. This does not fix a bug since virtual and physical address spaces are currently the same. Acked-by: Alexandra Winter <wintera@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 6334f64f04d5..9e62783e6acb 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -286,6 +286,7 @@ static union iucv_param *iucv_param_irq[NR_CPUS]; */ static inline int __iucv_call_b2f0(int command, union iucv_param *parm) { + unsigned long reg1 = virt_to...
d3d17e23d1a0d1f959b4fa55b35f1802d9c584fa
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Fix NULL pointer dereference in tb_port_update_credits()
Problem Details: Olliver reported that his system crashes when plugging in Thunderbolt 1 device: BUG: kernel NULL pointer dereference, address: 0000000000000020 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:tb_port_do...
```diff diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index 900114ba4371..fad40c4bc710 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1249,6 +1249,9 @@ int tb_port_update_credits(struct tb_port *port) ret = tb_port_do_update_credits(port); if (ret) ret...
31f26e4fec1fd9fd51efab0aee6b6c370b5e27e7
Analyze and fix the following issue in the Linux kernel code: selftests: bonding: make sure new active is not null
Problem Details: One of Jakub's tests[1] shows that there may be period all ports are down and no active slave. This makes the new_active_slave null and the test fails. Add a check to make sure the new active is not null. [ 189.051966] br0: port 2(s1) entered disabled state [ 189.317881] bond0: (slave eth1): link ...
```diff diff --git a/tools/testing/selftests/drivers/net/bonding/bond_options.sh b/tools/testing/selftests/drivers/net/bonding/bond_options.sh index 6fd0cff3e1e9..644ea5769e81 100755 --- a/tools/testing/selftests/drivers/net/bonding/bond_options.sh +++ b/tools/testing/selftests/drivers/net/bonding/bond_options.sh @@ -5...
75a323e604fc77c50c7ef2af6f0eeef221637642
Analyze and fix the following issue in the Linux kernel code: evm: Make it independent from 'integrity' LSM
Problem Details: Define a new structure for EVM-specific metadata, called evm_iint_cache, and embed it in the inode security blob. Introduce evm_iint_inode() to retrieve metadata, and register evm_inode_alloc_security() for the inode_alloc_security LSM hook, to initialize the structure (before splitting metadata, this ...
```diff diff --git a/include/linux/evm.h b/include/linux/evm.h index cb481eccc967..d48d6da32315 100644 --- a/include/linux/evm.h +++ b/include/linux/evm.h @@ -12,15 +12,12 @@ #include <linux/integrity.h> #include <linux/xattr.h> -struct integrity_iint_cache; - #ifdef CONFIG_EVM extern int evm_set_key(void *key, s...
06cca5110774f7b59a1685431ac697865588f4ca
Analyze and fix the following issue in the Linux kernel code: integrity: Move integrity_kernel_module_request() to IMA
Problem Details: In preparation for removing the 'integrity' LSM, move integrity_kernel_module_request() to IMA, and rename it to ima_kernel_module_request(). Rewrite the function documentation, to explain better what the problem is. Compile it conditionally if CONFIG_INTEGRITY_ASYMMETRIC_KEYS is enabled, and call it ...
```diff diff --git a/include/linux/ima.h b/include/linux/ima.h index 31ef6c3c3207..0f9af283cbc8 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h @@ -256,4 +256,14 @@ static inline bool ima_appraise_signature(enum kernel_read_file_id func) return false; } #endif /* CONFIG_IMA_APPRAISE && CONFIG_INTEGRITY_T...
4860abb91f3d7fbaf8147d54782149bb1fc45892
Analyze and fix the following issue in the Linux kernel code: smb: Fix regression in writes when non-standard maximum write size negotiated
Problem Details: The conversion to netfs in the 6.3 kernel caused a regression when maximum write size is set by the server to an unexpected value which is not a multiple of 4096 (similarly if the user overrides the maximum write size by setting mount parm "wsize", but sets it to a value that is not a multiple of 4096)...
```diff diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index d03253f8f145..ac9595504f4b 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -3444,8 +3444,18 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx) * the user on mount */ if ((cifs_sb->ctx->wsize == 0) || - ...
32019c659ecfe1d92e3bf9fcdfbb11a7c70acd58
Analyze and fix the following issue in the Linux kernel code: x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault()
Problem Details: When trying to use copy_from_kernel_nofault() to read vsyscall page through a bpf program, the following oops was reported: BUG: unable to handle page fault for address: ffffffffff600000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 3231067 P4D 32310...
```diff diff --git a/arch/x86/mm/maccess.c b/arch/x86/mm/maccess.c index 6993f026adec..42115ac079cf 100644 --- a/arch/x86/mm/maccess.c +++ b/arch/x86/mm/maccess.c @@ -3,6 +3,8 @@ #include <linux/uaccess.h> #include <linux/kernel.h> +#include <asm/vsyscall.h> + #ifdef CONFIG_X86_64 bool copy_from_kernel_nofault_al...
3738d710af51286d3814332343d10b0c745eaa12
Analyze and fix the following issue in the Linux kernel code: configs/debug: add NET debug config
Problem Details: The debug.config file is really great to easily enable a bunch of general debugging features on a CI-like setup. But it would be great to also include core networking debugging config. A few CI's validating features from the Net tree also enable a few other debugging options on top of debug.config. A ...
```diff diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config index 4722b998a324..509ee703de15 100644 --- a/kernel/configs/debug.config +++ b/kernel/configs/debug.config @@ -40,6 +40,12 @@ CONFIG_UBSAN_ENUM=y CONFIG_UBSAN_SHIFT=y CONFIG_UBSAN_UNREACHABLE=y # +# Networking Debugging +# +CONFIG_NET_DE...
14db5f64a971fce3d8ea35de4dfc7f443a3efb92
Analyze and fix the following issue in the Linux kernel code: zonefs: Improve error handling
Problem Details: Write error handling is racy and can sometime lead to the error recovery path wrongly changing the inode size of a sequential zone file to an incorrect value which results in garbage data being readable at the end of a file. There are 2 problems: 1) zonefs_file_dio_write() updates a zone file write p...
```diff diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c index 6ab2318a9c8e..dba5dcb62bef 100644 --- a/fs/zonefs/file.c +++ b/fs/zonefs/file.c @@ -348,7 +348,12 @@ static int zonefs_file_write_dio_end_io(struct kiocb *iocb, ssize_t size, struct zonefs_inode_info *zi = ZONEFS_I(inode); if (error) { - zonefs_io_er...
9e46c70e829bddc24e04f963471e9983a11598b7
Analyze and fix the following issue in the Linux kernel code: md: Don't suspend the array for interrupted reshape
Problem Details: md_start_sync() will suspend the array if there are spares that can be added or removed from conf, however, if reshape is still in progress, this won't happen at all or data will be corrupted(remove_and_add_spares won't be called from md_choose_sync_action for reshape), hence there is no need to suspen...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index dcde67a81647..9e41a9aaba8b 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9378,12 +9378,17 @@ static void md_start_sync(struct work_struct *ws) bool suspend = false; char *name; - if (md_spares_need_change(mddev)) + /* + * If reshape is still i...
ad39c08186f8a0f221337985036ba86731d6aafe
Analyze and fix the following issue in the Linux kernel code: md: Don't register sync_thread for reshape directly
Problem Details: Currently, if reshape is interrupted, then reassemble the array will register sync_thread directly from pers->run(), in this case 'MD_RECOVERY_RUNNING' is set directly, however, there is no guarantee that md_do_sync() will be executed, hence stop_sync_thread() will hang because 'MD_RECOVERY_RUNNING' ca...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index fbf04160d009..dcde67a81647 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9376,6 +9376,7 @@ static void md_start_sync(struct work_struct *ws) struct mddev *mddev = container_of(ws, struct mddev, sync_work); int spares = 0; bool suspend = false; ...
82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6
Analyze and fix the following issue in the Linux kernel code: md: Make sure md_do_sync() will set MD_RECOVERY_DONE
Problem Details: stop_sync_thread() will interrupt md_do_sync(), and md_do_sync() must set MD_RECOVERY_DONE, so that follow up md_check_recovery() will unregister sync_thread, clear MD_RECOVERY_RUNNING and wake up stop_sync_thread(). If MD_RECOVERY_WAIT is set or the array is read-only, md_do_sync() will return withou...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index 2a1c19f87d01..fbf04160d009 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8792,12 +8792,16 @@ void md_do_sync(struct md_thread *thread) int ret; /* just incase thread restarts... */ - if (test_bit(MD_RECOVERY_DONE, &mddev->recovery) || - tes...
55a48ad2db64737f7ffc0407634218cc6e4c513b
Analyze and fix the following issue in the Linux kernel code: md: Don't ignore read-only array in md_check_recovery()
Problem Details: Usually if the array is not read-write, md_check_recovery() won't register new sync_thread in the first place. And if the array is read-write and sync_thread is registered, md_set_readonly() will unregister sync_thread before setting the array read-only. md/raid follow this behavior hence there is no p...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index eea8dd529b5e..2a1c19f87d01 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9449,6 +9449,20 @@ not_running: sysfs_notify_dirent_safe(mddev->sysfs_action); } +static void unregister_sync_thread(struct mddev *mddev) +{ + if (!test_bit(MD_RECOVERY_DO...
1baae052cccd08daf9a9d64c3f959d8cdb689757
Analyze and fix the following issue in the Linux kernel code: md: Don't ignore suspended array in md_check_recovery()
Problem Details: mddev_suspend() never stop sync_thread, hence it doesn't make sense to ignore suspended array in md_check_recovery(), which might cause sync_thread can't be unregistered. After commit f52f5c71f3d4 ("md: fix stopping sync thread"), following hang can be triggered by test shell/integrity-caching.sh: 1)...
```diff diff --git a/drivers/md/md.c b/drivers/md/md.c index e52896c140bd..eea8dd529b5e 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9473,9 +9473,6 @@ not_running: */ void md_check_recovery(struct mddev *mddev) { - if (READ_ONCE(mddev->suspended)) - return; - if (mddev->bitmap) md_bitmap_daemon_work...
682158ab532a5bd24399fec25b65fec561f0f6e9
Analyze and fix the following issue in the Linux kernel code: bpf: Fix test verif_scale_strobemeta_subprogs failure due to llvm19
Problem Details: With latest llvm19, I hit the following selftest failures with $ ./test_progs -j libbpf: prog 'on_event': BPF program load failed: Permission denied libbpf: prog 'on_event': -- BEGIN PROG LOAD LOG -- combined stack size of 4 calls is 544. Too large verification time 1344153 usec stack dept...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index aa192dc735a9..011d54a1dc53 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -5812,6 +5812,17 @@ static int check_ptr_alignment(struct bpf_verifier_env *env, strict); } +static int round_up_stack_depth(struct bpf_verifi...
354da4cf57af5d8b5302251204d6077600b6d3d6
Analyze and fix the following issue in the Linux kernel code: x86/cpu/topology: Let XEN/PV use topology from CPUID/MADT
Problem Details: It turns out that XEN/PV Dom0 has halfways usable CPUID/MADT enumeration except that it cannot deal with CPUs which are enumerated as disabled in MADT. DomU has no MADT and provides at least rudimentary topology information in CPUID leaves 1 and 4. For both it's important that there are not more poss...
```diff diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index df741fbbc660..4bf82dbd2a6b 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -23,8 +23,6 @@ #include <linux/serial_core.h> #include <linux/pgtable.h> -#include <xen/xen.h> - #include <asm/e820/api.h> #...
3d41009425225ca5e09016c634ecee513b4713bb
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Provide a sane leaf 0xb/0x1f parser
Problem Details: detect_extended_topology() along with it's early() variant is a classic example for duct tape engineering: - It evaluates an array of subleafs with a boatload of local variables for the relevant topology levels instead of using an array to save the enumerated information and propagate it to ...
```diff diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile index b1c655e8689d..45b735b8e1df 100644 --- a/arch/x86/kernel/cpu/Makefile +++ b/arch/x86/kernel/cpu/Makefile @@ -18,7 +18,7 @@ KMSAN_SANITIZE_common.o := n KCSAN_SANITIZE_common.o := n obj-y := cacheinfo.o scattered.o -obj-y += to...
871760eb7af57accc5402142154e64f21701fa16
Analyze and fix the following issue in the Linux kernel code: io_uring: kill stale comment for io_cqring_overflow_kill()
Problem Details: This function now deals only with discarding overflow entries on ring free and exit, and it no longer returns whether we successfully flushed all entries as there's no CQE posting involved anymore. Kill the outdated comment. Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 45a2f8f3a77c..cf2f514b7cc0 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -666,7 +666,6 @@ static void io_cq_unlock_post(struct io_ring_ctx *ctx) io_commit_cqring_flush(ctx); } -/* Returns true if there are no backlogged entries af...
9ddf190a7df77b77817f955fdb9c2ae9d1c9c9a3
Analyze and fix the following issue in the Linux kernel code: scsi: jazz_esp: Only build if SCSI core is builtin
Problem Details: JAZZ_ESP is a bool kconfig symbol that selects SCSI_SPI_ATTRS. When CONFIG_SCSI=m, this results in SCSI_SPI_ATTRS=m while JAZZ_ESP=y, which causes many undefined symbol linker errors. Fix this by only offering to build this driver when CONFIG_SCSI=y. [mkp: JAZZ_ESP is unique in that it does not supp...
```diff diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index addac7fbe37b..9ce27092729c 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1270,7 +1270,7 @@ source "drivers/scsi/arm/Kconfig" config JAZZ_ESP bool "MIPS JAZZ FAS216 SCSI support" - depends on MACH_JAZZ && SCSI + depends on MAC...
9f3dbcb5632d6876226031d552ef6163bb3ad215
Analyze and fix the following issue in the Linux kernel code: scsi: csiostor: Avoid function pointer casts
Problem Details: csiostor uses function pointer casts to keep the csio_ln_ev state machine hidden, but this causes warnings about control flow integrity (KCFI) violations in clang-16 and higher: drivers/scsi/csiostor/csio_lnode.c:1098:33: error: cast from 'void (*)(struct csio_lnode *, enum csio_ln_ev)' to 'csio_sm_st...
```diff diff --git a/drivers/scsi/csiostor/csio_defs.h b/drivers/scsi/csiostor/csio_defs.h index c38017b4af98..e50e93e7fe5a 100644 --- a/drivers/scsi/csiostor/csio_defs.h +++ b/drivers/scsi/csiostor/csio_defs.h @@ -73,7 +73,21 @@ csio_list_deleted(struct list_head *list) #define csio_list_prev(elem) (((struct list_hea...
0793e511c4c66c38dd26add86f7236bcdc70c3b5
Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Add IRQ override quirk for ASUS ExpertBook B2502FBA
Problem Details: In order to fix the keyboard on ASUS ExpertBook B2502FBA, add an IRQ override quirk for it in analogy with how it was done for other members of this machine family. Link: https://lore.kernel.org/linux-acpi/20230411183144.6932-1-pmenzel@molgen.mpg.de Link: https://bugzilla.kernel.org/show_bug.cgi?id=21...
```diff diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 65ce43ecfa8c..c99b0cf5e22e 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -496,6 +496,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = { DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"), }, }, + { +...
5761eb9761d2d5fe8248a9b719efc4d8baf1f24a
Analyze and fix the following issue in the Linux kernel code: scsi: smartpqi: Fix disable_managed_interrupts
Problem Details: Correct blk-mq registration issue with module parameter disable_managed_interrupts enabled. When we turn off the default PCI_IRQ_AFFINITY flag, the driver needs to register with blk-mq using blk_mq_map_queues(). The driver is currently calling blk_mq_pci_map_queues() which results in a stack trace and...
```diff diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index ceff1ec13f9e..385180c98be4 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6533,8 +6533,11 @@ static void pqi_map_queues(struct Scsi_Host *shost) { struct pqi_ct...
f2dced9d1992824d677593072bc20eccf66ac5d5
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: Uninitialized variable in ufshcd_devfreq_target()
Problem Details: There is one goto where "sched_clk_scaling_suspend_work" is true but "scale_up" is uninitialized. It leads to a Smatch uninitialized variable warning: drivers/ufs/core/ufshcd.c:1589 ufshcd_devfreq_target() error: uninitialized symbol 'scale_up'. Fixes: 1d969731b87f ("scsi: ufs: core: Only suspend cl...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index d77b25b79ae3..3b89c9d4aa40 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -1469,7 +1469,7 @@ static int ufshcd_devfreq_target(struct device *dev, int ret = 0; struct ufs_hba *hba = dev_get_drvdata(dev); kti...
de959094eb2197636f7c803af0943cb9d3b35804
Analyze and fix the following issue in the Linux kernel code: scsi: target: pscsi: Fix bio_put() for error case
Problem Details: As of commit 066ff571011d ("block: turn bio_kmalloc into a simple kmalloc wrapper"), a bio allocated by bio_kmalloc() must be freed by bio_uninit() and kfree(). That is not done properly for the error case, hitting WARN and NULL pointer dereference in bio_free(). Fixes: 066ff571011d ("block: turn bio_...
```diff diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 41b7489d37ce..ed4fd22eac6e 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -907,12 +907,15 @@ new_bio: return 0; fail: - if (bio) - bio_put(bio); + if (bio) { + bio_unini...
b5fc07a5fb56216a49e6c1d0b172d5464d99a89b
Analyze and fix the following issue in the Linux kernel code: scsi: core: Consult supported VPD page list prior to fetching page
Problem Details: Commit c92a6b5d6335 ("scsi: core: Query VPD size before getting full page") removed the logic which checks whether a VPD page is present on the supported pages list before asking for the page itself. That was done because SPC helpfully states "The Supported VPD Pages VPD page list may or may not includ...
```diff diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 76d369343c7a..8cad9792a562 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -328,21 +328,39 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer, return result + 4; } +enum scsi_vpd_parameters { + SCSI_VPD_H...
e18afcb7b2a12b635ac10081f943fcf84ddacc51
Analyze and fix the following issue in the Linux kernel code: ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()
Problem Details: After unregistering the CPU idle device, the memory associated with it is not freed, leading to a memory leak: unreferenced object 0xffff896282f6c000 (size 1024): comm "swapper/0", pid 1, jiffies 4294893170 hex dump (first 32 bytes): 00 00 00 00 0b 00 00 00 00 00 00 00 00 00 00 00 ..............
```diff diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 55437f5e0c3a..bd6a7857ce05 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1430,6 +1430,8 @@ int acpi_processor_power_exit(struct acpi_processor *pr) acpi_processor_registered--; if (acpi_pr...