id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
08ce2fee1b869ecbfbd94e0eb2630e52203a2e03 | Analyze and fix the following issue in the Linux kernel code: ntfs3: fix circular locking dependency in run_unpack_ex | Problem Details:
Syzbot reported a circular locking dependency between wnd->rw_lock
(sbi->used.bitmap) and ni->file.run_lock.
The deadlock scenario:
1. ntfs_extend_mft() takes ni->file.run_lock then wnd->rw_lock.
2. run_unpack_ex() takes wnd->rw_lock then tries to acquire
ni->file.run_lock inside ntfs_refresh_zone(... | ```diff
diff --git a/fs/ntfs3/run.c b/fs/ntfs3/run.c
index 395b20492525..dc59cad4fa37 100644
--- a/fs/ntfs3/run.c
+++ b/fs/ntfs3/run.c
@@ -1131,11 +1131,14 @@ int run_unpack_ex(struct runs_tree *run, struct ntfs_sb_info *sbi, CLST ino,
struct rw_semaphore *lock =
is_mounted(sbi) ? &sbi->mft.ni->file.run_lock :... |
d1aab1ca576c90192ba961094d51b0be6355a4d6 | Analyze and fix the following issue in the Linux kernel code: bpf: Properly mark live registers for indirect jumps | Problem Details:
For a `gotox rX` instruction the rX register should be marked as used
in the compute_insn_live_regs() function. Fix this.
Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Link: https://lore.kernel.org/r/20260114162544.83253-2-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@ke... | ```diff
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 62ad7c79ce2d..7a375f608263 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -24848,6 +24848,12 @@ static void compute_insn_live_regs(struct bpf_verifier_env *env,
case BPF_JMP32:
switch (code) {
case BPF_JA:
+ def = 0;
+... |
6f87719b8ae170448348e56a82228ca39a3336a6 | Analyze and fix the following issue in the Linux kernel code: perf parse-events: Always track user config changes | Problem Details:
Requiring the 'pmu->perf_event_attr_init_default' callback to be set to
track user changes is a bit of a trap to fall in. It's hard to see that
this is required when depending on the user change tracking.
It's possible to want all 0 defaults so not set it, but at the same time
still do some programmat... | ```diff
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 1f6e2213326d..c8f2962a06c7 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1528,12 +1528,8 @@ static int parse_events_add_pmu(struct parse_events_state *parse_state,
return -ENOMEM;
}
-... |
87775abac8733f5a4856cd59122c6dc8c8032a13 | Analyze and fix the following issue in the Linux kernel code: perf evsel: apply evsel__set_config_if_unset() to all config fields | Problem Details:
Misleadingly, evsel__set_config_if_unset() only works with the config
field and not config1, config2, etc. This is fine at the moment because
all users of it happen to operate on bits that are in that config field.
Fix it before there are any new users of the function which operate on
bits in different... | ```diff
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1a41a10d9ab2..32517683351f 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1336,6 +1336,36 @@ void evsel__set_config_if_unset(struct evsel *evsel, const char *config_name,
struct perf_pmu_format *format = pmu_find_form... |
159ca97cd97ce8cc65364fee37319823b5ffb5bd | Analyze and fix the following issue in the Linux kernel code: perf parse-events: Refactor get_config_terms() to remove macros | Problem Details:
The ADD_CONFIG_TERM() macros build the __type argument out of a partial
EVSEL__CONFIG_TERM_x enum name. This means that they can't be called
from a function where __type is a variable and it's also impossible to
grep the codebase to find usages of these enums as they're never typed
in full.
Fix this b... | ```diff
diff --git a/tools/perf/util/evsel_config.h b/tools/perf/util/evsel_config.h
index bcd3a978f0c4..685fd8d5c4a8 100644
--- a/tools/perf/util/evsel_config.h
+++ b/tools/perf/util/evsel_config.h
@@ -50,6 +50,7 @@ struct evsel_config_term {
u64 cfg_chg;
char *str;
int cpu;
+ u64 val... |
957eda596c7665f2966970fd1dcc35fe299b38e8 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: pci: validate sequence number of TX release report | Problem Details:
Hardware rarely reports abnormal sequence number in TX release report,
which will access out-of-bounds of wd_ring->pages array, causing NULL
pointer dereference.
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - n... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c
index a66fcdb0293b..093960d7279f 100644
--- a/drivers/net/wireless/realtek/rtw89/pci.c
+++ b/drivers/net/wireless/realtek/rtw89/pci.c
@@ -604,11 +604,16 @@ static void rtw89_pci_release_rpp(struct rtw89_dev *rtwdev,... |
344c5281f43851b22c7cc223fd0250c143fcbc79 | Analyze and fix the following issue in the Linux kernel code: riscv: suspend: Fix stimecmp update hazard on RV32 | Problem Details:
On RV32, updating the 64-bit stimecmp (or vstimecmp) CSR requires two
separate 32-bit writes. A race condition exists if the timer triggers
during these two writes.
The RISC-V Privileged Specification (e.g., Section 3.2.1 for mtimecmp)
recommends a specific 3-step sequence to avoid spurious interrupts... | ```diff
diff --git a/arch/riscv/kernel/suspend.c b/arch/riscv/kernel/suspend.c
index 24b3f57d467f..aff93090c4ef 100644
--- a/arch/riscv/kernel/suspend.c
+++ b/arch/riscv/kernel/suspend.c
@@ -51,10 +51,11 @@ void suspend_restore_csrs(struct suspend_context *context)
#ifdef CONFIG_MMU
if (riscv_has_extension_unlikel... |
75870639bf5d1c447ddba4d738ff72771a69f2a1 | Analyze and fix the following issue in the Linux kernel code: riscv: kvm: Fix vstimecmp update hazard on RV32 | Problem Details:
On RV32, updating the 64-bit stimecmp (or vstimecmp) CSR requires two
separate 32-bit writes. A race condition exists if the timer triggers
during these two writes.
The RISC-V Privileged Specification (e.g., Section 3.2.1 for mtimecmp)
recommends a specific 3-step sequence to avoid spurious interrupts... | ```diff
diff --git a/arch/riscv/kvm/vcpu_timer.c b/arch/riscv/kvm/vcpu_timer.c
index 85a7262115e1..f36247e4c783 100644
--- a/arch/riscv/kvm/vcpu_timer.c
+++ b/arch/riscv/kvm/vcpu_timer.c
@@ -72,8 +72,9 @@ static int kvm_riscv_vcpu_timer_cancel(struct kvm_vcpu_timer *t)
static int kvm_riscv_vcpu_update_vstimecmp(struct... |
eaa9bb1d39d59e7c17b06cec12622b7c586ab629 | Analyze and fix the following issue in the Linux kernel code: riscv: clocksource: Fix stimecmp update hazard on RV32 | Problem Details:
On RV32, updating the 64-bit stimecmp (or vstimecmp) CSR requires two
separate 32-bit writes. A race condition exists if the timer triggers
during these two writes.
The RISC-V Privileged Specification (e.g., Section 3.2.1 for mtimecmp)
recommends a specific 3-step sequence to avoid spurious interrupts... | ```diff
diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
index 4d7cf338824a..cfc4d83c42c0 100644
--- a/drivers/clocksource/timer-riscv.c
+++ b/drivers/clocksource/timer-riscv.c
@@ -50,8 +50,9 @@ static int riscv_clock_next_event(unsigned long delta,
if (static_branch_likely(&riscv_... |
4181aceb4af414bd6d2ce5eb9a22637bbb4f5f8c | Analyze and fix the following issue in the Linux kernel code: rust: i2c: do not drop device private data on shutdown() | Problem Details:
We must not drop the device private data on shutdown(); none of the
registrations attached to devres that might access the device private
data are released before shutdown() is called.
Hence, freeing the device private data on shutdown() can cause UAF bugs.
Fixes: 57c5bd9aee94 ("rust: i2c: add basic ... | ```diff
diff --git a/rust/kernel/i2c.rs b/rust/kernel/i2c.rs
index 491e6cc25cf4..35b678b78d91 100644
--- a/rust/kernel/i2c.rs
+++ b/rust/kernel/i2c.rs
@@ -181,9 +181,9 @@ impl<T: Driver + 'static> Adapter<T> {
// SAFETY: `shutdown_callback` is only ever called after a successful call to
// `probe_call... |
69132c2d4c11858fa43edeb19a911eab625567f9 | Analyze and fix the following issue in the Linux kernel code: Documentation: riscv: uabi: Clarify ISA spec version for canonical order | Problem Details:
Specify that chapter 27 refers to version 20191213 of the RISC-V ISA
Unprivileged Architecture. The chapter numbering differs across
specification versions - for example, in version 20250508, the ISA
Extension Naming Conventions is chapter 36, not chapter 27.
Historical versions of the RISC-V specific... | ```diff
diff --git a/Documentation/arch/riscv/uabi.rst b/Documentation/arch/riscv/uabi.rst
index 243e40062e34..0c5299e00762 100644
--- a/Documentation/arch/riscv/uabi.rst
+++ b/Documentation/arch/riscv/uabi.rst
@@ -7,7 +7,9 @@ ISA string ordering in /proc/cpuinfo
------------------------------------
The canonical o... |
81cee9166a9073b4da28e970e75d7f89c98ed966 | Analyze and fix the following issue in the Linux kernel code: compiler_types: Introduce __flex_counter() and family | Problem Details:
Introduce __flex_counter() which wraps __builtin_counted_by_ref(),
as newly introduced by GCC[1] and Clang[2]. Use of __flex_counter()
allows access to the counter member of a struct's flexible array member
when it has been annotated with __counted_by().
Introduce typeof_flex_counter(), overflows_flex... | ```diff
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index d3318a3c2577..c02515f597d5 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -535,6 +535,37 @@ struct ftrace_likely_data {
#define __annotated(var, attr) __builtin_has_attribute(var, attr)
#end... |
3bd4edd67b034f8e1f61c86e0eb098de6179e3f2 | Analyze and fix the following issue in the Linux kernel code: hwspinlock: omap: Handle devm_pm_runtime_enable() errors | Problem Details:
Although unlikely, devm_pm_runtime_enable() can fail due to memory
allocations. Without proper error handling, the subsequent
pm_runtime_resume_and_get() call may operate on incorrectly
initialized runtime PM state.
Add error handling to check the return value of
devm_pm_runtime_enable() and return on... | ```diff
diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c
index 27b47b8623c0..2d8de835bc24 100644
--- a/drivers/hwspinlock/omap_hwspinlock.c
+++ b/drivers/hwspinlock/omap_hwspinlock.c
@@ -88,7 +88,9 @@ static int omap_hwspinlock_probe(struct platform_device *pdev)
* make sure t... |
5eb63e9bb65d88abde647ced50fe6ad40c11de1a | Analyze and fix the following issue in the Linux kernel code: bus: omap-ocp2scp: fix OF populate on driver rebind | Problem Details:
Since commit c6e126de43e7 ("of: Keep track of populated platform
devices") child devices will not be created by of_platform_populate()
if the devices had previously been deregistered individually so that the
OF_POPULATED flag is still set in the corresponding OF nodes.
Switch to using of_platform_depo... | ```diff
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
index e4dfda7b3b10..eee5ad191ea9 100644
--- a/drivers/bus/omap-ocp2scp.c
+++ b/drivers/bus/omap-ocp2scp.c
@@ -17,15 +17,6 @@
#define OCP2SCP_TIMING 0x18
#define SYNC2_MASK 0xf
-static int ocp2scp_remove_devices(struct device *dev, void *c)... |
2c3b8260d1a0d9a388f2d30e3bbe50d93edfa2aa | Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: sm6125-ginkgo: Fix missing msm-id subtype | Problem Details:
qcom,msm-id property must consist of two numbers, where the second
number is the subtype, as reported by dtbs_check:
sm6125-xiaomi-ginkgo.dtb: / (xiaomi,ginkgo): qcom,msm-id:0: [394] is too short
Xiaomi vendor DTS for Trinket IDP and QRD boards uses value of 0x10000,
so put it here as well.
Signed... | ```diff
diff --git a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
index 68a237215bd1..6b68e391cf3e 100644
--- a/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
+++ b/arch/arm64/boot/dts/qcom/sm6125-xiaomi-ginkgo.dts
@@ -19,7 +19,7 @@
chassis-type = "handset";... |
ccef4b2703ff5b0de0b1bda30a0de3026d52eb19 | Analyze and fix the following issue in the Linux kernel code: soc: qcom: ubwc: add missing include | Problem Details:
The header has a function which calls pr_err(). Don't require users of
the header to include <linux/printk.h> and include it here.
Fixes: 87cfc79dcd60 ("drm/msm/a6xx: Resolve the meaning of UBWC_MODE")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <b... | ```diff
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index 0a4edfe3d96d..f052e241736c 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -8,6 +8,7 @@
#define __QCOM_UBWC_H__
#include <linux/bits.h>
+#include <linux/printk.h>
#include <linux/types.h>
s... |
55780d8a1dcc93d2c4b33c565ada88df12c9f206 | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Stop toggling virtual VMSAVE/VMLOAD on intercept recalc | Problem Details:
Virtual VMSAVE/VMLOAD enablement (i.e.
VIRTUAL_VMLOAD_VMSAVE_ENABLE_MASK) is set/cleared by
svm_recalc_instruction_intercepts() when the intercepts are cleared/set.
This is unnecessary because the bit is meaningless when intercepts are
set and KVM emulates the instructions. Initialize the bit in vmcb01... | ```diff
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index f1a5b61bdb5b..5eadecc5246c 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -995,10 +995,14 @@ static void svm_recalc_instruction_intercepts(struct kvm_vcpu *vcpu)
svm_set_intercept(svm, INTERCEPT_RDTSCP);
}
+ /*
+ * ... |
127ccae2c185f62e6ecb4bf24f9cb307e9b9c619 | Analyze and fix the following issue in the Linux kernel code: KVM: nSVM: Always use vmcb01 in VMLOAD/VMSAVE emulation | Problem Details:
Commit cc3ed80ae69f ("KVM: nSVM: always use vmcb01 to for vmsave/vmload
of guest state") made KVM always use vmcb01 for the fields controlled by
VMSAVE/VMLOAD, but it missed updating the VMLOAD/VMSAVE emulation code
to always use vmcb01.
As a result, if VMSAVE/VMLOAD is executed by an L2 guest and is ... | ```diff
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index e454ae095cf7..f1a5b61bdb5b 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -2122,12 +2122,13 @@ static int vmload_vmsave_interception(struct kvm_vcpu *vcpu, bool vmload)
ret = kvm_skip_emulated_instruction(vcpu);
+ /* K... |
ea64aa57d596c4cbe518ffd043c52ef64089708d | Analyze and fix the following issue in the Linux kernel code: selinux: drop the BUG() in cred_has_capability() | Problem Details:
With the compile time check located immediately above the
cred_has_capability() function ensuring that we will notice if the
capability set grows beyond 63 capabilities, we can safely remove
the BUG() call from the cred_has_capability().
Signed-off-by: Paul Moore <paul@paul-moore.com> | ```diff
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 9289ed89a8ec..feda34b18d83 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1659,7 +1659,6 @@ static int cred_has_capability(const struct cred *cred,
break;
default:
pr_err("SELinux: out of range capability %... |
6c8512a5b7f44caf981cee4ffa2a4ac73e627732 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Don't register posted interrupt wakeup handler if alloc_kvm_area() fails | Problem Details:
Unregistering the posted interrupt wakeup handler only happens during
hardware unsetup. Therefore, if alloc_kvm_area() fails and continue to
register the posted interrupt wakeup handler, this will leave the global
posted interrupt wakeup handler pointer in an incorrect state. Although
it should not be ... | ```diff
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 97d696014f9a..ccca182a346d 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -8708,8 +8708,8 @@ __init int vmx_hardware_setup(void)
}
r = alloc_kvm_area();
- if (r && nested)
- nested_vmx_hardware_unsetup();
+ if (r)
+ ... |
b4d37cdb77a0015f51fee083598fa227cc07aaf1 | Analyze and fix the following issue in the Linux kernel code: KVM: Don't clobber irqfd routing type when deassigning irqfd | Problem Details:
When deassigning a KVM_IRQFD, don't clobber the irqfd's copy of the IRQ's
routing entry as doing so breaks kvm_arch_irq_bypass_del_producer() on x86
and arm64, which explicitly look for KVM_IRQ_ROUTING_MSI. Instead, to
handle a concurrent routing update, verify that the irqfd is still active
before co... | ```diff
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 0e8b5277be3b..a369b20d47f0 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -157,21 +157,28 @@ irqfd_shutdown(struct work_struct *work)
}
-/* assumes kvm->irqfds.lock is held */
-static bool
-irqfd_is_active(struct kvm_kernel_irqfd *irqf... |
b07b6f0c5d27fafb12ae98d889ae944d308fe9f6 | Analyze and fix the following issue in the Linux kernel code: selinux: fix a capabilities parsing typo in selinux_bpf_token_capable() | Problem Details:
There was a typo, likely a cut-n-paste bug, where we were checking for
SECCLASS_CAPABILITY instead of SECCLASS_CAPABILITY2.
Fixes: 5473a722f782 ("selinux: add support for BPF token access control")
Reported-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com> | ```diff
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index c7c19ceeeb2f..9289ed89a8ec 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -7260,7 +7260,7 @@ static int selinux_bpf_token_capable(const struct bpf_token *token, int cap)
sclass = initns ? SECCLASS_CAPABILITY : SEC... |
cfbe371194d1f342bdd88f87a9b36407d1ec0f52 | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Check vCPU ID against max x2AVIC ID if and only if x2AVIC is enabled | Problem Details:
When allocating the AVIC backing page, only check one of the max AVIC vs.
x2AVIC ID based on whether or not x2AVIC is enabled. Doing so fixes a bug
where KVM incorrectly inhibits AVIC if x2AVIC is _disabled_ and any vCPU
with a non-zero APIC ID is created, as x2avic_max_physical_id is left '0'
when x2... | ```diff
diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
index 6b77b2033208..0f6c8596719b 100644
--- a/arch/x86/kvm/svm/avic.c
+++ b/arch/x86/kvm/svm/avic.c
@@ -376,6 +376,7 @@ void avic_init_vmcb(struct vcpu_svm *svm, struct vmcb *vmcb)
static int avic_init_backing_page(struct kvm_vcpu *vcpu)
{
+ u32... |
d04f73668bebbc5a44a2771ea92b6ec253148050 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add an hdmi_hpd_debounce_delay_ms module | Problem Details:
[Why&How]
Right now, the HDMI HPD filter is enabled by default at 1500ms.
We want to disable it by default, as most modern displays with HDMI do
not require it for DPMS mode.
The HPD can instead be enabled as a driver parameter with a custom delay
value in ms (up to 5000ms).
Fixes: c918e75e1ed9 ("dr... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 9f9774f58ce1..b20a06abb65d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -274,6 +274,8 @@ extern int amdgpu_rebar;
extern int amdgpu_wbrf;
extern int amdgpu_user_queue;
... |
b2426a211dba6432e32a2e70e9183c6e134475c6 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/userq: Fix fence reference leak on queue teardown v2 | Problem Details:
The user mode queue keeps a pointer to the most recent fence in
userq->last_fence. This pointer holds an extra dma_fence reference.
When the queue is destroyed, we free the fence driver and its xarray,
but we forgot to drop the last_fence reference.
Because of the missing dma_fence_put(), the last fe... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 53d8707f9881..85e9edc1cb6f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -141,6 +141,8 @@ static void amdgpu_userq_walk_and... |
18dbcfb46f692e665c3fe3eee804e56c4eae53d6 | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: No need to suspend whole MES to evict process | Problem Details:
Each queue of the process is individually removed and there is not need
to suspend whole mes. Suspending mes stops kernel mode queues also
causing unnecessary timeouts when running mixed work loads
Fixes: 079ae5118e1f ("drm/amdkfd: fix suspend/resume all calls in mes based eviction path")
Closes: http... | ```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 8af0929ca40a..625ea8ab7a74 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -1209,14 +1209,8 @@ static... |
90dbc0bc2aa60021615969841fed06790c992bde | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix smu overdrive data type wrong issue on smu 14.0.2 | Problem Details:
resolving the issue of incorrect type definitions potentially causing calculation errors.
Fixes: 54f7f3ca982a ("drm/amdgpu/swm14: Update power limit logic")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deuch... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
index 33c3cd2e1e24..d7642d388bc3 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -1702,8 +1702,9 @@ static int ... |
52d3d115e9cc975b90b1fc49abf6d36ad5e8847a | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Initialise backlight level values from hw | Problem Details:
Internal backlight levels are initialised from ACPI but the values
are sometimes out of sync with the levels in effect until there has
been a read from hardware (eg triggered by reading from sysfs).
This means that the first drm_commit can cause the levels to be set
to a different value than the actua... | ```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 936c3bc3f2d6..fae88ce8327f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5266,6 +5266,8 @@ amdgpu_dm_register_back... |
0a1253ba5096f531eaaef40caa4c069da6ad48ae | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Show link name in PSR status message | Problem Details:
[Why]
The PSR message was moved in commit 4321742c394e ("drm/amd/display:
Move PSR support message into amdgpu_dm"). This message however shows
for every single link without showing which link is which. This can
send a confusing message to the user.
[How]
Add link name into the message.
Fixes: 43217... | ```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 740711ac1037..936c3bc3f2d6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5626,7 +5626,8 @@ static int amdgpu_dm_in... |
80614c509810fc051312d1a7ccac8d0012d6b8d0 | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: fix a memory leak in device_queue_manager_init() | Problem Details:
If dqm->ops.initialize() fails, add deallocate_hiq_sdma_mqd()
to release the memory allocated by allocate_hiq_sdma_mqd().
Move deallocate_hiq_sdma_mqd() up to ensure proper function
visibility at the point of use.
Fixes: 11614c36bc8f ("drm/amdkfd: Allocate MQD trunk for HIQ and SDMA")
Signed-off-by: H... | ```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 d7a2e7178ea9..8af0929ca40a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -2919,6 +2919,14 @@ static... |
122b15cdbcc2eaccd7c1e630bb79ff4c268dd3f4 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Use correct address to setup gart page table for vram access | Problem Details:
Use dst input parameter to setup gart page table entries instead of using fixed
location.
Fixes: 237d623ae659 ("drm/amdgpu/gart: Add helper to bind VRAM pages (v2)")
Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index d2237ce9da70..1485f4789440 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -375,7 +375,7 @@ void amdgpu_gart_map(struct amdgpu_device *adev, uint64_t off... |
9c8120015270d8a31c335c7137977749e5e8cd30 | Analyze and fix the following issue in the Linux kernel code: Revert duplicate "drm/amdgpu: disable peer-to-peer access for DCC-enabled GC12 VRAM surfaces" | Problem Details:
This reverts commit 22a36e660d014925114feb09a2680bb3c2d1e279 once,
which was merged twice due to an incorrect backmerge resolution.
Fixes: ce0478b02ed2 ("Merge tag 'v6.18-rc6' into drm-next")
Signed-off-by: Peter Colberg <pcolberg@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(ch... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
index e22cfa7c6d32..c1461317eb29 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
@@ -83,18 +83,6 @@ static int amdgpu_dma_buf_attach(struct dma_buf *d... |
9cb6278b44c38899961b36d303d7b18b38be2a6e | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix drm panic null pointer when driver not support atomic | Problem Details:
When driver not support atomic, fb using plane->fb rather than
plane->state->fb.
Fixes: fe151ed7af54 ("drm/amdgpu: add generic display panic helper code")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 2f2a72de673513247cd6fae... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index b5d34797d606..52bc04452812 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1880,7 +1880,12 @@ int amdgpu_display_get_scanout_buffer(struct d... |
292e5757b2229c0c6f1d059123a85f8a28f4464d | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix gfx9 update PTE mtype flag | Problem Details:
Fix copy&paste error, that should have been an assignment instead of an or,
otherwise MTYPE_UC 0x3 can not be updated to MTYPE_RW 0x1.
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherr... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 8ad7519f7b58..f1ee3921d970 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1235,16 +1235,16 @@ static void gmc_v9_0_get_vm_pte(struct amdgpu_device *adev,
*flags... |
5d9c4c272ba06055d19e05c2a02e16e58acc8943 | Analyze and fix the following issue in the Linux kernel code: rust: irq: always inline functions using build_assert with arguments | Problem Details:
`build_assert` relies on the compiler to optimize out its error path.
Functions using it with its arguments must thus always be inlined,
otherwise the error path of `build_assert` might not be optimized out,
triggering a build error.
Cc: stable@vger.kernel.org
Fixes: 746680ec6696 ("rust: irq: add flag... | ```diff
diff --git a/rust/kernel/irq/flags.rs b/rust/kernel/irq/flags.rs
index adfde96ec47c..d26e25af06ee 100644
--- a/rust/kernel/irq/flags.rs
+++ b/rust/kernel/irq/flags.rs
@@ -96,6 +96,8 @@ impl Flags {
self.0
}
+ // Always inline to optimize out error path of `build_assert`.
+ #[inline(always)... |
33d19f621641de1b6ec6fe1bb2ac68a7d2c61f6a | Analyze and fix the following issue in the Linux kernel code: rust: io: always inline functions using build_assert with arguments | Problem Details:
`build_assert` relies on the compiler to optimize out its error path.
Functions using it with its arguments must thus always be inlined,
otherwise the error path of `build_assert` might not be optimized out,
triggering a build error.
Cc: stable@vger.kernel.org
Fixes: ce30d94e6855 ("rust: add `io::{Io,... | ```diff
diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs
index 98e8b84e68d1..b64b11f75a35 100644
--- a/rust/kernel/io.rs
+++ b/rust/kernel/io.rs
@@ -142,7 +142,8 @@ macro_rules! define_read {
/// Bound checks are performed on compile time, hence if the offset is not known at compile
/// time, the bu... |
6a681cd9034587fe3550868bacfbd639d1c6891f | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add an hdmi_hpd_debounce_delay_ms module | Problem Details:
[Why&How]
Right now, the HDMI HPD filter is enabled by default at 1500ms.
We want to disable it by default, as most modern displays with HDMI do
not require it for DPMS mode.
The HPD can instead be enabled as a driver parameter with a custom delay
value in ms (up to 5000ms).
Fixes: c918e75e1ed9 ("dr... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 11a36c132905..9c11535c44c6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -269,6 +269,8 @@ extern int amdgpu_rebar;
extern int amdgpu_wbrf;
extern int amdgpu_user_queue;
... |
8e051e38a8d45caf6a866d4ff842105b577953bb | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/userq: Fix fence reference leak on queue teardown v2 | Problem Details:
The user mode queue keeps a pointer to the most recent fence in
userq->last_fence. This pointer holds an extra dma_fence reference.
When the queue is destroyed, we free the fence driver and its xarray,
but we forgot to drop the last_fence reference.
Because of the missing dma_fence_put(), the last fe... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index 3c6bd5531627..8d7420a9a113 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -141,6 +141,8 @@ static void amdgpu_userq_walk_and... |
3fd20580b96a6e9da65b94ac3b58ee288239b731 | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: No need to suspend whole MES to evict process | Problem Details:
Each queue of the process is individually removed and there is not need
to suspend whole mes. Suspending mes stops kernel mode queues also
causing unnecessary timeouts when running mixed work loads
Fixes: 079ae5118e1f ("drm/amdkfd: fix suspend/resume all calls in mes based eviction path")
Closes: http... | ```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 dc4b6d19dc10..28e8c4f46f69 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -1211,14 +1211,8 @@ static... |
e3a03d0ae16d6b56e893cce8e52b44140e1ed985 | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix smu overdrive data type wrong issue on smu 14.0.2 | Problem Details:
resolving the issue of incorrect type definitions potentially causing calculation errors.
Fixes: 54f7f3ca982a ("drm/amdgpu/swm14: Update power limit logic")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deuch... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
index 03c26d8248a3..faae1da81bd4 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -1632,8 +1632,9 @@ static int ... |
d81e52fc61fb98dc98f9fdb166ab21f502cb701c | Analyze and fix the following issue in the Linux kernel code: drm/amd/pm: fix issue of missing '*' on pp_dpm_xxx nodes | Problem Details:
refine the code to fix '*' missing on pp_dpm_xxx series node.
e.g.: missing '*' on navi10 pp_dpm_sclk
$ cat /sys/class/drm/card0/device/pp_dpm_sclk
0: 300Mhz
1: 1930Mhz (missing symbol '*')
Fixes: a08ea4bc7711 ("drm/amd/pm: Add a helper to show dpm table")
Signed-off-by: Yang Wang <kevinyang.wang@amd... | ```diff
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index 5b1f059105d6..24835600c1cd 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -1286,11 +1286,11 @@ int smu_cmn_print_dpm_clk_levels(struct smu_context *smu,
s... |
6c160001661b6c4e20f5c31909c722741e14c2d8 | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix GART PTE for non-4K pagesize in svm_migrate_gart_map() | Problem Details:
In svm_migrate_gart_map(), while migrating GART mapping, the number of
bytes copied for the GART table only accounts for CPU pages. On non-4K
systems, each CPU page can contain multiple GPU pages, and the GART
requires one 8-byte PTE per GPU page. As a result, an incorrect size was
passed to the DMA, c... | ```diff
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 4e0629cbd7f8..3df2bbd935e2 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -63,7 +63,7 @@ svm_migrate_gart_map(struct amdgpu_ring *ring,
*gart_addr = a... |
fb361a520a5861368c6c36717ff1900a35dde093 | Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix SVM map/unmap address conversion for non-4k page sizes | Problem Details:
SVM range size is tracked using the system page size. The range start and
end are aligned to system page-sized PFNs, so the total SVM range size
equals the total number of pages in the SVM range multiplied by the system
page size.
The SVM range map/unmap functions pass these system page-sized PFN numb... | ```diff
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 1ed08388d364..35036d47657b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1355,11 +1355,16 @@ svm_range_unmap_from_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm... |
318b1c36d82a0cd2b06a4bb43272fa6f1bc8adc1 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Initialise backlight level values from hw | Problem Details:
Internal backlight levels are initialised from ACPI but the values
are sometimes out of sync with the levels in effect until there has
been a read from hardware (eg triggered by reading from sysfs).
This means that the first drm_commit can cause the levels to be set
to a different value than the actua... | ```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 c0e9d549a8a4..157efedda358 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5279,6 +5279,8 @@ amdgpu_dm_register_back... |
74e15ac34b098934895fd27655d098971d2b43d9 | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: Add pin_init_internal deps | Problem Details:
Commit d7659acca7a3 ("rust: add pin-init crate build infrastructure")
did not add dependencies to `pin_init_internal`, resulting in broken
navigation. Thus add them now.
[ Tamir elaborates:
"before this series, go-to-symbol from pin_init_internal to e.g.
proc_macro::TokenStream doesn't work."
... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 5ebabbb0f1e8..6061bd6e2ebd 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -123,7 +123,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
app... |
98dcca855343512a99432224447f07c5988753ad | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: Add pin_init -> compiler_builtins dep | Problem Details:
Add a dependency edge from `pin_init` to `compiler_builtins` to
`scripts/generate_rust_analyzer.py` to match `rust/Makefile`. This has
been incorrect since commit d7659acca7a3 ("rust: add pin-init crate
build infrastructure").
Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Jesung Yan... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 9e92590af377..5ebabbb0f1e8 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -131,7 +131,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
app... |
5157c328edb35bac05ce77da473c3209d20e0bbb | Analyze and fix the following issue in the Linux kernel code: scripts: generate_rust_analyzer: Add compiler_builtins -> core dep | Problem Details:
Add a dependency edge from `compiler_builtins` to `core` to
`scripts/generate_rust_analyzer.py` to match `rust/Makefile`. This has
been incorrect since commit 8c4555ccc55c ("scripts: add
`generate_rust_analyzer.py`")
Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Jesung Yang <y.j3ms.... | ```diff
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 147d0cc94068..9e92590af377 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -83,7 +83,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
appen... |
81a304f5b39c9a0a26c1b42997e60a5c9be05ec8 | Analyze and fix the following issue in the Linux kernel code: rust: macros: ignore example with module parameters | Problem Details:
`ModuleParamAccess` uses `SetOnce`, which depends on the helper functions
so the `macros` crate example under `rusttest` fails to build:
---- rust/macros/lib.rs - module (line 62) stdout ----
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" ...
= note: s... | ```diff
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index b38002151871..33f66e86418a 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -59,7 +59,7 @@ use proc_macro::TokenStream;
///
/// # Examples
///
-/// ```
+/// ```ignore
/// use kernel::prelude::*;
///
/// module!{
``` |
da579f05ef0faada3559e7faddf761c75cdf85e1 | Analyze and fix the following issue in the Linux kernel code: io_uring: move local task_work in exit cancel loop | Problem Details:
With IORING_SETUP_DEFER_TASKRUN, task work is queued to ctx->work_llist
(local work) rather than the fallback list. During io_ring_exit_work(),
io_move_task_work_from_local() was called once before the cancel loop,
moving work from work_llist to fallback_llist.
However, task work can be added to work_... | ```diff
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 87a87396e940..b7a077c11c21 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3003,12 +3003,12 @@ static __cold void io_ring_exit_work(struct work_struct *work)
mutex_unlock(&ctx->uring_lock);
}
- if (ctx->flags & IORING_SETUP_DE... |
b36178488d479e9a53bbef2b01280378b5586e60 | Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix notifier_wq flushing warning | Problem Details:
Create notifier_wq with WQ_MEM_RECLAIM flag to fix the possible warning.
workqueue: WQ_MEM_RECLAIM amdxdna_js:drm_sched_free_job_work [gpu_sched] is flushing !WQ_MEM_RECLAIM notifier_wq:0x0
Fixes: e486147c912f ("accel/amdxdna: Add BO import and export")
Reviewed-by: Mario Limonciello (AMD) <superm1... | ```diff
diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
index 7d59764d7869..45f5c12fc67f 100644
--- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
+++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
@@ -275,7 +275,7 @@ static int amdxdna_probe(struct pci_dev *pdev, const struct pci_d... |
83014d82a1100abc89f7712ad67c3e5accaddc43 | Analyze and fix the following issue in the Linux kernel code: PCI/P2PDMA: Reset page reference count when page mapping fails | Problem Details:
When mapping a p2pdma page the page reference count is initialised to 1
prior to calling vm_insert_page(). This is to avoid vm_insert_page()
warning if the page refcount is zero. Prior to setting the page count there
is a check to ensure the page is currently free (ie. has a zero reference
count).
How... | ```diff
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index dd64ec830fdd..79a414fd6623 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -152,6 +152,13 @@ static int p2pmem_alloc_mmap(struct file *filp, struct kobject *kobj,
ret = vm_insert_page(vma, vaddr, page);
if (ret) {
gen_pool_... |
61acc4428a7f52e0a13e226ba76f2ce2ca66c065 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j784s4-j742s2-main-common.dtsi: Refactor watchdog instances for j784s4 | Problem Details:
Each A72 core has one watchdog instance associated with it. Since j742s2
has 4 A72 cores, the common file should not define 8 watchdog instances.
Refactor the last 4 extra watchdogs from the common file to j784s4
specific file, as j784s4 has 8 A72 cores and thus hardware description
requires 8 watchdo... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
index 9cc0901d58fb..c2636e624f18 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
@@ -2378,42 +2378... |
319fff9c7d620af83d8ab67050a54f63f16ae4e8 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am69-aquila-clover: Change main_spi2 CS0 to GPIO mode | Problem Details:
Change CS0 from hardware chip select to GPIO-based chip select to
align with the base aquila device tree configuration.
Fixes: 9f748a6177e1 ("arm64: dts: ti: am69-aquila: Add Clover")
Cc: stable@vger.kernel.org
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <fran... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
index c816ba3bfbdf..ec8ff4587715 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts
@@ -208,7 +208,8 @@
pinctrl-0 = <&pinctrl_main_... |
78a123f45a7e9ac2a59f0eff8a37d31773e7a021 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am69-aquila: Change main_spi0/2 CS to GPIO mode | Problem Details:
Hardware chip select does not work correctly on main_spi0 and
main_spi2 controllers. Testing shows main_spi2 loses CS state
during runtime PM suspend, while main_spi0 cannot drive CS HIGH
when bus is idle.
Use GPIO-based chip select for both controllers.
Fixes: 39ac6623b1d8 ("arm64: dts: ti: Add Aqui... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi b/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi
index 0866eb8a6f34..5119baf62a4c 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi
@@ -479,7 +479,7 @@
/* Aquila SPI_2 CS */
pinctrl_main_spi0_cs0: main... |
80db65d4acfb9ff12d00172aed39ea8b98261aad | Analyze and fix the following issue in the Linux kernel code: soc: ti: pruss: Fix double free in pruss_clk_mux_setup() | Problem Details:
In the pruss_clk_mux_setup(), the devm_add_action_or_reset() indirectly
calls pruss_of_free_clk_provider(), which calls of_node_put(clk_mux_np)
on the error path. However, after the devm_add_action_or_reset()
returns, the of_node_put(clk_mux_np) is called again, causing a double
free.
Fix by returning... | ```diff
diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index 038576805bfa..0fd59c73f585 100644
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
@@ -366,12 +366,10 @@ static int pruss_clk_mux_setup(struct pruss *pruss, struct clk *clk_mux,
ret = devm_add_action_or_reset(dev, pruss_of_free_clk_... |
c933138d45176780fabbbe7da263e04d5b3e525d | Analyze and fix the following issue in the Linux kernel code: soc: ti: k3-socinfo: Fix regmap leak on probe failure | Problem Details:
The mmio regmap allocated during probe is never freed.
Switch to using the device managed allocator so that the regmap is
released on probe failures (e.g. probe deferral) and on driver unbind.
Fixes: a5caf03188e4 ("soc: ti: k3-socinfo: Do not use syscon helper to build regmap")
Cc: stable@vger.kernel... | ```diff
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index 50c170a995f9..42275cb5ba1c 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -141,7 +141,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
if (IS_ERR(base))
return PTR_ERR(base);
- regma... |
3fec51b89d603f2d8ebf50f815b5e159efc381da | Analyze and fix the following issue in the Linux kernel code: soc: ti: k3-socinfo: Fix compile testing | Problem Details:
There seems to be nothing preventing this driver from being compile
tested so enable that by adding the missing input prompt.
Fixes: 907a2b7e2fc7 ("soc: ti: add k3 platforms chipid module driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251127135455.2497-1-johan... | ```diff
diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
index 1a93001c9e36..163aadd589d3 100644
--- a/drivers/soc/ti/Kconfig
+++ b/drivers/soc/ti/Kconfig
@@ -62,7 +62,7 @@ config TI_K3_RINGACC
If unsure, say N.
config TI_K3_SOCINFO
- bool
+ bool "K3 SoC Information driver" if COMPILE_TEST
depends ... |
9be35201579c8b96071cc49bfd382a0036de1d87 | Analyze and fix the following issue in the Linux kernel code: ACPI: processor: idle: Add debug log for states with invalid entry methods | Problem Details:
According to ACPI spec, entry method in LPI sub-package must be a
buffer or an integer.
The driver will disable the state whose the entry method is invalid
by zeroing flags in struct acpi_lpi_state.
The entry method is very key in cpuidle. A debug log is very useful
for developers.
Signed-off-by: Hu... | ```diff
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 4ba45440d4c4..f3a73c99f450 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -946,6 +946,8 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle,
lpi_state->entry_method = ACPI_CSTATE_INTE... |
62171369cf17794ddd88f602c2c84d008ecafcff | Analyze and fix the following issue in the Linux kernel code: PCI/PTM: Fix pcie_ptm_create_debugfs() memory leak | Problem Details:
In pcie_ptm_create_debugfs(), if devm_kasprintf() fails after successfully
allocating ptm_debugfs with kzalloc(), the function returns without freeing
the allocated memory, resulting in a memory leak.
Free ptm_debugfs before returning in the devm_kasprintf() error path and in
pcie_ptm_destroy_debugfs(... | ```diff
diff --git a/drivers/pci/pcie/ptm.c b/drivers/pci/pcie/ptm.c
index ed0f9691e7d1..c7c61869bc9c 100644
--- a/drivers/pci/pcie/ptm.c
+++ b/drivers/pci/pcie/ptm.c
@@ -542,8 +542,10 @@ struct pci_ptm_debugfs *pcie_ptm_create_debugfs(struct device *dev, void *pdata,
return NULL;
dirname = devm_kasprintf(dev, G... |
f132e089fe89cadc2098991f0a3cb05c3f824ac6 | Analyze and fix the following issue in the Linux kernel code: ACPI: processor: Fix NULL-pointer dereference in acpi_processor_errata_piix4() | Problem Details:
In acpi_processor_errata_piix4(), the pointer dev is first assigned an IDE
device and then reassigned an ISA device:
dev = pci_get_subsys(..., PCI_DEVICE_ID_INTEL_82371AB, ...);
dev = pci_get_subsys(..., PCI_DEVICE_ID_INTEL_82371AB_0, ...);
If the first lookup succeeds but the second fails, dev b... | ```diff
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c
index 7ec1dc04fd11..85096ce7b658 100644
--- a/drivers/acpi/acpi_processor.c
+++ b/drivers/acpi/acpi_processor.c
@@ -50,6 +50,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
{
u8 value1 = 0;
u8 value2 = 0;
+ struct p... |
ba6ded26dffe511b862a98a25955955e7154bfa8 | Analyze and fix the following issue in the Linux kernel code: ACPI: resource: Add JWIPC JVC9100 to irq1_level_low_skip_override[] | Problem Details:
Like the JWIPC JVC9100 has its serial IRQ (10 and 11) described
as ActiveLow in the DSDT, which the kernel overrides to EdgeHigh which
breaks the serial.
irq 10, level, active-low, shared, skip-override
irq 11, level, active-low, shared, skip-override
Add the JVC9100 to the irq1_level_low_skip_overri... | ```diff
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index d16906f46484..bc8050d8a6f5 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -532,6 +532,12 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
DMI_MATCH(DMI_BOARD_NAME, "16T90SP"),
},
},
+ {
+ ... |
471895799c2f46688792e175ced936ffeb6cdf01 | Analyze and fix the following issue in the Linux kernel code: i3c: master: Replace WARN_ON() with dev_err() in i3c_dev_free_ibi_locked() | Problem Details:
IBI disable failures are not indicative of a software bug, so using
WARN_ON() is not appropriate. Replace these warnings with dev_err().
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260113072702.16268-5-adrian.hunter@... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index d684a6b79960..71583cc4d197 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -3150,8 +3150,11 @@ void i3c_dev_free_ibi_locked(struct i3c_dev_desc *dev)
if (!dev->ibi)
return;
- if (WARN_ON(dev->ibi->enabled))
- WARN_ON(i3c_dev_... |
f0775157b9f9a28ae3eabc8d05b0bc52e8056c80 | Analyze and fix the following issue in the Linux kernel code: i3c: master: Update hot-join flag only on success | Problem Details:
To prevent inconsistent state when an error occurs, ensure the hot-join
flag is updated only when enabling or disabling hot-join succeeds.
Fixes: 317bacf960a48 ("i3c: master: add enable(disable) hot join in sys entry")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 3bc8b4abf8af..d684a6b79960 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -618,7 +618,8 @@ static int i3c_set_hotjoin(struct i3c_master_controller *master, bool enable)
else
ret = master->ops->disable_hotjoin(master);
- maste... |
8bb96575883d3b201ce37046b3903ea1d2d50bbc | Analyze and fix the following issue in the Linux kernel code: i3c: mipi-i3c-hci: Ensure proper bus clean-up | Problem Details:
Wait for the bus to fully disable before proceeding, ensuring that no
operations are still in progress. Synchronize the IRQ handler only after
interrupt signals have been disabled. This approach also handles cases
where bus disable might fail, preventing race conditions and ensuring a
consistent shut... | ```diff
diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index 6da5daf18166..0d3ec674878d 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -151,13 +151,39 @@ static int i3c_hci_bus_init(struct i3c_master_controller *m)
retu... |
5f84a1092dee7b2687804d71c0dd50edd6f2d32a | Analyze and fix the following issue in the Linux kernel code: btrfs: use may_delete_dentry() in btrfs_ioctl_snap_destroy() | Problem Details:
There is no longer the need to use btrfs_may_delete(), which was a copy
of the VFS private function may_delete(), since now that functionality
is exported by the VFS as a function named may_delete_dentry(). In fact
our local copy of may_delete() lacks an update that happened to that
function which is p... | ```diff
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index acb484546b1d..2d0b2619309d 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -815,62 +815,6 @@ free_pending:
return ret;
}
-/* copy of may_delete in fs/namei.c()
- * Check whether we can remove a link victim from directory dir, check
- * whethe... |
561940a7ee81319b9cba06d2b7ba6b45a5c41cbc | Analyze and fix the following issue in the Linux kernel code: iomap: wait for batched folios to be stable in __iomap_get_folio | Problem Details:
__iomap_get_folio needs to wait for writeback to finish if the file
requires folios to be stable for writes. For the regular path this is
taken care of by __filemap_get_folio, but for the newly added batch
lookup it has to be done manually.
This fixes xfs/131 failures when running on PI-capable hardw... | ```diff
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index fd9a2cf95620..6beb876658c0 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -851,6 +851,7 @@ static struct folio *__iomap_get_folio(struct iomap_iter *iter,
}
folio_get(folio);
+ folio_wait_stable(folio);
return fo... |
88ec797c468097a8ce97694ed11ea9c982598ec0 | Analyze and fix the following issue in the Linux kernel code: fs: make insert_inode_locked() wait for inode destruction | Problem Details:
This is the only routine which instead skipped instead of waiting.
The current behavior is arguably a bug as it results in a corner case
where the inode hash can have *two* matching inodes, one of which is on
its way out.
Ironing out this difference is an incremental step towards sanitizing
the API.
... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index d317637dc3b4..de398c63fb72 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1028,19 +1028,20 @@ long prune_icache_sb(struct super_block *sb, struct shrink_control *sc)
return freed;
}
-static void __wait_on_freeing_inode(struct inode *inode, bool is_inode_hash_locked)... |
55cc6fe5716f678f06bcb95140882dfa684464ec | Analyze and fix the following issue in the Linux kernel code: EFI/CPER: don't dump the entire memory region | Problem Details:
The current logic at cper_print_fw_err() doesn't check if the
error record length is big enough to handle offset. On a bad firmware,
if the ofset is above the actual record, length -= offset will
underflow, making it dump the entire memory.
The end result can be:
- the logic taking a lot of time dum... | ```diff
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index 88fc0293f876..0e938fc5ccb1 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -560,6 +560,11 @@ static void cper_print_fw_err(const char *pfx,
} else {
offset = sizeof(*fw_err);
}
+ if (offset > length... |
eae21beecb95a3b69ee5c38a659f774e171d730e | Analyze and fix the following issue in the Linux kernel code: EFI/CPER: don't go past the ARM processor CPER record buffer | Problem Details:
There's a logic inside GHES/CPER to detect if the section_length
is too small, but it doesn't detect if it is too big.
Currently, if the firmware receives an ARM processor CPER record
stating that a section length is big, kernel will blindly trust
section_length, producing a very long dump. For instan... | ```diff
diff --git a/drivers/firmware/efi/cper-arm.c b/drivers/firmware/efi/cper-arm.c
index 76542a53e202..b21cb1232d82 100644
--- a/drivers/firmware/efi/cper-arm.c
+++ b/drivers/firmware/efi/cper-arm.c
@@ -226,7 +226,8 @@ static void cper_print_arm_err_info(const char *pfx, u32 type,
}
void cper_print_proc_arm(con... |
589cff4975afe1a4eaaa1d961652f50b1628d78d | Analyze and fix the following issue in the Linux kernel code: fs: add <linux/init_task.h> for 'init_fs' | Problem Details:
The init_fs symbol is defined in <linux/init_task.h> but was
not included in fs/fs_struct.c so fix by adding the include.
Fixes the following sparse warning:
fs/fs_struct.c:150:18: warning: symbol 'init_fs' was not declared. Should it be static?
Fixes: 3e93cd671813e ("Take fs_struct handling to new f... | ```diff
diff --git a/fs/fs_struct.c b/fs/fs_struct.c
index b8c46c5a38a0..394875d06fd6 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -6,6 +6,7 @@
#include <linux/path.h>
#include <linux/slab.h>
#include <linux/fs_struct.h>
+#include <linux/init_task.h>
#include "internal.h"
/*
``` |
1219e0feaefc9697f738b223540e8e8906291cb3 | Analyze and fix the following issue in the Linux kernel code: fs: move initializing f_mode before file_ref_init() | Problem Details:
The comment above file_ref_init() says:
"We're SLAB_TYPESAFE_BY_RCU so initialize f_ref last."
but file_set_fsnotify_mode() was added after file_ref_init().
Move it right after setting f_mode, where it makes more sense.
Fixes: 711f9b8fbe4f4 ("fsnotify: disable pre-content and permission events by def... | ```diff
diff --git a/fs/file_table.c b/fs/file_table.c
index cd4a3db4659a..34244fccf2ed 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -176,6 +176,11 @@ static int init_file(struct file *f, int flags, const struct cred *cred)
f->f_flags = flags;
f->f_mode = OPEN_FMODE(flags);
+ /*
+ * Disable permission a... |
5e7fa6bfa9b5ced6868fc652d5c40fe0eac154d9 | Analyze and fix the following issue in the Linux kernel code: exportfs: Fix kernel-doc output for get_name() | Problem Details:
Without a space between %NAME_MAX and the plus sign, kernel-doc will
output ``NAME_MAX``+1, which scapes the last backtick and make Sphinx
format a much larger string as monospaced text.
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Link: https://patch.msgid.link/20260112-tonyk-fs_uuid-v1-1-ac... | ```diff
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index f0cf2714ec52..599ea86363e1 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -234,7 +234,7 @@ struct handle_to_path_ctx {
* get_name:
* @get_name should find a name for the given @child in the given @parent
* ... |
6784f274722559c0cdaaa418bc8b7b1d61c314f9 | Analyze and fix the following issue in the Linux kernel code: device_cgroup: remove branch hint after code refactor | Problem Details:
commit 4ef4ac360101 ("device_cgroup: avoid access to ->i_rdev in the
common case in devcgroup_inode_permission()") reordered the checks in
devcgroup_inode_permission() to check the inode mode before checking
i_rdev, for better cache behavior.
However, the likely() annotation on the i_rdev check was no... | ```diff
diff --git a/include/linux/device_cgroup.h b/include/linux/device_cgroup.h
index 0864773a57e8..822085bc2d20 100644
--- a/include/linux/device_cgroup.h
+++ b/include/linux/device_cgroup.h
@@ -21,7 +21,7 @@ static inline int devcgroup_inode_permission(struct inode *inode, int mask)
if (likely(!S_ISBLK(inode->i_... |
6b32c93560cb194e10279bd3be3c1d0fa30df3e7 | Analyze and fix the following issue in the Linux kernel code: x86/traps: Print unhashed pointers on stack overflow | Problem Details:
When a stack overflow occurs, the kernel prints hashed fault address and the
stack range using %p. The actual addresses are required for debugging and
hashed pointers provide no useful information in this context.
Use %px to print the unhashed, raw addresses.
Signed-off-by: Ryosuke Yasuoka <ryasuoka@... | ```diff
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index bcf1dedc1d00..5a6a772e0a6c 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -549,7 +549,7 @@ __visible void __noreturn handle_stack_overflow(struct pt_regs *regs,
{
const char *name = stack_type_name(info->type);
- pr... |
0edb475ac0a7d153318a24d4dca175a270a5cc4f | Analyze and fix the following issue in the Linux kernel code: nvme: fix PCIe subsystem reset controller state transition | Problem Details:
The commit d2fe192348f9 (“nvme: only allow entering LIVE from CONNECTING
state”) disallows controller state transitions directly from RESETTING
to LIVE. However, the NVMe PCIe subsystem reset path relies on this
transition to recover the controller on PowerPC (PPC) systems.
On PPC systems, issuing a s... | ```diff
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 29e715d5b8f3..58f3097888a7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1532,7 +1532,10 @@ static int nvme_pci_subsystem_reset(struct nvme_ctrl *ctrl)
}
writel(NVME_SUBSYS_RESET, dev->bar + NVME_REG_NSSR);
- nvm... |
9bcb4c4c330ca36ba7ab398c03d75c15b769d59d | Analyze and fix the following issue in the Linux kernel code: usb: gadget: uvc: retry vb2_reqbufs() with vb_vmalloc_memops if use_sg fail | Problem Details:
Based on the reality[1][2] that vb2_dma_sg_alloc() can't alloc buffer with
device DMA limits, those device will always get below error: "swiotlb
buffer is full (sz: 393216 bytes), total 65536 (slots), used 2358 (slots)"
and the uvc gadget function can't work at all.
The videobuf2-dma-sg.c driver doesn... | ```diff
diff --git a/drivers/usb/gadget/function/uvc_queue.c b/drivers/usb/gadget/function/uvc_queue.c
index 21d80322cb61..586e5524c171 100644
--- a/drivers/usb/gadget/function/uvc_queue.c
+++ b/drivers/usb/gadget/function/uvc_queue.c
@@ -182,7 +182,15 @@ int uvcg_alloc_buffers(struct uvc_video_queue *queue,
{
int r... |
0bce8f19bba16277257a915e4fb94e1cfe99d760 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: uvc: return error from uvcg_queue_init() | Problem Details:
uvcg_queue_init() may fail, but its return value is currently ignored.
Propagate the error code from uvcg_queue_init() to correctly report
initialization failures.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://patch.msgid.link/20260113-uvc-gadget-fix-patch-v2-3-62950ef5bcb5@nxp.com
Signed-o... | ```diff
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index 9dc3af16e2f3..f568dee08b3b 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -838,7 +838,6 @@ int uvcg_video_init(struct uvc_video *video, struct uvc_device *u... |
010dc57cb5163e5f4a32430dd5091cc29efd0471 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: uvc: fix interval_duration calculation | Problem Details:
According to USB specification:
For full-/high-speed isochronous endpoints, the bInterval value is
used as the exponent for a 2^(bInterval-1) value.
To correctly convert bInterval as interval_duration:
interval_duration = 2^(bInterval-1) * frame_interval
Because the unit of video->interval is ... | ```diff
diff --git a/drivers/usb/gadget/function/uvc.h b/drivers/usb/gadget/function/uvc.h
index b3f88670bff8..676419a04976 100644
--- a/drivers/usb/gadget/function/uvc.h
+++ b/drivers/usb/gadget/function/uvc.h
@@ -107,7 +107,7 @@ struct uvc_video {
unsigned int width;
unsigned int height;
unsigned int imagesize;... |
2edc1acb1a2512843425aa19d0c6060a0a924605 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: uvc: fix req_payload_size calculation | Problem Details:
Current req_payload_size calculation has 2 issue:
(1) When the first time calculate req_payload_size for all the buffers,
reqs_per_frame = 0 will be the divisor of DIV_ROUND_UP(). So
the result is undefined.
This happens because VIDIOC_STREAMON is always executed after
VIDIOC_QBUF. So ... | ```diff
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index aa6ab666741a..a96476507d2f 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -362,6 +362,10 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt)
... |
42c85d89b8d677b51f6a75569c69299a46d9f03d | Analyze and fix the following issue in the Linux kernel code: usb: dwc3: apple: Ignore USB role switches to the active role | Problem Details:
Ignore USB role switches if dwc3-apple is already in the desired state.
The USB-C port controller on M2 and M1/M2 Pro/Max/Ultra devices issues
additional interrupts which result in USB role switches to the already
active role.
Ignore these USB role switches to ensure the USB-C port controller and
dwc3-... | ```diff
diff --git a/drivers/usb/dwc3/dwc3-apple.c b/drivers/usb/dwc3/dwc3-apple.c
index c2ae8eb21d51..40c3ccfddb67 100644
--- a/drivers/usb/dwc3/dwc3-apple.c
+++ b/drivers/usb/dwc3/dwc3-apple.c
@@ -357,6 +357,22 @@ static int dwc3_usb_role_switch_set(struct usb_role_switch *sw, enum usb_role ro
guard(mutex)(&apple... |
def675cf3f107ba8da78ca0b8650997fdf667538 | Analyze and fix the following issue in the Linux kernel code: drm/xe/mert: Improve handling of MERT CAT errors | Problem Details:
All MERT catastrophic errors but VF's LMTT fault are serious, so
we shouldn't limit our handling only to print debug messages.
Change CATERR message to error level and then declare the device
as wedged to match expectation from the design document. For the
LMTT faults, add a note about adding tracking... | ```diff
diff --git a/drivers/gpu/drm/xe/regs/xe_mert_regs.h b/drivers/gpu/drm/xe/regs/xe_mert_regs.h
index c345e11ceea8..99e5a26da657 100644
--- a/drivers/gpu/drm/xe/regs/xe_mert_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_mert_regs.h
@@ -11,11 +11,13 @@
#define MERT_LMEM_CFG XE_REG(0x1448b0)
#define MERT_TLB_CT_INT... |
d13b6a128a12e528bb18f971f2969feb286f45c7 | Analyze and fix the following issue in the Linux kernel code: usb: host: xhci-tegra: Use platform_get_irq_optional() for wake IRQs | Problem Details:
When some wake IRQs are disabled in the device tree, the corresponding
interrupt entries are removed from DT. In such cases, the driver
currently calls platform_get_irq(), which returns -ENXIO and logs
an error like:
tegra-xusb 3610000.usb: error -ENXIO: IRQ index 2 not found
However, not all wake ... | ```diff
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index 31ccced5125e..8b492871d21d 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1563,7 +1563,7 @@ static int tegra_xusb_setup_wakeup(struct platform_device *pdev, struct tegra_xu
for (i = 0; i < tegr... |
c4380ee3ccbf591d855317249f31c820b7b73a46 | Analyze and fix the following issue in the Linux kernel code: usb: dwc3: apple: Set USB2 PHY mode before dwc3 init | Problem Details:
Now that the upstream code has been getting broader test coverage by our
users we occasionally see issues with USB2 devices plugged in during boot.
Before Linux is running, the USB2 PHY has usually been running in device
mode and it turns out that sometimes host->device or device->host
transitions don'... | ```diff
diff --git a/drivers/usb/dwc3/dwc3-apple.c b/drivers/usb/dwc3/dwc3-apple.c
index cc47cad232e3..c2ae8eb21d51 100644
--- a/drivers/usb/dwc3/dwc3-apple.c
+++ b/drivers/usb/dwc3/dwc3-apple.c
@@ -218,25 +218,31 @@ static int dwc3_apple_core_init(struct dwc3_apple *appledwc)
return ret;
}
-static void dwc3_apple... |
cea2a1257a3b5ea3e769a445b34af13e6aa5a123 | Analyze and fix the following issue in the Linux kernel code: usb: chipidea: udc: fix DMA and SG cleanup in _ep_nuke() | Problem Details:
The ChipIdea UDC driver can encounter "not page aligned sg buffer"
errors when a USB device is reconnected after being disconnected
during an active transfer. This occurs because _ep_nuke() returns
requests to the gadget layer without properly unmapping DMA buffers
or cleaning up scatter-gather bounce ... | ```diff
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 64a421ae0f05..c8d931d9d433 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -931,6 +931,13 @@ __acquires(hwep->lock)
list_del_init(&hwreq->queue);
hwreq->req.status = -ESHUTDOWN;
+ /* Unmap DMA and cle... |
2e9762f45efb53e7e7fc61f4ebf7a3507f5daa45 | Analyze and fix the following issue in the Linux kernel code: usb: chipidea: ci_hdrc_imx: use "wakeup" suffix for wakeup interrupt name | Problem Details:
Currently the wakeup and controller interrupt name are same. It's not
easy to find the correct one in /proc/interrupt at the first glance.
Rename the wakeup interrupt name for better distinction.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Peter Chen <... | ```diff
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index d4ee9e16332f..56d2ba824a0b 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -385,6 +385,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
const struct ci_hdrc_imx... |
7a7930c0f934fb0c46de6e7ca08e14e11df35dd6 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: u_ether: use <linux/hex.h> header file | Problem Details:
Since <linux/kernel.h> no longer includes <linux/hex.h>, any users
of the hex interfaces need to include <linux/hex.h> themselves, so
add the header file here as needed.
Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: e065c6a7e46c ("usb: gadget: u_ether: add gether_opts for config caching... | ```diff
diff --git a/drivers/usb/gadget/function/u_ether_configfs.h b/drivers/usb/gadget/function/u_ether_configfs.h
index 39d3a261496d..217990a266b2 100644
--- a/drivers/usb/gadget/function/u_ether_configfs.h
+++ b/drivers/usb/gadget/function/u_ether_configfs.h
@@ -14,6 +14,7 @@
#define __U_ETHER_CONFIGFS_H
#inclu... |
0145e7acd29855dfba4a2f387d455b5d9a520f0e | Analyze and fix the following issue in the Linux kernel code: usb: gadget: f_fs: fix DMA-BUF OUT queues | Problem Details:
Currently, DMA_FROM_DEVICE is used when attaching DMABUFs to IN
endpoints and DMA_TO_DEVICE for OUT endpoints. This is inverted from
how it should be.
The result is IOMMU read-only mappings placed on OUT queues,
triggering arm-smmu write faults.
Put differently, OUT endpoints flow data from host -> g... | ```diff
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index c479d0204afb..c1826aa2f0f8 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1513,7 +1513,7 @@ static int ffs_dmabuf_attach(struct file *file, int fd)
goto err_dmabuf_detach;
... |
8e4c1d06183c25022f6b0002a5cab84979ca6337 | Analyze and fix the following issue in the Linux kernel code: usb: gadget: f_fs: Fix ioctl error handling | Problem Details:
When ffs_epfile_ioctl handles FUNCTIONFS_DMABUF_* ioctls, it's currently
falling through when copy_from_user fails.
However, this fallthrough isn't being checked properly, so the handler
continues executing further than it should. It then tries the secondary
dispatch where it ultimately gives up and r... | ```diff
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 6a0a4d870865..c479d0204afb 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1748,10 +1748,8 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code,
{
int fd;
- ... |
3502cea99c7ceb331458cbd34ef6792c83144687 | Analyze and fix the following issue in the Linux kernel code: i3c: Move device name assignment after i3c_bus_init | Problem Details:
Move device name initialization to occur after i3c_bus_init()
so that i3cbus->id is guaranteed to be assigned before it is used.
Fixes: 9d4f219807d5 ("i3c: fix refcount inconsistency in i3c_master_register")
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>... | ```diff
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index e551b1de5d7b..3bc8b4abf8af 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -2911,7 +2911,6 @@ int i3c_master_register(struct i3c_master_controller *master,
INIT_LIST_HEAD(&master->boardinfo.i3c);
device_initialize(&master->dev)... |
bfef062695570842cf96358f2f46f4c6642c6689 | Analyze and fix the following issue in the Linux kernel code: drm/tegra: dsi: fix device leak on probe | Problem Details:
Make sure to drop the reference taken when looking up the companion
(ganged) device and its driver data during probe().
Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.
Fixes: e94236cde4d5 ("drm/tegra: dsi: Add g... | ```diff
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 175f5f9937b0..8ee96b59fdbc 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -1542,11 +1542,9 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi)
return -EPROBE_DEFER;
dsi->slave = platform_... |
bc148def8924e43245c353c52ced47079a5026da | Analyze and fix the following issue in the Linux kernel code: phy: apple: atc: Reset USB2 PHY during probe as well | Problem Details:
Now that the upstream Type-C PHY code is getting broader test coverage we
got reports of USB devices plugged in during boot or those plugged in for
the first time after boot occasionally not working correctly.
This is partially caused by the USB2 parts of the PHY being left in an
unknown state by the p... | ```diff
diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c
index 716c1e70de38..dc867f368b68 100644
--- a/drivers/phy/apple/atc.c
+++ b/drivers/phy/apple/atc.c
@@ -2227,6 +2227,7 @@ static int atcphy_probe_finalize(struct apple_atcphy *atcphy)
_atcphy_dwc3_reset_assert(atcphy);
/* Reset atcphy to clear... |
7d55b44e2be1069504e22253d26d08982884f930 | Analyze and fix the following issue in the Linux kernel code: phy: apple: atc: Actually check return value of devm_apple_tunable_parse | Problem Details:
Let's actually check the return value of devm_apple_tunable_parse
instead of trying to check IS_ERR on a pointer to the return value which
is always going to be valid. This prevent a oops when the tunables are
invalid or when they don't exist:
[ 57.664567] Unable to handle kernel paging request at v... | ```diff
diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c
index c8a58ee64b7a..716c1e70de38 100644
--- a/drivers/phy/apple/atc.c
+++ b/drivers/phy/apple/atc.c
@@ -2178,10 +2178,10 @@ static int atcphy_load_tunables(struct apple_atcphy *atcphy)
for (int i = 0; i < ARRAY_SIZE(tunables); i++) {
*tunables[... |
69555130dccb39df4d40f90fafc7fc79a5d55b8a | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Fix an off-by-one typo in the comment for enabling AVIC by default | Problem Details:
Fix a goof in the comment that documents KVM's logic for enabling AVIC by
default to reference Zen5+ as family 0x1A (Zen5), not family 0x19 (Zen4).
The code is correct (checks for _greater_ than 0x19), only the comment is
flawed.
Opportunistically tweak the check too, even though it's already correct,... | ```diff
diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
index 6b77b2033208..e8acac56da5b 100644
--- a/arch/x86/kvm/svm/avic.c
+++ b/arch/x86/kvm/svm/avic.c
@@ -1224,13 +1224,13 @@ static bool __init avic_want_avic_enabled(void)
* In "auto" mode, enable AVIC by default for Zen4+ if x2AVIC is
* suppo... |
ba7693014d52e709797ae430cfe6ac1c8cadd3e6 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: pinctrl: spacemit: k3: fix drive-strength doc | Problem Details:
Fix a typo in DT documentation, it should describe the 3.3V drive strength
table of SpacemiT k3 SoC.
Fixes: 5adaa1a8c088 ("dt-bindings: pinctrl: spacemit: add K3 SoC support")
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Signed-off-by:... | ```diff
diff --git a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
index 9a76cffcbaee..f009fed87e6b 100644
--- a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/sp... |
763baca7bf8b36b8ff0e1ec6eb30dbfe99b18fd8 | Analyze and fix the following issue in the Linux kernel code: xen: introduce xen_console_io option | Problem Details:
Xen can support console_io hypercalls for any domains, not just dom0,
depending on DEBUG and XSM policies. These hypercalls can be very useful
for development and debugging.
Introduce a kernel command line option xen_console_io to enable the
usage of console_io hypercalls for any domain upon request. ... | ```diff
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index a8d0afde7f85..68ab6fa72b68 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -8414,6 +8414,11 @@ Kernel parameters
save/res... |
e07dea3de508cd6950c937cec42de7603190e1ca | Analyze and fix the following issue in the Linux kernel code: phy: rockchip: inno-usb2: Fix a double free bug in rockchip_usb2phy_probe() | Problem Details:
The for_each_available_child_of_node() calls of_node_put() to
release child_np in each success loop. After breaking from the
loop with the child_np has been released, the code will jump to
the put_child label and will call the of_node_put() again if the
devm_request_threaded_irq() fails. These cause a ... | ```diff
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index e5efae7b0135..8f4c08e599aa 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1495,7 +1495,7 @@ next_child:
rphy);
if (ret) {... |
70812056fbfb9348788e35b7641ff959b711840e | Analyze and fix the following issue in the Linux kernel code: phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100) | Problem Details:
For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a
stub implementation was added for the v4 of the hardware. However it
was omitted for the v6, causing a NULL pointer dereference oops on
Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.
Fixes: add66a6673bc ("phy... | ```diff
diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
index 13feab99feec..7372de05a0b8 100644
--- a/drivers/phy/qualcomm/phy-qcom-edp.c
+++ b/drivers/phy/qualcomm/phy-qcom-edp.c
@@ -758,6 +758,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v6 = {
.com_power_on = qcom_e... |
46378ab9fcb796dca46b51e10646f636e2c661f9 | Analyze and fix the following issue in the Linux kernel code: ASoC: tlv320adcx140: fix word length | Problem Details:
The word length is the physical width of the channel slots. So the
hw_params would misconfigure when format width and physical width
doesn't match. Like S24_LE which has data width of 24 bits but physical
width of 32 bits. So if using asymmetric formats you will get a lot of
noise.
Fixes: 689c7655b50c... | ```diff
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index 58a6dfa228cc..fdf4a9add852 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -725,7 +725,7 @@ static int adcx140_hw_params(struct snd_pcm_substream *substream,
struct adcx140_priv *adcx... |
be7664c81d3129fc313ef62ff275fd3d33cfecd4 | Analyze and fix the following issue in the Linux kernel code: ASoC: tlv320adcx140: fix null pointer | Problem Details:
The "snd_soc_component" in "adcx140_priv" was only used once but never
set. It was only used for reaching "dev" which is already present in
"adcx140_priv".
Fixes: 4e82971f7b55 ("ASoC: tlv320adcx140: Add a new kcontrol")
Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk>
Signed-off-by: Sascha Hauer <s... | ```diff
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index 75e1007012a4..3fb1b6251e6f 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -23,7 +23,6 @@
#include "tlv320adcx140.h"
struct adcx140_priv {
- struct snd_soc_component *component;
s... |
390caeed0897fcac75f3c414dbdd85d593183d9c | Analyze and fix the following issue in the Linux kernel code: ASoC: sdw_utils: cs42l43: Enable Headphone pin for LINEOUT jack type | Problem Details:
The CS42L43 codec's load detection can return different impedance values
that map to either HEADPHONE or LINEOUT jack types. However, the
soc_jack_pins array only maps SND_JACK_HEADPHONE to the "Headphone" DAPM
pin, not SND_JACK_LINEOUT.
When headphones are detected with an impedance that maps to LINE... | ```diff
diff --git a/sound/soc/sdw_utils/soc_sdw_cs42l43.c b/sound/soc/sdw_utils/soc_sdw_cs42l43.c
index 4c954501e500..2685ff4f0932 100644
--- a/sound/soc/sdw_utils/soc_sdw_cs42l43.c
+++ b/sound/soc/sdw_utils/soc_sdw_cs42l43.c
@@ -44,7 +44,7 @@ static const struct snd_soc_dapm_route cs42l43_dmic_map[] = {
static struc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.