id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
29712b437339bf9ae36affa6b922340b059cd153 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988 | Problem Details:
MT7888 have 3 Macs and so its nodes have names from mac0 - mac2. Update
pattern to fix this.
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250709111147.11843-2-linux@fw-web.de
Signed-off-by: ... | ```diff
diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml
index 9e02fd80af83..175d1d011dc6 100644
--- a/Documentation/devicetree/bindings/net/mediatek,net.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml
@@ -382,7 +382,7 @@ a... |
a8b289f0f2dcbadd8c207ad8f33cf7ba2b4eb088 | Analyze and fix the following issue in the Linux kernel code: irqchip/irq-msi-lib: Fix build with PCI disabled | Problem Details:
The armada-370-xp irqchip fails in some randconfig builds because
of a missing declaration:
In file included from drivers/irqchip/irq-armada-370-xp.c:23:
include/linux/irqchip/irq-msi-lib.h:25:39: error: 'struct msi_domain_info' declared inside parameter list will not be visible outside of this defini... | ```diff
diff --git a/include/linux/irqchip/irq-msi-lib.h b/include/linux/irqchip/irq-msi-lib.h
index dd8d1d138544..224ac28e88d7 100644
--- a/include/linux/irqchip/irq-msi-lib.h
+++ b/include/linux/irqchip/irq-msi-lib.h
@@ -17,6 +17,7 @@
#define MATCH_PLATFORM_MSI BIT(DOMAIN_BUS_PLATFORM_MSI)
+struct msi_domain_inf... |
667efb341917bde19f5d7517b65defcdaed67c9e | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix lifetime of struct amdgpu_task_info after ring reset | Problem Details:
When a ring reset happens, amdgpu calls drm_dev_wedged_event() using
struct amdgpu_task_info *ti as one of the arguments. After using *ti, a
call to amdgpu_vm_put_task_info(ti) is required to correctly track its
lifetime.
However, it's called from a place that the ring reset path never reaches
due to ... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 2b58e353cca1..87f7040d8a2b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -90,7 +90,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched... |
68ea85df15d111d82fc474cbe104174791169355 | Analyze and fix the following issue in the Linux kernel code: PCI/MSI: Prevent recursive locking in pci_msix_write_tph_tag() | Problem Details:
pci_msix_write_tph_tag() takes the per device MSI descriptor mutex and then
invokes msi_domain_get_virq(), which takes the same mutex again. That
obviously results in a system hang which is exposed by a softlockup or
lockdep warning.
Move the lock guard after the invocation of msi_domain_get_virq() to... | ```diff
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 6ede55a7c5e6..d686488f4111 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -934,10 +934,12 @@ int pci_msix_write_tph_tag(struct pci_dev *pdev, unsigned int index, u16 tag)
if (!pdev->msix_enabled)
return -ENXIO;
- guard(ms... |
cf590b239c98ff7772c61a9124dbcb5f250e9395 | Analyze and fix the following issue in the Linux kernel code: drm/doc: Fix grammar for "Task information" | Problem Details:
Remove the repetitive wording at the end of "Task information" section.
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://lore.kernel.org/r/202507... | ```diff
diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-uapi.rst
index 5bc1da4915af..843facf01b2d 100644
--- a/Documentation/gpu/drm-uapi.rst
+++ b/Documentation/gpu/drm-uapi.rst
@@ -460,8 +460,8 @@ event string.
The reliability of this information is driver and hardware specific, and should
be ... |
e41315787dda23daf146afb03b844d2c5880b72b | Analyze and fix the following issue in the Linux kernel code: drm: Add missing struct drm_wedge_task_info kernel doc | Problem Details:
Fix the following kernel doc warning:
include/drm/drm_device.h:40: warning: Function parameter or struct member 'pid' not described in 'drm_wedge_task_info'
include/drm/drm_device.h:40: warning: Function parameter or struct member 'comm' not described in 'drm_wedge_task_info'
Fixes: 183bccafa176 ("dr... | ```diff
diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
index 08b3b2467c4c..a33aedd5e9ec 100644
--- a/include/drm/drm_device.h
+++ b/include/drm/drm_device.h
@@ -35,7 +35,9 @@ struct pci_controller;
* struct drm_wedge_task_info - information about the guilty task of a wedge dev
*/
struct drm_wedge... |
b59df66c0876891ad406844f238f6b322741e521 | Analyze and fix the following issue in the Linux kernel code: drm/doc: Fix title underline for "Task information" | Problem Details:
Fix the following warning:
Documentation/gpu/drm-uapi.rst:450: WARNING: Title underline too short.
Task information
--------------- [docutils]
Fixes: cd37124b4093 ("drm/doc: Add a section about "Task information" for the wedge API")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https:... | ```diff
diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-uapi.rst
index 263e5a97c080..5bc1da4915af 100644
--- a/Documentation/gpu/drm-uapi.rst
+++ b/Documentation/gpu/drm-uapi.rst
@@ -447,7 +447,7 @@ hang is usually the most critical one which can result in consequential hangs or
complete wedging.
... |
07b7c2b4eca3f83ce9cd5ee3fa1c7c001d721c69 | Analyze and fix the following issue in the Linux kernel code: selftests: breakpoints: use suspend_stats to reliably check suspend success | Problem Details:
The step_after_suspend_test verifies that the system successfully
suspended and resumed by setting a timerfd and checking whether the
timer fully expired. However, this method is unreliable due to timing
races.
In practice, the system may take time to enter suspend, during which the
timer may expire j... | ```diff
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c b/tools/testing/selftests/breakpoints/step_after_suspend_test.c
index 8d275f03e977..8d233ac95696 100644
--- a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
+++ b/tools/testing/selftests/breakpoints/step_after_suspend_test... |
34db4fba81916a2001d7a503dfcf718c08ed5c42 | Analyze and fix the following issue in the Linux kernel code: kunit: fix longest symbol length test | Problem Details:
The kunit test that checks the longests symbol length [1], has triggered
warnings in some pilelines when symbol prefixes are used [2][3]. The test
will to depend on !PREFIX_SYMBOLS and !CFI_CLANG as sujested in [4] and
on !GCOV_KERNEL.
[1] https://lore.kernel.org/rust-for-linux/CABVgOSm=5Q0fM6neBhxSbO... | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index ebe33181b6e6..4a75a52803b6 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2885,6 +2885,7 @@ config FORTIFY_KUNIT_TEST
config LONGEST_SYM_KUNIT_TEST
tristate "Test the longest symbol possible" if !KUNIT_ALL_TESTS
depends on KUNIT && KPROBE... |
4ecdcf9caf519fbab1aa01b431339387fed00fb8 | Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Move state change logger to helper | Problem Details:
In the state change helper we are already doing extra stuff,
move debug state logger there to cover all state changes.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Acked-by: Matthew Bro... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 2a052dc22ff2..17e5870baf33 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -387,6 +387,8 @@ static int guc_ct_control_toggle(struct xe_guc_ct *ct, bool enable)
static void guc_ct_change_state(... |
0efec0500117947f924e5ac83be40f96378af85a | Analyze and fix the following issue in the Linux kernel code: drm/xe/pm: Correct comment of xe_pm_set_vram_threshold() | Problem Details:
The parameter threshold is with size in MiB, not in bits.
Correct it to avoid any confusion.
v2: s/mb/MiB, s/vram/VRAM, fix return section. (Michal)
Fixes: 30c399529f4c ("drm/xe: Document Xe PM component")
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Sig... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index f171a91b849c..e279b47ba03b 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -761,11 +761,13 @@ void xe_pm_assert_unbounded_bridge(struct xe_device *xe)
}
/**
- * xe_pm_set_vram_threshold - Set a vram thresh... |
7c2f3ec7707188d8d5269ae2dce97d7be3e9f261 | Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: mvm: fix scan request validation | Problem Details:
The scan request validation function uses bitwise and instead
of logical and. Fix it.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709230308.3fbc... | ```diff
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 5f30109ca18f..79660138ae97 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -836,7 +836,7 @@ static inline bool iwl_mvm_scan_fits(stru... |
073b3eca08f915d9b92818ed8c30123c54058206 | Analyze and fix the following issue in the Linux kernel code: Documentation: KVM: Fix unexpected unindent warning | Problem Details:
Add proper indentations to bullet list item to resolve the warning:
"Bullet list ends without a blank line; unexpected unindent."
Closes:https://lore.kernel.org/kvm/20250623162110.6e2f4241@canb.auug.org.au
Fixes: 4580dbef5ce0 ("KVM: TDX: Exit to userspace for SetupEventNotifyInterrupt")
Reported-by: ... | ```diff
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index 43ed57e048a8..6ab242418c92 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -7230,8 +7230,8 @@ inputs and outputs of the TDVMCALL. Currently the following values of
placed in fields from ``... |
2885daf47081dd1aaf1a588e9d001eb343df1f90 | Analyze and fix the following issue in the Linux kernel code: lib/smp_processor_id: Make migration check unconditional of SMP | Problem Details:
Commit cac5cefbade90 ("sched/smp: Make SMP unconditional")
migrate_disable() even on UP builds.
Commit 06ddd17521bf1 ("sched/smp: Always define is_percpu_thread() and
scheduler_ipi()") made is_percpu_thread() check the affinity mask
instead replying always true for UP mask.
As a consequence smp_proces... | ```diff
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index a2bb7738c373..94b3f6b19538 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -22,10 +22,8 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)
if (is_percpu_thread())
goto out;
-#ifdef CONFIG_S... |
1c26c3bbdee11f3fad0c74b8f09aef488dcf4b62 | Analyze and fix the following issue in the Linux kernel code: iommufd/access: Add internal APIs for HW queue to use | Problem Details:
The new HW queue object, as an internal iommufd object, wants to reuse the
struct iommufd_access to pin some iova range in the iopt.
However, an access generally takes the refcount of an ictx. So, in such an
internal case, a deadlock could happen when the release of the ictx has to
wait for the releas... | ```diff
diff --git a/drivers/iommu/iommufd/device.c b/drivers/iommu/iommufd/device.c
index e9b6ca47095c..07a4ff753c12 100644
--- a/drivers/iommu/iommufd/device.c
+++ b/drivers/iommu/iommufd/device.c
@@ -1084,7 +1084,39 @@ void iommufd_access_destroy_object(struct iommufd_object *obj)
if (access->ioas)
WARN_ON(iomm... |
fca02263f27eee093379844ac0fb280bf70e6aed | Analyze and fix the following issue in the Linux kernel code: iommufd: Correct virt_id kdoc at struct iommu_vdevice_alloc | Problem Details:
The userspace-api iommufd.rst has described it correctly but the uAPI doc
was remained uncorrected. Thus, fix it.
Link: https://patch.msgid.link/r/2cdcecaf2babee16fda7545ccad4e5bed7a5032d.1752126748.git.nicolinc@nvidia.com
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nico... | ```diff
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index f29b6c44655e..4bc05e4621c1 100644
--- a/include/uapi/linux/iommufd.h
+++ b/include/uapi/linux/iommufd.h
@@ -995,7 +995,7 @@ struct iommu_viommu_alloc {
* @dev_id: The physical device to allocate a virtual instance on the vIOMMU
*... |
b23e09f9997771b4b739c1c694fa832b5fa2de02 | Analyze and fix the following issue in the Linux kernel code: iommufd: Report unmapped bytes in the error path of iopt_unmap_iova_range | Problem Details:
There are callers that read the unmapped bytes even when rc != 0. Thus, do
not forget to report it in the error path too.
Fixes: 8d40205f6093 ("iommufd: Add kAPI toward external drivers for kernel access")
Link: https://patch.msgid.link/r/e2b61303bbc008ba1a4e2d7c2a2894749b59fdac.1752126748.git.nicolin... | ```diff
diff --git a/drivers/iommu/iommufd/io_pagetable.c b/drivers/iommu/iommufd/io_pagetable.c
index 13d010f19ed1..22fc3a12109f 100644
--- a/drivers/iommu/iommufd/io_pagetable.c
+++ b/drivers/iommu/iommufd/io_pagetable.c
@@ -743,8 +743,10 @@ again:
iommufd_access_notify_unmap(iopt, area_first, length);
/* Som... |
e778689390c71462a099b5d6e56d71c316486184 | Analyze and fix the following issue in the Linux kernel code: drm/i915/bios: Apply vlv_fixup_mipi_sequences() to v2 mipi-sequences too | Problem Details:
It turns out that the fixup from vlv_fixup_mipi_sequences() is necessary
for some DSI panel's with version 2 mipi-sequences too.
Specifically the Acer Iconia One 8 A1-840 (not to be confused with the
A1-840FHD which is different) has the following sequences:
BDB block 53 (1284 bytes) - MIPI sequence ... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index ba7b8938b17c..166ee11831ab 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -1938,7 +1938,7 @@ static int get_init_otp_deassert_fragment_len(struct in... |
11895f375939d60efe7ed5dddc1cffe2e79f976c | Analyze and fix the following issue in the Linux kernel code: drm/i915/bios: Apply vlv_fixup_mipi_sequences() to v2 mipi-sequences too | Problem Details:
It turns out that the fixup from vlv_fixup_mipi_sequences() is necessary
for some DSI panel's with version 2 mipi-sequences too.
Specifically the Acer Iconia One 8 A1-840 (not to be confused with the
A1-840FHD which is different) has the following sequences:
BDB block 53 (1284 bytes) - MIPI sequence ... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 9ce41e689d50..9c268bed091d 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -1939,7 +1939,7 @@ static int get_init_otp_deassert_fragment_len(struct in... |
d18d7989e3da1f2753d49cb24d916f357e340f76 | Analyze and fix the following issue in the Linux kernel code: printk: kunit: Fix __counted_by() in struct prbtest_rbdata | Problem Details:
__counted_by() has to point to a variable which defines the size
of the related array. The code must never access the array
beyond this limit.
struct prbtest_rbdata currently stores the length of the string.
And the code access the array beyond the limit when writing
or reading the trailing '\0'.
Sto... | ```diff
diff --git a/kernel/printk/printk_ringbuffer_kunit_test.c b/kernel/printk/printk_ringbuffer_kunit_test.c
index 217dcc14670c..e67e1815f4c8 100644
--- a/kernel/printk/printk_ringbuffer_kunit_test.c
+++ b/kernel/printk/printk_ringbuffer_kunit_test.c
@@ -52,13 +52,12 @@ module_param(runtime_ms, ulong, 0400);
/* ... |
bead8800222768dab1a421206350d530b0c45254 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Remove waitque for sched teardown | Problem Details:
struct nouveau_sched contains a waitque needed to prevent
drm_sched_fini() from being called while there are still jobs pending.
Doing so so far would have caused memory leaks.
With the new memleak-free mode of operation switched on in
drm_sched_fini() by providing the callback nouveau_sched_cancel_jo... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_sched.c b/drivers/gpu/drm/nouveau/nouveau_sched.c
index 2ec62059c351..7d9c3418e76b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sched.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sched.c
@@ -122,11 +122,9 @@ nouveau_job_done(struct nouveau_job *job)
{
struct nouveau_sc... |
5f46f5c7af8c632de3742dc0cf3cb9a05bd52437 | Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Add new callback for scheduler teardown | Problem Details:
There is a new callback for always tearing the scheduler down in a
leak-free, deadlock-free manner.
Port Nouveau as its first user by providing the scheduler with a
callback that ensures the fence context gets killed in drm_sched_fini().
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Phi... | ```diff
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 869d4335c0f4..9f345a008717 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -240,6 +240,21 @@ nouveau_fence_emit(struct nouveau_fence *fence)
return ret;
}... |
bf8bbaefaa6ae0a07971ea57b3208df60e8ad0a4 | Analyze and fix the following issue in the Linux kernel code: drm/sched: Avoid memory leaks with cancel_job() callback | Problem Details:
Since its inception, the GPU scheduler can leak memory if the driver
calls drm_sched_fini() while there are still jobs in flight.
The simplest way to solve this in a backwards compatible manner is by
adding a new callback, drm_sched_backend_ops.cancel_job(), which
instructs the driver to signal the ha... | ```diff
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 81ad40d9582b..a971f0c9e6e0 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -1352,6 +1352,18 @@ Out_check_own:
}
EXPORT_SYMBOL(drm_sched_init);
+static void d... |
9ec406ac4b7de3e8040a503429d1a5d389bfdaf6 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: fix timer used for ticks | Problem Details:
Remove always-on on generic ARM timer as the clock source provided by
STGEN is deactivated in low power mode, STOP1 by example.
Fixes: 5d30d03aaf78 ("arm64: dts: st: introduce stm32mp25 SoCs family")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/2025051... | ```diff
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index 30372ec100a4..a4af4996ff24 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -150,7 +150,7 @@
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>,
... |
ce3d39fae3d35fc9f09a7d65bffc218fbdebd002 | Analyze and fix the following issue in the Linux kernel code: drm/xe/bo: add GPU memory trace points | Problem Details:
Add TRACE_GPU_MEM tracepoints for tracking global GPU memory usage.
These are required by VSR on Android 12+ for reporting GPU driver memory
allocations.
v5:
- Drop process_mem tracking
- Set the gpu_id field to dev->primary->index (Lucas, Tvrtko)
- Formatting cleanup under 80 columns
v3:
- Use ... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index 7f8470b22dc9..4e0355d0f406 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -19,6 +19,8 @@
#include <kunit/static_stub.h>
+#include <trace/events/gpu_mem.h>
+
#include "xe_device.h"
#include "xe_dma_buf.... |
b1bf1a782fdf5c482215c0c661b5da98b8e75773 | Analyze and fix the following issue in the Linux kernel code: dm-bufio: fix sched in atomic context | Problem Details:
If "try_verify_in_tasklet" is set for dm-verity, DM_BUFIO_CLIENT_NO_SLEEP
is enabled for dm-bufio. However, when bufio tries to evict buffers, there
is a chance to trigger scheduling in spin_lock_bh, the following warning
is hit:
BUG: sleeping function called from invalid context at drivers/md/dm-bufi... | ```diff
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index ec84ba5e93e5..ff7595caf440 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -2742,7 +2742,11 @@ static unsigned long __evict_a_few(unsigned long nr_buffers)
__make_buffer_clean(b);
__free_buffer_wake(b);
- cond_resched();... |
fee9b1f6691120182136edacf590f52d62d9de7f | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: pack HTT pdev rate stats structs | Problem Details:
In order to ensure the HTT DebugFS structs shared with firmware have
matching alignment, the structs should be packed. Most of the structs
are correctly packed, however the following are not:
ath12k_htt_tx_pdev_rate_stats_tlv
ath12k_htt_rx_pdev_rate_stats_tlv
ath12k_htt_rx_pdev_rate_ext_stats_tlv
So ... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
index 13fbfb069ead..9bd3a632b002 100644
--- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
+++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
@@ -490,7 +490,7 @@ struct ath12k_htt... |
2109e98503bc1c01c399feac68cc8b7faf6d0a4a | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: update unsupported bandwidth flags in reg rules | Problem Details:
The maximum bandwidth an interface can operate in is defined by the
configured country. However, currently, it is able to operate in
bandwidths greater than the allowed bandwidth. For example,
the Central African Republic (CF) supports a maximum bandwidth of 40 MHz
in both the 2 GHz and 5 GHz bands, bu... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/reg.c b/drivers/net/wireless/ath/ath12k/reg.c
index 96254d6fc675..7898f6981e5a 100644
--- a/drivers/net/wireless/ath/ath12k/reg.c
+++ b/drivers/net/wireless/ath/ath12k/reg.c
@@ -426,6 +426,29 @@ ath12k_map_fw_dfs_region(enum ath12k_dfs_region dfs_region)
}
}
+st... |
d9b99eb3d76a603442311926617654f0e35581d4 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Fix mute LED for HP Victus 16-r0xxx | Problem Details:
The mute led on this laptop is using ALC245 but requires a quirk to work
This patch enables the existing quirk for the device.
Tested on Victus 16-r0xxx Laptop. The LED behaviour works
as intended.
Cc: <stable@vger.kernel.org>
Signed-off-by: Edip Hazuri <edip@medip.dev>
Link: https://patch.msgid.link... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 060db37eab83..132cef8fab08 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10814,6 +10814,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIX... |
1aee3a44fad2adeaa8f1a3aafd7c0154924af666 | Analyze and fix the following issue in the Linux kernel code: selftests/hid: sync python tests to hid-tools 0.10 | Problem Details:
hid-tools 0.10 fixes one inconvenience introduced by
commit 6a9e76f75c1a ("HID: multitouch: Disable touchpad
on firmware level while not in use")
This change added a new callback when a hid-nultitouch device is opened
or closed to put the underlying device into a given operating mode.
However, in the ... | ```diff
diff --git a/tools/testing/selftests/hid/tests/base_device.py b/tools/testing/selftests/hid/tests/base_device.py
index e13035fe1deb..59465c58d94d 100644
--- a/tools/testing/selftests/hid/tests/base_device.py
+++ b/tools/testing/selftests/hid/tests/base_device.py
@@ -23,6 +23,7 @@ import fcntl
import functools
... |
642f9b2d608cc2239d22957ca1dc557d07470b50 | Analyze and fix the following issue in the Linux kernel code: selftests/hid: sync the python tests to hid-tools 0.8 | Problem Details:
Instead of backporting one by one each commits, let's pull them in bulk
and refer to the hid-tools project for a detailed history.
The short summary is:
- make use of dataclass when possible, to avoid tuples
- wacom: remove unused uhdev parameter
- various small fixes not worth mentioning
Reviewed-by... | ```diff
diff --git a/tools/testing/selftests/hid/tests/base.py b/tools/testing/selftests/hid/tests/base.py
index 3a465768e507..5175cf235b2f 100644
--- a/tools/testing/selftests/hid/tests/base.py
+++ b/tools/testing/selftests/hid/tests/base.py
@@ -5,6 +5,7 @@
# Copyright (c) 2017 Benjamin Tissoires <benjamin.tissoires@... |
c85a8cb9b8d3a3dd9bb12879b28fc377dd24272b | Analyze and fix the following issue in the Linux kernel code: selftests/hid: run ruff format on the python part | Problem Details:
We aim at syncing with the hid-tools repo on
gitlab.freedesktop.org/libevdev/hid-tools. One of the commits is this
mechanical formatting, so pull it over here so changes are not hidden by
those.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://patch.msgid.link/20250709-wip-fix-ci-v... | ```diff
diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testing/selftests/hid/tests/test_tablet.py
index a9e2de1e8861..52fb22cac91e 100644
--- a/tools/testing/selftests/hid/tests/test_tablet.py
+++ b/tools/testing/selftests/hid/tests/test_tablet.py
@@ -1228,9 +1228,9 @@ class Huion_Kamvas_Pro_19_2... |
ee2736848f1c9b64a9b1321d839f084ce80d4e66 | Analyze and fix the following issue in the Linux kernel code: cpuidle: dt: fix opencoded for_each_cpu() in idle_state_valid() | Problem Details:
The function opencodes the for_each_cpu_from() by using an open for-loop.
Fix that in sake of readability.
While there, drop the 'valid' variable as it's pretty useless here.
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Link: https://patch.msgid.link/20250604213908.27819-1-yury.norov@gma... | ```diff
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index 97feb7d8fb23..558d49838990 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -98,7 +98,6 @@ static bool idle_state_valid(struct device_node *state_node, unsigned int idx,
{
int cpu;
... |
b6d0427cfc699243fc1f82087b58f63d389321aa | Analyze and fix the following issue in the Linux kernel code: scripts/gdb/symbols: make lx-symbols skip the s390 decompressor | Problem Details:
When one starts QEMU with the -S flag and attaches GDB, the kernel is
not yet loaded, and the current instruction is an entry point to the
decompressor. In case the intention is to debug the early kernel boot,
and not the decompressor, e.g., put a breakpoint on some kernel
function and see all the invo... | ```diff
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index 2332bd8eddf1..6edb99221675 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -84,6 +84,30 @@ def get_kerneloffset():
return None
+def is_in_s390_decompressor():
+ # DAT is always off in decom... |
1fbe023d30da84d11299dfab496f40daae423940 | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Print configuration KLVs using debug printer | Problem Details:
While we print VF's configuration KLVs only under DEBUG_SRIOV
config, we should be doing it at debug level, not info level.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
Link: https://lore.k... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index d186f780885d..d0cf1d80be07 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -104,13 +104,13 @@ static int pf_push_vf_buf_klvs(struct xe_gt *gt, un... |
89cd027c94ab8ede68f61920c84478c5becf07ca | Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Print runtime registers using debug printer | Problem Details:
While we already print VF's runtime registers only under DEBUG_SRIOV
config, we should be still doing it at debug level, not info.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
Link: https://lore.kernel.org/r/20250604190021.725-2-mich... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c
index 821cfcc34e6b..fa74b3e1a964 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_service.c
@@ -266,7 +266,7 @@ static void pf_prepare_runtime_info(struct xe_gt ... |
cee06ca7a6748f7d5d7ea40876dcbc0af26bf34e | Analyze and fix the following issue in the Linux kernel code: media: imx8mq-mipi-csi2: Fix error code in imx8mq_mipi_csi_parse_dt() | Problem Details:
This was returning IS_ERR() where PTR_ERR() was intended.
Fixes: 642b70d526ab ("media: imx8mq-mipi-csi2: Add support for i.MX8QXP")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li... | ```diff
diff --git a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
index 6501843ae72d..3a4645f59a44 100644
--- a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
+++ b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
@@ -966,7 +966,7 @@ static int imx8mq_mipi_csi_parse_dt(struc... |
c07981af55d3ba3ec3be880cfe4a0cc10f1f7138 | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: add the virtual monitor after reconfig complete | Problem Details:
In reconfig we add the virtual monitor in 2 cases:
1. If we are resuming (it was deleted on suspend)
2. If it was added after an error but before the reconfig
(due to the last non-monitor interface removal).
In the second case, the removal of the non-monitor interface will succeed
but the addition ... | ```diff
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index a125995ed252..e66da651678a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2144,11 +2144,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
cfg80211_sched_scan_stopped_locked(local->hw.wiphy, 0);
wake_up:
-
- if (local->v... |
d7a54d02db41f72f0581a3c77c75b0993ed3f6e2 | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: always initialize sdata::key_list | Problem Details:
This is currently not initialized for a virtual monitor, leading to a
NULL pointer dereference when - for example - iterating over all the
keys of all the vifs.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.ms... | ```diff
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7c27f3cd841c..c01634fdba78 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1150,6 +1150,8 @@ static void ieee80211_sdata_init(struct ieee80211_local *local,
{
sdata->local = local;
+ INIT_LIST_HEAD(&sdata->key_list);
+
/*
... |
07f99c3fbe6e322bdb222fbfd59f708ced799cc5 | Analyze and fix the following issue in the Linux kernel code: x86/lib: Add WBNOINVD helper functions | Problem Details:
In line with WBINVD usage, add WBNOINVD helper functions. Explicitly fall
back to WBINVD (via alternative()) if WBNOINVD isn't supported even though
the instruction itself is backwards compatible (WBNOINVD is WBINVD with an
ignored REP prefix), so that disabling X86_FEATURE_WBNOINVD behaves as one
wou... | ```diff
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 028f126018c9..e08f1ae25401 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -113,6 +113,7 @@ void native_play_dead(void);
void play_dead_common(void);
void wbinvd_on_cpu(int cpu);
void wbinvd_on_all_cpus(voi... |
04515e08bca9b5a1f9729b8d99d8b322e56d7454 | Analyze and fix the following issue in the Linux kernel code: HID: debug: Remove duplicate entry (BTN_WHEEL) | Problem Details:
BTN_WHEEL is duplicated (by value) and compiler is not happy about that:
drivers/hid/hid-debug.c:3302:16: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
3302 | [BTN_WHEEL] = "BtnWheel", [KEY_OK] = "Ok",
| ... | ```diff
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index c6b6b1029540..4424c0512bae 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -3299,7 +3299,7 @@ static const char *keys[KEY_MAX + 1] = {
[BTN_STYLUS2] = "Stylus2", [BTN_TOOL_DOUBLETAP] = "ToolDoubleTap",
[BTN_TOOL_TRIP... |
6aae87fe7f180cd93a74466cdb6cf2aa9bb28798 | Analyze and fix the following issue in the Linux kernel code: i2c: stm32f7: unmap DMA mapped buffer | Problem Details:
Before each I2C transfer using DMA, the I2C buffer is DMA'pped to make
sure the memory buffer is DMA'able. This is handle in the function
`stm32_i2c_prep_dma_xfer()`.
If the transfer fails for any reason the I2C buffer must be unmap.
Use the dma_callback to factorize the code and fix this issue.
Note ... | ```diff
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 817d081460c2..73a7b8894c0d 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -739,10 +739,11 @@ static void stm32f7_i2c_disable_dma_req(struct stm32f7_i2c_dev *i2c_dev)
static void stm... |
c870cbbd71fccda71d575f0acd4a8d2b7cd88861 | Analyze and fix the following issue in the Linux kernel code: i2c: stm32: fix the device used for the DMA map | Problem Details:
If the DMA mapping failed, it produced an error log with the wrong
device name:
"stm32-dma3 40400000.dma-controller: rejecting DMA map of vmalloc memory"
Fix this issue by replacing the dev with the I2C dev.
Fixes: bb8822cbbc53 ("i2c: i2c-stm32: Add generic DMA API")
Signed-off-by: Clément Le Goffic <... | ```diff
diff --git a/drivers/i2c/busses/i2c-stm32.c b/drivers/i2c/busses/i2c-stm32.c
index 157c64e27d0b..f84ec056e36d 100644
--- a/drivers/i2c/busses/i2c-stm32.c
+++ b/drivers/i2c/busses/i2c-stm32.c
@@ -102,7 +102,6 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma,
void *dma_async_pa... |
60c016afccac7acb78a43b9c75480887ed3ce48e | Analyze and fix the following issue in the Linux kernel code: i2c: omap: Fix an error handling path in omap_i2c_probe() | Problem Details:
If an error occurs after pm_runtime_use_autosuspend(), a corresponding
pm_runtime_dont_use_autosuspend() should be called.
In case of error in pm_runtime_resume_and_get(), it is not the case because
the error handling path is wrongly ordered.
Fix it.
Fixes: 780f62974125 ("i2c: omap: fix reference lea... | ```diff
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 17db58195c06..5fcc9f6c33e5 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1521,9 +1521,9 @@ err_mux_state_deselect:
if (omap->mux_state)
mux_state_deselect(omap->mux_state);
err_put_pm:
- p... |
a9503a2ecd95e23d7243bcde7138192de8c1c281 | Analyze and fix the following issue in the Linux kernel code: i2c: omap: Handle omap_i2c_init() errors in omap_i2c_probe() | Problem Details:
omap_i2c_init() can fail. Handle this error in omap_i2c_probe().
Fixes: 010d442c4a29 ("i2c: New bus driver for TI OMAP boards")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <stable@vger.kernel.org> # v2.6.19+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore... | ```diff
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 8b01df3cc8e9..17db58195c06 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1472,7 +1472,9 @@ omap_i2c_probe(struct platform_device *pdev)
}
/* reset ASAP, clearing any IRQs */
- omap_i2c_ini... |
6af7e00a92e04e0ea41bbe4b83deac9bb11fe4c5 | Analyze and fix the following issue in the Linux kernel code: media: staging/ipu7: avoid division by 64-bit value | Problem Details:
On 32-bit targets, this causes a link failure:
x86_64-linux-ld: drivers/staging/media/ipu7/ipu7-isys-csi-phy.o: in function `ipu7_isys_phy_config':
ipu7-isys-csi-phy.c:(.text+0x1509): undefined reference to `__udivdi3'
Note that this does not divide a 64-bit number by a 32-bit one as usual,
but the o... | ```diff
diff --git a/drivers/staging/media/ipu7/ipu7-isys-csi-phy.c b/drivers/staging/media/ipu7/ipu7-isys-csi-phy.c
index 4407750c7f40..b8c5db7ae300 100644
--- a/drivers/staging/media/ipu7/ipu7-isys-csi-phy.c
+++ b/drivers/staging/media/ipu7/ipu7-isys-csi-phy.c
@@ -734,6 +734,7 @@ static void ipu7_isys_cphy_config(str... |
76142b137b968d47b35cdd8d1dc924677d319c8b | Analyze and fix the following issue in the Linux kernel code: media: ov2659: Fix memory leaks in ov2659_probe() | Problem Details:
ov2659_probe() doesn't properly free control handler resources in failure
paths, causing memory leaks. Add v4l2_ctrl_handler_free() to prevent these
memory leaks and reorder the ctrl_handler assignment for better code flow.
Fixes: c4c0283ab3cd ("[media] media: i2c: add support for omnivision's ov2659 ... | ```diff
diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
index 06b7896c3eaf..586b31ba076b 100644
--- a/drivers/media/i2c/ov2659.c
+++ b/drivers/media/i2c/ov2659.c
@@ -1469,14 +1469,15 @@ static int ov2659_probe(struct i2c_client *client)
V4L2_CID_TEST_PATTERN,
ARRAY_SIZE(ov2659_t... |
ae42c6fe531425ef2f47e82f96851427d24bbf6b | Analyze and fix the following issue in the Linux kernel code: media: ti: j721e-csi2rx: fix list_del corruption | Problem Details:
If ti_csi2rx_start_dma() fails in ti_csi2rx_dma_callback(), the buffer is
marked done with VB2_BUF_STATE_ERROR but is not removed from the DMA queue.
This causes the same buffer to be retried in the next iteration, resulting
in a double list_del() and eventual list corruption.
Fix this by removing the... | ```diff
diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
index 284d33b2a0ec..b628d6e081db 100644
--- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
+++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
@@ -619,6 +619,7 @@ static vo... |
020f602b068c9ce18d5056d02c8302199377d98d | Analyze and fix the following issue in the Linux kernel code: media: hi556: correct the test pattern configuration | Problem Details:
Hynix hi556 support 8 test pattern modes:
hi556_test_pattern_menu[] = {
{
"Disabled",
"Solid Colour",
"100% Colour Bars",
"Fade To Grey Colour Bars",
"PN9",
"Gradient Horizontal",
"Gradient Vertical",
"Check Board",
"Slant Pattern",
}
The test pattern is set by a 8-bit register according to t... | ```diff
diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
index 110dd00c51ae..076c19fcf99c 100644
--- a/drivers/media/i2c/hi556.c
+++ b/drivers/media/i2c/hi556.c
@@ -762,21 +762,23 @@ static int hi556_test_pattern(struct hi556 *hi556, u32 pattern)
int ret;
u32 val;
- if (pattern) {
- ret = hi556... |
375fc903e57cb3ca4d2d5408de98d6369d4c8334 | Analyze and fix the following issue in the Linux kernel code: media: hi556: Support full range of power rails | Problem Details:
Use regulator_bulk_* to get the array of potential power rails for
the hi556.
Previously the driver only supported avdd as only avdd is used on IPU6
designs. But other designs may also need the driver to control the other
power rails and the new INT3472 handshake support also makes use of
dvdd on IPU6... | ```diff
diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
index d3cc65b67855..110dd00c51ae 100644
--- a/drivers/media/i2c/hi556.c
+++ b/drivers/media/i2c/hi556.c
@@ -624,6 +624,12 @@ static const struct hi556_mode supported_modes[] = {
},
};
+static const char * const hi556_supply_names[] = {
+ "d... |
99f2211a9d89fe34b3fa847fd7a4475171406cd0 | Analyze and fix the following issue in the Linux kernel code: media: hi556: Fix reset GPIO timings | Problem Details:
probe() requests the reset GPIO to be set to high when getting it.
Immeditately after this hi556_resume() is called and sets the GPIO low.
If the GPIO was low before requesting it this will result in the GPIO
only very briefly spiking high and the sensor not being properly reset.
The same problem also... | ```diff
diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
index aed258211b8a..d3cc65b67855 100644
--- a/drivers/media/i2c/hi556.c
+++ b/drivers/media/i2c/hi556.c
@@ -1321,7 +1321,12 @@ static int hi556_resume(struct device *dev)
return ret;
}
- gpiod_set_value_cansleep(hi556->reset_gpio, 0);
+ i... |
1fff2ee377e1c2230054e65092def460dd40b587 | Analyze and fix the following issue in the Linux kernel code: media: uapi: videodev2: Fix comment for 12-bit packed Bayer formats | Problem Details:
For 12-bit packed Bayer formats: every two consecutive samples are
packed into three bytes. Fix the corresponding comment.
Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.co... | ```diff
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 6f7bd38dd5aa..1bb1979f6c18 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -726,7 +726,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. ... |
9f2d0da9b8c3477cd5ed4e1ed1e58bb44184561b | Analyze and fix the following issue in the Linux kernel code: media: cadence: csi2rx: Enable csi2rx_err_irq interrupt and add support for VIDIOC_LOG_STATUS | Problem Details:
Enable the csi2rx_err_irq interrupt to record any errors during streaming
and also add support for VIDIOC_LOG_STATUS ioctl. This allows users to
retrieve detailed error information during streaming, including FIFO
overflow, packet errors, and ECC errors.
Signed-off-by: Yemike Abhilash Chandra <y-abhil... | ```diff
diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
index cebcae196eec..7f1ce95cdc3f 100644
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -57,6 +57,25 @@
#define CSI2RX_LANES_MAX 4
#define CSI2RX_ST... |
0bb005ac7268cc414bc216ad78adb63c281fc862 | Analyze and fix the following issue in the Linux kernel code: media: v4l2-subdev: Add debug prints to v4l2_subdev_collect_streams() | Problem Details:
Print streams found by v4l2_subdev_collect_streams() at debug level. This
could be useful in debugging drivers, userspace programs or the framework
itself.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans V... | ```diff
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 7b1a67a52efa..4fd25fea3b58 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -2233,6 +2233,9 @@ static void v4l2_subdev_collect_streams(struct v4l2_subdev *sd,
*fou... |
f98691668ecd644ce63d20d8dd7baf892a6b873d | Analyze and fix the following issue in the Linux kernel code: media: v4l2-subdev: Print early in v4l2_subdev_{enable,disable}_streams() | Problem Details:
Print debug messages early in v4l2_subdev_enable_streams() and
v4l2_subdev_disable_streams(), before sanity checks take place. This can
help figuring out why something goes wrong, in driver development or
otherwise.
Also print the name of the sub-device where streaming is to be enabled or
disabled.
S... | ```diff
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index c69d1aff701f..7b1a67a52efa 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -2285,6 +2285,9 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad,
bool ... |
ff49672a28f3a856717f09d61380e524e243121f | Analyze and fix the following issue in the Linux kernel code: media: ipu6: isys: Use correct pads for xlate_streams() | Problem Details:
The pad argument to v4l2_subdev_state_xlate_streams() is incorrect, static
pad number is used for the source pad even though the pad number is
dependent on the stream. Fix it.
Fixes: 3a5c59ad926b ("media: ipu6: Rework CSI-2 sub-device streaming control")
Cc: stable@vger.kernel.org
Signed-off-by: Sakar... | ```diff
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
index da8581a37e22..6030bd23b4b9 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
@@ -354,9 +354,9 @@ static int ipu6_isys_csi2_enable_streams(... |
fe69a391808404977b1f002a6e7447de3de7a88e | Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code | Problem Details:
The object is potentially already gone after the drm_gem_object_put().
In general the object should be fully constructed before calling
drm_gem_handle_create(), except the debugfs tracking uses a separate
lock and list and separate flag to denotate whether the object is
actually initialized.
Since I'm... | ```diff
diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
index 7c00fd77758b..a123bc740ba1 100644
--- a/drivers/gpu/drm/panthor/panthor_gem.c
+++ b/drivers/gpu/drm/panthor/panthor_gem.c
@@ -16,10 +16,15 @@
#include "panthor_mmu.h"
#ifdef CONFIG_DEBUG_FS
-static void panthor_... |
dd831ac8221e691e9e918585b1003c7071df0379 | Analyze and fix the following issue in the Linux kernel code: net/sched: sch_qfq: Fix null-deref in agg_dequeue | Problem Details:
To prevent a potential crash in agg_dequeue (net/sched/sch_qfq.c)
when cl->qdisc->ops->peek(cl->qdisc) returns NULL, we check the return
value before using it, similar to the existing approach in sch_hfsc.c.
To avoid code duplication, the following changes are made:
1. Changed qdisc_warn_nonwc(includ... | ```diff
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index d7b7b6cd4aa1..8a75c73fc555 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -114,7 +114,6 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
struct netlink_ext_ack *extack);
void qdisc_put_rtab(struct... |
27917e8194f91dffd8b4825350c63cb68e98ce58 | Analyze and fix the following issue in the Linux kernel code: erofs: address D-cache aliasing | Problem Details:
Flush the D-cache before unlocking folios for compressed inodes, as
they are dirtied during decompression.
Avoid calling flush_dcache_folio() on every CPU write, since it's more
like playing whack-a-mole without real benefit.
It has no impact on x86 and arm64/risc-v: on x86, flush_dcache_folio()
is a... | ```diff
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 221e0ff1ed0d..16e4a6bd9b97 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -214,9 +214,11 @@ int erofs_map_dev(struct super_block *sb, struct erofs_map_dev *map)
/*
* bit 30: I/O error occurred on this folio
+ * bit 29: CPU has dirty data in D-cach... |
99f7619a77a0a2e3e2bcae676d0f301769167754 | Analyze and fix the following issue in the Linux kernel code: erofs: fix to add missing tracepoint in erofs_read_folio() | Problem Details:
Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap")
converts to use iomap interface, it removed trace_erofs_readpage()
tracepoint in the meantime, let's add it back.
Fixes: 771c994ea51f ("erofs: convert all uncompressed cases to iomap")
Signed-off-by: Chao Yu <chao@kernel.org>
Revie... | ```diff
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 534ac359976e..221e0ff1ed0d 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -351,6 +351,8 @@ int erofs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
*/
static int erofs_read_folio(struct file *file, struct folio *folio)
{
+ trace_er... |
d53238b614e01266a3d36b417b60a502e0698504 | Analyze and fix the following issue in the Linux kernel code: erofs: fix to add missing tracepoint in erofs_readahead() | Problem Details:
Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap")
converts to use iomap interface, it removed trace_erofs_readahead()
tracepoint in the meantime, let's add it back.
Fixes: 771c994ea51f ("erofs: convert all uncompressed cases to iomap")
Signed-off-by: Chao Yu <chao@kernel.org>
Revi... | ```diff
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 6a329c329f43..534ac359976e 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -356,6 +356,9 @@ static int erofs_read_folio(struct file *file, struct folio *folio)
static void erofs_readahead(struct readahead_control *rac)
{
+ trace_erofs_readahead(rac-... |
cd803da7c033e376a66793a43ee98e136bc6cc25 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: fix PHY handling for ROCK 4D | Problem Details:
Old revisions of the ROCK 4D board have a dedicated crystal to
supply the RTL8211F PHY's 25MHz clock input. At least some newer
revisions instead use REFCLKO25M_GMAC0_OUT. The DT already has
this half-prepared, but there are some issues:
1. The DT relies on auto-selecting the right PHY driver, which
... | ```diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
index 22ffa15abc9e..62712c90c83d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts
@@ -645,14 +645,16 @@
&mdio0 {
rgmii_phy0: ether... |
25a36912dc4456c519858179997e5375e76d6104 | Analyze and fix the following issue in the Linux kernel code: mmc: loongson2: prevent integer overflow in ret variable | Problem Details:
In loongson2_mmc_dll_mode_init(), `ret` variable is declared
as u32 but it is expected to hold an int value.
Fixes: d0f8e961deae ("mmc: loongson2: Add Loongson-2K2000 SD/SDIO/eMMC controller driver")
Reported-by: https://scan7.scan.coverity.com/#/project-view/53936/11354?selectedIssue=1644958
Signed-o... | ```diff
diff --git a/drivers/mmc/host/loongson2-mmc.c b/drivers/mmc/host/loongson2-mmc.c
index 515ccf834f0a..ba6bb8fd5535 100644
--- a/drivers/mmc/host/loongson2-mmc.c
+++ b/drivers/mmc/host/loongson2-mmc.c
@@ -485,7 +485,8 @@ close_transfer:
static void loongson2_mmc_dll_mode_init(struct loongson2_mmc_host *host)
... |
469d7ea8e99124e4def5d98f928ffb4a659aa1c8 | Analyze and fix the following issue in the Linux kernel code: spi: xilinx: Fix block comment style and minor cleanups | Problem Details:
This patch fixes block comment style issues and minor code cleanups as reported by checkpatch.pl.
Signed-off-by: Darshan Rathod <darshanrathod475@gmail.com>
Link: https://patch.msgid.link/20250710045058.1325-1-darshanrathod475@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org> | ```diff
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index ded709b2b459..d59cc8a18484 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -89,8 +89,8 @@ struct xilinx_spi {
u8 bytes_per_word;
int buffer_size; /* buffer size in words */
u32 cs_inactive; /* Level of the CS pi... |
03ba056e63d3b2d3774c7a8cf40f5a31b968b612 | Analyze and fix the following issue in the Linux kernel code: crypto: zstd - fix duplicate check warning | Problem Details:
Fix the following warnings reported by the static analyzer Smatch:
crypto/zstd.c:273 zstd_decompress()
warn: duplicate check 'scur' (previous on line 235)
Fixes: f5ad93ffb541 ("crypto: zstd - convert to acomp")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.o... | ```diff
diff --git a/crypto/zstd.c b/crypto/zstd.c
index 657e0cf7b952..24edb4d616b5 100644
--- a/crypto/zstd.c
+++ b/crypto/zstd.c
@@ -268,10 +268,9 @@ static int zstd_decompress(struct acomp_req *req)
total_out += outbuf.pos;
acomp_walk_done_dst(&walk, outbuf.pos);
- } while (scur != inbuf.pos);
+ } while ... |
19c4096ccdd809c6213e2e62b0d4f57c880138cd | Analyze and fix the following issue in the Linux kernel code: ALSA: compress_offload: tighten ioctl command number checks | Problem Details:
The snd_compr_ioctl() ignores the upper 24 bits of the ioctl command
number and only compares the number of the ioctl command, which can
cause unintended behavior if an application tries to use an unsupprted
command that happens to have the same _IOC_NR() value.
Remove the truncation to the low bits a... | ```diff
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 840bb9cfe789..a66f258cafaa 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -1269,62 +1269,62 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
stream = &data->st... |
6b89819b06d8d339da414f06ef3242f79508be5e | Analyze and fix the following issue in the Linux kernel code: cachefiles: Fix the incorrect return value in __cachefiles_write() | Problem Details:
In __cachefiles_write(), if the return value of the write operation > 0, it
is set to 0. This makes it impossible to distinguish scenarios where a
partial write has occurred, and will affect the outer calling functions:
1) cachefiles_write_complete() will call "term_func" such as
netfs_write_subreque... | ```diff
diff --git a/fs/cachefiles/io.c b/fs/cachefiles/io.c
index c08e4a66ac07..3e0576d9db1d 100644
--- a/fs/cachefiles/io.c
+++ b/fs/cachefiles/io.c
@@ -347,8 +347,6 @@ int __cachefiles_write(struct cachefiles_object *object,
default:
ki->was_async = false;
cachefiles_write_complete(&ki->iocb, ret);
- if (re... |
76fdb7eb4e1c91086ce9c3db6972c2ed48c96afb | Analyze and fix the following issue in the Linux kernel code: uapi: export PROCFS_ROOT_INO | Problem Details:
The root inode of /proc having a fixed inode number has been part of the
core kernel ABI since its inception, and recently some userspace
programs (mainly container runtimes) have started to explicitly depend
on this behaviour.
The main reason this is useful to userspace is that by checking that a
sus... | ```diff
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 06a297a27ba3..ed86ac710384 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -363,12 +363,12 @@ static const struct inode_operations proc_root_inode_operations = {
* This is the root "inode" in the /proc tree..
*/
struct proc_dir_entry proc_root = {
- .l... |
22c2ed6996ac34df506040a069fac3e5100b5c0e | Analyze and fix the following issue in the Linux kernel code: checkpatch: check for missing sentinels in ID arrays | Problem Details:
All of the ID tables based on <linux/mod_devicetable.h> (of_device_id,
pci_device_id, ...) require their arrays to end in an empty sentinel
value. That's usually spelled with an empty initializer entry (e.g.,
"{}"), but also sometimes with explicit 0 entries, field initializers
(e.g., '.id = ""'), or ... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 489b74d52abe..d4c24318548c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -685,6 +685,9 @@ our $tracing_logging_tags = qr{(?xi:
[\.\!:\s]*
)};
+# Device ID types like found in include/linux/mod_devicetable.h.
+our $dev_id_t... |
d0118d7d20bbf9a76f75840bc3b0da0f4d092da9 | Analyze and fix the following issue in the Linux kernel code: ocfs2: update d_splice_alias() return code checking | Problem Details:
When commit d3556babd7fa ("ocfs2: fix d_splice_alias() return code
checking") was merged into v3.18-rc3, d_splice_alias() was returning one
of a valid dentry, NULL or an ERR_PTR.
When commit b5ae6b15bd73 ("merge d_materialise_unique() into
d_splice_alias()") was merged into v3.19-rc1, d_splice_alias()... | ```diff
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 26bc59c3a813..c90b254da75e 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -142,6 +142,8 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,
bail_add:
ret = d_splice_alias(inode, dentry);
+ if (IS_ERR(ret))
+ goto b... |
0c954c57f9e1fcf5d1b3e1be5320978bfaf9cbed | Analyze and fix the following issue in the Linux kernel code: ocfs2: embed actual values into ocfs2_sysfile_lock_key names | Problem Details:
Since lockdep_set_class() uses stringified key name via macro, calling
lockdep_set_class() with an array causes lockdep warning messages to
report variable name than actual index number.
Change ocfs2_init_locked_inode() to pass actual index number for better
readability of lockdep reports. This patch... | ```diff
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 12e5d1f73325..14bf440ea4df 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -50,8 +50,6 @@ struct ocfs2_find_inode_args
unsigned int fi_sysfile_type;
};
-static struct lock_class_key ocfs2_sysfile_lock_key[NUM_SYSTEM_INODES];
-
static int ocfs2... |
896f612273dacfdc7a635315394ccf285c257208 | Analyze and fix the following issue in the Linux kernel code: fs: fat: Prevent fsfuzzer from dominating the console | Problem Details:
fsfuzzer may make many invalid access for FAT-fs and generate many kmsg
like "FAT-fs (loop2): error, invalid access to FAT (entry 0x00000ccb)".
For platforms & os that enables hardware serial device whose speed are
slow, this may cause softlockup easily.
So let's ratelimit the error log.
The log as ... | ```diff
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c
index 1db348f8f887..a7061c2ad8e4 100644
--- a/fs/fat/fatent.c
+++ b/fs/fat/fatent.c
@@ -356,7 +356,7 @@ int fat_ent_read(struct inode *inode, struct fat_entry *fatent, int entry)
if (!fat_valid_entry(sbi, entry)) {
fatent_brelse(fatent);
- fat_fs_error(sb, ... |
41a7f737685eed2700654720d3faaffdf0132135 | Analyze and fix the following issue in the Linux kernel code: scripts: gdb: move MNT_* constants to gdb-parsed | Problem Details:
Since these are now no longer defines, but in an enum.
Link: https://lkml.kernel.org/r/20250618134629.25700-2-johannes@sipsolutions.net
Fixes: 101f2bbab541 ("fs: convert mount flags to enum")
Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc... | ```diff
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
index fd6bd69c5096..d5e3069f42a7 100644
--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -73,12 +73,12 @@ if IS_BUILTIN(CONFIG_MODULES):
LX_GDBPARSED(MOD_RO_AFTER_INIT)
/* linux/mount.h *... |
64960497ea86a5d09176c296c3616aa7c8668624 | Analyze and fix the following issue in the Linux kernel code: fork: clean up ifdef logic around stack allocation | Problem Details:
There is an unneeded OR in the ifdef functions that are used to allocate
and free kernel stacks based on direct map or vmap. Adding dynamic stack
support would complicate this logic even further.
Therefore, clean up by changing the order so OR is no longer needed.
Link: https://lkml.kernel.org/r/202... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index 6616d173307a..bd8c21d64746 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -188,13 +188,7 @@ static inline void free_task_struct(struct task_struct *tsk)
kmem_cache_free(task_struct_cachep, tsk);
}
-/*
- * Allocate pages if THREAD_SIZE is >= PAGE_SIZE, oth... |
2ae826799932ff89409f56636ad3c25578fe7cf5 | Analyze and fix the following issue in the Linux kernel code: ocfs2: reset folio to NULL when get folio fails | Problem Details:
The reproducer uses FAULT_INJECTION to make memory allocation fail, which
causes __filemap_get_folio() to fail, when initializing w_folios[i] in
ocfs2_grab_folios_for_write(), it only returns an error code and the value
of w_folios[i] is the error code, which causes
ocfs2_unlock_and_free_folios() to re... | ```diff
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 40b6bce12951..89aadc6cdd87 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct address_space *mapping,
if (IS_ERR(wc->w_folios[i])) {
ret = PTR_ERR(wc->w_folios[i]);
mlog_errno(r... |
aa644c405291a419e92b112e2279c01c410e9a26 | Analyze and fix the following issue in the Linux kernel code: uprobes: revert ref_ctr_offset in uprobe_unregister error path | Problem Details:
There's error path that could lead to inactive uprobe:
1) uprobe_register succeeds - updates instruction to int3 and
changes ref_ctr from 0 to 1
2) uprobe_unregister fails - int3 stays in place, but ref_ctr
is changed to 0 (it's not restored to 1 in the fail path)
uprobe is leaked
... | ```diff
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 4c965ba77f9f..84ee7b590861 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -581,8 +581,8 @@ retry:
out:
/* Revert back reference counter if instruction update failed. */
- if (ret < 0 && is_register && ref_ctr_update... |
e795000e755c309d1f9bd2a0590eca38b4625f3a | Analyze and fix the following issue in the Linux kernel code: mul_u64_u64_div_u64: fix the division-by-zero behavior | Problem Details:
The current implementation forces a compile-time 1/0 division, which
generates an undefined instruction (ud2 on x86) rather than a proper
runtime division-by-zero exception.
Change to trigger an actual div-by-0 exception at runtime, consistent with
other division operations. Use a non-1 dividend to p... | ```diff
diff --git a/lib/math/div64.c b/lib/math/div64.c
index 5faa29208bdb..bf77b9843175 100644
--- a/lib/math/div64.c
+++ b/lib/math/div64.c
@@ -212,12 +212,13 @@ u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c)
#endif
- /* make sure c is not zero, trigger exception otherwise */
-#pragma GCC diagnostic push
-#pragma... |
d71b90e5ba83b32b4e3980f8c07ba2012ad9378a | Analyze and fix the following issue in the Linux kernel code: exit: fix misleading comment in forget_original_parent() | Problem Details:
The commit 482a3767e508 ("exit: reparent: call forget_original_parent()
under tasklist_lock") moved the comment from exit_notify() to
forget_original_parent(). However, the forget_original_parent() only
handles (A), while (B) is handled in kill_orphaned_pgrp(). So remove the
unrelated part.
Link: ht... | ```diff
diff --git a/kernel/exit.c b/kernel/exit.c
index bb184a67ac73..f03caf17b214 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -692,12 +692,7 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
}
/*
- * This does two things:
- *
- * A. Make init inherit all the child processes
... |
ad2c8079e9d5637f6d66cb5ce5cf49768ae87658 | Analyze and fix the following issue in the Linux kernel code: kcov: fix typo in comment of kcov_fault_in_area | Problem Details:
change '__santizer_cov_trace_pc()' to '__sanitizer_cov_trace_pc()'
Link: https://lkml.kernel.org/r/20250615123237.110144-1-n9winx@163.com
Signed-off-by: Wei Nanxin <n9winx@163.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Macro Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-f... | ```diff
diff --git a/kernel/kcov.c b/kernel/kcov.c
index 187ba1b80bda..1d85597057e1 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -552,7 +552,7 @@ static int kcov_get_mode(unsigned long arg)
/*
* Fault in a lazily-faulted vmalloc area before it can be used by
- * __santizer_cov_trace_pc(), to avoid recursion i... |
2489e958129ff7cbf26a34ee33cdc9ccbd68fe3c | Analyze and fix the following issue in the Linux kernel code: relayfs: abolish prev_padding | Problem Details:
Patch series "relayfs: misc changes", v5.
The series mostly focuses on the error counters which helps every user
debug their own kernel module.
This patch (of 5):
prev_padding represents the unused space of certain subbuffer. If the
content of a call of relay_write() exceeds the limit of the remai... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
index e8a04e476c57..09a64f224c49 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
@@ -220,8 +220,7 @@ static int guc_action_control_log(struct intel_guc *g... |
449e0b4ed5a16c72289a786c5333fc97520402bf | Analyze and fix the following issue in the Linux kernel code: fork: clean-up naming of vm_stack/vm_struct variables in vmap stacks code | Problem Details:
There are two data types: "struct vm_struct" and "struct vm_stack" that
have the same local variable names: vm_stack, or vm, or s, which makes the
code confusing to read.
Change the code so the naming is consistent:
struct vm_struct is always called vm_area
struct vm_stack is always called vm_stack
... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index 1ee8eb11f38b..5fd893c907a5 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -207,14 +207,14 @@ struct vm_stack {
struct vm_struct *stack_vm_area;
};
-static bool try_release_thread_stack_to_cache(struct vm_struct *vm)
+static bool try_release_thread_stack_t... |
85df0d505ed64d72c86822733f648074d1ae2bca | Analyze and fix the following issue in the Linux kernel code: ocfs2: replace simple_strtol with kstrtol | Problem Details:
kstrtol() is better because simple_strtol() ignores overflow. And using
kstrtol() is more concise.
Link: https://lkml.kernel.org/r/20250527092333.1917391-1-suhui@nfschina.com
Signed-off-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.c... | ```diff
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index 77edcd70f72c..0f045e45fa0c 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -360,7 +360,6 @@ static int ocfs2_control_do_setnode_msg(struct file *file,
struct ocfs2_control_message_setn *msg)
{
long nodenum;
- char *ptr =... |
98db4b5472ed8a64e418b895054c5fb123c038bf | Analyze and fix the following issue in the Linux kernel code: selftests/mm: fix UFFDIO_API usage with proper two-step feature negotiation | Problem Details:
The current implementation of test_unmerge_uffd_wp() explicitly sets
`uffdio_api.features = UFFD_FEATURE_PAGEFAULT_FLAG_WP` before calling
UFFDIO_API. This can cause the ioctl() call to fail with EINVAL on
kernels that do not support UFFD-WP, leading the test to fail
unnecessarily:
# --------------... | ```diff
diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c
index b61803e36d1c..d8bd1911dfc0 100644
--- a/tools/testing/selftests/mm/ksm_functional_tests.c
+++ b/tools/testing/selftests/mm/ksm_functional_tests.c
@@ -393,9 +393,13 @@ static void test_unmerge... |
1f0bce2fa8c6bfd65cf78ad6ef6e0948fc55c7bb | Analyze and fix the following issue in the Linux kernel code: maple_tree: add testing for restoring maple state to active | Problem Details:
Restoring maple status to ma_active on overflow/underflow when mas->node
was NULL could have happened in the past, but was masked by a bug in
mas_walk(). Add test cases that triggered the bug when the node was
mas->node prior to fixing the maple state setup.
Add a few extra tests around restoring the... | ```diff
diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c
index 13e2a10d7554..cb3936595b0d 100644
--- a/lib/test_maple_tree.c
+++ b/lib/test_maple_tree.c
@@ -3177,6 +3177,7 @@ static noinline void __init check_state_handling(struct maple_tree *mt)
void *entry, *ptr = (void *) 0x1234500;
void *ptr2 = &ptr;
... |
12f1d7931283106306a8822c5279013b8a0f1242 | Analyze and fix the following issue in the Linux kernel code: maple_tree: fix status setup on restore to active | Problem Details:
During the initial call with a maple state, an error status may be set
before a valid node is populated into the maple state node. Subsequent
calls with the maple state may restore the state into an active state with
no node set. This was masked by the mas_walk() always resetting the
status to ma_sta... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 34b84b14985e..7601c7c2bc09 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4927,7 +4927,7 @@ void *mas_walk(struct ma_state *mas)
{
void *entry;
- if (!mas_is_active(mas) || !mas_is_start(mas))
+ if (!mas_is_active(mas) && !mas_is_start(mas))
... |
d2ef92cd2a31ba7c0d0eb0dd5c1acf381f161fcd | Analyze and fix the following issue in the Linux kernel code: mm: unexport globally copy_to_kernel_nofault | Problem Details:
copy_to_kernel_nofault() is an internal helper which should not be visible
to loadable modules – exporting it would give exploit code a cheap
oracle to probe kernel addresses. Instead, keep the helper un-exported
and compile the kunit case that exercises it only when
mm/kasan/kasan_test.o is linked in... | ```diff
diff --git a/mm/kasan/kasan_test_c.c b/mm/kasan/kasan_test_c.c
index 5f922dd38ffa..2aa12dfa427a 100644
--- a/mm/kasan/kasan_test_c.c
+++ b/mm/kasan/kasan_test_c.c
@@ -1977,6 +1977,11 @@ static void rust_uaf(struct kunit *test)
KUNIT_EXPECT_KASAN_FAIL(test, kasan_test_rust_uaf());
}
+/*
+ * copy_to_kernel_n... |
d8e77a0b636485364d70b86addf0c76bf9bccc4f | Analyze and fix the following issue in the Linux kernel code: lib/test_vmalloc.c: restrict default test mask to avoid test warnings | Problem Details:
When the vmalloc test is built into the kernel, it runs automatically
during the boot. The current-default "run_test_mask" includes all test
cases, including those which are designed to fail and which trigger kernel
warnings.
These kernel splats can be misinterpreted as actual kernel bugs, leading
to... | ```diff
diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
index 7264781750c9..c1966cf72ab8 100644
--- a/lib/test_vmalloc.c
+++ b/lib/test_vmalloc.c
@@ -41,7 +41,7 @@ __param(int, nr_pages, 0,
__param(bool, use_huge, false,
"Use vmalloc_huge in fix_size_alloc_test");
-__param(int, run_test_mask, INT_MAX,
+__para... |
59305202c67fea50378dcad0cc199dbc13a0e99a | Analyze and fix the following issue in the Linux kernel code: mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() | Problem Details:
Memory hot remove unmaps and tears down various kernel page table regions
as required. The ptdump code can race with concurrent modifications of
the kernel page tables. When leaf entries are modified concurrently, the
dump code may log stale or inconsistent information for a VA range, but
this is oth... | ```diff
diff --git a/arch/arm64/mm/ptdump_debugfs.c b/arch/arm64/mm/ptdump_debugfs.c
index 68bf1a125502..1e308328c079 100644
--- a/arch/arm64/mm/ptdump_debugfs.c
+++ b/arch/arm64/mm/ptdump_debugfs.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/debugfs.h>
-#include <linux/memory_hotplug.h>
#inc... |
dfa3cf0bc018ff15e02ce19906be00a287ff2395 | Analyze and fix the following issue in the Linux kernel code: selftets/damon: add a test for memcg_path leak | Problem Details:
There was a memory leak bug in DAMOS sysfs memcg_path file. Add a
selftest to ensure the bug never comes back.
Link: https://lkml.kernel.org/r/20250619183608.6647-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-fo... | ```diff
diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile
index ff21524be458..e888455e3cf8 100644
--- a/tools/testing/selftests/damon/Makefile
+++ b/tools/testing/selftests/damon/Makefile
@@ -15,6 +15,7 @@ TEST_PROGS += reclaim.sh lru_sort.sh
# regression tests (reproducers o... |
5d26b5bdc64625049d98efc0f5bfddd83709c154 | Analyze and fix the following issue in the Linux kernel code: mm/memremap: remove unused devmap_managed_key | Problem Details:
It's no longer used so remove it.
Link: https://lkml.kernel.org/r/11516e39f33f809292ffccab1d46062f9bc248b3.1750323463.git-series.apopple@nvidia.com
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Balbi... | ```diff
diff --git a/mm/memremap.c b/mm/memremap.c
index 044a4550671a..f75078c14839 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -38,30 +38,6 @@ unsigned long memremap_compat_align(void)
EXPORT_SYMBOL_GPL(memremap_compat_align);
#endif
-#ifdef CONFIG_FS_DAX
-DEFINE_STATIC_KEY_FALSE(devmap_managed_key);
-EXPORT... |
984921edea68bf24bcc87e1317bfc90451ff46c6 | Analyze and fix the following issue in the Linux kernel code: mm: remove PFN_DEV, PFN_MAP, PFN_SPECIAL, PFN_SG_CHAIN and PFN_SG_LAST | Problem Details:
The PFN_MAP flag is no longer used for anything, so remove it. The
PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so also
remove them. The last user of PFN_SPECIAL was removed by 653d7825c149
("dcssblk: mark DAX broken, remove FS_DAX_LIMITED support").
Users of PFN_DEV were remove... | ```diff
diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
index 2d9148221e9a..2c002936a0f6 100644
--- a/include/linux/pfn_t.h
+++ b/include/linux/pfn_t.h
@@ -5,26 +5,11 @@
/*
* PFN_FLAGS_MASK - mask of all the possible valid pfn_t flags
- * PFN_SG_CHAIN - pfn is a pointer to the next scatterlist entry
- *... |
d438d273417055241ebaaf1ba3be23459fc27cba | Analyze and fix the following issue in the Linux kernel code: mm: remove devmap related functions and page table bits | Problem Details:
Now that DAX and all other reference counts to ZONE_DEVICE pages are
managed normally there is no need for the special devmap PTE/PMD/PUD page
table bits. So drop all references to these, freeing up a software
defined page table bit on architectures supporting it.
Link: https://lkml.kernel.org/r/6389... | ```diff
diff --git a/Documentation/mm/arch_pgtable_helpers.rst b/Documentation/mm/arch_pgtable_helpers.rst
index af245161d8e7..c88c7fa665d6 100644
--- a/Documentation/mm/arch_pgtable_helpers.rst
+++ b/Documentation/mm/arch_pgtable_helpers.rst
@@ -30,8 +30,6 @@ PTE Page Table Helpers
+---------------------------+------... |
28dc88c39ecfe7de5033fa05cdd24fd1a9f8267d | Analyze and fix the following issue in the Linux kernel code: fs/dax: remove FS_DAX_LIMITED config option | Problem Details:
The dcssblk driver was the last user of FS_DAX_LIMITED. That was marked
broken by 653d7825c149 ("dcssblk: mark DAX broken, remove FS_DAX_LIMITED
support") to allow removal of PFN_SPECIAL. However the FS_DAX_LIMITED
config option itself was not removed, so do that now.
Link: https://lkml.kernel.org/r... | ```diff
diff --git a/fs/Kconfig b/fs/Kconfig
index 44b6cdd36dc1..ccdf371a62ed 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -59,7 +59,7 @@ endif # BLOCK
config FS_DAX
bool "File system based Direct Access (DAX) support"
depends on MMU
- depends on ZONE_DEVICE || FS_DAX_LIMITED
+ depends on ZONE_DEVICE
select FS_IO... |
bea0cc7cf4a51e8d3a0042212df3b83b49df58a7 | Analyze and fix the following issue in the Linux kernel code: powerpc: remove checks for devmap pages and PMDs/PUDs | Problem Details:
PFN_DEV no longer exists. This means no devmap PMDs or PUDs will be
created, so checking for them is redundant. Instead mappings of pages
that would have previously returned true for pXd_devmap() will return true
for pXd_trans_huge()
Link: https://lkml.kernel.org/r/31f63cc8dd518f9e2ec300681fe302eb4a... | ```diff
diff --git a/arch/powerpc/mm/book3s64/hash_hugepage.c b/arch/powerpc/mm/book3s64/hash_hugepage.c
index 15d6f3ea7178..cdfd4fe75edb 100644
--- a/arch/powerpc/mm/book3s64/hash_hugepage.c
+++ b/arch/powerpc/mm/book3s64/hash_hugepage.c
@@ -54,7 +54,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, uns... |
2f4e882d955b19ff7b216d6a29a77fcba045b7cc | Analyze and fix the following issue in the Linux kernel code: mm/khugepaged: remove redundant pmd_devmap() check | Problem Details:
The pmd_devmap() check in check_pmd_state() is redundant because the only
user of pmd_devmap were device dax and fs dax. However all callers of
check_pmd_state() first call thp_vma_allowable_order() to check if the vma
should be scanned. Except when called from a page fault this always
returns 0 for ... | ```diff
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 6b09b09c8f82..3495a20cef5e 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -945,8 +945,6 @@ static inline int check_pmd_state(pmd_t *pmd)
return SCAN_PMD_NULL;
if (pmd_trans_huge(pmde))
return SCAN_PMD_MAPPED;
- if (pmd_devmap(pmde))
- return S... |
8a6a984c2e0ea406459b445a3910a454bece3aa1 | Analyze and fix the following issue in the Linux kernel code: mm: remove redundant pXd_devmap calls | Problem Details:
DAX was the only thing that created pmd_devmap and pud_devmap entries
however it no longer does as DAX pages are now refcounted normally and
pXd_trans_huge() returns true for those. Therefore checking both
pXd_devmap and pXd_trans_huge() is redundant and the former can be removed
without changing beha... | ```diff
diff --git a/fs/dax.c b/fs/dax.c
index ea0c35794bf9..7d4ecb9d23af 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1937,7 +1937,7 @@ static vm_fault_t dax_iomap_pte_fault(struct vm_fault *vmf, pfn_t *pfnp,
* the PTE we need to set up. If so just return and the fault will be
* retried.
*/
- if (pmd_trans_huge(... |
7b2ae3c47f65bc75985caaaba9f2fb601eebca20 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: remove pXd_devmap usage from insert_pXd_pfn() | Problem Details:
Nothing uses PFN_DEV anymore so no need to create devmap pXd's when
mapping a PFN. Instead special mappings will be created which ensures
vm_normal_page_pXd() will not return pages which don't have an associated
page. This could change behaviour slightly on architectures where
pXd_devmap() does not i... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 7434d177b97c..54b5c37d9515 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1415,11 +1415,7 @@ static int insert_pmd(struct vm_area_struct *vma, unsigned long addr,
add_mm_counter(mm, mm_counter_file(fop.folio), HPAGE_PMD_NR);
} else {
entry... |
fd2825b0760a10a9626986cca64f5664302ffdfc | Analyze and fix the following issue in the Linux kernel code: mm/gup: remove pXX_devmap usage from get_user_pages() | Problem Details:
GUP uses pXX_devmap() calls to see if it needs to a get a reference on the
associated pgmap data structure to ensure the pages won't go away.
However it's a driver responsibility to ensure that if pages are mapped
(ie. discoverable by GUP) that they are not offlined or removed from the
memmap so ther... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 7753daac49f7..a2df2308cb2c 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -473,9 +473,6 @@ static inline bool folio_test_pmd_mappable(struct folio *folio)
return folio_order(folio) >= HPAGE_PMD_ORDER;
}
-struct page... |
4b1d3145c1045d4b0db4622cd2c224a247f25a20 | Analyze and fix the following issue in the Linux kernel code: mm: convert vmf_insert_mixed() from using pte_devmap to pte_special | Problem Details:
DAX no longer requires device PTEs as it always has a ZONE_DEVICE page
associated with the PTE that can be reference counted normally. Other
users of pte_devmap are drivers that set PFN_DEV when calling
vmf_insert_mixed() which ensures vm_normal_page() returns NULL for these
entries.
There is no reas... | ```diff
diff --git a/mm/hmm.c b/mm/hmm.c
index d0c5c35807a2..14914da98416 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -302,13 +302,10 @@ static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr,
goto fault;
/*
- * Bypass devmap pte such as DAX page when all pfn requested
- * flags(pfn_req_flags) are ... |
79065255abc4b0fae843f539f7f5f0fe9fcac1e6 | Analyze and fix the following issue in the Linux kernel code: mm: remove remaining uses of PFN_DEV | Problem Details:
PFN_DEV was used by callers of dax_direct_access() to figure out if the
returned PFN is associated with a page using pfn_t_has_page() or not.
However all DAX PFNs now require an assoicated ZONE_DEVICE page so can
assume a page exists.
Other users of PFN_DEV were setting it before calling vmf_insert_m... | ```diff
diff --git a/drivers/gpu/drm/gma500/fbdev.c b/drivers/gpu/drm/gma500/fbdev.c
index 8edefea2ef59..109efdc96ac5 100644
--- a/drivers/gpu/drm/gma500/fbdev.c
+++ b/drivers/gpu/drm/gma500/fbdev.c
@@ -33,7 +33,7 @@ static vm_fault_t psb_fbdev_vm_fault(struct vm_fault *vmf)
vma->vm_page_prot = pgprot_noncached(vma->... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.