id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
1a524e8b488eabd3cb3f32bc0e124f702c3a57ef
Analyze and fix the following issue in the Linux kernel code: drm/xe: Do not warn on SVM migration failing because of 64k requirements
Problem Details: On platforms which only support 64k VRAM pages, it is expected that 4k faults will not migrate. Do not warn on this, rather print a debug message. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://lore.kernel.org/r/20250529164338.17...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 871ac81bb04a..f27fb9b588de 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -821,7 +821,7 @@ bool xe_svm_range_needs_migrate_to_vram(struct xe_svm_range *range, struct xe_vm } if (preferred_region_is_...
8c56bfe53bd881c7b598c54a3a06216743c57bbc
Analyze and fix the following issue in the Linux kernel code: perf trace: Set errpid to false for rseq and set_robust_list
Problem Details: The 'rseq' and 'set_robust_list' syscalls don't return a pid, so set errpid for both to false. Fixes: 0c1019e3463b263a ("perf trace: Mark the 'rseq' arg in the rseq syscall as coming from user space") Fixes: 1de5b5dcb8353f36 ("perf trace: Mark the 'head' arg in the set_robust_list syscall as coming fr...
```diff diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 67b557ec3b0d..2ab1b8e05ad3 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1348,7 +1348,7 @@ static const struct syscall_fmt syscall_fmts[] = { .arg = { [0] = { .scnprintf = SCA_FDAT, /* olddirfd */ }, ...
f36a75aba1c3176d177964bca76f86a075d2943a
Analyze and fix the following issue in the Linux kernel code: drm/i915/guc: Handle race condition where wakeref count drops below 0
Problem Details: There is a rare race condition when preparing for a reset where guc_lrc_desc_unpin() could be in the process of deregistering a context while a different thread is scrubbing outstanding contexts and it alters the context state and does a wakeref put. Then, if there is a failure with deregister_context(...
```diff diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 108331a69995..127316d2c8aa 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -3443,18 +3443,29 @@ static inline int guc...
7a17bbc1d952057898cb0739e60665908fbb8c72
Analyze and fix the following issue in the Linux kernel code: rust: list: Fix typo `much` in arc.rs
Problem Details: Correct the typo (s/much/must) in the ListArc documentation. Reported-by: Miguel Ojeda <ojeda@kernel.org> Closes: https://github.com/Rust-for-Linux/linux/issues/1166 Fixes: a48026315cd7 ("rust: list: add tracking for ListArc") Signed-off-by: Sylvan Smit <sylvan@sylvansmit.com> Reviewed-by: Benno Lossi...
```diff diff --git a/rust/kernel/list/arc.rs b/rust/kernel/list/arc.rs index 8401ddcd178a..d92bcf665c89 100644 --- a/rust/kernel/list/arc.rs +++ b/rust/kernel/list/arc.rs @@ -74,7 +74,7 @@ pub unsafe trait TryNewListArc<const ID: u64 = 0>: ListArcSafe<ID> { /// /// * The `untracked` strategy does not actually keep tr...
b20fbbc08a363f28fd0f3ad5163b2b0ff7605ba5
Analyze and fix the following issue in the Linux kernel code: rust: check type of `$ptr` in `container_of!`
Problem Details: Add a compile-time check that `*$ptr` is of the type of `$type->$($f)*`. Rename those placeholders for clarity. Given the incorrect usage: > diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs > index 8d978c896747..6a7089149878 100644 > --- a/rust/kernel/rbtree.rs > +++ b/rust/kernel/rbtree.rs...
```diff diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 909d305d0be8..7e227b52b4d8 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -213,12 +213,19 @@ fn panic(info: &core::panic::PanicInfo<'_>) -> ! { /// ``` #[macro_export] macro_rules! container_of { - ($ptr:expr, $type:ty, $($f:tt)*) => ...
d0b29661a95bbf804b6fe9bdff1d8927206c9f38
Analyze and fix the following issue in the Linux kernel code: ACPICA: Switch back to using strncpy() in acpi_ut_safe_strncpy()
Problem Details: ACPICA commit b90d0d65ec97ff8279ad826f4102e0d31c5f662a I mistakenly replaced strncpy() with memcpy() in commit ebf27765421c ("ACPICA: Replace strncpy() with memcpy()"), not realizing the entire context behind *why* strncpy() was used. In this safer implementation of strncpy(), it does not make sense ...
```diff diff --git a/drivers/acpi/acpica/utnonansi.c b/drivers/acpi/acpica/utnonansi.c index 803e3e893825..ff0802ace19b 100644 --- a/drivers/acpi/acpica/utnonansi.c +++ b/drivers/acpi/acpica/utnonansi.c @@ -168,7 +168,7 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size) { /* Always terminate...
fbeaad071a98fef87deccee81d564de1c8e8e16d
Analyze and fix the following issue in the Linux kernel code: drm/xe: Create LRC BO without VM
Problem Details: Specifying VM during lrc->bo creation requires VM's reference to be held for the lifetime of lrc->bo as it will use VM's dma reservation object. Using VM's dma reservation object for lrc->bo doesn't provide any advantage. Hence do not pass VM while creating lrc->bo. v2: Use xe_bo_unpin_map_no_vm (Matt...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index ce78cee5dec6..32c6923df7c3 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -132,12 +132,6 @@ static int __xe_exec_queue_init(struct xe_exec_queue *q) flags |= XE_LRC_CREATE_...
e5ef4cd2a47f27c0c9d8ff6c0f63a18937c071a3
Analyze and fix the following issue in the Linux kernel code: EDAC/altera: Use correct write width with the INTTEST register
Problem Details: On the SoCFPGA platform, the INTTEST register supports only 16-bit writes. A 32-bit write triggers an SError to the CPU so do 16-bit accesses only. [ bp: AI-massage the commit message. ] Fixes: c7b4be8db8bc ("EDAC, altera: Add Arria10 OCRAM ECC support") Signed-off-by: Niravkumar L Rabara <niravkum...
```diff diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 20333608b983..cae52c654a15 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -1746,9 +1746,9 @@ altr_edac_a10_device_trig(struct file *file, const char __user *user_buf, local_irq_save(flags); if (trig_typ...
70523f335734b0b42f97647556d331edf684c7dc
Analyze and fix the following issue in the Linux kernel code: Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"
Problem Details: Revert commit 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()") because it introduced a significant power regression on systems that start with "nosmt" in the kernel command line. Namely, on such systems, SMT siblings permanently go offline early, when cpuidle has not been initialized y...
```diff diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index d6cf1e23c2a3..96355ab9aed9 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -1238,10 +1238,6 @@ void play_dead_common(void) local_irq_disable(); } -/* - * We need to flush the caches before going to sleep, les...
c3e9826a22027a21d998d3e64882fa377b613006
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add null pointer check for get_first_active_display()
Problem Details: The function mod_hdcp_hdcp1_enable_encryption() calls the function get_first_active_display(), but does not check its return value. The return value is a null pointer if the display list is empty. This will lead to a null pointer dereference in mod_hdcp_hdcp2_enable_encryption(). Add a null pointer ch...
```diff diff --git a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c index 8c137d7c032e..e58e7b93810b 100644 --- a/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c +++ b/drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c @@ -368,6 +368,9 @@ enum mod_hdcp_sta...
90237b16ec1d7afa16e2173cc9a664377214cdd9
Analyze and fix the following issue in the Linux kernel code: amd/amdkfd: fix a kfd_process ref leak
Problem Details: This patch is to fix a kfd_prcess ref leak. Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c index e54e708ed82d..2b294ada3ec0 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c @@ -1350,6 +1350,7 @@ void kfd_signal_poison_consumed_event(struct kfd_node *dev, u32...
bf394d28548c3c0a01e113fdef20ddb6cd2df106
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn5.0.1: read back register after written
Problem Details: The addition of register read-back in VCN v5.0.1 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c index 1e9d2aedf279..338cf43c45fe 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c @@ -1038,6 +1038,11 @@ static int vcn_v5_0_1_start(struct amdgpu_vcn_inst *vinst) W...
a8bce9b7a2ccb5cbbe9967a37e617a9ef963e540
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn5: read back register after written
Problem Details: The addition of register read-back in VCN v5.0.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@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 27dcc6f37a73..f8e3f0b882da 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c @@ -794,6 +794,11 @@ static int vcn_v5_0_0_start_dpg_mode(struct amdgpu_vcn_inst *vin...
4d4275a0387790fbe0a016c075dcbb39d58b63ab
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn4.0.5: read back register after written
Problem Details: The addition of register read-back in VCN v4.0.5 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@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 a09f9a2dd471..16ade84facc7 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c @@ -1254,6 +1254,11 @@ static void vcn_v4_0_5_stop_dpg_mode(struct amdgpu_vcn_inst *v...
5b4c6413c89613cb46669b576d83658fe6e734da
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn4.0.3: read back register after written
Problem Details: The addition of register read-back in VCN v4.0.3 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@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 764b3ff09f1e..5a33140f5723 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c @@ -977,6 +977,11 @@ static int vcn_v4_0_3_start_dpg_mode(struct amdgpu_vcn_inst *vin...
a3810a5e37c58329aa2c7992f3172a423f4ae194
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn4: read back register after written
Problem Details: The addition of register read-back in VCN v4.0.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@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 8fff470bce87..b5071f77f78d 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c @@ -1122,6 +1122,11 @@ static int vcn_v4_0_start_dpg_mode(struct amdgpu_vcn_inst *vinst, bool...
b7a4842a917e3a251b5a6aa1a21a5daf6d396ef3
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn3: read back register after written
Problem Details: The addition of register read-back in VCN v3.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@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 0b19f0ab4480..9fb0d5380589 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c @@ -1173,6 +1173,11 @@ static int vcn_v3_0_start_dpg_mode(struct amdgpu_vcn_inst *vinst, bool...
d9e688b9148bb23629d32017344888dd67ec2ab1
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn2.5: read back register after written
Problem Details: The addition of register read-back in VCN v2.5 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c index 3eec1b8feaee..58b527a6b795 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c @@ -1158,6 +1158,11 @@ static int vcn_v2_5_start_dpg_mode(struct amdgpu_vcn_inst *vinst, bool...
8c5ed7f5abe2cae3b0bf33d4f51f6fb03aadf3ff
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn2: read back register after written
Problem Details: The addition of register read-back in VCN v2.0 is intended to prevent potential race conditions. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index b8d835c9e17e..148b651be7ca 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c @@ -978,6 +978,12 @@ static int vcn_v2_0_start_dpg_mode(struct amdgpu_vcn_inst *vinst, bool i...
0ef2803173f180fe31b5083b1dcf0f8fa6e5608f
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn1: read back register after written
Problem Details: V3: drop changes where readbacks have implemented. This patch set is to add readbacks only. V2: use common register UVD_STATUS for readback (standard PCI MMIO behavior, i.e. readback post all writes to let the writes hit the hardware) add readback in ..._stop() for more coverage. Simi...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index 21b57c29bf7d..c74947705d77 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c @@ -1009,6 +1009,11 @@ static int vcn_v1_0_start_spg_mode(struct amdgpu_vcn_inst *vinst) ...
040585df957d45ebec0297bad525f39471229987
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Reuse Subvp debug option for FAMS
Problem Details: FAMS is the successor to SubVP starting with DCN4x. Reuse the same debug option to disable FAMS for debugging purposes. Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 9f2e26336ccc..1797fa85fac6 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -2000,8 +2000,10 @@ static int amdgpu_dm_i...
27eab4c644236a9324084a70fe79e511cbd07393
Analyze and fix the following issue in the Linux kernel code: net: lan966x: Make sure to insert the vlan tags also in host mode
Problem Details: When running these commands on DUT (and similar at the other end) ip link set dev eth0 up ip link add link eth0 name eth0.10 type vlan id 10 ip addr add 10.0.0.1/24 dev eth0.10 ip link set dev eth0.10 up ping 10.0.0.2 The ping will fail. The reason why is failing is because, the network interfaces fo...
```diff diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index 427bdc0e4908..7001584f1b7a 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -879,6 +879,7 @@ static in...
cb6a85f38f456b086c366e346ebb67ffa70c7243
Analyze and fix the following issue in the Linux kernel code: acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio()
Problem Details: commit 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") modified get_max_boost_ratio() to return the nominal_freq advertised in the _CPC object. This was for the purposes of computing the maximum frequency. The frequencies advertised in _CPC objects are in MHz. However, cpufreq expects the...
```diff diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index d26b610e4f24..76768fe213a9 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -660,7 +660,7 @@ static u64 get_max_boost_ratio(unsigned int cpu, u64 *nominal_freq) nominal_perf = perf_caps.nomina...
2d22216521b12c4b09479aa684504092cd67970b
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Removed unnecessary if() goto out where out is the next line
Problem Details: In the function ring_buffer_discard_commit() there's an if statement that jumps to the next line: if (rb_try_to_discard(cpu_buffer, event)) goto out; out: This was caused by the change that modified the way timestamps were taken in interrupt context, and removed the code between the if statement ...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index e40f5c6d7908..a01fc42f2a13 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -4685,10 +4685,7 @@ void ring_buffer_discard_commit(struct trace_buffer *buffer, RB_WARN_ON(buffer, !local_read(&cpu_buffer->committ...
4fc78a7c9ca994e1da5d3940704d4e8f0ea8c5e4
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Do not trigger WARN_ON() due to a commit_overrun
Problem Details: When reading a memory mapped buffer the reader page is just swapped out with the last page written in the write buffer. If the reader page is the same as the commit buffer (the buffer that is currently being written to) it was assumed that it should never have missed events. If it does, it triggers a W...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index ca1a8e706004..683aa57870fe 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -7285,8 +7285,8 @@ consume: /* Check if any events were dropped */ missed_events = cpu_buffer->lost_events; - if (cpu_buffer->re...
4f296d77cf49fcb5f90b4674123ad7f3a0676165
Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: move xe_svm_init() earlier
Problem Details: In xe_vm_close_and_put() we need to be able to call xe_svm_fini(), however during vm creation we can call this on the error path, before having actually initialised the svm state, leading to various splats followed by a fatal NPD. Fixes: 6fd979c2f331 ("drm/xe: Add SVM init / close / fini to faulting V...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 168756fb140b..7140d8856bad 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -1709,10 +1709,16 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags) xe_pm_runtime_get_noresume(xe); } + if (flags ...
96af397aa1a2d1032a6e28ff3f4bc0ab4be40e1d
Analyze and fix the following issue in the Linux kernel code: drm/xe/vm: move rebind_work init earlier
Problem Details: In xe_vm_close_and_put() we need to be able to call flush_work(rebind_work), however during vm creation we can call this on the error path, before having actually set up the worker, leading to a splat from flush_work(). It looks like we can simply move the worker init step earlier to fix this. Fixes:...
```diff diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 5a978da411b0..168756fb140b 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -1704,8 +1704,10 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags) * scheduler drops all the references of it, hence p...
54d34165b4f786d7fea8412a18fb4a54c1eab623
Analyze and fix the following issue in the Linux kernel code: net/mlx4_en: Prevent potential integer overflow calculating Hz
Problem Details: The "freq" variable is in terms of MHz and "max_val_cycles" is in terms of Hz. The fact that "max_val_cycles" is a u64 suggests that support for high frequency is intended but the "freq_khz * 1000" would overflow the u32 type if we went above 4GHz. Use unsigned long long type for the mutliplication t...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx4/en_clock.c b/drivers/net/ethernet/mellanox/mlx4/en_clock.c index cd754cd76bde..d73a2044dc26 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_clock.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_clock.c @@ -249,7 +249,7 @@ static const struct ptp_clock_info mlx4_e...
467e245d47e6662a4cbf4184d9e6d0b1b120c0bf
Analyze and fix the following issue in the Linux kernel code: readdir: supply dir_context.count as readdir buffer size hint
Problem Details: This is a preparation for large readdir buffers in fuse. Simply setting the fuse buffer size to the userspace buffer size should work, the record sizes are similar (fuse's is slightly larger than libc's, so no overflow should ever happen). Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-of...
```diff diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 128dd092916b..48f0c505b50f 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -284,6 +284,7 @@ static int get_name(const struct path *path, char *name, struct dentry *child) }; struct getdents_callback buffer = { .ctx.actor = filldir...
ba99c627aac85bc746fb4a6e2d79edb3ad100326
Analyze and fix the following issue in the Linux kernel code: driver: net: ethernet: mtk_star_emac: fix suspend/resume issue
Problem Details: Identify the cause of the suspend/resume hang: netif_carrier_off() is called during link state changes and becomes stuck while executing linkwatch_work(). To resolve this issue, call netif_device_detach() during the Ethernet suspend process to temporarily detach the network device from the kernel and ...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c index b175119a6a7d..b83886a41121 100644 --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c @@ -1463,6 +1463,8 @@ static __maybe_unused int mtk_star_susp...
4257271d2a5bd2d2a889a2f105dd6650c857988d
Analyze and fix the following issue in the Linux kernel code: hinic3: Remove printed message during module init
Problem Details: No driver should spam the kernel log when merely being loaded. Fixes: 17fcb3dc12bbee8e ("hinic3: module initialization and tx/rx logic") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/5310dac0b3ab4bd16dd8fb761566f12e...
```diff diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c index 093aa6d775ff..497f2a36f35d 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_main.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_main.c @@ -324,8 +324,6 @@ static __init int hinic3_nic_...
f29ccaa07cf3d35990f4d25028cc55470d29372b
Analyze and fix the following issue in the Linux kernel code: net: tipc: fix refcount warning in tipc_aead_encrypt
Problem Details: syzbot reported a refcount warning [1] caused by calling get_net() on a network namespace that is being destroyed (refcount=0). This happens when a TIPC discovery timer fires during network namespace cleanup. The recently added get_net() call in commit e279024617134 ("net/tipc: fix slab-use-after-free...
```diff diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index f4cfe88670f5..ea5bb131ebd0 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -818,7 +818,11 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb, } /* Get net to avoid freed tipc_crypto when delete namespace */ - get_n...
fd579a2ebbe4b7e6b388915a50d904e772a35c61
Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix return from none_validate_challenge()
Problem Details: Fix the return value of none_validate_challenge() to be explicitly true (which indicates the source packet should simply be discarded) rather than implicitly true (because rxrpc_abort_conn() always returns -EPROTO which gets converted to true). Note that this change doesn't change the behaviour of the...
```diff diff --git a/net/rxrpc/insecure.c b/net/rxrpc/insecure.c index 1f7c136d6d0e..0a260df45d25 100644 --- a/net/rxrpc/insecure.c +++ b/net/rxrpc/insecure.c @@ -45,8 +45,9 @@ static void none_free_call_crypto(struct rxrpc_call *call) static bool none_validate_challenge(struct rxrpc_connection *conn, struct ...
f41a94aade120dc60322865f363cee7865f2df01
Analyze and fix the following issue in the Linux kernel code: gve: Fix RX_BUFFERS_POSTED stat to report per-queue fill_cnt
Problem Details: Previously, the RX_BUFFERS_POSTED stat incorrectly reported the fill_cnt from RX queue 0 for all queues, resulting in inaccurate per-queue statistics. Fix this by correctly indexing priv->rx[idx].fill_cnt for each RX queue. Fixes: 24aeb56f2d38 ("gve: Add Gvnic stats AQ command and ethtool show/set-pri...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c index e1ffbd561fac..7cd1eda0b449 100644 --- a/drivers/net/ethernet/google/gve/gve_main.c +++ b/drivers/net/ethernet/google/gve/gve_main.c @@ -2153,7 +2153,7 @@ void gve_handle_report_stats(struct gve_priv *priv)...
eb7fd7aa35bfcc1e1fda4ecc42ccfcb526cdc780
Analyze and fix the following issue in the Linux kernel code: net: stmmac: platform: guarantee uniqueness of bus_id
Problem Details: bus_id is currently derived from the ethernetX alias. If one is missing for the device, 0 is used. If ethernet0 points to another stmmac device or if there are 2+ stmmac devices without an ethernet alias, then bus_id will be 0 for all of those. This is an issue because the bus_id is used to generate t...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 43c869f64c39..b80c1efdb323 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -430,6 +430,7 @@ stmmac_pr...
54ec8b08216f3be2cc98b33633d3c8ea79749895
Analyze and fix the following issue in the Linux kernel code: can: kvaser_pciefd: refine error prone echo_skb_max handling logic
Problem Details: echo_skb_max should define the supported upper limit of echo_skb[] allocated inside the netdevice's priv. The corresponding size value provided by this driver to alloc_candev() is KVASER_PCIEFD_CAN_TX_MAX_COUNT which is 17. But later echo_skb_max is rounded up to the nearest power of two (for the max ...
```diff diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c index 7d3066691d5d..52301511ed1b 100644 --- a/drivers/net/can/kvaser_pciefd.c +++ b/drivers/net/can/kvaser_pciefd.c @@ -966,7 +966,7 @@ static int kvaser_pciefd_setup_can_ctrls(struct kvaser_pciefd *pcie) u32 status, tx_nr_packets...
8097128a40ff378761034ec72cdbf6f46e466dc0
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: Fix using wrong mask in REG_FIELD_PREP
Problem Details: Wrong mask is used in PORT_ALPM_LFPS_CTL_FIRST_LFPS_HALF_CYCLE_DURATION and PORT_ALPM_LFPS_CTL_LAST_LFPS_HALF_CYCLE_DURATION. Fixes: 295099580f04 ("drm/i915/psr: Add missing ALPM AUX-Less register definitions") Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Ankit Nautiyal <ankit...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h b/drivers/gpu/drm/i915/display/intel_psr_regs.h index aad3ac5f502e..8afbf5a38335 100644 --- a/drivers/gpu/drm/i915/display/intel_psr_regs.h +++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h @@ -335,8 +335,8 @@ #define PORT_ALPM_LFPS_CTL_LFPS_HALF_CY...
271683bb2cf32e5126c592b5d5e6a756fa374fd9
Analyze and fix the following issue in the Linux kernel code: page_pool: Fix use-after-free in page_pool_recycle_in_ring
Problem Details: syzbot reported a uaf in page_pool_recycle_in_ring: BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862 Read of size 8 at addr ffff8880286045a0 by task syz.0.284/6943 CPU: 0 UID: 0 PID: 6943 Comm: syz.0.284 Not tainted 6.13.0-rc3-syzkaller-gdfa94ce54f41 #0 Hardwa...
```diff diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 4011eb305cee..ba7cf3e3c32f 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -153,9 +153,9 @@ u64 *page_pool_ethtool_stats_get(u64 *data, const void *stats) EXPORT_SYMBOL(page_pool_ethtool_stats_get); #else -#define alloc_stat_inc(...
9ad0452c0277b816a435433cca601304cfac7c21
Analyze and fix the following issue in the Linux kernel code: net: ch9200: fix uninitialised access during mii_nway_restart
Problem Details: In mii_nway_restart() the code attempts to call mii->mdio_read which is ch9200_mdio_read(). ch9200_mdio_read() utilises a local buffer called "buff", which is initialised with control_read(). However "buff" is conditionally initialised inside control_read(): if (err == size) { ...
```diff diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c index f69d9b902da0..a206ffa76f1b 100644 --- a/drivers/net/usb/ch9200.c +++ b/drivers/net/usb/ch9200.c @@ -178,6 +178,7 @@ static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc) { struct usbnet *dev = netdev_priv(netdev); ...
8542d6fac25c03b4bf36b2d762cfe60fda8491bb
Analyze and fix the following issue in the Linux kernel code: Fix sock_exceed_buf_limit not being triggered in __sk_mem_raise_allocated
Problem Details: When a process under memory pressure is not part of any cgroup and the charged flag is false, trace_sock_exceed_buf_limit was not called as expected. This regression was introduced by commit 2def8ff3fdb6 ("sock: Code cleanup on __sk_mem_raise_allocated()"). The fix changes the default value of charged...
```diff diff --git a/net/core/sock.c b/net/core/sock.c index 341979874459..3b409bc8ef6d 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3284,16 +3284,16 @@ int __sk_mem_raise_allocated(struct sock *sk, int size, int amt, int kind) { struct mem_cgroup *memcg = mem_cgroup_sockets_enabled ? sk->sk_memcg : NULL; ...
33a46dab18c92da612778b115a600578fa4d42e1
Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix NPD when saving default context
Problem Details: xef is only valid if it's a job from userspace. For in-kernel jobs it causes a NPD like below: <4> [] RIP: 0010:xe_sched_job_create+0xbd/0x390 [xe] ... <4> [] Call Trace: <4> [] <TASK> <4> [] __xe_bb_create_job+0xa2/0x240 [xe] <4> [] ? find_held_lock+0x31/0...
```diff diff --git a/drivers/gpu/drm/xe/xe_sched_job.c b/drivers/gpu/drm/xe/xe_sched_job.c index 5921293b25db..d21bf8f26964 100644 --- a/drivers/gpu/drm/xe/xe_sched_job.c +++ b/drivers/gpu/drm/xe/xe_sched_job.c @@ -114,7 +114,7 @@ struct xe_sched_job *xe_sched_job_create(struct xe_exec_queue *q, xe_exec_queue_get(job...
d6a0e0bfecccdcecb08defe75a137c7262352102
Analyze and fix the following issue in the Linux kernel code: ubsan: integer-overflow: depend on BROKEN to keep this out of CI
Problem Details: Depending on !COMPILE_TEST isn't sufficient to keep this feature out of CI because we can't stop it from being included in randconfig builds. This feature is still highly experimental, and is developed in lock-step with Clang's Overflow Behavior Types[1]. Depend on BROKEN to keep it from being enabled ...
```diff diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index f6ea0c5b5da3..96cd89668467 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan @@ -118,6 +118,8 @@ config UBSAN_UNREACHABLE config UBSAN_INTEGER_WRAP bool "Perform checking for integer arithmetic wrap-around" + # This is very experimental so drop ...
c8bcb01352a86bc5592403904109c22b66bd916e
Analyze and fix the following issue in the Linux kernel code: PCI: cadence-ep: Correct PBA offset in .set_msix() callback
Problem Details: While cdns_pcie_ep_set_msix() writes the Table Size field correctly (N-1), the calculation of the PBA offset is wrong because it calculates space for (N-1) entries instead of N. This results in the following QEMU error when using PCI passthrough on a device which relies on the PCI endpoint subsystem: ...
```diff diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c index 599ec4b1223e..112ae200b393 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c @@ -292,13 +292,14 @@ static int cdns_pcie_ep_set...
810276362bad172d063d1f6be1cc2cb425b90103
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: ep: Correct PBA offset in .set_msix() callback
Problem Details: While dw_pcie_ep_set_msix() writes the Table Size field correctly (N-1), the calculation of the PBA offset is wrong because it calculates space for (N-1) entries instead of N. This results in the following QEMU error when using PCI passthrough on a device which relies on the PCI endpoint subsystem: ...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 1a0bf9341542..24026f3f3413 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -585,6 +585,7 @@ static int dw_pcie_ep_set_msix(st...
c25a89770d1f216dcedfc2d25d56b604f62ce0bd
Analyze and fix the following issue in the Linux kernel code: nfs_localio: change nfsd_file_put_local() to take a pointer to __rcu pointer
Problem Details: Instead of calling xchg() and unrcu_pointer() before nfsd_file_put_local(), we now pass pointer to the __rcu pointer and call xchg() and unrcu_pointer() inside that function. Where unrcu_pointer() is currently called the internals of "struct nfsd_file" are not known and that causes older compilers suc...
```diff diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c index ef12dd279539..510d0a16cfe9 100644 --- a/fs/nfs/localio.c +++ b/fs/nfs/localio.c @@ -209,9 +209,16 @@ void nfs_local_probe_async(struct nfs_client *clp) } EXPORT_SYMBOL_GPL(nfs_local_probe_async); -static inline void nfs_local_file_put(struct nfsd_file *...
21fb44034695185f1dcbcb37354c842cabfe83c1
Analyze and fix the following issue in the Linux kernel code: nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh()
Problem Details: nfs_uuid_put() and nfs_close_local_fh() can race if a "struct nfs_file_localio" is released at the same time that nfsd calls nfs_localio_invalidate_clients(). It is important that neither of these functions completes after the other has started looking at a given nfs_file_localio and before it finishe...
```diff diff --git a/fs/nfs_common/nfslocalio.c b/fs/nfs_common/nfslocalio.c index 49c59f0c78c6..1dd5a8cca064 100644 --- a/fs/nfs_common/nfslocalio.c +++ b/fs/nfs_common/nfslocalio.c @@ -151,8 +151,7 @@ EXPORT_SYMBOL_GPL(nfs_localio_enable_client); */ static bool nfs_uuid_put(nfs_uuid_t *nfs_uuid) { - LIST_HEAD(loc...
74fc55ab2a6a0c71628fcf3b9783aae7119b5199
Analyze and fix the following issue in the Linux kernel code: nfs_localio: duplicate nfs_close_local_fh()
Problem Details: nfs_close_local_fh() is called from two different places for quite different use case. It is called from nfs_uuid_put() when the nfs_uuid is being detached - possibly because the nfs server is not longer serving that filesystem. In this case there will always be an nfs_uuid and so rcu_read_lock() is n...
```diff diff --git a/fs/nfs_common/nfslocalio.c b/fs/nfs_common/nfslocalio.c index 503f85f64b76..49c59f0c78c6 100644 --- a/fs/nfs_common/nfslocalio.c +++ b/fs/nfs_common/nfslocalio.c @@ -171,7 +171,26 @@ static bool nfs_uuid_put(nfs_uuid_t *nfs_uuid) /* Walk list of files and ensure their last references dropped */...
e6f7e1487ab528a6c653bd0d42812ff2942846cd
Analyze and fix the following issue in the Linux kernel code: nfs_localio: simplify interface to nfsd for getting nfsd_file
Problem Details: The nfsd_localio_operations structure contains nfsd_file_get() to get a reference to an nfsd_file. This is only used in one place, where nfsd_open_local_fh() is also used. This patch combines the two, calling nfsd_open_local_fh() passing a pointer to where the nfsd_file pointer might be stored. If t...
```diff diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c index 86df8d2cd22e..ef12dd279539 100644 --- a/fs/nfs/localio.c +++ b/fs/nfs/localio.c @@ -209,11 +209,6 @@ void nfs_local_probe_async(struct nfs_client *clp) } EXPORT_SYMBOL_GPL(nfs_local_probe_async); -static inline struct nfsd_file *nfs_local_file_get(struc...
77e82fb2c6c27c122e785f543ae0062f7783c886
Analyze and fix the following issue in the Linux kernel code: nfs_localio: always hold nfsd net ref with nfsd_file ref
Problem Details: Having separate nfsd_file_put and nfsd_file_put_local in struct nfsd_localio_operations doesn't make much sense. The difference is that nfsd_file_put doesn't drop a reference to the nfs_net which is what keeps nfsd from shutting down. Currently, if nfsd tries to shutdown it will invalidate the files ...
```diff diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c index 7a33da477da3..86df8d2cd22e 100644 --- a/fs/nfs/localio.c +++ b/fs/nfs/localio.c @@ -211,12 +211,12 @@ EXPORT_SYMBOL_GPL(nfs_local_probe_async); static inline struct nfsd_file *nfs_local_file_get(struct nfsd_file *nf) { - return nfs_to->nfsd_file_get(nf)...
ed9be317330c7390df7db9e1d046698c02001bd2
Analyze and fix the following issue in the Linux kernel code: nfs_localio: use cmpxchg() to install new nfs_file_localio
Problem Details: Rather than using nfs_uuid.lock to protect installing a new ro_file or rw_file, change to use cmpxchg(). Removing the file already uses xchg() so this improves symmetry and also makes the code a little simpler. Also remove the optimisation of not taking the lock, and not removing the nfs_file_localio ...
```diff diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c index a4bacd9a5052..7a33da477da3 100644 --- a/fs/nfs/localio.c +++ b/fs/nfs/localio.c @@ -282,14 +282,9 @@ nfs_local_open_fh(struct nfs_client *clp, const struct cred *cred, return NULL; rcu_read_lock(); /* try to swap in the pointer */ - spin_lock(&cl...
0bd2f6b8996d4f1ca4573652454987826730a04a
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Prevent hang on NFS mount with xprtsec=[m]tls
Problem Details: Engineers at Hammerspace noticed that sometimes mounting with "xprtsec=tls" hangs for a minute or so, and then times out, even when the NFS server is reachable and responsive. kTLS shuts off data_ready callbacks if strp->msg_ready is set to mitigate data_ready callbacks when a full TLS record is not y...
```diff diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 83cc095846d3..4b10ecf4c265 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2740,6 +2740,11 @@ static void xs_tcp_tls_setup_socket(struct work_struct *work) } rpc_shutdown_client(lower_clnt); + /* Check for ingress data tha...
dd862da61e91123ca745e06c03ba39ce71a929d9
Analyze and fix the following issue in the Linux kernel code: nfs: fix incorrect handling of large-number NFS errors in nfs4_do_mkdir()
Problem Details: A recent commit introduced nfs4_do_mkdir() which reports an error from nfs4_call_sync() by returning it with ERR_PTR(). This is a problem as nfs4_call_sync() can return negative NFS-specific errors with values larger than MAX_ERRNO (4095). One example is NFS4ERR_DELAY which has value 10008. This "po...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6471db331863..341740fa293d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5164,13 +5164,15 @@ static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_ } static struct dentry *nfs4_do_mkdir(struct inode *dir, struct ...
80c4de6ab44c14e910117a02f2f8241ffc6ec54a
Analyze and fix the following issue in the Linux kernel code: nfs: ignore SB_RDONLY when remounting nfs
Problem Details: In some scenarios, when mounting NFS, more than one superblock may be created. The final superblock used is the last one created, but only the first superblock carries the ro flag passed from user space. If a ro flag is added to the superblock via remount, it will trigger the issue described in Link[1]...
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 1a609471e85e..91b5503b6f74 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1051,6 +1051,16 @@ int nfs_reconfigure(struct fs_context *fc) sync_filesystem(sb); + /* + * The SB_RDONLY flag has been removed from the superblock during + * mounts to prev...
8cd9b785943c57a136536250da80ba1eb6f8eb18
Analyze and fix the following issue in the Linux kernel code: nfs: clear SB_RDONLY before getting superblock
Problem Details: As described in the link, commit 52cb7f8f1778 ("nfs: ignore SB_RDONLY when mounting nfs") removed the check for the ro flag when determining whether to share the superblock, which caused issues when mounting different subdirectories under the same export directory via NFSv3. However, this change did no...
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 9eea9e62afc9..1a609471e85e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1308,8 +1308,17 @@ int nfs_get_tree_common(struct fs_context *fc) if (IS_ERR(server)) return PTR_ERR(server); + /* + * When NFS_MOUNT_UNSHARED is not set, NFS forces the sha...
1ff4716f420b5a6e6ef095b23bb5db76f46be7fc
Analyze and fix the following issue in the Linux kernel code: NFS: always probe for LOCALIO support asynchronously
Problem Details: It was reported that NFS client mounts of AWS Elastic File System (EFS) volumes is slow, this is because the AWS firewall disallows LOCALIO (because it doesn't consider the use of NFS_LOCALIO_PROGRAM valid), see: https://bugzilla.redhat.com/show_bug.cgi?id=2335129 Switch to performing the LOCALIO prob...
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 745f3c42f140..cf35ad3f818a 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -439,7 +439,7 @@ struct nfs_client *nfs_get_client(const struct nfs_client_initdata *cl_init) spin_unlock(&nn->nfs_client_lock); new = rpc_ops->init_client(new, cl_init);...
04a15263662ab864725d8b60407e2dd5ba525514
Analyze and fix the following issue in the Linux kernel code: pnfs/flexfiles: connect to NFSv3 DS using TLS if MDS connection uses TLS
Problem Details: Implementation follows bones of the pattern that was established in commit a35518cae4b325 ("NFSv4.1/pnfs: fix NFS with TLS in pnfs"). Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
```diff diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c index 91ef486f40b9..b4ccdf78d4dd 100644 --- a/fs/nfs/pnfs_nfs.c +++ b/fs/nfs/pnfs_nfs.c @@ -830,10 +830,16 @@ static int _nfs4_pnfs_v3_ds_connect(struct nfs_server *mds_srv, .servername = clp->cl_hostname, .connect_timeout = connect_timeout, .rec...
4d4832ed13ff505fe0371544b4773e79be2bb964
Analyze and fix the following issue in the Linux kernel code: NFSv4: Don't check for OPEN feature support in v4.1
Problem Details: fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't be sending it to v4.1 servers. Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS") Signed-off-by: Scott Mayhew <smayhew@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Benjamin Coddington <bco...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 8feb9abfe152..d9c7035d5771 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3976,8 +3976,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f FATTR4_WORD0_CASE_INSENSITIVE | FATTR4_WORD0_CASE_PRES...
243fea134633ba3d64aceb4c16129c59541ea2c6
Analyze and fix the following issue in the Linux kernel code: NFSv4.2: fix listxattr to return selinux security label
Problem Details: Currently, when NFS is queried for all the labels present on the file via a command example "getfattr -d -m . /mnt/testfile", it does not return the security label. Yet when asked specifically for the label (getfattr -n security.selinux) it will be returned. Include the security label when all attribut...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 87f9f6fb0214..8feb9abfe152 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -10858,7 +10858,7 @@ const struct nfs4_minor_version_ops *nfs_v4_minor_ops[] = { static ssize_t nfs4_listxattr(struct dentry *dentry, char *list, size_t size) { - ssi...
aba41e90aadeca8d4656f90639aa5f91ce564f1c
Analyze and fix the following issue in the Linux kernel code: NFSv4.2: fix setattr caching of TIME_[MODIFY|ACCESS]_SET when timestamps are delegated
Problem Details: nfs_setattr will flush all pending writes before updating a file time attributes. However when the client holds delegated timestamps, it can update its timestamps locally as it is the authority for the file times attributes. The client will later set the file attributes by adding a setattr to the deleg...
```diff diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 119e447758b9..6472b95bfd88 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -633,6 +633,34 @@ nfs_fattr_fixup_delegated(struct inode *inode, struct nfs_fattr *fattr) } } +static void nfs_set_timestamps_to_ts(struct inode *inode, struct iattr *attr) +{ +...
4c10fa44bc5f700e2ea21de2fbae520ba21f19d9
Analyze and fix the following issue in the Linux kernel code: fs/nfs/read: fix double-unlock bug in nfs_return_empty_folio()
Problem Details: Sometimes, when a file was read while it was being truncated by another NFS client, the kernel could deadlock because folio_unlock() was called twice, and the second call would XOR back the `PG_locked` flag. Most of the time (depending on the timing of the truncation), nobody notices the problem becau...
```diff diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 81bd1b9aba17..3c1fa320b3f1 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c @@ -56,7 +56,8 @@ static int nfs_return_empty_folio(struct folio *folio) { folio_zero_segment(folio, 0, folio_size(folio)); folio_mark_uptodate(folio); - folio_unlock(folio); + if (nfs...
793908d60b8745c386b9f4e29eb702f74ceb0886
Analyze and fix the following issue in the Linux kernel code: PCI: endpoint: Retain fixed-size BAR size as well as aligned size
Problem Details: When allocating space for an endpoint function on a BAR with a fixed size, the size saved in 'struct pci_epf_bar.size' should be the fixed size as expected by pci_epc_set_bar(). However, if pci_epf_alloc_space() increased the allocation size to accommodate iATU alignment requirements, it previously sa...
```diff diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index 394395c7f8de..577a9e490115 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -236,12 +236,13 @@ void pci_epf_free_space(struct pci_epf *epf, void *addr, enum pci_barno bar, ...
2fbdb6d8e03b70668c0876e635506540ae92ab05
Analyze and fix the following issue in the Linux kernel code: tracing: Fix compilation warning on arm32
Problem Details: On arm32, size_t is defined to be unsigned int, while PAGE_SIZE is unsigned long. This hence triggers a compilation warning as min() asserts the type of two operands to be equal. Casting PAGE_SIZE to size_t solves this issue and works on other target architectures as well. Compilation warning details:...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2c1764ed87b0..b60d495c2a79 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -6891,7 +6891,7 @@ static ssize_t tracing_splice_read_pipe(struct file *filp, ret = trace_seq_to_buffer(&iter->seq, page_address(spd.pages[i]), ...
2c7f023219966777be0687e15b57689894304cd3
Analyze and fix the following issue in the Linux kernel code: io_uring/net: only consider msg_inq if larger than 1
Problem Details: Currently retry and general validity of msg_inq is gated on it being larger than zero, but it's entirely possible for this to be slightly inaccurate. In particular, if FIN is received, it'll return 1. Just use larger than 1 as the check. This covers both the FIN case, and at the same time, it doesn't ...
```diff diff --git a/io_uring/net.c b/io_uring/net.c index d13f3e8f6c72..e16633fd6630 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -832,7 +832,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, * If more is available AND it was a full transfer, retry and * append to this one */ - ...
a6a26786f22a4ab0227bcf610510c4c9c2df0808
Analyze and fix the following issue in the Linux kernel code: drm/i915/guc: Check if expecting reply before decrementing outstanding_submission_g2h
Problem Details: When sending a H2G message where a reply is expected in guc_submission_send_busy_loop(), outstanding_submission_g2h is incremented before the send. However, if there is an error sending the message, outstanding_submission_g2h is decremented without checking if a reply is expected. Therefore, check if ...
```diff diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index f8cb7c630d5b..108331a69995 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -633,7 +633,7 @@ static int guc_submission...
c7a48ea9b919e2fa0e4a1d9938fdb03e9afe276c
Analyze and fix the following issue in the Linux kernel code: perf trace: Always print return value for syscalls returning a pid
Problem Details: The syscalls that were consistently observed were set_robust_list and rseq. This is because perf cannot find their child process. This change ensures that the return value is always printed. Before: 0.256 ( 0.001 ms): set_robust_list(head: 0x7f09c77dba20, len: 24) = 0...
```diff diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 07eddd5c0baa..67b557ec3b0d 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -3005,8 +3005,8 @@ errno_print: { else if (sc->fmt->errpid) { struct thread *child = machine__find_thread(trace->host, ret, ret);...
df7996076b1e1ba8a0690542d0e40f703f2f9eb7
Analyze and fix the following issue in the Linux kernel code: ASoC: amd: yc: Add support for Lenovo Yoga 7 16ARP8
Problem Details: Add DMI quirk entry for Lenovo Yoga 7 16ARP8 (83BS) to enable digital microphone support via ACP driver. Fixes microphone detection on this specific model which was previously falling back to non-functional generic audio paths. Tested-by: meowmeowbeanz <meowmeowbeanz@gmx.com> Signed-off-by: meowmeowb...
```diff diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c index 3d9da93d22ee..7e62445e02c1 100644 --- a/sound/soc/amd/yc/acp6x-mach.c +++ b/sound/soc/amd/yc/acp6x-mach.c @@ -311,6 +311,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "83AS"), }...
a4a859eb6704a8aa46aa1cec5396c8d41383a26b
Analyze and fix the following issue in the Linux kernel code: perf record: Fix incorrect --user-regs comments
Problem Details: The comment of "--user-regs" option is not correct, fix it. "on interrupt," -> "in user space," Fixes: 84c417422798c897 ("perf record: Support direct --user-regs arguments") Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Cc: Adrian Hunter <adrian.hu...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 136c0172799a..8059bce85a51 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -3533,7 +3533,7 @@ static struct option __record_options[] = { "sample selected machine registers on interrupt," " u...
9883494c45a13dc88d27dde4f988c04823b42a2f
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to correct check conditions in f2fs_cross_rename
Problem Details: Should be "old_dir" here. Fixes: 5c57132eaf52 ("f2fs: support project quota") Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
```diff diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index bb225431ed47..07e333ee21b7 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -1117,7 +1117,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, if ((is_inode_flag_set(new_dir, FI_PROJ_INHERIT) && !projid_eq(F2FS_I(new_...
c836d3b8d94e3dd381e7d4bb918875084f85715e
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to skip f2fs_balance_fs() if checkpoint is disabled
Problem Details: Syzbot reports a f2fs bug as below: INFO: task syz-executor328:5856 blocked for more than 144 seconds. Not tainted 6.15.0-rc6-syzkaller-00208-g3c21441eeffc #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor328 state:D stack:24392 pid:5856 tgid:5832 p...
```diff diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index b77b5de71a48..ae1223ef648f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -433,7 +433,7 @@ void f2fs_balance_fs(struct f2fs_sb_info *sbi, bool need) if (need && excess_cached_nats(sbi)) f2fs_balance_fs_bg(sbi, false); - if (!f2fs_is_chec...
ab73b29efd36f8916c6cc9954e912c4723c9a1b0
Analyze and fix the following issue in the Linux kernel code: s390/uv: Improve splitting of large folios that cannot be split while dirty
Problem Details: Currently, starting a PV VM on an iomap-based filesystem with large folio support, such as XFS, will not work. We'll be stuck in unpack_one()->gmap_make_secure(), because we can't seem to make progress splitting the large folio. The problem is that we require a writable PTE but a writable PTE under su...
```diff diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c index f6ddb2b54032..d278bf0c09d1 100644 --- a/arch/s390/kernel/uv.c +++ b/arch/s390/kernel/uv.c @@ -15,6 +15,7 @@ #include <linux/pagemap.h> #include <linux/swap.h> #include <linux/pagewalk.h> +#include <linux/backing-dev.h> #include <asm/facility.h...
40493d97b329f8185c0f04dc0ef2b9ffc58e7f3b
Analyze and fix the following issue in the Linux kernel code: drm/xe: Add missing documentation of rpa_freq
Problem Details: While at it, already adjust the rpe_freq frequency, to highlight that both are calculated by PCODE at runtime. Fixes: c6aac2fa77a3 ("drm/xe: Introduce the RPa information") Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Lucas De Marchi <lu...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_freq.c b/drivers/gpu/drm/xe/xe_gt_freq.c index 3293d89f1386..60d9354e7dbf 100644 --- a/drivers/gpu/drm/xe/xe_gt_freq.c +++ b/drivers/gpu/drm/xe/xe_gt_freq.c @@ -36,7 +36,10 @@ * - act_freq: The actual resolved frequency decided by PCODE. * - cur_freq: The current one re...
55f8aa083604ce098c9d6a0911c6bcde15d03a80
Analyze and fix the following issue in the Linux kernel code: drm/xe: Make xe_gt_freq part of the Documentation
Problem Details: The documentation was created with the creation of the component, however it has never been actually shown in the actual Documentation. While doing this, fixes the identation style, to avoid new warnings while building htmldocs. Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw mana...
```diff diff --git a/Documentation/gpu/xe/index.rst b/Documentation/gpu/xe/index.rst index b2369561f24e..42ba6c263cd0 100644 --- a/Documentation/gpu/xe/index.rst +++ b/Documentation/gpu/xe/index.rst @@ -16,6 +16,7 @@ DG2, etc is provided to prototype the driver. xe_migrate xe_cs xe_pm + xe_gt_freq xe_...
89ab97de44fec8eecedd1d327d418c5781303c05
Analyze and fix the following issue in the Linux kernel code: dt-bindings: timer: Add fsl,vf610-pit.yaml
Problem Details: Add binding doc fsl,vf610-pit.yaml to fix below CHECK_DTB warnings: arch/arm/boot/dts/nxp/vf/vf610m4-colibri.dtb: /soc/bus@40000000/pit@40037000: failed to match any schema with compatible: ['fsl,vf610-pit'] Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Conor Dooley <conor.dooley@microchi...
```diff diff --git a/Documentation/devicetree/bindings/timer/fsl,vf610-pit.yaml b/Documentation/devicetree/bindings/timer/fsl,vf610-pit.yaml new file mode 100644 index 000000000000..bee2c35bd0e2 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/fsl,vf610-pit.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (...
3e897853debde269ab01f0d3d28c3e7b37bf2c39
Analyze and fix the following issue in the Linux kernel code: drm/vkms: Create KUnit tests for YUV conversions
Problem Details: Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. The code used to compute the expected result can be found in comment. [Louis Chauvet: - fix minor formating issues (whitespace, double line) - change expected alpha from ...
```diff diff --git a/drivers/gpu/drm/vkms/tests/Makefile b/drivers/gpu/drm/vkms/tests/Makefile index 9ded37b67a46..0ee077942ae2 100644 --- a/drivers/gpu/drm/vkms/tests/Makefile +++ b/drivers/gpu/drm/vkms/tests/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_DRM_VKMS_KUNIT_TEST) += vkms...
f6743e6a00fda5d7238fb73807a7aa325a5c2d2c
Analyze and fix the following issue in the Linux kernel code: drm/sched: Cleanup event names
Problem Details: All events now start with the same prefix (drm_sched_job_). drm_sched_job_wait_dep was misleading because it wasn't waiting at all. It's now replaced by trace_drm_sched_job_unschedulable, which is only traced if the job cannot be scheduled. For moot dependencies, nothing is traced. Signed-off-by: Pie...
```diff diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h index 38cdd659a286..4ce53e493fef 100644 --- a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h +++ b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h @@ -63,17 +63,17 @@ DECLARE_EVENT_CLASS(drm_sched_job...
fd03f82a026cc03cb8051a8c6487c99f96c9029f
Analyze and fix the following issue in the Linux kernel code: drm/bridge: analogix_dp: Fix clk-disable removal
Problem Details: Commit 6579a03e68ff ("drm/bridge: analogix_dp: Remove the unnecessary calls to clk_disable_unprepare() during probing") removed the mismatched clock_disable calls from analogix_dp_probe. But that patch was created and sent before commit e5e9fa9f7aad ("drm/bridge: analogix_dp: Add support to get panel ...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 01201fff59a6..505eec6b819b 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1586,7 +1586,7 @@ analogix_dp_probe(s...
1f5090c4ae71d070aa9dac49b8ef3efe0da0fb36
Analyze and fix the following issue in the Linux kernel code: drm/bridge: adv7511: Move adv711_dsi_config_timing_gen() into adv7511_mode_set()
Problem Details: adv7511_mode_set() currently updates only the sync registers of the ADV bridge. At the end, drm_mode_copy() updates the current mode, but the horizontal and vertical porch registers of the ADV bridge still retain values from the old mode. Move adv7511_dsi_config_timing_gen() into adv7511_mode_set() to...
```diff diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511.h b/drivers/gpu/drm/bridge/adv7511/adv7511.h index 0ecce9e4947a..19046e61e015 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511.h +++ b/drivers/gpu/drm/bridge/adv7511/adv7511.h @@ -422,6 +422,8 @@ int adv7533_patch_cec_registers(struct adv7511 *adv); int ad...
040a008d0e5006123ac1b6e96b9de615e587ab7e
Analyze and fix the following issue in the Linux kernel code: perf intel-tpebs: Avoid race when evlist is being deleted
Problem Details: Reading through the evsel->evlist may seg fault if a sample arrives when the evlist is being deleted. Detect this case and ignore samples arriving when the evlist is being deleted. Fixes: bcfab08db7fb38bf ("perf intel-tpebs: Filter non-workload samples") Signed-off-by: Ian Rogers <irogers@google.com>...
```diff diff --git a/tools/perf/util/intel-tpebs.c b/tools/perf/util/intel-tpebs.c index 4ad4bc118ea5..3b92ebf5c112 100644 --- a/tools/perf/util/intel-tpebs.c +++ b/tools/perf/util/intel-tpebs.c @@ -162,9 +162,17 @@ new_child: static bool should_ignore_sample(const struct perf_sample *sample, const struct tpebs_reti...
fef8f648bb47726d96a5701fe31ed606268da73d
Analyze and fix the following issue in the Linux kernel code: perf symbol: Fix use-after-free in filename__read_build_id
Problem Details: The same buf is used for the program headers and reading notes. As the notes memory may be reallocated then this corrupts the memory pointed to by the phdr. Using the same buffer is in any case a logic error. Rather than deal with the duplicated code, introduce an elf32 boolean and a union for either t...
```diff diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c index d8da3da01fe6..36c1d3090689 100644 --- a/tools/perf/util/symbol-minimal.c +++ b/tools/perf/util/symbol-minimal.c @@ -90,11 +90,23 @@ int filename__read_build_id(const char *filename, struct build_id *bid) { FILE *fp; int ...
2a2a7f5e7deffa363b438308812989ded126a48a
Analyze and fix the following issue in the Linux kernel code: perf pmu: Avoid segv for missing name/alias_name in wildcarding
Problem Details: The pmu name or alias_name fields may be NULL and should be skipped if so. This is done in all loops of perf_pmu___name_match except the final wildcard loop which was an oversight. Fixes: 63e287131cf0c59b ("perf pmu: Rename name matching for no suffix or wildcard variants") Signed-off-by: Ian Rogers <...
```diff diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index bc1178234d3b..609828513f6c 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -2143,6 +2143,9 @@ static bool perf_pmu___name_match(const struct perf_pmu *pmu, const char *to_mat for (size_t i = 0; i < ARRAY_SIZE(names); i++) { ...
3ec8a8330a1aa846dffbf1d64479213366c55b54
Analyze and fix the following issue in the Linux kernel code: s390/uv: Don't return 0 from make_hva_secure() if the operation was not successful
Problem Details: If s390_wiggle_split_folio() returns 0 because splitting a large folio succeeded, we will return 0 from make_hva_secure() even though a retry is required. Return -EAGAIN in that case. Otherwise, we'll return 0 from gmap_make_secure(), and consequently from unpack_one(). In kvm_s390_pv_unpack(), we ass...
```diff diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c index 9a5d5be8acf4..2cc3b599c7fe 100644 --- a/arch/s390/kernel/uv.c +++ b/arch/s390/kernel/uv.c @@ -393,8 +393,11 @@ int make_hva_secure(struct mm_struct *mm, unsigned long hva, struct uv_cb_header folio_walk_end(&fw, vma); mmap_read_unlock(mm); -...
bc4005ef43104da589951dba69291360c6a11ae7
Analyze and fix the following issue in the Linux kernel code: ASoC: tas571x: fix tas5733 num_controls
Problem Details: Commit e3de7984e451 ("ASoC: tas571x: add separate tas5733 controls") introduces a separate struct for the tas5733 controls but did not update the num_controls with the correct ARRAY_SIZE. Fixes: e3de7984e451 ("ASoC: tas571x: add separate tas5733 controls") Signed-off-by: Bram Vlerick <bram.vlerick@op...
```diff diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index 00b131294547..6bf37c77f0a7 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -834,7 +834,7 @@ static const struct tas571x_chip tas5733_chip = { .supply_names = tas5733_supply_names, .num_su...
22eba3be8e1dc27de4aec3374bc9018dc8713670
Analyze and fix the following issue in the Linux kernel code: drm/xe/svm: Avoid duplicate eviction on get_pages() failure
Problem Details: xe_svm_range_get_pages() already calls drm_gpusvm_range_evict() internally when it fails with -EOPNOTSUPP. Remove the eviction call in the caller to prevent duplicate handling. Fixes: e0ff0d7cf928 ("drm/xe/svm: Refactor usage of drm_gpusvm* function in xe_svm") Cc: Matthew Brost <matthew.brost@intel.c...
```diff diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c index 4432685936ed..871ac81bb04a 100644 --- a/drivers/gpu/drm/xe/xe_svm.c +++ b/drivers/gpu/drm/xe/xe_svm.c @@ -914,11 +914,6 @@ retry: if (err == -EOPNOTSUPP || err == -EFAULT || err == -EPERM) { ctx.timeslice_ms <<= 1; /* Double times...
4557cc834712eca4eae7adbd9f0a06bdd8f79c99
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Reorder Doorbell Unregister and Command Queue Destruction
Problem Details: Refactor ivpu_cmdq_unregister() to ensure the doorbell is unregistered before destroying the command queue. The NPU firmware requires doorbells to be unregistered prior to command queue destruction. If doorbell remains registered when command queue destroy command is sent firmware will automatically u...
```diff diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c index b28da35c30b6..1c8e283ad985 100644 --- a/drivers/accel/ivpu/ivpu_job.c +++ b/drivers/accel/ivpu/ivpu_job.c @@ -247,6 +247,10 @@ static int ivpu_cmdq_unregister(struct ivpu_file_priv *file_priv, struct ivpu_cm if (!cmdq->db_id) ...
1c2c0e29f24360b3130c005a3c261cb8c7b363c6
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Use firmware names from upstream repo
Problem Details: Use FW names from linux-firmware repo instead of deprecated ones. The vpu_37xx.bin style names were never released and were only used for internal testing, so it is safe to remove them. Fixes: c140244f0cfb ("accel/ivpu: Add initial Panther Lake support") Cc: stable@vger.kernel.org # v6.13+ Reviewed-by...
```diff diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c index ccaaf6c100c0..9db741695401 100644 --- a/drivers/accel/ivpu/ivpu_fw.c +++ b/drivers/accel/ivpu/ivpu_fw.c @@ -55,18 +55,18 @@ static struct { int gen; const char *name; } fw_names[] = { - { IVPU_HW_IP_37XX, "vpu_37xx.bin" }, + { I...
a01e93ee44f7ed76f872d0ede82f8d31bf0a048a
Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Improve buffer object logging
Problem Details: - Fix missing alloc log when drm_gem_handle_create() fails in drm_vma_node_allow() and open callback is not called - Add ivpu_bo->ctx_id that enables to log the actual context id instead of using 0 as default - Add couple WARNs and errors so we can catch more memory corruption issues Fixes: 37de...
```diff diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c index 8741c73b92ce..c193a80241f5 100644 --- a/drivers/accel/ivpu/ivpu_gem.c +++ b/drivers/accel/ivpu/ivpu_gem.c @@ -28,7 +28,7 @@ static inline void ivpu_dbg_bo(struct ivpu_device *vdev, struct ivpu_bo *bo, con { ivpu_dbg(vdev, BO, ...
acea6b132d813a12ac414f6b1efb05921623afc0
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix bpf selftest build warning
Problem Details: On linux-next, build for bpf selftest displays a warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/if_xdp.h' differs from latest version at 'include/uapi/linux/if_xdp.h'. Commit 8066e388be48 ("net: add UAPI to the header guard in various network headers") changed the header guard from ...
```diff diff --git a/tools/include/uapi/linux/if_xdp.h b/tools/include/uapi/linux/if_xdp.h index 42869770776e..44f2bb93e7e6 100644 --- a/tools/include/uapi/linux/if_xdp.h +++ b/tools/include/uapi/linux/if_xdp.h @@ -7,8 +7,8 @@ * Magnus Karlsson <magnus.karlsson@intel.com> */ -#ifndef _LINUX_IF_XDP_H -#defin...
6da5f1b4b4a06ebd3af1510ebd3ecf60a5037936
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: Fix skip of wildcard interface test
Problem Details: The script is supposed to skip wildcard interface testing if unsupported by the host's nft tool. The failing check caused script abort due to 'set -e' though. Fix this by running the potentially failing nft command inside the if-conditional pipe. Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nft...
```diff diff --git a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh b/tools/testing/selftests/net/netfilter/nft_interface_stress.sh index 11d82d11495e..5ff7be9daeee 100755 --- a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh +++ b/tools/testing/selftests/net/netfilter/nft_interface_stress....
34ecde3c56066ba79e5ec3d93c5b14ea83e3603e
Analyze and fix the following issue in the Linux kernel code: iomap: don't lose folio dropbehind state for overwrites
Problem Details: DONTCACHE I/O must have the completion punted to a workqueue, just like what is done for unwritten extents, as the completion needs task context to perform the invalidation of the folio(s). However, if writeback is started off filemap_fdatawrite_range() off generic_sync() and it's an overwrite, then th...
```diff diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 233abf598f65..3729391a18f3 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1691,6 +1691,8 @@ static int iomap_add_to_ioend(struct iomap_writepage_ctx *wpc, ioend_flags |= IOMAP_IOEND_UNWRITTEN; if (wpc->iomap.flags & IO...
57a92d14659df3e7e7e0052358c8cc68bbbc3b5e
Analyze and fix the following issue in the Linux kernel code: net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames
Problem Details: We have noticed that when PHY timestamping is enabled, L2 frames seems to be modified by changing two 2 bytes with a value of 0. The place were these 2 bytes seems to be random(or I couldn't find a pattern). In most of the cases the userspace can ignore these frames but if for example those 2 bytes ar...
```diff diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c index 6f96f2679f0b..6b800081eed5 100644 --- a/drivers/net/phy/mscc/mscc_ptp.c +++ b/drivers/net/phy/mscc/mscc_ptp.c @@ -946,7 +946,9 @@ static int vsc85xx_ip1_conf(struct phy_device *phydev, enum ts_blk blk, /* UDP checksum offset ...
0bdc924bfb319fb10d1113cbf091fc26fb7b1f99
Analyze and fix the following issue in the Linux kernel code: net: openvswitch: Fix the dead loop of MPLS parse
Problem Details: The unexpected MPLS packet may not end with the bottom label stack. When there are many stacks, The label count value has wrapped around. A dead loop occurs, soft lockup/CPU stuck finally. stack backtrace: UBSAN: array-index-out-of-bounds in /build/linux-0Pa0xK/linux-5.15.0/net/openvswitch/flow.c:662:...
```diff diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c index 8a848ce72e29..b80bd3a90773 100644 --- a/net/openvswitch/flow.c +++ b/net/openvswitch/flow.c @@ -788,7 +788,7 @@ static int key_extract_l3l4(struct sk_buff *skb, struct sw_flow_key *key) memset(&key->ipv4, 0, sizeof(key->ipv4)); } } else...
6e9f2df1c550ead7cecb3e450af1105735020c92
Analyze and fix the following issue in the Linux kernel code: calipso: Don't call calipso functions for AF_INET sk.
Problem Details: syzkaller reported a null-ptr-deref in txopt_get(). [0] The offset 0x70 was of struct ipv6_txoptions in struct ipv6_pinfo, so struct ipv6_pinfo was NULL there. However, this never happens for IPv6 sockets as inet_sk(sk)->pinet6 is always set in inet6_create(), meaning the socket was not IPv6 one. Th...
```diff diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index cd9160bbc919..6ea16138582c 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c @@ -1165,6 +1165,9 @@ int netlbl_conn_setattr(struct sock *sk, break; #if IS_ENABLED(CONFIG_IPV6) case AF_INET6: + if (sk-...
ac9fe7dd8e730a103ae4481147395cc73492d786
Analyze and fix the following issue in the Linux kernel code: net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Problem Details: Savino says: "We are writing to report that this recent patch (141d34391abbb315d68556b7c67ad97885407547) [1] can be bypassed, and a UAF can still occur when HFSC is utilized with NETEM. The patch only checks the cl->cl_nactive field to determine whether it is the first insertio...
```diff diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 7986145a527c..5a7745170e84 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c @@ -175,6 +175,11 @@ struct hfsc_sched { #define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */ +static bool cl_in_el_or_vttree(struct hfsc_cla...
67af4ec948e8ce3ea53a9cf614d01fddf172e56d
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: QOS: Refactor TC_HTB_LEAF_DEL_LAST callback
Problem Details: This patch addresses below issues, 1. Active traffic on the leaf node must be stopped before its send queue is reassigned to the parent. This patch resolves the issue by marking the node as 'Inner'. 2. During a system reboot, the interface receives TC_HTB_LEAF_DEL and TC_HTB_LEAF_DEL_LAST ca...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c index 35acc07bd964..5765bac119f0 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c @@ -1638,6 +1638,7 @@ static int otx2_qos_leaf_de...
479c58016099d19686e36f6c50f912360839a7fa
Analyze and fix the following issue in the Linux kernel code: octeontx2-pf: QOS: Perform cache sync on send queue teardown
Problem Details: QOS is designed to create a new send queue whenever a class is created, ensuring proper shaping and scheduling. However, when multiple send queues are created and deleted in a loop, SMMU errors are observed. This patch addresses the issue by performing an data cache sync during the teardown of QOS se...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c index c5dbae0e513b..58d572ce08ef 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c @@ -256,6 +256,26 @@ out: return er...
c5cebb241e27ed0c3f4c1d2ce63089398e0ed17e
Analyze and fix the following issue in the Linux kernel code: bpf, arm64: Remove unused-but-set function and variable.
Problem Details: Remove unused-but-set function and variable to fix the build warning: arch/arm64/net/bpf_jit_comp.c: In function 'arch_bpf_trampoline_size': 2547 | int nregs, ret; | ^~~~~ Fixes: 9014cf56f13d ("bpf, arm64: Support up to 12 function arguments") Reported-by: kernel test robot <lkp@...
```diff diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index b5c3ab623536..14d4c6ac4ca0 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -2520,21 +2520,6 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im, return ctx->idx; } ...
4496e1c1354bd4837bcc1414f6e1a4d042857903
Analyze and fix the following issue in the Linux kernel code: crash_dump, nvme: select CONFIGFS_FS as built-in
Problem Details: Configfs can be configured as a loadable module, which causes a link-time failure for dm-crypt crash dump support: crash_dump_dm_crypt.c:(.text+0x3a4): undefined reference to `config_item_init_type_name' aarch64-linux-ld: kernel/crash_dump_dm_crypt.o: in function `configfs_dmcrypt_keys_init': crash_du...
```diff diff --git a/drivers/nvme/target/Kconfig b/drivers/nvme/target/Kconfig index 4c253b433bf7..4904097dfd49 100644 --- a/drivers/nvme/target/Kconfig +++ b/drivers/nvme/target/Kconfig @@ -3,7 +3,7 @@ config NVME_TARGET tristate "NVMe Target support" depends on BLOCK - depends on CONFIGFS_FS + select CONFIGFS_FS...
c544a952ba61b1a025455098033c17e0573ab085
Analyze and fix the following issue in the Linux kernel code: mm: pcp: increase pcp->free_count threshold to trigger free_high
Problem Details: In old pcp design, pcp->free_factor gets incremented in nr_pcp_free() which is invoked by free_pcppages_bulk(). So, it used to increase free_factor by 1 only when we try to reduce the size of pcp list and free_high used to trigger only for order > 0 and order < costly_order and pcp->free_factor > 0. ...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index dbafa7c69a6a..d578c6f7ee29 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2661,7 +2661,7 @@ static void free_frozen_page_commit(struct zone *zone, * stops will be drained from vmstat refresh context. */ if (order && order <= PAGE_ALLOC_COSTLY_...
7f4b6065d9a842721a04632fc219aa453d1b2f5c
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: refactor __unmap_hugepage_range() to take folio instead of page
Problem Details: The function __unmap_hugepage_range() has two kinds of users: 1) unmap_hugepage_range(), which passes in the head page of a folio. Since unmap_hugepage_range() already takes folio and there are no other uses of the folio struct in the function, it is natural for __unmap_hugepage_range() to tak...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f6d5f24e793c..eb21619206af 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -134,7 +134,7 @@ void unmap_hugepage_range(struct vm_area_struct *, void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_stru...
81edb1ba3232afd45ae7f3f492a91019571b18c9
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: refactor unmap_hugepage_range() to take folio instead of page
Problem Details: The function unmap_hugepage_range() has two kinds of users: 1) unmap_ref_private(), which passes in the head page of a folio. Since unmap_ref_private() already takes folio and there are no other uses of the folio struct in the function, it is natural for unmap_hugepage_range() to take folio a...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 23ebf49c5d6a..f6d5f24e793c 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -129,8 +129,8 @@ int move_hugetlb_page_tables(struct vm_area_struct *vma, int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, ...