id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
94e6e889a786dd16542fc8f2a45405fa13e3bbb5
Analyze and fix the following issue in the Linux kernel code: dlm: fix error if inactive rsb is not hashed
Problem Details: If an inactive rsb is not hashed anymore and this could occur because we releases and acquired locks we need to signal the followed code that the lookup failed. Since the lookup was successful, but it isn't part of the rsb hash anymore we need to signal it by setting error to -EBADR as dlm_search_rsb_t...
```diff diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index c8ff88f1cdcf..499fa999ae83 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -784,6 +784,7 @@ static int find_rsb_dir(struct dlm_ls *ls, const void *name, int len, } } else { write_unlock_bh(&ls->ls_rsbtbl_lock); + error = -EBADR; goto do_new; } ```
7e55bc0110bbb8a6f5419a178168d5df1c1fc00a
Analyze and fix the following issue in the Linux kernel code: perf test: Fix spelling mistake "sythesizing" -> "synthesizing"
Problem Details: There are spelling mistakes in TEST_ASSERT_VAL messages. Fix them. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20250228090941.680226-1-colin.i.king@gmail.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
```diff diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c index ddd1da9a4ba9..446a3615d720 100644 --- a/tools/perf/tests/mmap-thread-lookup.c +++ b/tools/perf/tests/mmap-thread-lookup.c @@ -229,11 +229,11 @@ static int mmap_events(synth_cb synth) static int test__mmap_thread_lo...
75100d848ef4b8ca39bb6dd3a21181e37dea27e2
Analyze and fix the following issue in the Linux kernel code: perf build: Fix in-tree build due to symbolic link
Problem Details: Building perf in-tree is broken after commit 890a1961c812 ("perf tools: Create source symlink in perf object dir") which added a 'source' symlink in the output dir pointing to the source dir. With in-tree builds, the added 'SOURCE = ...' line is executed multiple times (I observed 2 during the build p...
```diff diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 55d6ce9ea52f..d0b50ccc9d7b 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -158,7 +158,7 @@ ifneq ($(OUTPUT),) VPATH += $(OUTPUT) export VPATH # create symlink to the original source -SOURCE := $(shell ln -sf $(src...
ee01b2f2d7d0010787c2343463965bbc283a497f
Analyze and fix the following issue in the Linux kernel code: net: gso: fix ownership in __udp_gso_segment
Problem Details: In __udp_gso_segment the skb destructor is removed before segmenting the skb but the socket reference is kept as-is. This is an issue if the original skb is later orphaned as we can hit the following bug: kernel BUG at ./include/linux/skbuff.h:3312! (skb_orphan) RIP: 0010:ip_rcv_core+0x8b2/0xca0 ...
```diff diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index a5be6e4ed326..ecfca59f31f1 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -321,13 +321,17 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb, /* clear destructor to avoid skb_segment assigning it to tail */ c...
2a289aed3fcd7fdd6d5c8def0f992d31a0754094
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Always set mp_state to RUNNABLE on wakeup from HLT
Problem Details: When emulating HLT and a wake event is already pending, explicitly mark the vCPU RUNNABLE (via kvm_set_mp_state()) instead of assuming the vCPU is already in the appropriate state. Barring a KVM bug, it should be impossible for the vCPU to be in a non-RUNNABLE state, but there is no advantage to relyi...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2231a2cd8489..bef63fd46d5a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -11297,9 +11297,8 @@ static int __kvm_emulate_halt(struct kvm_vcpu *vcpu, int state, int reason) ++vcpu->stat.halt_exits; if (lapic_in_kernel(vcpu)) { if (kvm_...
43c854c65e47d2f3763345683b06257b4d12e4e3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Remove undocumented sdmmc property from lubancat-1
Problem Details: Property "supports-sd" isn't documented anywhere and is unnecessary for mainline driver to function. It seems a property used by downstream kernel was brought into mainline. This should be reported by dtbs_check, but mmc-controller-common.yaml defaults additionalProperties to true thus allows it. Remo...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts index 61dd71c259aa..ddf84c2a19cf 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts @@ -512,7 +512,6 @@ &sdmmc0 { max-fr...
c157d351460bcf202970e97e611cb6b54a3dd4a4
Analyze and fix the following issue in the Linux kernel code: intel_idle: Handle older CPUs, which stop the TSC in deeper C states, correctly
Problem Details: The Intel idle driver is preferred over the ACPI processor idle driver, but fails to implement the work around for Core2 generation CPUs, where the TSC stops in C2 and deeper C-states. This causes stalls and boot delays, when the clocksource watchdog does not catch the unstable TSC before the CPU goes ...
```diff diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 118fe1d37c22..0fdb1d1316c4 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -56,6 +56,7 @@ #include <asm/intel-family.h> #include <asm/mwait.h> #include <asm/spec-ctrl.h> +#include <asm/tsc.h> #include <asm/fpu...
9a0dddfb30f120db3851627935851d262e4e7acb
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix invalid data access in ath12k_dp_rx_h_undecap_nwifi
Problem Details: In certain cases, hardware might provide packets with a length greater than the maximum native Wi-Fi header length. This can lead to accessing and modifying fields in the header within the ath12k_dp_rx_h_undecap_nwifi function for DP_RX_DECAP_TYPE_NATIVE_WIFI decap type and potentially resulting in inv...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c index 95c9056642cf..ff6a709b5042 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.c +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c @@ -2548,6 +2548,29 @@ static void ath12k_dp_rx_deliver_msdu(struct ath12k *ar, struc...
1bd9ffec4cdb9a1f09bbba16bba538f6c58a397b
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Deprecate qcom,ath11k-calibration-variant properties
Problem Details: Add support for calibration-like properties without 'ath11k' prefix, while still keeping everything backwards compatible. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link...
```diff diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 65bba0ae69a9..3d39ff85ba94 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -1175,8 +1175,11 @@ int ath11k_core_check_dt(struct ath11k_base *ab) if (!node) r...
a97ed4ecb797a69f52f66445ebca538c93462ba4
Analyze and fix the following issue in the Linux kernel code: wifi: ath10k: Deprecate qcom,ath10k-calibration-variant properties
Problem Details: Add support for calibration-like properties without 'ath10k' prefix, while still keeping everything backwards compatible. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link...
```diff diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index b3294287bce1..6d336e39d673 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -1163,8 +1163,11 @@ int ath10k_core_check_dt(struct ath10k *ar) if (!node) return...
64e37c19383f840da534449b88d7adea4c69f52d
Analyze and fix the following issue in the Linux kernel code: dt-bindings: wireless: ath12k: Strip ath12k prefix from calibration property
Problem Details: Devicetree properties describing exactly the same thing should be reusable between device bindings. All Qualcomm Atheros WiFi chips needs certain calibration data, so properties should not be prefixed with device family (ath12k). Deprecate qcom,ath12k-calibration-variant and alike, so we gradually sw...
```diff diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml index cbfb559f6b69..7f83871bd107 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml +++ b/Documentation/devicetree/bindings/net/wir...
352e8c4379fa540747cbb6c94c4b149c7487feac
Analyze and fix the following issue in the Linux kernel code: dt-bindings: wireless: ath11k: Strip ath11k prefix from calibration property
Problem Details: Devicetree properties describing exactly the same thing should be reusable between device bindings. All Qualcomm Atheros WiFi chips needs certain calibration data, so properties should not be prefixed with device family (ath11k). Deprecate qcom,ath11k-calibration-variant and alike, so we gradually sw...
```diff diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml index a71fdf05bc1e..25b0afd1b615 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml +++ b/Documentation/devicetree/bindings/net/wir...
fcd37e2a33167cf6b507256365e45a43009d74eb
Analyze and fix the following issue in the Linux kernel code: dt-bindings: wireless: ath10k: Strip ath10k prefix from calibration properties
Problem Details: Devicetree properties describing exactly the same thing should be reusable between device bindings. All Qualcomm Atheros WiFi chips needs certain calibration data, so properties should not be prefixed with device family (ath10k). Deprecate qcom,ath10k-calibration-variant and alike, so we gradually sw...
```diff diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml index 070c4c9b8643..a8a992b0b54e 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,a...
ab8a17bc63e2d187ea4602e1d1b9baf10c7b252d
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: refactor transmitted arvif retrieval
Problem Details: Create a new function ath11k_mac_get_tx_arvif() to retrieve 'arvif' for the transmitted interface of the MBSSID set. This will help modifying the same code path to reflect mac80211 data structure changes to support MLO. This also fixes an issue in ath11k_mac_update_vif_chan() where tx_arvif is not rese...
```diff diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 14ed53836589..466a314b938b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1529,6 +1529,14 @@ static int ath11k_mac_set_vif_params(struct ath11k_vif *arvif, retur...
a30047129e0931fde80dc54785d970aefc50379d
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: add rust bindings entry for bitmap API
Problem Details: This entry enumerates bitmap and related APIs listed in BITMAP API entry that rust requires but cannot use directly (i.e. inlined functions and macros). The "Rust kernel policy" (https://rust-for-linux.com/rust-kernel-policy) document describes the special status of rust support: "Exceptionally, fo...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index efee40ea589f..315cff76df29 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4021,6 +4021,11 @@ F: tools/include/vdso/bits.h F: tools/lib/bitmap.c F: tools/lib/find_bit.c +BITMAP API BINDINGS [RUST] +M: Yury Norov <yury.norov@gmail.com> +S: Maintained +F: rust/helpe...
fad07a5c0f07ad0884e1cb4362fe28c083b5b811
Analyze and fix the following issue in the Linux kernel code: tools/x86: Fix linux/unaligned.h include path in lib/insn.c
Problem Details: tools/arch/x86/include/linux doesn't exist but building is working by virtue of a -I. Building using bazel this fails. Use angle brackets to include unaligned.h so there isn't an invalid relative include. Fixes: 5f60d5f6bbc1 ("move asm/unaligned.h to linux/unaligned.h") Signed-off-by: Ian Rogers <irog...
```diff diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c index ab5cdc3337da..e91d4c4e1c16 100644 --- a/tools/arch/x86/lib/insn.c +++ b/tools/arch/x86/lib/insn.c @@ -13,7 +13,7 @@ #endif #include "../include/asm/inat.h" /* __ignore_sync_check__ */ #include "../include/asm/insn.h" /* __ignore_sync_ch...
1e7933a575ed8af4a64dd5089c2f6912da66dd79
Analyze and fix the following issue in the Linux kernel code: uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"
Problem Details: This patch reverts 'commit c32ee3d9abd2("bitops: avoid integer overflow in GENMASK(_ULL)")'. The code generation can be shrink by over 1KB by reverting this commit. Originally the commit claimed that clang would emit warnings using the implementation at that time. The patch was applied and tested ag...
```diff diff --git a/include/uapi/linux/bits.h b/include/uapi/linux/bits.h index 5ee30f882736..682b406e1067 100644 --- a/include/uapi/linux/bits.h +++ b/include/uapi/linux/bits.h @@ -4,13 +4,9 @@ #ifndef _UAPI_LINUX_BITS_H #define _UAPI_LINUX_BITS_H -#define __GENMASK(h, l) \ - (((~_UL(0)) - (_UL(1) << (l)) ...
433265870ab3455b418885bff48fa5fd02f7e448
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Manually context switch DEBUGCTL if LBR virtualization is disabled
Problem Details: Manually load the guest's DEBUGCTL prior to VMRUN (and restore the host's value on #VMEXIT) if it diverges from the host's value and LBR virtualization is disabled, as hardware only context switches DEBUGCTL if LBR virtualization is fully enabled. Running the guest with the host's value has likely bee...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index ed4846518696..e67de787fc71 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4288,6 +4288,16 @@ static __no_kcsan fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu, clgi(); kvm_load_guest_xsave_state(vcpu); + /* + * Hardwar...
d0eac42f5cecce009d315655bee341304fbe075e
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Suppress DEBUGCTL.BTF on AMD
Problem Details: Mark BTF as reserved in DEBUGCTL on AMD, as KVM doesn't actually support BTF, and fully enabling BTF virtualization is non-trivial due to interactions with the emulator, guest_debug, #DB interception, nested SVM, etc. Don't inject #GP if the guest attempts to set BTF, as there's no way to communicate ...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index bdafbde1f211..ed4846518696 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3177,6 +3177,15 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) */ data &= ~GENMASK(5, 2); + /* + * Suppress BTF a...
d4b69c3d1471a7fa48111b3bb6489e7c5a5bcb2a
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Inject #GP if memory operand for INVPCID is non-canonical
Problem Details: Inject a #GP if the memory operand received by INVCPID is non-canonical. The APM clearly states that the intercept takes priority over all #GP checks except the CPL0 restriction. Of course, that begs the question of how the CPU generates a linear address in the first place. Tracing confirms that EXIT...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 0603d047a1f0..2b4d93f25c7d 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3272,6 +3272,17 @@ static int invpcid_interception(struct kvm_vcpu *vcpu) type = svm->vmcb->control.exit_info_2; gva = svm->vmcb->control.exit_in...
64c947a1cf351989245ba83eb0587645c8d0c482
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Reject KVM_RUN if userspace forces emulation during nested VM-Enter
Problem Details: Extend KVM's restrictions on userspace forcing "emulation required" at odd times to cover stuffing invalid guest state while a nested run is pending. Clobbering guest state while KVM is in the middle of emulating VM-Enter is nonsensical, as it puts the vCPU into an architecturally impossible state, and...
```diff diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 9bbcdbfc7f2c..67ebc1959724 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -5876,11 +5876,35 @@ static int handle_nmi_window(struct kvm_vcpu *vcpu) return 1; } -static bool vmx_emulation_required_with_pending_exception(s...
be45bc4eff33d9a7dae84a2150f242a91a617402
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Set RFLAGS.IF=1 in C code, to get VMRUN out of the STI shadow
Problem Details: Enable/disable local IRQs, i.e. set/clear RFLAGS.IF, in the common svm_vcpu_enter_exit() just after/before guest_state_{enter,exit}_irqoff() so that VMRUN is not executed in an STI shadow. AMD CPUs have a quirk (some would say "bug"), where the STI shadow bleeds into the guest's intr_state field if a ...
```diff diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index a713c803a3a3..0d299f3f921e 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4189,6 +4189,18 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu, bool spec_ctrl_in guest_state_enter_irqoff(); + /* + * Set R...
75418e222e30440ed9aa6d57b6aba474bcd8b4f1
Analyze and fix the following issue in the Linux kernel code: KVM: selftests: Fix spelling mistake "UFFDIO_CONINUE" -> "UFFDIO_CONTINUE"
Problem Details: There is a spelling mistake in a PER_PAGE_DEBUG debug message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20250227220819.656780-1-colin.i.king@gmail.com Signed-off-by: Sean Christopherson <seanjc@google.com>
```diff diff --git a/tools/testing/selftests/kvm/lib/userfaultfd_util.c b/tools/testing/selftests/kvm/lib/userfaultfd_util.c index 7c9de8414462..5bde176cedd5 100644 --- a/tools/testing/selftests/kvm/lib/userfaultfd_util.c +++ b/tools/testing/selftests/kvm/lib/userfaultfd_util.c @@ -114,7 +114,7 @@ struct uffd_desc *uff...
81edb983b3f5d6900d3e337b9af7b1bec4bef0f2
Analyze and fix the following issue in the Linux kernel code: f2fs: add check for deleted inode
Problem Details: The syzbot reproducer mounts a f2fs image, then tries to unlink an existing file. However, the unlinked file already has a link count of 0 when it is read for the first time in do_read_inode(). Add a check to sanity_check_inode() for i_nlink == 0. [Chao Yu: rebase the code and fix orphan inode recove...
```diff diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index a278c7da8177..3d85d8116dae 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -502,6 +502,14 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, goto out; } + if (inode->i_nlink == 0) { + f2fs_warn(F2FS_I_SB(inode), "%s: ...
322ec93e9081d717fbc02c14fe80f754709e8b9c
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Use explicit base values in POWER_DOMAIN_*() macros
Problem Details: Although we have comments in intel_display_limits.h saying that the code expects PIPE_A and TRANSCODER_A to be zero, it doesn't hurt to add them as explicit base values for calculating the power domain offset in POWER_DOMAIN_*() macros. On the plus side, we have that this: * Fixes a warning reported...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h index a3a5c1be8bab..4ad35bd4b040 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.h +++ b/drivers/gpu/drm/i915/display/intel_display_power.h @@ -117,12 +117,12 @@ enum intel_display_...
201e07aec617b10360df09090651dea9d0d4f7d3
Analyze and fix the following issue in the Linux kernel code: f2fs: fix the missing write pointer correction
Problem Details: If checkpoint was disabled, we missed to fix the write pointers. Cc: <stable@vger.kernel.org> Fixes: 1015035609e4 ("f2fs: fix changing cursegs if recovery fails on zoned device") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f5c69cc2de72..7a8fcc1e278c 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4752,8 +4752,10 @@ try_onemore: if (err) goto free_meta; - if (unlikely(is_set_ckpt_flags(sbi, CP_DISABLED_FLAG))) + if (unlikely(is_set_ckpt_flags(sbi, CP_DISABLED_FLAG)...
1b60b23975d6d81703826e3797738e471c3009c6
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to set .discard_granularity correctly
Problem Details: commit 4f993264fe29 ("f2fs: introduce discard_unit mount option") introduced a bug, when we enable discard_unit=section option, it will set .discard_granularity to BLKS_PER_SEC(), however discard granularity only supports [1, 512], once section size is not equal to segment size, it will cause issue_dis...
```diff diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 6ebe25eafafa..2b415926641f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2320,10 +2320,9 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi) dcc->discard_granularity = DEFAULT_DISCARD_GRANULARITY; dcc->max_ordered_discard =...
64407f4b5807dc9dec8135e1bfd45d2cb11b4ea0
Analyze and fix the following issue in the Linux kernel code: gpiolib: Fix Oops in gpiod_direction_input_nonotify()
Problem Details: The gpiod_direction_input_nonotify() function is supposed to return zero if the direction for the pin is input. But instead it accidentally returns GPIO_LINE_DIRECTION_IN (1) which will be cast into an ERR_PTR() in gpiochip_request_own_desc(). The callers dereference it and it leads to a crash. I ch...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index fc19df5a64c2..8741600af7ef 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2712,7 +2712,7 @@ EXPORT_SYMBOL_GPL(gpiod_direction_input); int gpiod_direction_input_nonotify(struct gpio_desc *desc) { - int ret = 0; + int ret...
b654f7a51ffb386131de42aa98ed831f8c126546
Analyze and fix the following issue in the Linux kernel code: block: fix 'kmem_cache of name 'bio-108' already exists'
Problem Details: Device mapper bioset often has big bio_slab size, which can be more than 1000, then 8byte can't hold the slab name any more, cause the kmem_cache allocation warning of 'kmem_cache of name 'bio-108' already exists'. Fix the warning by extending bio_slab->name to 12 bytes, but fix output of /proc/slabin...
```diff diff --git a/block/bio.c b/block/bio.c index f0c416e5931d..6ac5983ba51e 100644 --- a/block/bio.c +++ b/block/bio.c @@ -77,7 +77,7 @@ struct bio_slab { struct kmem_cache *slab; unsigned int slab_ref; unsigned int slab_size; - char name[8]; + char name[12]; }; static DEFINE_MUTEX(bio_slab_lock); static D...
ed9f3112a8a8f6e6919d3b9da2651fa302df7be3
Analyze and fix the following issue in the Linux kernel code: io_uring: cache nodes and mapped buffers
Problem Details: Frequent alloc/free cycles on these is pretty costly. Use an io cache to more efficiently reuse these buffers. Signed-off-by: Keith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20250227223916.143006-7-kbusch@meta.com [axboe: fix imu leak] Signed-off-by: Jens Axboe <axboe@kernel.dk>
```diff diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h index 123e69368730..432c98ff52ee 100644 --- a/include/linux/io_uring_types.h +++ b/include/linux/io_uring_types.h @@ -292,6 +292,8 @@ struct io_ring_ctx { struct io_file_table file_table; struct io_rsrc_data buf_table; + struc...
7ed3f3c40d7b5cd8d8e4ce8e4c27d604a27c1861
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: Fix spelling mistake "Increate" -> "Increase"
Problem Details: There is a spelling mistake in a IWL_DEBUG_RATE message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250227221917.658401-1-colin.i.king@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index a8c4e354e2ce..068c58e9c1eb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c @@ -1783,7 +1783,7 @@ static enum rs_action rs_get_rate_action(struct...
6b2690df3f032d91546841dcca44d5acdb7ace1e
Analyze and fix the following issue in the Linux kernel code: pmdomain: rockchip: fix rockchip_pd_power error handling
Problem Details: The calls rockchip_pd_power makes to rockchip_pmu_set_idle_request lack any return error handling, causing device drivers to incorrectly believe the hardware idle requests succeed when they may have failed. This leads to software possibly accessing hardware that is powered off and the subsequent SError...
```diff diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c index 2b620f036838..08207b3dd5e3 100644 --- a/drivers/pmdomain/rockchip/pm-domains.c +++ b/drivers/pmdomain/rockchip/pm-domains.c @@ -607,26 +607,29 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool po...
98c7a713db91c5a9a7ffc47cd85e7158e0963cb8
Analyze and fix the following issue in the Linux kernel code: x86/bugs: Add X86_BUG_SPECTRE_V2_USER
Problem Details: All CPU vulnerabilities with command line options map to a single X86_BUG bit except for Spectre V2 where both the spectre_v2 and spectre_v2_user command line options are related to the same bug. The spectre_v2 command line options mostly relate to user->kernel and guest->host mitigations, while the s...
```diff diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index c8701abb7752..0bc420319ee2 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -537,4 +537,5 @@ #define X86_BUG_RFDS X86_BUG(1*32 + 2) /* "rfds" CPU is vulnerable to Register Fil...
b150654f74bf0df8e6a7936d5ec51400d9ec06d8
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Fix suspicious RCU usage
Problem Details: Commit <d74169ceb0d2> ("iommu/vt-d: Allocate DMAR fault interrupts locally") moved the call to enable_drhd_fault_handling() to a code path that does not hold any lock while traversing the drhd list. Fix it by ensuring the dmar_global_lock lock is held when traversing the drhd list. Without this fix, t...
```diff diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c index 9f424acf474e..e540092d664d 100644 --- a/drivers/iommu/intel/dmar.c +++ b/drivers/iommu/intel/dmar.c @@ -2043,6 +2043,7 @@ int enable_drhd_fault_handling(unsigned int cpu) /* * Enable fault control interrupt. */ + guard(rwsem_read...
64f792981e35e191eb619f6f2fefab76cc7d6112
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Remove device comparison in context_setup_pass_through_cb
Problem Details: Remove the device comparison check in context_setup_pass_through_cb. pci_for_each_dma_alias already makes a decision on whether the callback function should be called for a device. With the check in place it will fail to create context entries for aliases as it walks up to the root bus. Fixes: 2031c46...
```diff diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index cc46098f875b..4d8d4593c9c8 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -4378,9 +4378,6 @@ static int context_setup_pass_through_cb(struct pci_dev *pdev, u16 alias, void * { struct device *dev = data...
c5b0320bbf79548fbf058a3925a07c8f281beeab
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Preserve default DTE fields when updating Host Page Table Root
Problem Details: When updating the page table root field on the DTE, avoid overwriting any bits that are already set. The earlier call to make_clear_dte() writes default values that all DTEs must have set (currently DTE[V]), and those must be preserved. Currently this doesn't cause problems since the page table root u...
```diff diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index b48a72bd7b23..cd5116d8c3b2 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -2043,12 +2043,12 @@ static void set_dte_entry(struct amd_iommu *iommu, make_clear_dte(dev_data, dte, &new); if (domain->iop.mode !=...
ad49fe2b3d54fe657756e1dbf0acb5ed9cf5c576
Analyze and fix the following issue in the Linux kernel code: ceph: Convert ceph_move_dirty_page_in_page_array() to move_dirty_folio_in_page_array()
Problem Details: Shorten the name of this internal function by dropping the 'ceph_' prefix and pass in a folio instead of a page. Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Link: https://lore.kernel.org/r/20250217185119.430193-9-willy@infradead.org Tested-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.c...
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index c1755799e335..13f4fdd9a8ba 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1236,11 +1236,9 @@ bool is_write_congestion_happened(struct ceph_fs_client *fsc) CONGESTION_ON_THRESH(fsc->mount_options->congestion_kb); } -static inline -int ceph_move_dirty...
fd7449d937e7fb3144770592927cf452bf66dbd3
Analyze and fix the following issue in the Linux kernel code: ceph: fix generic/421 test failure
Problem Details: The generic/421 fails to finish because of the issue: Jan 3 14:25:27 ceph-testing-0001 kernel: [ 369.894678] INFO: task kworker/u48:0:11 blocked for more than 122 seconds. Jan 3 14:25:27 ceph-testing-0001 kernel: [ 369.895403] Not tainted 6.13.0-rc5+ #1 Jan 3 14:25:27 ceph-testing-0001 kernel: [ 369.8...
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 02d20c000dc5..d82ce4867fca 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -82,6 +82,7 @@ static bool ceph_dirty_folio(struct address_space *mapping, struct folio *folio) { struct inode *inode = mapping->host; struct ceph_client *cl = ceph_inode_to_cli...
f08068df4aa411465319bfb796dc6a2228131bc5
Analyze and fix the following issue in the Linux kernel code: ceph: extend ceph_writeback_ctl for ceph_writepages_start() refactoring
Problem Details: The ceph_writepages_start() has unreasonably huge size and complex logic that makes this method hard to understand. Current state of the method's logic makes bug fix really hard task. This patch extends the struct ceph_writeback_ctl with the goal to make ceph_writepages_start() method more compact and ...
```diff diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index f5224a566b69..d002ff62d867 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -568,7 +568,36 @@ struct ceph_writeback_ctl u64 truncate_size; u32 truncate_seq; bool size_stable; + bool head_snapc; + struct ceph_snap_context *snapc; + struct ceph_snap_co...
ab68d2e36532806b8f86ff2f60861dbb8443f0be
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Enable modifying CPU bug flags with '{clear,set}puid='
Problem Details: Sometimes it can be very useful to run CPU vulnerability mitigations on systems where they aren't known to mitigate any real-world vulnerabilities. This can be handy for mundane reasons like debugging HW-agnostic logic on whatever machine is to hand, but also for research reasons: while some mitigation...
```diff diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index de1ad09fe8d7..e5fc0038c8f6 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -50,6 +50,7 @@ extern const char * const x86_power_flags[32]; * X86_BUG_<name> - NCAPINTS*32. */ exte...
814165e9fd1f62332b5444d730b8d6e432328463
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Add the 'setcpuid=' boot parameter
Problem Details: In preparation for adding support to inject fake CPU bugs at boot-time, add a general facility to force enablement of CPU flags. The flag taints the kernel and the documentation attempts to be clear that this is highly unsuitable for uses outside of kernel development and platform experimentation. Th...
```diff diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 137d3e00a5be..ff483c9a56c3 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1479,12 +1479,12 @@ static void detect_nopl(void) #endif } -static inline void parse_clearcpuid(char *arg) +static inline...
f034937f5af32188cd1c07865c885b2f171e17bf
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Create helper function to parse the 'clearcpuid=' boot parameter
Problem Details: This is in preparation for a later commit that will reuse this code, to make review convenient. Factor out a helper function which does the full handling for this arg including printing info to the console. No functional change intended. Signed-off-by: Brendan Jackman <jackmanb@google.com> Signed-of...
```diff diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 76598a93a8fa..137d3e00a5be 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1479,56 +1479,18 @@ static void detect_nopl(void) #endif } -/* - * We parse cpu parameters early because fpu__init_system...
f479ecc5ef15ed8d774968c1a8726a49420f11a0
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Fix speakers on ASUS EXPERTBOOK P5405CSA 1.0
Problem Details: After some digging around I have found that this laptop has Cirrus's smart aplifiers connected to SPI bus (spi1-CSC3551:00-cs35l41-hda). To get them correctly detected and working I had to modify patch_realtek.c with ASUS EXPERTBOOK P5405CSA 1.0 SystemID (0x1043, 0x1f63) and add corresponding hda_quir...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 926007b4a9ba..d58743b955f8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10691,6 +10691,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", A...
12784ca33b62fd327631749e6a0cd2a10110a56c
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Fix Asus Z13 2025 audio
Problem Details: Use the basic quirk for this type of amplifier. Sound works in speakers, headphones, and microphone. Whereas none worked before. Tested-by: Kyle Gospodnetich <me@kylegospodneti.ch> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> Link: https://patch.msgid.link/20250227175107.33432-3-lkml@antheas....
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f92de4a95a4c..926007b4a9ba 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -10692,6 +10692,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV...
3414cda9d41f41703832d0abd01063dd8de82b89
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Remove (revert) duplicate Ally X config
Problem Details: In commit 1e9c708dc3ae ("ALSA: hda/tas2781: Add new quirk for Lenovo, ASUS, Dell projects") Baojun adds a bunch of projects to the file, including for the Ally X. Turns out the initial Ally X was not sorted properly, so the kernel had 2 quirks for it. The previous quirk overrode the new one due to bei...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c735f630ecb5..f92de4a95a4c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7690,7 +7690,6 @@ enum { ALC285_FIXUP_THINKPAD_X1_GEN7, ALC285_FIXUP_THINKPAD_HEADSET_JACK, ALC294_FIXUP_ASUS_ALLY,...
a4248ee16f411ac1ea7dfab228a6659b111e3d65
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Don't clear X86_FEATURE_LAHF_LM flag in init_amd_k8() on AMD when running in a virtual machine
Problem Details: When running in a virtual machine, we might see the original hardware CPU vendor string (i.e. "AuthenticAMD"), but a model and family ID set by the hypervisor. In case we run on AMD hardware and the hypervisor sets a model ID < 0x14, the LAHF cpu feature is eliminated from the the list of CPU capabilit...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 54194f5995de..d747515ad013 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -632,7 +632,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c) * (model = 0x14) and later actually support it. * (AMD Erratum #110,...
3abe3d342fc6a254e8b878d1e8c72c0ff980e68a
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event()
Problem Details: Fix below inconsistent indenting smatch warning. smatch warnings: sound/core/seq/oss/seq_oss_event.c:297 note_on_event() warn: inconsistent indenting Signed-off-by: Charles Han <hanchunchao@inspur.com> Link: https://patch.msgid.link/20250228033427.7056-1-hanchunchao@inspur.com Signed-off-by: Takashi I...
```diff diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c index 7b7c925dd3aa..76fb81077eef 100644 --- a/sound/core/seq/oss/seq_oss_event.c +++ b/sound/core/seq/oss/seq_oss_event.c @@ -290,16 +290,14 @@ note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, st ...
7fa25e87fecbba89fe9c87b2d902976b42efda32
Analyze and fix the following issue in the Linux kernel code: ALSA: es18xx: Fix spelling mistake "grap" -> "grab"
Problem Details: There are spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250228083631.676877-1-colin.i.king@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 59c784a70ac1..e35c727a52fa 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -1735,27 +1735,27 @@ static int snd_es18xx_new_device(struct snd_card *card, chip->active = 0; if (!devm_request_region(card->dev, port, 16, "ES18xx")) { - dev...
c72e455b89f216b43cd0dbb518036ec4c98f5c46
Analyze and fix the following issue in the Linux kernel code: leds: leds-st1202: Fix NULL pointer access on race condition
Problem Details: st1202_dt_init() calls devm_led_classdev_register_ext() before the internal data structures are properly set up, so the LEDs become visible to user space while being partially initialized, leading to a window where trying to access them causes a NULL pointer access. Move devm_led_classdev_register_ext...
```diff diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c index b691c4886993..e894b3f9a0f4 100644 --- a/drivers/leds/leds-st1202.c +++ b/drivers/leds/leds-st1202.c @@ -261,8 +261,6 @@ static int st1202_dt_init(struct st1202_chip *chip) int err, reg; for_each_available_child_of_node_scoped(dev_o...
023f3290b02552ea006c1a2013e373750d2cbff6
Analyze and fix the following issue in the Linux kernel code: x86/locking: Remove semicolon from "lock" prefix
Problem Details: Minimum version of binutils required to compile the kernel is 2.25. This version correctly handles the "lock" prefix, so it is possible to remove the semicolon, which was used to support ancient versions of GNU as. Due to the semicolon, the compiler considers "lock; insn" as two separate instructions....
```diff diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index e3903b731305..3b3d3aa19acd 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -48,7 +48,7 @@ ".popsection\n" \ "671:" -#define LOCK_PREFIX LOCK_PREFIX_HERE "\n\tlock; " ...
510a6190cf5ee9481a8565a4d9935e1d1f1f8f05
Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: fix faulty ohci/ehci node names
Problem Details: They should be named "usb@". Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250226084938.3436-10-wsa+renesas@sang-engineering.com [claudiu.beznea: replace at91 w/ microchip in commit title] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
```diff diff --git a/arch/arm/boot/dts/microchip/aks-cdu.dts b/arch/arm/boot/dts/microchip/aks-cdu.dts index b65f80e1ef05..302cb872efa1 100644 --- a/arch/arm/boot/dts/microchip/aks-cdu.dts +++ b/arch/arm/boot/dts/microchip/aks-cdu.dts @@ -56,7 +56,7 @@ }; }; - usb0: ohci@500000 { + usb0: usb@500000 { num...
12ad8dcbe1e726be40a9596466aad0e827389be3
Analyze and fix the following issue in the Linux kernel code: ARM: dts: microchip: usb_a9263: fix wrong vendor
Problem Details: The board was made by Calao, not by Atmel. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20250226084938.3436-9-wsa+renesas@sang-engineering.com [claudiu.beznea: replaced at91 w/ microchip in commit t...
```diff diff --git a/arch/arm/boot/dts/microchip/usb_a9263.dts b/arch/arm/boot/dts/microchip/usb_a9263.dts index 5caf7e337009..bc85d8aaf378 100644 --- a/arch/arm/boot/dts/microchip/usb_a9263.dts +++ b/arch/arm/boot/dts/microchip/usb_a9263.dts @@ -9,7 +9,7 @@ / { model = "Calao USB A9263"; - compatible = "atmel,usb...
b899981750dcb958ceffa4462d903963ee494aa2
Analyze and fix the following issue in the Linux kernel code: parisc: PDT: Fix missing prototype warning
Problem Details: As reported by the kernel test robot, the following error occurs: arch/parisc/kernel/pdt.c:65:6: warning: no previous prototype for 'arch_report_meminfo' [-Wmissing-prototypes] 65 | void arch_report_meminfo(struct seq_file *m) | ^~~~~~~~~~~~~~~~~~~ arch_report_meminfo() is declare...
```diff diff --git a/arch/parisc/kernel/pdt.c b/arch/parisc/kernel/pdt.c index 0f9b3b5914cf..b70b67adb855 100644 --- a/arch/parisc/kernel/pdt.c +++ b/arch/parisc/kernel/pdt.c @@ -63,6 +63,7 @@ static unsigned long pdt_entry[MAX_PDT_ENTRIES] __page_aligned_bss; #define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL...
00371a3f48775967950c2fe3ec97b7c786ca956d
Analyze and fix the following issue in the Linux kernel code: stmmac: loongson: Pass correct arg to PCI function
Problem Details: pcim_iomap_regions() should receive the driver's name as its third parameter, not the PCI device's name. Define the driver name with a macro and use it at the appropriate places, including pcim_iomap_regions(). Cc: stable@vger.kernel.org # v5.14+ Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support f...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index f5acfb7d4ff6..ab7c2750c104 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c @@ -11,6 +11,8 @@ #include "dwma...
a16f88964c647103dad7743a484b216d488a6352
Analyze and fix the following issue in the Linux kernel code: nvmet-tcp: Fix a possible sporadic response drops in weakly ordered arch
Problem Details: The order in which queue->cmd and rcv_state are updated is crucial. If these assignments are reordered by the compiler, the worker might not get queued in nvmet_tcp_queue_response(), hanging the IO. to enforce the the correct reordering, set rcv_state using smp_store_release(). Fixes: bdaf13279192 ("n...
```diff diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index 7c51c2a8c109..4f9cac8a5abe 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -571,10 +571,16 @@ static void nvmet_tcp_queue_response(struct nvmet_req *req) struct nvmet_tcp_cmd *cmd = container_of(req, struct n...
ad95bab0cd28ed77c2c0d0b6e76e03e031391064
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: fix potential memory corruption in nvme_tcp_recv_pdu()
Problem Details: nvme_tcp_recv_pdu() doesn't check the validity of the header length. When header digests are enabled, a target might send a packet with an invalid header length (e.g. 255), causing nvme_tcp_verify_hdgst() to access memory outside the allocated area and cause memory corruptions by overwriting it with th...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 1094cbbec169..23f11527d29d 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -217,6 +217,19 @@ static inline int nvme_tcp_queue_id(struct nvme_tcp_queue *queue) return queue - queue->ctrl->queues; } +static inline bool...
a1a7eb89ca0b89dc1c326eeee2596f263291aca3
Analyze and fix the following issue in the Linux kernel code: ftrace: Avoid potential division by zero in function_stat_show()
Problem Details: Check whether denominator expression x * (x - 1) * 1000 mod {2^32, 2^64} produce zero and skip stddev computation in that case. For now don't care about rec->counter * rec->counter overflow because rec->time * rec->time overflow will likely happen earlier. Cc: stable@vger.kernel.org Cc: Wen Yang <wen...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 6b0c25761ccb..fc88e0688daf 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -540,6 +540,7 @@ static int function_stat_show(struct seq_file *m, void *v) static struct trace_seq s; unsigned long long avg; unsigned long long st...
3908b6baf2ac20138915b5ca98338b4f063954d8
Analyze and fix the following issue in the Linux kernel code: selftests/ftrace: Let fprobe test consider already enabled functions
Problem Details: The fprobe test fails on Fedora 41 since the fprobe test assumption that the number of enabled_functions is zero before the test starts is not necessarily true. Some user space tools, like systemd, add BPF programs that attach to functions. Those will show up in the enabled_functions table and must be ...
```diff diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc index 449f9d8be746..73f6c6fcecab 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_fprobe.tc +++ b/tools/testing/selftests/ftrace/test.d/dyn...
6f86bdeab633a56d5c6dccf1a2c5989b6a5e323e
Analyze and fix the following issue in the Linux kernel code: tracing: Fix bad hist from corrupting named_triggers list
Problem Details: The following commands causes a crash: ~# cd /sys/kernel/tracing/events/rcu/rcu_callback ~# echo 'hist:name=bad:keys=common_pid:onmax(bogus).save(common_pid)' > trigger bash: echo: write error: Invalid argument ~# echo 'hist:name=bad:keys=common_pid' > trigger Because the following occurs: event...
```diff diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 261163b00137..ad7419e24055 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -6724,27 +6724,27 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops, if (existing_hist_up...
bf08fd32cc55961c720f6f48a0fe317f0c710f09
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Avoid a hundred -Wflex-array-member-not-at-end warnings
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. So, in this particular case, we create a new `struct mlx5e_umr_wqe_hdr` to enclose the header part of flexible structure `struct mlx5e_umr_wqe`. This is, all the members except the flexible arrays...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 769e683f2488..8df185e2ef7f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -230,16 +230,22 @@ struct mlx5e_rx_wqe_cyc { DECLARE_FLEX_AR...
afb41b08c44e5386f2f52fa859010ac4afd2b66f
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: Fix a C2HTermReq error message
Problem Details: In H2CTermReq, a FES with value 0x05 means "R2T Limit Exceeded"; but in C2HTermReq the same value has a different meaning (Data Transfer Limit Exceeded). Fixes: 84e009042d0f ("nvme-tcp: add basic support for the C2HTermReq PDU") Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Reviewed-by: Sagi ...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 8c14018201db..1094cbbec169 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -775,7 +775,7 @@ static void nvme_tcp_handle_c2h_term(struct nvme_tcp_queue *queue, [NVME_TCP_FES_PDU_SEQ_ERR] = "PDU Sequence Error", [NVME...
0979ff3676b1b4e6a20970bc265491d23c2da42b
Analyze and fix the following issue in the Linux kernel code: nvmet: remove old function prototype
Problem Details: nvmet_subsys_nsid_exists() doesn't exist anymore Fixes: 74d16965d7ac ("nvmet-loop: avoid using mutex in IO hotpath") Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
```diff diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h index d2c1233981e1..fcf4f460dc9a 100644 --- a/drivers/nvme/target/nvmet.h +++ b/drivers/nvme/target/nvmet.h @@ -647,7 +647,6 @@ void nvmet_subsys_disc_changed(struct nvmet_subsys *subsys, struct nvmet_host *host); void nvmet_add_async_ev...
72dafb567760320f2de7447cd6e979bf9d4e5d17
Analyze and fix the following issue in the Linux kernel code: x86/sev: Add missing RIP_REL_REF() invocations during sme_enable()
Problem Details: The following commit: 1c811d403afd ("x86/sev: Fix position dependent variable references in startup code") introduced RIP_REL_REF() to force RIP-relative accesses to global variables, as needed to prevent crashes during early SEV/SME startup code. For completeness, RIP_REL_REF() should be used wit...
```diff diff --git a/arch/x86/mm/mem_encrypt_identity.c b/arch/x86/mm/mem_encrypt_identity.c index e6c7686f443a..9fce5b87b8c5 100644 --- a/arch/x86/mm/mem_encrypt_identity.c +++ b/arch/x86/mm/mem_encrypt_identity.c @@ -565,7 +565,7 @@ void __head sme_enable(struct boot_params *bp) } RIP_REL_REF(sme_me_mask) = me_...
e008eeec7868a9ca6e159726aeb9bdbf2ab86647
Analyze and fix the following issue in the Linux kernel code: x86/platform: Fix missing declaration of 'x86_apple_machine'
Problem Details: Fix this sparse warning: arch/x86/kernel/quirks.c:662:6: warning: symbol 'x86_apple_machine' was not declared. Should it be static? Signed-off-by: Zhang Kunbo <zhangkunbo@huawei.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241126015636.3463994-1-zhangkunbo@hu...
```diff diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index 6d0df6a58873..a92f18db9610 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c @@ -10,6 +10,8 @@ #include <asm/setup.h> #include <asm/mce.h> +#include <linux/platform_data/x86/apple.h> + #if defined(CONFIG_X86_IO_APIC) ...
b8ffd979356e33a3af0854d47375bba611126f3b
Analyze and fix the following issue in the Linux kernel code: x86/irq: Fix missing declaration of 'io_apic_irqs'
Problem Details: Fix this sparse warning: arch/x86/kernel/i8259.c:57:15: warning: symbol 'io_apic_irqs' was not declared. Should it be static? Signed-off-by: Zhang Kunbo <zhangkunbo@huawei.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20241126020511.3464664-1-zhangkunbo@huawei.c...
```diff diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index c20d1832c481..2bade73f49e3 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c @@ -23,6 +23,7 @@ #include <asm/desc.h> #include <asm/apic.h> #include <asm/i8259.h> +#include <asm/io_apic.h> /* * This is the 'legacy' 8259...
d8df010f72b8a32aaea393e36121738bb53ed905
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected()
Problem Details: Add check for the return value of mgmt_alloc_skb() in mgmt_device_connected() to prevent null pointer dereference. Fixes: e96741437ef0 ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_CONNECTED") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Signed...
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3e0f88cd975c..621c555f639b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -9660,6 +9660,9 @@ void mgmt_device_connected(struct hci_dev *hdev, struct hci_conn *conn, sizeof(*ev) + (name ? eir_precalc_len(name_len) : 0) + ...
f2176a07e7b19f73e05c805cf3d130a2999154cb
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add check for mgmt_alloc_skb() in mgmt_remote_name()
Problem Details: Add check for the return value of mgmt_alloc_skb() in mgmt_remote_name() to prevent null pointer dereference. Fixes: ba17bb62ce41 ("Bluetooth: Fix skb allocation in mgmt_remote_name() & mgmt_device_connected()") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Signed-off...
```diff diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index f53304cb09db..3e0f88cd975c 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -10413,6 +10413,8 @@ void mgmt_remote_name(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, skb = mgmt_alloc_skb(hdev, MGMT_EV_DEVICE_FOUND, ...
7d83c129a8d7df23334d4a35bca9090a26b0a118
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix parameter annotation in vcn_v5_0_0_is_idle
Problem Details: Update parameter description in the vcn_v5_0_0_is_idle function Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:1231: warning: Function parameter or struct member 'ip_block' not described in 'vcn_v5_0_0_is_idle' drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c:1231: warning: Excess functi...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c index e07b500235b5..d99d05f42f1d 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c @@ -1223,7 +1223,7 @@ static void vcn_v5_0_0_set_unified_ring_funcs(struct amdgpu_dev...
cbf85b9cb80bec6345ffe0368dfff98386f4714f
Analyze and fix the following issue in the Linux kernel code: bluetooth: btusb: Initialize .owner field of force_poll_sync_fops
Problem Details: Initialize .owner field of force_poll_sync_fops to THIS_MODULE in order to prevent btusb from being unloaded while its operations are in use. Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval") Signed-off-by: Salah Triki <salah.triki@gmail.com> Signed-off-by: Luiz...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 8149e53fd0a7..2a8d91963c63 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3644,6 +3644,7 @@ static ssize_t force_poll_sync_write(struct file *file, } static const struct file_operations force_poll_sync_fops ...
fe9d0061c413f8fb8c529b18b592b04170850ded
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: debugfs hang_hws skip GPU with MES
Problem Details: debugfs hang_hws is used by GPU reset test with HWS, for MES this crash the kernel with NULL pointer access because dqm->packet_mgr is not setup for MES path. Skip GPU with MES for now, MES hang_hws debugfs interface will be supported later. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-b...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 095e73790dc4..b9c82be6ce13 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -1604,6 +1604,11 @@ int kfd_debugfs_hang_hws(struct kfd_node *dev) return -EINV...
7919b4cad5545ed93778f11881ceee72e4dbed66
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix pqm_destroy_queue race with GPU reset
Problem Details: If GPU in reset, destroy_queue return -EIO, pqm_destroy_queue should delete the queue from process_queue_list and free the resource. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c index 93647ee27325..662c595ce783 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c @@ -548,7 +548,7 @@ int p...
0f3fda3117507e22e0c8bfe1849ea483a6e1d793
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix parameter annotations for VCN clock gating functions
Problem Details: The previous references to a non-existent `adev` parameter have been removed & corrected to reflect the use of the `vinst` pointer, which points to the VCN instance structure, in the below files: - vcn_v1_0.c - vcn_v2_0.c - vcn_v3_0.c Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/vcn_v1_0....
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index 8bad63282de4..21b57c29bf7d 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c @@ -616,7 +616,7 @@ static void vcn_v1_0_disable_clock_gating(struct amdgpu_vcn_inst *vinst) ...
f0b4440cdc1807bb6ec3dce0d6de81170803569b
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix mode1 reset crash issue
Problem Details: If HW scheduler hangs and mode1 reset is used to recover GPU, KFD signal user space to abort the processes. After process abort exit, user queues still use the GPU to access system memory before h/w is reset while KFD cleanup worker free system memory and free VRAM. There is use-after-free race bug th...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 2715ca53e9da..7c0c24732481 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -35,6 +35,7 @@ #include <linux/pm_runtime.h> #include "amdgpu_amdkfd.h" #in...
1b9366c601039d60546794c63fbb83ce8e53b978
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: KFD release_work possible circular locking
Problem Details: If waiting for gpu reset done in KFD release_work, thers is WARNING: possible circular locking dependency detected #2 kfd_create_process kfd_process_mutex flush kfd release work #1 kfd release work wait for amdgpu reset work #0 amdgpu_device_gpu_reset kgd2k...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 1067afdb456e..2715ca53e9da 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -838,6 +838,14 @@ struct kfd_process *kfd_create_process(struct task_struct *t...
9c696cc57c1a6dab6da6b51f4b30a7d16e233cbc
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Create a debug option to disable ring reset
Problem Details: Prior to the addition of ring reset, the debug option `debug_disable_soft_recovery` could be used to force a full device reset. Now that we have ring reset, create a debug option to disable them in amdgpu, forcing the driver to go with the full device reset path again when both options are combined. T...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 2b1990ea9639..2a9a41f4e748 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1192,6 +1192,7 @@ struct amdgpu_device { bool debug_use_vram_fw_buf;...
63e6a77ccf239337baa9b1e7787cde9fa0462092
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params
Problem Details: Null pointer dereference issue could occur when pipe_ctx->plane_state is null. The fix adds a check to ensure 'pipe_ctx->plane_state' is not null before accessing. This prevents a null pointer dereference. Found by code review. Fixes: 3be5262e353b ("drm/amd/display: Rename more dc_surface stuff to pl...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 0bd3e7c072a1..0f8a88220ec6 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1472,7 +1472,8 @@ bool resource_build_sca...
c0a01660de20bfc60b01f616e7aead727f12ba9e
Analyze and fix the following issue in the Linux kernel code: Documentation/gpu: remove duplicate entries in different glossaries
Problem Details: Some items were defined in both the general and DC glossaries. Remove the duplicate entries. Fixes: 2df30ae0ba0b ("Documentation/gpu: Add acronyms for some firmware components") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Rodrigo Siqueira <siqueira@igalia.com> Reviewed-by: Rodrigo Siqueir...
```diff diff --git a/Documentation/gpu/amdgpu/display/dc-glossary.rst b/Documentation/gpu/amdgpu/display/dc-glossary.rst index 0b0ffd428dd2..7dc034e9e586 100644 --- a/Documentation/gpu/amdgpu/display/dc-glossary.rst +++ b/Documentation/gpu/amdgpu/display/dc-glossary.rst @@ -167,9 +167,6 @@ consider asking in the amdgfx...
eaa3feb16d3b8fbb787cc6c0c16c45bf654d806a
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix spelling mistake "initiailize" -> "initialize" and grammar
Problem Details: There is a spelling mistake and a grammatical error in a dev_err message. Fix it. Reviewed-by: Tao Zhou <tao.zhou1@amd.com> 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/amdgpu/amdgpu_cper.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c index 0b288deb9b19..15cd0a007b71 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cper.c @@ -542,7 +542,7 @@ int amdgpu_cper_init(struct amdgpu_device *adev) r = amdg...
b965e42530a815987a56d84b78c11e1852541ec0
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix logic to fetch supported NPS modes
Problem Details: Correct the logic to find supported NPS modes from firmware. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reported-by: Ava Zhang <niandong.zhang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Fixes: 30eb41f5d1a7 ("drm/amdgpu: Use firmware supported NPS modes") Signed-off-by: Alex Deuche...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index ccb31e724b55..783e0c3b86b4 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1607,9 +1607,8 @@ static void gmc_v9_0_init_nps_details(struct amdgpu_device *adev) /...
fddc45026311c05a5355fd34b9dc0a1d7eaef4a2
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix Circular Locking Dependency in 'svm_range_cpu_invalidate_pagetables'
Problem Details: This commit addresses a circular locking dependency in the svm_range_cpu_invalidate_pagetables function. The function previously held a lock while determining whether to perform an unmap or eviction operation, which could lead to deadlocks. Fixes the below: [ 223.418794] ============================...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 195085079eb2..94b1ac8a4735 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -207,21 +207,6 @@ static i...
11cdb81b3c1b974d179e217babf4c2681c6cc9ed
Analyze and fix the following issue in the Linux kernel code: drm/msm/a6xx: Fix gpucc register block for A621
Problem Details: Adreno 621 has a different memory map for GPUCC block. So update a6xx_gpu_state code to dump the correct set of gpucc registers. Signed-off-by: Jie Zhang <quic_jiezh@quicinc.com> Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/640055/ Signed-...
```diff diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c index 81763876e402..2c10474ccc95 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c @@ -1226,8 +1226,13 @@ static void a6xx_get_gmu_registers(struct msm_...
0b305b7cadce835505bd93183a599acb1f800a05
Analyze and fix the following issue in the Linux kernel code: drm/msm/gem: Fix error code msm_parse_deps()
Problem Details: The SUBMIT_ERROR() macro turns the error code negative. This extra '-' operation turns it back to positive EINVAL again. The error code is passed to ERR_PTR() and since positive values are not an IS_ERR() it eventually will lead to an oops. Delete the '-'. Fixes: 866e43b945bf ("drm/msm: UAPI error ...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index dee470403036..3e9aa2cc38ef 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -509,7 +509,7 @@ static struct drm_syncobj **msm_parse_deps(struct msm_gem_submit *submit, ...
82c13da746d24af7f2179bdceca46f950879896b
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove unused optc3_fpu_set_vrr_m_const
Problem Details: The last use of optc3_fpu_set_vrr_m_const() was removed in 2022's commit 64f991590ff4 ("drm/amd/display: Fix a compilation failure on PowerPC caused by FPU code") which removed the only caller (with a similar) name. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: A...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c index aac0a0ae2966..88789987bdbc 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c @@ -178,82 +178,6 @@ struct _vcs_...
0797c54502d6cdb806aaf8d482b3ed445d6e298f
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn5.0.0: split code along instances
Problem Details: Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. v2: squash in fix for stop() from Boyuan Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c index e937ed682abd..188cd6f1dda2 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c @@ -767,154 +767,149 @@ static int vcn_v5_0_0_start_dpg_mode(struct amdgpu_device *ad...
ecc9ab4e924b7eb9e2c4a668162aaa1d9d60d08c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn4.0.5: split code along instances
Problem Details: Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. v2: squash in fix for stop() from Boyuan Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c index 5e6ad825cc47..c2bbacb176c1 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c @@ -990,183 +990,178 @@ static int vcn_v4_0_5_start_dpg_mode(struct amdgpu_device *ad...
5826d5a5d5c5548a11fbc503d9a0bdee8af310d2
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn4.0.3: split code along instances
Problem Details: Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. v2: squash in fix for stop() from Boyuan Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c index c936bd08963e..00b94d01cd4c 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c @@ -1117,172 +1117,169 @@ static int vcn_v4_0_3_start_sriov(struct amdgpu_device *ade...
f4cd7a85db75d78f7cb907de785b1140e8b8b8aa
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn4.0: split code along instances
Problem Details: Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. v2: squash in fix for stop() from Boyuan Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c index 0dd844243531..c99c121faac0 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c @@ -1087,182 +1087,177 @@ static int vcn_v4_0_start_dpg_mode(struct amdgpu_device *adev, int ...
d39f1bb57741ff6e34dd3c2937d5cddfed8a499c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn3.0: split code along instances
Problem Details: Split the code on a per instance basis. This will allow us to use the per instance functions in the future to handle more things per instance. v2: squash in fix for stop() from Boyuan Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c index f75f996d929e..ec42a456c541 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c @@ -1134,192 +1134,186 @@ static int vcn_v3_0_start_dpg_mode(struct amdgpu_device *adev, int ...
dae870019866b247a7796359c4327ade3170faa4
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn2.5: fix VCN stop logic
Problem Details: Need to make sure we call amdgpu_dpm_enable_vcn() in vcn_v2_5_stop() at the end if there are errors or DPG is enabled. Fixes: ebc25499de12 ("drm/amdgpu/vcn2.5: split code along instances") Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Suggested-by: Boyuan Zhang <boyuan.zhang@amd.com> Signed-off-by:...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index a6726afcf89c..e36e2a5676df 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c @@ -1414,13 +1414,15 @@ static int vcn_v2_5_stop(struct amdgpu_device *adev, int i) if (a...
2397d61ee45cddb8f3bd3a3a9840ef0f0b5aa843
Analyze and fix the following issue in the Linux kernel code: Revert "drivers/card_reader/rtsx_usb: Restore interrupt based detection"
Problem Details: This reverts commit 235b630eda072d7e7b102ab346d6b8a2c028a772. This commit was found responsible for issues with SD card recognition, as users had to re-insert their cards in the readers and wait for a while. As for some people the SD card was involved in the boot process it also caused boot failures. ...
```diff diff --git a/drivers/misc/cardreader/rtsx_usb.c b/drivers/misc/cardreader/rtsx_usb.c index e0174da5e9fc..77b0490a1b38 100644 --- a/drivers/misc/cardreader/rtsx_usb.c +++ b/drivers/misc/cardreader/rtsx_usb.c @@ -286,7 +286,6 @@ static int rtsx_usb_get_status_with_bulk(struct rtsx_ucr *ucr, u16 *status) int rtsx...
c133ec0e5717868c9967fa3df92a55e537b1aead
Analyze and fix the following issue in the Linux kernel code: usb: xhci: Enable the TRB overfetch quirk on VIA VL805
Problem Details: Raspberry Pi is a major user of those chips and they discovered a bug - when the end of a transfer ring segment is reached, up to four TRBs can be prefetched from the next page even if the segment ends with link TRB and on page boundary (the chip claims to support standard 4KB pages). It also appears ...
```diff diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 92703efda1f7..fdf0c1008225 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -2437,7 +2437,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) * and our use of dma addresses in the trb_address_map ...
18cdd90aba794333f4c6dce39f5c3fe642af5575
Analyze and fix the following issue in the Linux kernel code: x86/bpf: Fix BPF percpu accesses
Problem Details: Due to this recent commit in the x86 tree: 9d7de2aa8b41 ("Use relative percpu offsets") percpu addresses went from positive offsets from the GSBASE to negative kernel virtual addresses. The BPF verifier has an optimization for x86-64 that loads the address of cpu_number into a register, but was on...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 9971c03adfd5..f74263b206e4 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -21692,7 +21692,7 @@ patch_map_ops_generic: * way, it's fine to back out this inlining logic */ #ifdef CONFIG_SMP - insn_buf[0] = BPF_MOV32_I...
d7a5ac67d82c50c1f909c7056f78b1630a0f71cf
Analyze and fix the following issue in the Linux kernel code: drm/msm: Extend gpu devcore dumps with pgtbl info
Problem Details: In the case of iova fault triggered devcore dumps, include additional debug information based on what we think is the current page tables, including the TTBR0 value (which should match what we have in adreno_smmu_fault_info unless things have gone horribly wrong), and the pagetable entries traversed in...
```diff diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 1238f3265978..7156cda07b03 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -883,6 +883,16 @@ void adreno_show(struct msm_gpu *gpu, struct msm_gpu_state *stat...
977e4ef27591a41cab8ff43cf390d32936d4b7f5
Analyze and fix the following issue in the Linux kernel code: drm/msm: Expose DRIVER_SYNCOBJ_TIMELINE
Problem Details: Initially we didn't want to expose the cap, as it would expose a bug in the vk driver (turnip) with older mesa versions. This was fixed over a year ago (and cherry-picked to stable release branches at the time), see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25981. So let's go ahead and...
```diff diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index ff7a7a9f7b0d..c3588dc9e537 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -894,6 +894,7 @@ static const struct drm_driver msm_driver = { DRIVER_RENDER | DRIVER_ATOMIC | DRIVER_MODES...
f561db72a663f8a73c2250bf3244ce1ce221bed7
Analyze and fix the following issue in the Linux kernel code: drm/msm/a6xx: Fix stale rpmh votes from GPU
Problem Details: It was observed on sc7180 (A618 gpu) that GPU votes for GX rail and CNOC BCM nodes were not removed after GPU suspend. This was because we skipped sending 'prepare-slumber' request to gmu during suspend sequence in some cases. So, make sure we always call prepare-slumber hfi during suspend. Also, calli...
```diff diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 699b0dd34b18..38c94915d4c9 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1169,49 +1169,50 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu) struct a6xx_gpu...
6b481ab0e6855fb30e2923c51f62f1662d1cda7e
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: select FW caching
Problem Details: nouveau tries to load some firmware during suspend that it loaded earlier, but with fw caching disabled it hangs suspend, so just rely on FW cache enabling instead of working around it in the driver. Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Dave Airli...
```diff diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index ce840300578d..1050a4617fc1 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -4,6 +4,7 @@ config DRM_NOUVEAU depends on DRM && PCI && MMU select IOMMU_API select FW_LOADER + select FW_C...
89eb42b5539f6ae6a0cabcb39e5b6fcc83c106a1
Analyze and fix the following issue in the Linux kernel code: drm/xe: xe_gen_wa_oob: replace program_invocation_short_name
Problem Details: program_invocation_short_name may not be available in other systems. Instead, replace it with the argv[0] to pass the executable name. Fixes build error when program_invocation_short_name is not available: drivers/gpu/drm/xe/xe_gen_wa_oob.c:34:3: error: use of undeclared identifier 'program_invocatio...
```diff diff --git a/drivers/gpu/drm/xe/xe_gen_wa_oob.c b/drivers/gpu/drm/xe/xe_gen_wa_oob.c index 904cf47925aa..ed9183599e31 100644 --- a/drivers/gpu/drm/xe/xe_gen_wa_oob.c +++ b/drivers/gpu/drm/xe/xe_gen_wa_oob.c @@ -28,10 +28,10 @@ "\n" \ "#endif\n" -static void print_usage(FILE *f) +static void print_usage(FI...
a38a005d95796fb5d5b8c8be325facc75c4708c9
Analyze and fix the following issue in the Linux kernel code: drm/i915/pfit: fix comment style for moved comments
Problem Details: Adhere to coding style. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d3bc49cf04473a0be07bab1ad7fd9df1f671307f.1740564009.git.jani.nikula@intel.com
```diff diff --git a/drivers/gpu/drm/i915/display/intel_pfit.c b/drivers/gpu/drm/i915/display/intel_pfit.c index 0a7609020c17..5e4a6ef2ff8d 100644 --- a/drivers/gpu/drm/i915/display/intel_pfit.c +++ b/drivers/gpu/drm/i915/display/intel_pfit.c @@ -569,9 +569,9 @@ void ilk_pfit_enable(const struct intel_crtc_state *crtc_...
e6b6de16782b5cd08b17b3a4ab11aa7a8194d7bd
Analyze and fix the following issue in the Linux kernel code: drm/i915/pfit: rename intel_panel_fitting() to intel_pfit_compute_config()
Problem Details: Unify naming wrt both the prefix and suffix. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/33bb513e186c8838acde37f87aee732b63bd5702.1740564009.git.jani.nikula@intel.com
```diff diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c index c1b5be0f5603..910336366e5f 100644 --- a/drivers/gpu/drm/i915/display/icl_dsi.c +++ b/drivers/gpu/drm/i915/display/icl_dsi.c @@ -1647,7 +1647,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, ...
dc8aa31a7ac2c4290ea974c13cb0094e08f8948f
Analyze and fix the following issue in the Linux kernel code: x86/fpu: Refine and simplify the magic number check during signal return
Problem Details: Before restoring xstate from the user space buffer, the kernel performs sanity checks on these magic numbers: magic1 in the software reserved area, and magic2 at the end of XSAVE region. The position of magic2 is calculated based on the xstate size derived from the user space buffer. But, the in-kerne...
```diff diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c index 8f62e0666dea..6c69cb28b298 100644 --- a/arch/x86/kernel/fpu/signal.c +++ b/arch/x86/kernel/fpu/signal.c @@ -27,19 +27,14 @@ static inline bool check_xstate_in_sigframe(struct fxregs_state __user *fxbuf, struct _fpx_sw_byte...