id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2750f6765d6974f7e163c5d540a96c8703f6d8dd
Analyze and fix the following issue in the Linux kernel code: drm/i915/psr: fix pipe to vblank conversion
Problem Details: First, we can't assume pipe == crtc index. If a pipe is fused off in between, it no longer holds. intel_crtc_for_pipe() is the only proper way to get from a pipe to the corresponding crtc. Second, drivers aren't supposed to access or index drm->vblank[] directly. There's drm_crtc_vblank_crtc() for thi...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 0ca2b06d18b5..3decc190d2ac 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -931,7 +931,8 @@ static bool is_dc5_dc6_blocked(struct intel_dp *intel_dp) { ...
187de7c212e5fa87779e1026bf949337bca0cdaa
Analyze and fix the following issue in the Linux kernel code: printk: nbcon: Allow unsafe write_atomic() for panic
Problem Details: There may be console drivers that have not yet figured out a way to implement safe atomic printing (->write_atomic() callback). These drivers could choose to only implement threaded printing (->write_thread() callback), but then it is guaranteed that _no_ output will be printed during panic. Not even a...
```diff diff --git a/include/linux/console.h b/include/linux/console.h index d17f1f525bec..5f17321ed962 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -186,6 +186,8 @@ static inline void con_debug_leave(void) { } * printing callbacks must not be called. * @CON_NBCON: Console can operate ou...
53afec2c8fb2a562222948cb1c2aac48598578c9
Analyze and fix the following issue in the Linux kernel code: tracing/tools: Fix incorrcet short option in usage text for --threads
Problem Details: The help message incorrectly listed '-t' as the short option for --threads, but the actual getopt_long configuration uses '-e'. This mismatch can confuse users and lead to incorrect command-line usage. This patch updates the usage string to correctly show: "-e, --threads NRTHR" to match the implementa...
```diff diff --git a/tools/tracing/latency/latency-collector.c b/tools/tracing/latency/latency-collector.c index cf263fe9deaf..ef97916e3873 100644 --- a/tools/tracing/latency/latency-collector.c +++ b/tools/tracing/latency/latency-collector.c @@ -1725,7 +1725,7 @@ static void show_usage(void) "-n, --notrace\t\tIf late...
0995c2fc39b0f998d40f5d276f67ae22fc1c37c3
Analyze and fix the following issue in the Linux kernel code: drm/xe: Enforce correct user fence signaling order using
Problem Details: Prevent application hangs caused by out-of-order fence signaling when user fences are attached. Use drm_syncobj (via dma-fence-chain) to guarantee that each user fence signals in order, regardless of the signaling order of the attached fences. Ensure user fence writebacks to user space occur in the cor...
```diff diff --git a/drivers/gpu/drm/xe/xe_exec.c b/drivers/gpu/drm/xe/xe_exec.c index 7715e74bb945..a8ab363a8046 100644 --- a/drivers/gpu/drm/xe/xe_exec.c +++ b/drivers/gpu/drm/xe/xe_exec.c @@ -165,7 +165,8 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file) for (num_syncs = 0; num_sync...
86a9ce21f5b781c56eba23cbbd2264ab74778ab0
Analyze and fix the following issue in the Linux kernel code: block: don't return 1 for the fallback case in blkdev_get_zone_info
Problem Details: blkdev_do_report_zones returns the number of reported zones, but blkdev_get_zone_info returns 0 or an errno. Translate to the expected return value in blkdev_report_zone_fallback. Fixes: b037d41762fd ("block: introduce blkdev_get_zone_info()") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by...
```diff diff --git a/block/blk-zoned.c b/block/blk-zoned.c index c5226bcaaa94..8204214e3b89 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -895,8 +895,14 @@ static int blkdev_report_zone_fallback(struct block_device *bdev, .data = zone, .report_active = true, }; + int error; - return blkdev_do_repo...
d23550efc6800841b4d1639784afaebdea946ae0
Analyze and fix the following issue in the Linux kernel code: x86/microcode/AMD: Add more known models to entry sign checking
Problem Details: Two Zen5 systems are missing from need_sha_check(). Add them. Fixes: 50cef76d5cb0 ("x86/microcode/AMD: Load only SHA256-checksummed patches") Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@kernel.org> Link: https://patch.msgi...
```diff diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index b7c797dc94f4..dc82153009da 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -220,10 +220,12 @@ static bool need_sha_check(u32 cur_rev) case 0xaa001: return cur_rev <= 0xaa0...
b11a020d914c3b7628f56a9ea476a5b03679489b
Analyze and fix the following issue in the Linux kernel code: drm/xe: Do clean shutdown also when using flr
Problem Details: Currently Xe driver is triggering flr without any clean-up on shutdown. This is causing random warnings from pending related works as the underlying hardware is reset in the middle of their execution. Fix this by performing clean shutdown also when using flr. Fixes: 501d799a47e2 ("drm/xe: Wire up dev...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 132530e5a3db..456899238377 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -983,21 +983,21 @@ void xe_device_remove(struct xe_device *xe) void xe_device_shutdown(struct xe_device *xe) { + s...
95af8f4fdce8349a5fe75264007f1af2aa1082ea
Analyze and fix the following issue in the Linux kernel code: drm/xe/guc: Synchronize Dead CT worker with unbind
Problem Details: Cancel and wait for any Dead CT worker to complete before continuing with device unbinding. Else the worker will end up using resources freed by the undind operation. Cc: Zhanjun Dong <zhanjun.dong@intel.com> Fixes: d2c5a5a926f4 ("drm/xe/guc: Dead CT helper") Signed-off-by: Balasubramani Vivekanandan ...
```diff diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c index 18f6327bf552..283d846c3512 100644 --- a/drivers/gpu/drm/xe/xe_guc_ct.c +++ b/drivers/gpu/drm/xe/xe_guc_ct.c @@ -200,6 +200,9 @@ static void guc_ct_fini(struct drm_device *drm, void *arg) { struct xe_guc_ct *ct = arg; +#if IS...
5cb637d9425d7c6282b9f7470d273e4ecac6efb8
Analyze and fix the following issue in the Linux kernel code: iommupt: Documentation fixes
Problem Details: Some adjustments pointed out by Randy: "decodes an full 64-bit" -> "decodes the full 64 bit" Correct the function parameter name for iova_to_phys() Use the recommended section heading style. Suggested-by: Randy Dunlap <rdunlap@infradead.org> Fixes: ab0b572847ac ("genpt: Add Documentation/ files"...
```diff diff --git a/Documentation/driver-api/generic_pt.rst b/Documentation/driver-api/generic_pt.rst index 7a9ca9f2878d..fd29d1b525e5 100644 --- a/Documentation/driver-api/generic_pt.rst +++ b/Documentation/driver-api/generic_pt.rst @@ -10,9 +10,8 @@ Generic Radix Page Table .. kernel-doc:: drivers/iommu/generic_pt/...
e4dfaf25df1210af6776b6672191cf5e32ba5529
Analyze and fix the following issue in the Linux kernel code: iommupt: Describe @bitnr parameter
Problem Details: Sphinx reports kernel-doc warnings when making htmldocs: WARNING: ./drivers/iommu/generic_pt/pt_common.h:361 function parameter 'bitnr' not described in 'pt_test_sw_bit_acquire' WARNING: ./drivers/iommu/generic_pt/pt_common.h:371 function parameter 'bitnr' not described in 'pt_set_sw_bit_release' Des...
```diff diff --git a/drivers/iommu/generic_pt/pt_common.h b/drivers/iommu/generic_pt/pt_common.h index b5628f47e0db..3b4e37108914 100644 --- a/drivers/iommu/generic_pt/pt_common.h +++ b/drivers/iommu/generic_pt/pt_common.h @@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common); /** * ...
6573d552e28c22f5f7b7eedce3ac7c2677032b13
Analyze and fix the following issue in the Linux kernel code: Documentation: genpt: Don't use code block marker before iommu_amdv1.c include listing
Problem Details: Stephen Rothwell reports htmldocs warning when merging iommu tree: Documentation/driver-api/generic_pt.rst:32: WARNING: Literal block expected; none found. [docutils] This is because of duplicate double colon code block markers: one after generic_pt/fmt/iommu_amdv1.c and the one in its preceding para...
```diff diff --git a/Documentation/driver-api/generic_pt.rst b/Documentation/driver-api/generic_pt.rst index 210d1229aa1c..7a9ca9f2878d 100644 --- a/Documentation/driver-api/generic_pt.rst +++ b/Documentation/driver-api/generic_pt.rst @@ -27,7 +27,7 @@ compiled into a per-format IOMMU operations kernel module. For thi...
29528c8e643bb0c54da01237a35010c6438423d2
Analyze and fix the following issue in the Linux kernel code: ASoC: tas2781: fix getting the wrong device number
Problem Details: The return value of device_property_read_u32_array used for getting the property is the status instead of the number of the property. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20251107054959.950-1-shengh...
```diff diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c index ba880b5de7e8..8f37aa00e62e 100644 --- a/sound/soc/codecs/tas2781-i2c.c +++ b/sound/soc/codecs/tas2781-i2c.c @@ -1957,7 +1957,8 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv) { struct i2c_client *client = (s...
264b501bb40dd22e8c4ab2c8a3378e32c2e04ec6
Analyze and fix the following issue in the Linux kernel code: rust: pwm: Add module_pwm_platform_driver! macro
Problem Details: Rust PWM drivers using the abstractions in `kernel/pwm.rs` typically call C functions (like `pwmchip_alloc`, `__pwmchip_add`, etc.) that are exported to the `PWM` C symbol namespace. With the introduction of `imports_ns` support in the `module!` macro, every PWM driver would need to manually include `...
```diff diff --git a/rust/kernel/pwm.rs b/rust/kernel/pwm.rs index 79fbb13cd47f..6f2f78c687d5 100644 --- a/rust/kernel/pwm.rs +++ b/rust/kernel/pwm.rs @@ -760,3 +760,26 @@ impl<T: PwmOps> Drop for Registration<T> { unsafe { bindings::pwmchip_remove(chip_raw); } } } + +/// Declares a kernel module that ex...
d8046cd50879db371bbf6220477ec521692ab2f6
Analyze and fix the following issue in the Linux kernel code: rust: pwm: Add complete abstraction layer
Problem Details: Introduce a comprehensive abstraction layer for the PWM subsystem to enable writing drivers in Rust. Because `Device`, `Chip`, and `PwmOps` all refer to each other, they form a single, indivisible unit with circular dependencies. They are introduced together in this single commit to create a complete,...
```diff diff --git a/rust/kernel/pwm.rs b/rust/kernel/pwm.rs index beabf0086a2f..79fbb13cd47f 100644 --- a/rust/kernel/pwm.rs +++ b/rust/kernel/pwm.rs @@ -8,10 +8,14 @@ use crate::{ bindings, + container_of, + device::{self, Bound}, + devres, + error::{self, to_result}, prelude::*, - types::...
739ad9be61e5f53dbd8d7d7e80723d0799ff077c
Analyze and fix the following issue in the Linux kernel code: rust: macros: Add support for 'imports_ns' to module!
Problem Details: Kernel modules that use C symbols exported via `EXPORT_SYMBOL_NS` must declare this dependency for `modpost` verification. C modules achieve this by using the `MODULE_IMPORT_NS(NAMESPACE)` macro, which embeds an `import_ns=<NAMESPACE>` tag into the `.modinfo` section. The Rust `module!` macro lacked t...
```diff diff --git a/rust/macros/module.rs b/rust/macros/module.rs index 5ee54a00c0b6..408cd1154875 100644 --- a/rust/macros/module.rs +++ b/rust/macros/module.rs @@ -98,6 +98,7 @@ struct ModuleInfo { description: Option<String>, alias: Option<Vec<String>>, firmware: Option<Vec<String>>, + imports_ns:...
f6087b926aea65768975fd4cbc3775965cbd8621
Analyze and fix the following issue in the Linux kernel code: slab: make __slab_free() more clear
Problem Details: The function is tricky and many of its tests are hard to understand. Try to improve that by using more descriptively named variables and added comments. - rename 'prior' to 'old_head' to match the head and tail parameters - introduce a 'bool was_full' to make it more obvious what we are testing inst...
```diff diff --git a/mm/slub.c b/mm/slub.c index f1a5373eee7b..074abe8e79f8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5859,8 +5859,8 @@ static void __slab_free(struct kmem_cache *s, struct slab *slab, unsigned long addr) { - void *prior; - int was_frozen; + void *old_head; + bool was_frozen, was_full; struct ...
9942d36a73c2d46c52fdd6f37cf698f3cb09ce5c
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Set surface-framebuffer GEM objects
Problem Details: Set struct drm_framebuffer.obj[0] to the allocated GEM buffer object for surface framebuffers. Avoids a NULL-pointer deref in the client's vmap helpers. [ 22.640191] Console: switching to colour frame buffer device 160x50 [ 22.641788] Oops: general protection fault, probably for non-canonical ad...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 54ea1b513950..d32ce1cb579e 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -553,6 +553,9 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv, memcpy...
f050da08a4edfcccb92bbc93eafb9723286a5ce2
Analyze and fix the following issue in the Linux kernel code: drm/vblank: Increase timeout in drm_wait_one_vblank()
Problem Details: Currently, wait_event_timeout() in drm_wait_one_vblank() uses a 100ms timeout. Under heavy scheduling pressure or rare delayed vblank handling, this can trigger WARNs unnecessarily. Increase the timeout to 1000ms to reduce spurious WARNs, while still catching genuine issues. Reported-by: syzbot+147ba...
```diff diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 451ec9620226..32d013c5c8fc 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -1315,7 +1315,7 @@ void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe) ret = wait_event_timeout(vblank->qu...
3946d3ba99342f3b9996e621f05e7003d4308171
Analyze and fix the following issue in the Linux kernel code: drm/vblank: Fix kernel docs for vblank timer
Problem Details: Fix documentation for drm_crtc_vblank_start_timer(), which referred to drm_crtc_vblank_cancel_timer(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/dri-devel/20251106152201.6f248c09@canb.auug.org.au/ Fixes: ...
```diff diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 61e211fd3c9c..451ec9620226 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -2258,7 +2258,7 @@ int drm_crtc_vblank_start_timer(struct drm_crtc *crtc) EXPORT_SYMBOL(drm_crtc_vblank_start_timer); /** ...
eef295a8508202e750e4f103a97447f3c9d5e3d0
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Restore Guest-Backed only cursor plane support
Problem Details: The referenced fixes commit broke the cursor plane for configurations which have Guest-Backed surfaces but no cursor MOB support. Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling") Signed-off-by: Ian Forbes <ian.forbes@broadcom.com> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: h...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c index 718832b08d96..c46f17ba7236 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c @@ -100,8 +100,10 @@ vmw_cursor_update_type(struct vmw_private *v...
32b415a9dc2c212e809b7ebc2b14bc3fbda2b9af
Analyze and fix the following issue in the Linux kernel code: drm/vmwgfx: Validate command header size against SVGA_CMD_MAX_DATASIZE
Problem Details: This data originates from userspace and is used in buffer offset calculations which could potentially overflow causing an out-of-bounds access. Fixes: 8ce75f8ab904 ("drm/vmwgfx: Update device includes for DX device functionality") Reported-by: Rohit Keshri <rkeshri@redhat.com> Signed-off-by: Ian Forbe...
```diff diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index d539f25b5fbe..3057f8baa7d2 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c @@ -3668,6 +3668,11 @@ static int vmw_cmd_check(struct vmw_private *dev_priv, c...
6bd89ae7d14788ba15e25289479addcb98e7dc26
Analyze and fix the following issue in the Linux kernel code: perf record: Make sure to update build-ID cache
Problem Details: Recent change on enabling --buildid-mmap by default brought an issue with build-id handling. With build-ID in MMAP2 records, we don't need to save the build-ID table in the header of a perf data file. But the actual file contents still need to be cached in the debug directory for annotation etc. Spl...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index ffb94a8339b0..fe10bb7f35cb 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1890,15 +1890,14 @@ record__finish_output(struct record *rec) } /* Buildid scanning disabled or build ID in kernel and synt...
80f0d631dcc76ee1b7755bfca1d8417d91d71414
Analyze and fix the following issue in the Linux kernel code: tracing: Fix memory leaks in create_field_var()
Problem Details: The function create_field_var() allocates memory for 'val' through create_hist_field() inside parse_atom(), and for 'var' through create_var(), which in turn allocates var->type and var->var.name internally. Simply calling kfree() to release these structures will result in memory leaks. Use destroy_hi...
```diff diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 1d536219b624..6bfaf1210dd2 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -3272,14 +3272,16 @@ static struct field_var *create_field_var(struct hist_trigger_data *hist_data, var = cr...
aa997d2d2a0b2e76f4df0f1f12829f02acb4fb6b
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Do not warn in ring_buffer_map_get_reader() when reader catches up
Problem Details: The function ring_buffer_map_get_reader() is a bit more strict than the other get reader functions, and except for certain situations the rb_get_reader_page() should not return NULL. If it does, it triggers a warning. This warning was triggering but after looking at why, it was because another accepta...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 1244d2c5c384..afcd3747264d 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -7344,6 +7344,10 @@ consume: goto out; } + /* Did the reader catch up with the writer? */ + if (cpu_buffer->reader_page == cpu_...
93e197e524b14d185d011813b72773a1a49d932d
Analyze and fix the following issue in the Linux kernel code: io_uring: use WRITE_ONCE for user shared memory
Problem Details: IORING_SETUP_NO_MMAP rings remain user accessible even before the ctx setup is finalised, so use WRITE_ONCE consistently when initialising rings. Fixes: 03d89a2de25bb ("io_uring: support for user allocated memory for rings/sqes") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Je...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index e493d4358ab7..d11d0e9723a1 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -3381,10 +3381,6 @@ static __cold int io_allocate_scq_urings(struct io_ring_ctx *ctx, if (!(ctx->flags & IORING_SETUP_NO_SQARRAY)) ctx->sq_array = (u32 *)(...
15638d52cbcf6e969f4a5e2757b118355db583f3
Analyze and fix the following issue in the Linux kernel code: block: fix cached zone reporting after zone append was used
Problem Details: No zone plugs are allocated when a zone is opened by calling Zone Append on it. This makes the cached zone reporting report incorrectly empty zones if the file system is unmounted and report zones is called after that, e.g. by xfstests test cases using the scratch device. Fix this by recording if zon...
```diff diff --git a/block/blk-zoned.c b/block/blk-zoned.c index a0ce17e2143f..c5226bcaaa94 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -899,6 +899,19 @@ static int blkdev_report_zone_fallback(struct block_device *bdev, return blkdev_do_report_zones(bdev, sector, 1, &args); } +/* + * For devices that...
c6886cf610f4bb0b8aa6b88ab013a042e317f898
Analyze and fix the following issue in the Linux kernel code: block: don't leak disk->zones_cond for !disk_need_zone_resources
Problem Details: disk->zones_cond is allocated for all zoned devices, but disk_free_zone_resources skips it when the zone write plug hash is not allocated, leaking the allocation for non-mq devices that don't emulate zone append. This is reported by kmemleak-enabled xfstests for various tests that use simple device ma...
```diff diff --git a/block/blk-zoned.c b/block/blk-zoned.c index bba64b427082..a0ce17e2143f 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1834,6 +1834,14 @@ static void disk_destroy_zone_wplugs_hash_table(struct gendisk *disk) kfree(disk->zone_wplugs_hash); disk->zone_wplugs_hash = NULL; disk->zone_w...
156a530ed5ed012f35e8319c2ee5223dfc7195d3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Add devicetree for the 9Tripod X3568 v4
Problem Details: The 9Tripod X3568 v4 is an RK3568-based SBC, just like the RK3568-EVB. It always uses soldered connections between the X3568CV2/X3568CV3/X3568CV4 core board and the X3568bv4 I/O board. The differences between the core boards - PCB size, layout - CPU (RKK3568B2/RK3568J) - Memory type (DDR4/LPDDR4/LPDDR...
```diff diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 4cd8ef607f55..73bd126efc4c 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -130,6 +130,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb dtb-$(CONFIG_ARCH_R...
9311e6c29b348b005e79228ef6facd38ebcc73f9
Analyze and fix the following issue in the Linux kernel code: cgroup: Fix sleeping from invalid context warning on PREEMPT_RT
Problem Details: cgroup_task_dead() is called from finish_task_switch() which runs with preemption disabled and doesn't allow scheduling even on PREEMPT_RT. The function needs to acquire css_set_lock which is a regular spinlock that can sleep on RT kernels, leading to "sleeping function called from invalid context" war...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index cbb7340c5866..5e80d48488ef 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1324,7 +1324,10 @@ struct task_struct { struct css_set __rcu *cgroups; /* cg_list protected by css_set_lock and tsk->alloc_lock: */ struct list_he...
74d4432421a3e2669fbccc08c0f4fc2980bf0e39
Analyze and fix the following issue in the Linux kernel code: docs: netlink: Couple of intro-specs documentation fixes
Problem Details: Fix typo "handul" to "handful" and remove outdated limitation stating only generic netlink is supported (we have netlink-raw). Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Gal Pressman <gal@nvidia.com> Link: https://patch.msgid.link/20251105192908.686458-1-gal@nvidia.com Signed-off...
```diff diff --git a/Documentation/userspace-api/netlink/intro-specs.rst b/Documentation/userspace-api/netlink/intro-specs.rst index a4435ae4628d..e5ebc617754a 100644 --- a/Documentation/userspace-api/netlink/intro-specs.rst +++ b/Documentation/userspace-api/netlink/intro-specs.rst @@ -13,10 +13,10 @@ Simple CLI Kerne...
c91afa7610235f89a5e8f5686aac23892ab227ed
Analyze and fix the following issue in the Linux kernel code: tracing: tprobe-events: Fix to put tracepoint_user when disable the tprobe
Problem Details: __unregister_trace_fprobe() checks tf->tuser to put it when removing tprobe. However, disable_trace_fprobe() does not use it and only calls unregister_fprobe(). Thus it forgets to disable tracepoint_user. If the trace_fprobe has tuser, put it for unregistering the tracepoint callbacks when disabling t...
```diff diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index fd1b108ab639..8001dbf16891 100644 --- a/kernel/trace/trace_fprobe.c +++ b/kernel/trace/trace_fprobe.c @@ -1514,6 +1514,10 @@ static int disable_trace_fprobe(struct trace_event_call *call, if (!trace_probe_is_enabled(tp)) { list_fo...
25802f8d16374bcfc1e32d26fdee0d89ec82f865
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add 9Tripod
Problem Details: Add 9Tripod to the vendor prefixes. Signed-off-by: Coia Prant <coiaprant@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20251103171702.1518730-2-coiaprant@gmail.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 003cc91fb02f..7fd091e87007 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -30,6 +30,8 @@ pattern...
10d9dda426d684e98b17161f02f77894c6de9b60
Analyze and fix the following issue in the Linux kernel code: tracing: tprobe-events: Fix to register tracepoint correctly
Problem Details: Since __tracepoint_user_init() calls tracepoint_user_register() without initializing tuser->tpoint with given tracpoint, it does not register tracepoint stub function as callback correctly, and tprobe does not work. Initializing tuser->tpoint correctly before tracepoint_user_register() so that it sets...
```diff diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c index ad9d6347b5fa..fd1b108ab639 100644 --- a/kernel/trace/trace_fprobe.c +++ b/kernel/trace/trace_fprobe.c @@ -106,13 +106,14 @@ static struct tracepoint_user *__tracepoint_user_init(const char *name, struct t if (!tuser->name) return ...
fbf90d1b697faf61bb8b3ed72be6a8ebeb09de3d
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix USB Type-C host mode for Radxa ROCK 5B+/5T
Problem Details: The Radxa ROCK 5B+/5T USB Type-C port supports Dual Role Data and should also act as a host. However, currently, when acting as a host, only self-powered devices work. Since the ROCK 5B+ supports Dual Role Power, set the power-role property to "dual" and the try-power-role property to "sink". (along w...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi index 3bbe78810ec6..7aac77dfc5f1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi @@ -331,12 +331,12 @@...
a59e927ff46a967f84ddf94e89cbb045810e8974
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix USB power enable pin for BTT CB2 and Pi2
Problem Details: Fix typo into regulator GPIO definition. With current definition - USB powered off. Valid definition can be found on "pinctrl" section: vcc5v0_usb2t_en: vcc5v0-usb2t-en { rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; }; vcc5v0_usb2b_en: vcc5v0-usb2b-en { rockchip,pi...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi index f74590af7e33..b6cf03a7ba66 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-bigtreetech-cb2.dtsi @@ -187,7 +187,7 ...
c6c76445c30bb73fd4cfba8f4742e642dcfe90f5
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix DMA for Indiedroid Nova Bluetooth
Problem Details: When the device was first added, there was a problem with the bluetooth controller that manifested when DMA was enabled for the underlying UART interface. At some point in the intervening time the problem appears to have been resolved. Add the UART rx and tx channels back to re-enable UART. Signed-off...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts index 02e95fca2d5e..b506d820585f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts @@ -931,12 +931,9...
c04956cccb78cc233a20cc18f663689671f03c65
Analyze and fix the following issue in the Linux kernel code: tg3: extract GRXRINGS from .get_rxnfc
Problem Details: Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to optimize RX ring queries") added specific support for GRXRINGS callback, simplifying .get_rxnfc. Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new .get_rx_ring_count(). Given that tg3_get_rxnfc() only handles ...
```diff diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index d78cafdb2094..fa58c3ffceb0 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -12719,29 +12719,17 @@ static int tg3_get_sset_count(struct net_device *dev, int sset) } } -s...
37f46601383aa5a19bd42ea99617fa0fa6215f77
Analyze and fix the following issue in the Linux kernel code: selftests/tracing: Add basic test for trace_marker_raw file
Problem Details: Commit 64cf7d058a00 ("tracing: Have trace_marker use per-cpu data to read user space") made an update that fixed both trace_marker and trace_marker_raw. But the small difference made to trace_marker_raw had a blatant bug in it that any basic testing would have uncovered. Unfortunately, the self tests h...
```diff diff --git a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc new file mode 100644 index 000000000000..7daf7292209e --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc @@ -0,0 +1,107 @@ +#!/bin...
12ed3e5a03a8a5150977c2fa7e4dd739320592bc
Analyze and fix the following issue in the Linux kernel code: ice: add flow parsing for GTP and new protocol field support
Problem Details: Introduce new protocol header types and field sizes to support GTPU, GTPC tunneling protocols. - Add field size macros for GTP TEID, QFI, and other headers - Extend ice_flow_field_info and enum definitions - Update hash macros for new protocols - Add support for IPv6 prefix matching and fragment h...
```diff diff --git a/drivers/net/ethernet/intel/ice/ice_flow.c b/drivers/net/ethernet/intel/ice/ice_flow.c index 6d5c939dc8a5..a2f2a612428d 100644 --- a/drivers/net/ethernet/intel/ice/ice_flow.c +++ b/drivers/net/ethernet/intel/ice/ice_flow.c @@ -5,6 +5,38 @@ #include "ice_flow.h" #include <net/gre.h> +/* Size of k...
0ed3a30fd996cb0cac872432cf25185fda7e5316
Analyze and fix the following issue in the Linux kernel code: hisi_acc_vfio_pci: Add .match_token_uuid callback in hisi_acc_vfio_pci_migrn_ops
Problem Details: The commit, <86624ba3b522> ("vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD") accidentally ignored including the .match_token_uuid callback in the hisi_acc_vfio_pci_migrn_ops struct. Introduce the missed callback here. Fixes: 86624ba3b522 ("vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_...
```diff diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c index 498cb7d1c9e5..fe2ffcd00d6e 100644 --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c @@ -1620,6 +1620,7 @@ static const struct vfio_device_ops...
2f03f21fe7516902283b135de272d3c7b10672de
Analyze and fix the following issue in the Linux kernel code: vfio: Fix ksize arg while copying user struct in vfio_df_ioctl_bind_iommufd()
Problem Details: For the cases where user includes a non-zero value in 'token_uuid_ptr' field of 'struct vfio_device_bind_iommufd', the copy_struct_from_user() in vfio_df_ioctl_bind_iommufd() fails with -E2BIG. For the 'minsz' passed, copy_struct_from_user() expects the newly introduced field to be zero-ed, which would...
```diff diff --git a/drivers/vfio/device_cdev.c b/drivers/vfio/device_cdev.c index 480cac3a0c27..8ceca24ac136 100644 --- a/drivers/vfio/device_cdev.c +++ b/drivers/vfio/device_cdev.c @@ -99,7 +99,7 @@ long vfio_df_ioctl_bind_iommufd(struct vfio_device_file *df, return ret; if (user_size < minsz) return -EINVAL;...
c331b400e291a510eb9a0dbdc783b38e6f8321f0
Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Ensure SPEC_CTRL[63:32] is context switched between guest and host
Problem Details: SPEC_CTRL is an MSR, i.e. a 64-bit value, but the VMRUN assembly code assumes bits 63:32 are always zero. The bug is _currently_ benign because neither KVM nor the kernel support setting any of bits 63:32, but it's still a bug that needs to be fixed. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Sug...
```diff diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S index 235c4af6b692..98bfa2e00d88 100644 --- a/arch/x86/kvm/svm/vmenter.S +++ b/arch/x86/kvm/svm/vmenter.S @@ -52,11 +52,23 @@ * there must not be any returns or indirect branches between this code * and vmentry. */ - movl SVM_spec_ctr...
f2a12cc3b97f062186568a7b94ddb7aa2ef68140
Analyze and fix the following issue in the Linux kernel code: erofs: avoid infinite loop due to incomplete zstd-compressed data
Problem Details: Currently, the decompression logic incorrectly spins if compressed data is truncated in crafted (deliberately corrupted) images. Fixes: 7c35de4df105 ("erofs: Zstandard compression support") Reported-by: Robert Morris <rtm@csail.mit.edu> Closes: https://lore.kernel.org/r/50958.1761605413@localhost Sign...
```diff diff --git a/fs/erofs/decompressor_zstd.c b/fs/erofs/decompressor_zstd.c index b4bfe14229f9..e38d93bb2104 100644 --- a/fs/erofs/decompressor_zstd.c +++ b/fs/erofs/decompressor_zstd.c @@ -172,7 +172,6 @@ static int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq, dctx.bounce = strm->bounce; do { ...
c105e76bb17cf4b55fe89c6ad4f6a0e3972b5b08
Analyze and fix the following issue in the Linux kernel code: hfs: fix potential use after free in hfs_correct_next_unused_CNID()
Problem Details: This code calls hfs_bnode_put(node) which drops the refcount and then dreferences "node" on the next line. It's only safe to use "node" when we're holding a reference so flip these two lines around. Fixes: a06ec283e125 ("hfs: add logic of correcting a next unused CNID") Signed-off-by: Dan Carpenter <...
```diff diff --git a/fs/hfs/catalog.c b/fs/hfs/catalog.c index caebabb6642f..b80ba40e3877 100644 --- a/fs/hfs/catalog.c +++ b/fs/hfs/catalog.c @@ -322,9 +322,9 @@ int hfs_correct_next_unused_CNID(struct super_block *sb, u32 cnid) } } + node_id = node->prev; hfs_bnode_put(node); - node_id = node->prev; ...
a9da90e618cd0669a22bcc06a96209db5dd96e9b
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: reject address change while connecting
Problem Details: While connecting, the MAC address can already no longer be changed. The change is already rejected if netif_carrier_ok(), but of course that's not true yet while connecting. Check for auth_data or assoc_data, so the MAC address cannot be changed. Also more comprehensively check that there are no stati...
```diff diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index a7873832d4fa..0ca55b9655a7 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -223,6 +223,10 @@ static int ieee80211_can_powered_addr_change(struct ieee80211_sub_if_data *sdata if (netif_carrier_ok(sdata->dev)) return -EBUSY; + /...
dea9f84776b96a703f504631ebe9fea07bd2c181
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix dma_fence leak when job is canceled
Problem Details: Currently, dma_fence_put(job->fence) is called in job notification callback. However, if a job is canceled, the notification callback is never invoked, leading to a memory leak. Move dma_fence_put(job->fence) to the job cleanup function to ensure the fence is always released. Fixes: aac243092b70 ("acc...
```diff diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c index b78c47ed0d34..bdc90fe8a47e 100644 --- a/drivers/accel/amdxdna/aie2_ctx.c +++ b/drivers/accel/amdxdna/aie2_ctx.c @@ -189,7 +189,6 @@ aie2_sched_notify(struct amdxdna_sched_job *job) up(&job->hwctx->priv->job_sem); job->j...
3dc8c73365d3ca25c99e7e1a0f493039d7291df5
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: va-macro: fix resource leak in probe error path
Problem Details: In the commit referenced by the Fixes tag, clk_hw_get_clk() was added in va_macro_probe() to get the fsgen clock, but forgot to add the corresponding clk_put() in va_macro_remove(). This leads to a clock reference leak when the driver is unloaded. Switch to devm_clk_hw_get_clk() to automatically manag...
```diff diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index 2e1b77973a3e..92c177b82a02 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -1638,7 +1638,7 @@ static int va_macro_probe(struct platform_device *pdev) if (ret) goto err_clkout; ...
3c6a743c6961cc2cab453b343bb157d6bbbf8120
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Enable mst when it's detected but yet to be initialized
Problem Details: [Why] drm_dp_mst_topology_queue_probe() is used under the assumption that mst is already initialized. If we connect system with SST first then switch to the mst branch during suspend, we will fail probing topology by calling the wrong API since the mst manager is yet to be initialized. [How] At dm_res...
```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 2fe6520207d6..91c0188a29b2 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3563,6 +3563,7 @@ static int dm_resume(st...
570a66b48c22214851949fcd71816fee280aa096
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix wait after reset sequence in S3
Problem Details: For a mode-1 reset done at the end of S3 on PSPv11 dGPUs, only check if TOS is unloaded. Fixes: 32f73741d6ee ("drm/amdgpu: Wait for bootloader after PSPv11 reset") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4649 Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Alex Deucher <alexan...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 61268aa82df4..7333e19291cf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2632,9 +2632,14 @@ static int amdgpu_pmops_suspend_noirq(struct device *dev) { ...
b09cb2996cdf50cd1ab4020e002c95d742c81313
Analyze and fix the following issue in the Linux kernel code: drm/amd: Fix suspend failure with secure display TA
Problem Details: commit c760bcda83571 ("drm/amd: Check whether secure display TA loaded successfully") attempted to fix extra messages, but failed to port the cleanup that was in commit 5c6d52ff4b61e ("drm/amd: Don't try to enable secure display TA multiple times") to prevent multiple tries. Add that to the failure ha...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 8c0e5d03de50..aa7987d0806c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2355,8 +2355,11 @@ static int psp_securedisplay_initialize(struct psp_context *ps...
ea1c4c7e648d1ca91577071fc42fdc219521098c
Analyze and fix the following issue in the Linux kernel code: leds: Drop duplicate LEDS_EXPRESSWIRE config
Problem Details: While moving said config symbol out of the "if NEW_LEDS" block, I accidentally left a copy inside that block. Remove it. Reported-by: Randy Dunlap <rdunlap@infradead.org> Closes: https://lore.kernel.org/all/b6c481bb-e854-405e-a428-90301789fe20@infradead.org/ Fixes: 2cd0d1db31e7 ("leds: expresswire: Do...
```diff diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index eed609378ec1..11e7282dc297 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -214,10 +214,6 @@ config LEDS_EL15203000 To compile this driver as a module, choose M here: the module will be called leds-el15203000. -config LEDS_...
eb6e7f520d6efa4d4ebf1671455abe4a681f7a05
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix gpu page fault after hibernation on PF passthrough
Problem Details: On PF passthrough environment, after hibernate and then resume, coralgemm will cause gpu page fault. Mode1 reset happens during hibernate, but partition mode is not restored on resume, register mmCP_HYP_XCP_CTL and mmCP_PSP_XCP_CTL is not right after resume. When CP access the MQD BO, wrong stride siz...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c index 811124ff88a8..f9e2edf5260b 100644 --- a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c +++ b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c @@ -407,7 +407,8 @@ static int aqua_vanjaram_switch_partition_mode(struct...
d95963e309bc1211e28051314e72638d98225614
Analyze and fix the following issue in the Linux kernel code: backlight: ktd2801: Depend on GPIOLIB
Problem Details: The LEDS_EXPRESSWIRE library used by the driver requires GPIOLIB. Make sure this dependency is not left unsatisfied. Reported-by: Randy Dunlap <rdunlap@infradead.org> Closes: https://lore.kernel.org/all/b6c481bb-e854-405e-a428-90301789fe20@infradead.org/ Signed-off-by: Duje Mihanović <duje@dujemihanov...
```diff diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index d9374d208cee..37341474beb9 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -185,6 +185,7 @@ config BACKLIGHT_KTD253 config BACKLIGHT_KTD2801 tristate "Backlight Driver for Kinetic KTD2...
4dbf066d965cd3299fb396f1375d10423c9c625c
Analyze and fix the following issue in the Linux kernel code: leds: leds-cros_ec: Skip LEDs without color components
Problem Details: A user reports that on their Lenovo Corsola Magneton with EC firmware steelix-15194.270.0 the driver probe fails with EINVAL. It turns out that the power LED does not contain any color components as indicated by the following "ectool led power query" output: Brightness range for LED 1: red ...
```diff diff --git a/drivers/leds/leds-cros_ec.c b/drivers/leds/leds-cros_ec.c index 377cf04e202a..bea3cc3fbfd2 100644 --- a/drivers/leds/leds-cros_ec.c +++ b/drivers/leds/leds-cros_ec.c @@ -142,9 +142,6 @@ static int cros_ec_led_count_subleds(struct device *dev, } } - if (!num_subleds) - return -EINVAL; - *m...
6f15c3d715f1bf1025f88890eec7f3da210097a9
Analyze and fix the following issue in the Linux kernel code: bitops: Update kernel-doc in hweight.c to fix the issues with it
Problem Details: The kernel-doc in lib/hweight.c is global to the file and currently has issues: Warning: lib/hweight.c:13 expecting prototype for hweightN(). Prototype was for __sw_hweight32() instead Warning: lib/hweight.c:13 function parameter 'w' not described in '__sw_hweight32' Update it accordingly. Signed-o...
```diff diff --git a/lib/hweight.c b/lib/hweight.c index c94586b62551..0dfcafc3fd39 100644 --- a/lib/hweight.c +++ b/lib/hweight.c @@ -4,8 +4,8 @@ #include <asm/types.h> /** - * hweightN - returns the hamming weight of a N-bit word - * @x: the word to weigh + * DOC: __sw_hweightN - returns the hamming weight of a N...
a26a6c93edfeee82cb73f55e87d995eea59ddfe8
Analyze and fix the following issue in the Linux kernel code: kbuild: Strip trailing padding bytes from modules.builtin.modinfo
Problem Details: After commit d50f21091358 ("kbuild: align modinfo section for Secureboot Authenticode EDK2 compat"), running modules_install with certain versions of kmod (such as 29.1 in Ubuntu Jammy) in certain configurations may fail with: depmod: ERROR: kmod_builtin_iter_next: unexpected string without modname ...
```diff diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index ced4379550d7..cd788cac9d91 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -102,11 +102,24 @@ vmlinux: vmlinux.unstripped FORCE # modules.builtin.modinfo # -----------------------------------------------------------...
ecf6bc474ae97c404e2125b413eb0ef3627b03c5
Analyze and fix the following issue in the Linux kernel code: mfd: simple-mfd-i2c: Remove select I2C_K1 from MFD_SPACEMIT_P1
Problem Details: select will force a symbol to a specific value without considering its dependencies. As a result, the i2c-k1 driver will fail to build when OF or COMMON_CLK are disabled. The reason for removing I2C_K1 instead of adding a depends on condition is to keep the possibility for other SoCs to use this PMIC....
```diff diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index dbeac6825a10..58bfe32453a2 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1275,7 +1275,6 @@ config MFD_SPACEMIT_P1 tristate "SpacemiT P1 PMIC" depends on ARCH_SPACEMIT || COMPILE_TEST depends on I2C - select I2C_K1 select MFD_S...
a2e5a3cea4b18f6e2575acc444a5e8cce1fc8260
Analyze and fix the following issue in the Linux kernel code: ext4: correct the checking of quota files before moving extents
Problem Details: The move extent operation should return -EOPNOTSUPP if any of the inodes is a quota inode, rather than requiring both to be quota inodes. Fixes: 02749a4c2082 ("ext4: add ext4_is_quota_file()") Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Message-ID: <2025101301512...
```diff diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index 4b091c21908f..0f4b7c89edd3 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -485,7 +485,7 @@ mext_check_arguments(struct inode *orig_inode, return -ETXTBSY; } - if (ext4_is_quota_file(orig_inode) && ext4_is_quota_file(donor...
3534e03e0ec2e00908765549828a69df5ebefb91
Analyze and fix the following issue in the Linux kernel code: selftests/vsock: avoid false-positives when checking dmesg
Problem Details: Sometimes VMs will have some intermittent dmesg warnings that are unrelated to vsock. Change the dmesg parsing to filter on strings containing 'vsock' to avoid false positive failures that are unrelated to vsock. The downside is that it is possible for some vsock related warnings to not contain the sub...
```diff diff --git a/tools/testing/selftests/vsock/vmtest.sh b/tools/testing/selftests/vsock/vmtest.sh index edacebfc1632..8ceeb8a7894f 100755 --- a/tools/testing/selftests/vsock/vmtest.sh +++ b/tools/testing/selftests/vsock/vmtest.sh @@ -389,9 +389,9 @@ run_test() { local rc host_oops_cnt_before=$(dmesg | grep -...
6640d552185f7c11235c64a832004db9af119b2d
Analyze and fix the following issue in the Linux kernel code: fs: ext4: fix uninitialized symbols
Problem Details: Fix the issue detected by the smatch tool. fs/ext4/inode.c:3583 ext4_map_blocks_atomic_write_slow() error: uninitialized symbol 'next_pblk'. fs/ext4/namei.c:1776 ext4_lookup() error: uninitialized symbol 'de'. fs/ext4/namei.c:1829 ext4_get_parent() error: uninitialized symbol 'de'. fs/ext4/namei.c:316...
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e99306a8f47c..6356340b768d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3544,7 +3544,7 @@ static int ext4_map_blocks_atomic_write_slow(handle_t *handle, ext4_lblk_t m_lblk = map->m_lblk; unsigned int m_len = map->m_len; unsigned int mapped_len...
2977567b244f056d86658160659f06cd6c78ba3d
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Fix timeout error during beacon stats retrieval
Problem Details: Currently, for beacon_stats, ath12k_mac_get_fw_stats() is called for each started BSS on the specified hardware. ath12k_mac_get_fw_stats() will wait for the fw_stats_done completion after fetching the requested data from firmware. For the beacon_stats, fw_stats_done completion will be set only when sta...
```diff diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index a2137b363c2f..cc352eef1939 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 201...
ee87c63f9b2a418f698d79c2991347e31a7d2c27
Analyze and fix the following issue in the Linux kernel code: net: bridge: fix MST static key usage
Problem Details: As Ido pointed out, the static key usage in MST is buggy and should use inc/dec instead of enable/disable because we can have multiple bridges with MST enabled which means a single bridge can disable MST for all. Use static_branch_inc/dec to avoid that. When destroying a bridge decrement the key if MST...
```diff diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 98c5b9c3145f..ca3a637d7cca 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c @@ -386,6 +386,7 @@ void br_dev_delete(struct net_device *dev, struct list_head *head) del_nbp(p); } + br_mst_uninit(br); br_recalculate_neigh_suppress_enabled(...
8dca36978aa80bab9d4da130c211db75c9e00048
Analyze and fix the following issue in the Linux kernel code: net: bridge: fix use-after-free due to MST port state bypass
Problem Details: syzbot reported[1] a use-after-free when deleting an expired fdb. It is due to a race condition between learning still happening and a port being deleted, after all its fdbs have been flushed. The port's state has been toggled to disabled so no learning should happen at that time, but if we have MST en...
```diff diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index 870bdf2e082c..dea09096ad0f 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c @@ -25,7 +25,7 @@ static inline int should_deliver(const struct net_bridge_port *p, vg = nbp_vlan_group_rcu(p); return ((p->flags & BR_HAIRPIN_...
0216721ce71252f60d89af49c8dff613358058d3
Analyze and fix the following issue in the Linux kernel code: lan966x: Fix sleeping in atomic context
Problem Details: The following warning was seen when we try to connect using ssh to the device. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:575 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 104, name: dropbear preempt_count: 1, expected: 0 INFO: lockdep is turned off. CPU: 0 U...
```diff diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c index 2474dfd330f4..fe4e61405284 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c @@ -294,7 +294,7 ...
9065b968752334f972e0d48e50c4463a172fc2a7
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: zero init info->status in wmi_process_mgmt_tx_comp()
Problem Details: When reporting tx completion using ieee80211_tx_status_xxx() family of functions, the status part of the struct ieee80211_tx_info nested in the skb is used to report things like transmit rates & retry count to mac80211 On the TX data path, this is correctly memset to 0 before calling ieee80211_tx_stat...
```diff diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 0491e3fd6b5e..e3b444333dee 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5961,6 +5961,9 @@ static int wmi_process_mgmt_tx_comp(struct ath11k *ar, dma_unmap_sing...
067bf016e99ad72aa4ff869d6dec1fd62a9c6202
Analyze and fix the following issue in the Linux kernel code: bonding: fix NULL pointer dereference in actor_port_prio setting
Problem Details: Liang reported an issue where setting a slave’s actor_port_prio to predefined values such as 0, 255, or 65535 would cause a system crash. The problem occurs because in bond_opt_parse(), when the provided value matches a predefined table entry, the function returns that table entry, which does not cont...
```diff diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index 495a87f2ea7c..384499c869b8 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -225,13 +225,6 @@ static const struct bond_opt_value bond_ad_actor_sys_prio_tbl[] = { { NULL, -...
96baf482ca1f69f0da9d10a5bd8422c87ea9039e
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Fix reserved multicast address table programming
Problem Details: KSZ9477/KSZ9897 and LAN937X families of switches use a reserved multicast address table for some specific forwarding with some multicast addresses, like the one used in STP. The hardware assumes the host port is the last port in KSZ9897 family and port 5 in LAN937X family. Most of the time this assum...
```diff diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index d747ea1c41a7..5df8f153d511 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -1355,9 +1355,15 @@ void ksz9477_config_cpu_port(struct dsa_switch *ds) } } +#define RESV_MCA...
541414065c59db785000d7661d3d07184e104ec2
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: skip writing eeprom when PMFW manages RAS data
Problem Details: Only update bad page number in legacy eeprom write path. v2: add null pointer check for con. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c index 9854238ce7bf..670c0dedf4e9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c @@ -871,6 +871,18 @@ Out: return res; } +int amdgpu_...
62320fb8d91a0bddc44a228203cfa9bfbb5395bd
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Enable mst when it's detected but yet to be initialized
Problem Details: [Why] drm_dp_mst_topology_queue_probe() is used under the assumption that mst is already initialized. If we connect system with SST first then switch to the mst branch during suspend, we will fail probing topology by calling the wrong API since the mst manager is yet to be initialized. [How] At dm_res...
```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 5f090c13f224..18f1cf16ec18 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3624,6 +3624,7 @@ static int dm_resume(st...
1ad25fd272753db14c5d1cc8c68e20ce01f3f888
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix wait after reset sequence in S3
Problem Details: For a mode-1 reset done at the end of S3 on PSPv11 dGPUs, only check if TOS is unloaded. Fixes: 32f73741d6ee ("drm/amdgpu: Wait for bootloader after PSPv11 reset") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4649 Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Alex Deucher <alexan...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 3776901bbb1b..cb522d6272d6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2625,9 +2625,14 @@ static int amdgpu_pmops_suspend_noirq(struct device *dev) { ...
7f34ddf77d30959fcc24cd279074f7e0d4f732df
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add ras_eeprom_read_idx interface
Problem Details: PMFW will manage RAS eeprom data by itself, add new interface to read eeprom data via PMFW, we can read part of records by setting index. v2: use IPID parse interface. pa is not used and set it to a fixed value. v3: optimize the null pointer check for IPID parse interface. Signed-off-by: Tao Zhou...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c index d7e2a81bc274..9854238ce7bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c @@ -970,6 +970,50 @@ static int __amdgpu_ras_eeprom_read(...
4104c0a454f6a4d1e0d14895d03c0e7bdd0c8240
Analyze and fix the following issue in the Linux kernel code: drm/amd: Fix suspend failure with secure display TA
Problem Details: commit c760bcda83571 ("drm/amd: Check whether secure display TA loaded successfully") attempted to fix extra messages, but failed to port the cleanup that was in commit 5c6d52ff4b61e ("drm/amd: Don't try to enable secure display TA multiple times") to prevent multiple tries. Add that to the failure ha...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 8c0e5d03de50..aa7987d0806c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2355,8 +2355,11 @@ static int psp_securedisplay_initialize(struct psp_context *ps...
be031770bfc1662e773e2dfc696f1a0c1401f300
Analyze and fix the following issue in the Linux kernel code: drm/amd/ras: Fix the issue of incorrect function call
Problem Details: When amdgpu_device_health_check fails, amdgpu_ras_pre_reset will not be called and therefore amdgpu_ras_post_reset cannot be called either. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index dcf6fce1c5a2..86255c13fbb7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -6694,8 +6694,8 @@ skip_sched_resume: amdgpu_device_gpu_resume(adev,...
5d1b32cfe4a676fe552416cb5ae847b215463a1a
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix gpu page fault after hibernation on PF passthrough
Problem Details: On PF passthrough environment, after hibernate and then resume, coralgemm will cause gpu page fault. Mode1 reset happens during hibernate, but partition mode is not restored on resume, register mmCP_HYP_XCP_CTL and mmCP_PSP_XCP_CTL is not right after resume. When CP access the MQD BO, wrong stride siz...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c index 811124ff88a8..f9e2edf5260b 100644 --- a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c +++ b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c @@ -407,7 +407,8 @@ static int aqua_vanjaram_switch_partition_mode(struct...
0cc4b846159184892f4210c440daeb97cbe9583a
Analyze and fix the following issue in the Linux kernel code: s390/ctcm: Use info level for handshake UC_RCRESET
Problem Details: CTC adapter throws CTC_EVENT_UC_RCRESET (Unit check remote reset event) during initial handshake, if the peer is not ready yet. This causes the ctcm driver to re-attempt the handshake. As it is normal for the event to occur during initialization, use info instead of warn level in kernel log and NOTICE...
```diff diff --git a/drivers/s390/net/ctcm_fsms.c b/drivers/s390/net/ctcm_fsms.c index 9678c6a2cda7..1a48258b63b2 100644 --- a/drivers/s390/net/ctcm_fsms.c +++ b/drivers/s390/net/ctcm_fsms.c @@ -882,6 +882,13 @@ static void ctcm_chx_rxiniterr(fsm_instance *fi, int event, void *arg) fsm_newstate(fi, CTC_STATE_RXERR)...
32ed0bc2f0f8ce411a822531c71b49fa93608b37
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Ensure guest's SPEC_CTRL[63:32] is loaded on VM-Enter
Problem Details: SPEC_CTRL is an MSR, i.e. a 64-bit value, but the assembly code that loads the guest's value assumes bits 63:32 are always zero. The bug is _currently_ benign because neither KVM nor the kernel support setting any of bits 63:32, but it's still a bug that needs to be fixed. Note, the host's value is r...
```diff diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S index bc255d709d8a..574159a84ee9 100644 --- a/arch/x86/kvm/vmx/vmenter.S +++ b/arch/x86/kvm/vmx/vmenter.S @@ -118,13 +118,23 @@ SYM_FUNC_START(__vmx_vcpu_run) * and vmentry. */ mov 2*WORD_SIZE(%_ASM_SP), %_ASM_DI - movl VMX_spec_ctrl(%...
d0164c161923ac303bd843e04ebe95cfd03c6e19
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix check for valid GVA on an EPT violation
Problem Details: On an EPT violation, bit 7 of the exit qualification is set if the guest linear-address is valid. The derived page fault error code should not be checked for this bit. Fixes: f3009482512e ("KVM: VMX: Set PFERR_GUEST_{FINAL,PAGE}_MASK if and only if the GVA is valid") Cc: stable@vger.kernel.org Signed-...
```diff diff --git a/arch/x86/kvm/vmx/common.h b/arch/x86/kvm/vmx/common.h index bc5ece76533a..412d0829d7a2 100644 --- a/arch/x86/kvm/vmx/common.h +++ b/arch/x86/kvm/vmx/common.h @@ -98,7 +98,7 @@ static inline int __vmx_handle_ept_violation(struct kvm_vcpu *vcpu, gpa_t gpa, error_code |= (exit_qualification & EPT_VI...
2bac49bad1f3553cc3b3bfb22cc194e9bd9e8427
Analyze and fix the following issue in the Linux kernel code: mfd: max77620: Fix potential IRQ chip conflict when probing two devices
Problem Details: MAX77620 is most likely always a single device on the board, however nothing stops board designers to have two of them, thus same device driver could probe twice. Or user could manually try to probing second time. Device driver is not ready for that case, because it allocates statically 'struct regmap...
```diff diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index 21d2ab3db254..3af2974b3023 100644 --- a/drivers/mfd/max77620.c +++ b/drivers/mfd/max77620.c @@ -254,7 +254,7 @@ static int max77620_irq_global_unmask(void *irq_drv_data) return ret; } -static struct regmap_irq_chip max77620_top_irq_chip = {...
1b58acfd067ca16116b9234cd6b2d30cc8ab7502
Analyze and fix the following issue in the Linux kernel code: mfd: da9055: Fix missing regmap_del_irq_chip() in error path
Problem Details: When da9055_device_init() fails after regmap_add_irq_chip() succeeds but mfd_add_devices() fails, the error handling path only calls mfd_remove_devices() but forgets to call regmap_del_irq_chip(). This results in a resource leak. Fix this by adding regmap_del_irq_chip() to the error path so that resou...
```diff diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c index 1f727ef60d63..8c989b74f924 100644 --- a/drivers/mfd/da9055-core.c +++ b/drivers/mfd/da9055-core.c @@ -388,6 +388,7 @@ int da9055_device_init(struct da9055 *da9055) err: mfd_remove_devices(da9055->dev); + regmap_del_irq_chip(da9055->ch...
c19e675a3c82aeee99f7007f6cfbd5b292167cbb
Analyze and fix the following issue in the Linux kernel code: dt-bindings: mfd: Add Renesas R2A11302FT PMIC
Problem Details: This PMIC is referenced in upstream DTs for the Renesas Lager and Koelsch boards. Sadly, there is no documentation available. This minimal binding description states the facts that we do know. Fixes: arch/arm/boot/dts/renesas/r8a7790-lager.dtb: /soc/spi@e6e10000/pmic@0: failed to match any schema with...
```diff diff --git a/Documentation/devicetree/bindings/mfd/renesas,r2a11302ft.yaml b/Documentation/devicetree/bindings/mfd/renesas,r2a11302ft.yaml new file mode 100644 index 000000000000..7b96619ebd8c --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/renesas,r2a11302ft.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Iden...
ccb7cd3218e48665f3c7e19eede0da5f069c323d
Analyze and fix the following issue in the Linux kernel code: mfd: altera-sysmgr: Fix device leak on sysmgr regmap lookup
Problem Details: Make sure to drop the reference taken to the sysmgr platform device when retrieving its driver data. Note that holding a reference to a device does not prevent its driver data from going away. Fixes: f36e789a1f8d ("mfd: altera-sysmgr: Add SOCFPGA System Manager") Cc: stable@vger.kernel.org # 5.2 Sign...
```diff diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c index fb5f988e61f3..90c6902d537d 100644 --- a/drivers/mfd/altera-sysmgr.c +++ b/drivers/mfd/altera-sysmgr.c @@ -117,6 +117,8 @@ struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np, sysmgr = dev_get_drvdata(dev); ...
c1287d67c3a91aa19e4d9bbd3ad943cfbfa6bed4
Analyze and fix the following issue in the Linux kernel code: s390/sclp_mem: Consider global memory_hotplug.memmap_on_memory setting
Problem Details: When the global kernel command line parameter memory_hotplug.memmap_on_memory is set to false, per-memory-block memmap_on_memory setting can still be set to true. However, when configuring memory block, add_memory_resource() would configure it without memmap_on_memory. i.e. Even if the MHP_MEMMAP_ON_M...
```diff diff --git a/drivers/s390/char/sclp_mem.c b/drivers/s390/char/sclp_mem.c index 3a7a69615d99..bc515a24b3f2 100644 --- a/drivers/s390/char/sclp_mem.c +++ b/drivers/s390/char/sclp_mem.c @@ -275,6 +275,8 @@ static ssize_t sclp_memmap_on_memory_store(struct kobject *kobj, struct kobj_att rc = kstrtobool(buf, &valu...
858063c1aec837a7a500db9bd13145a17b0b7641
Analyze and fix the following issue in the Linux kernel code: s390: Fix double word in comments
Problem Details: Remove the repeated word "the" in comments. Signed-off-by: Bo Liu <liubo03@inspur.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
```diff diff --git a/arch/s390/kernel/perf_cpum_sf.c b/arch/s390/kernel/perf_cpum_sf.c index f432869f8921..bf816b134fb1 100644 --- a/arch/s390/kernel/perf_cpum_sf.c +++ b/arch/s390/kernel/perf_cpum_sf.c @@ -1093,7 +1093,7 @@ static void perf_event_count_update(struct perf_event *event, u64 count) * combined-sampling ...
84f5526e4dce0a44d050ceb1b1bf21d43016d91b
Analyze and fix the following issue in the Linux kernel code: ASoC: tas2783A: Fix issues in firmware parsing
Problem Details: During firmware download, if the size of the firmware is too small, it wrongly assumes the firmware download is successful. If there is size mismatch with chunk's header, invalid memory is accessed. Fix these issues by throwing error during these cases. Fixes: 4cc9bd8d7b32 (ASoc: tas2783A: Add soundwi...
```diff diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 1fb4227b711e..e273b80d033e 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -762,10 +762,17 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) goto out; } - mutex_...
1a58d865f423f4339edf59053e496089075fa950
Analyze and fix the following issue in the Linux kernel code: ASoC: sdw_utils: fix device reference leak in is_sdca_endpoint_present()
Problem Details: The bus_find_device_by_name() function returns a device pointer with an incremented reference count, but the original code was missing put_device() calls in some return paths, leading to reference count leaks. Fix this by ensuring put_device() is called before function exit after bus_find_device_by_...
```diff diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c index f7c8c16308de..3848c7df1916 100644 --- a/sound/soc/sdw_utils/soc_sdw_utils.c +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -1277,7 +1277,7 @@ static int is_sdca_endpoint_present(struct device *dev, struct sdw_slave *sla...
6b6eddc63ce871897d3a5bc4f8f593e698aef104
Analyze and fix the following issue in the Linux kernel code: ASoC: cs4271: Fix regulator leak on probe failure
Problem Details: The probe function enables regulators at the beginning but fails to disable them in its error handling path. If any operation after enabling the regulators fails, the probe will exit with an error, leaving the regulators permanently enabled, which could lead to a resource leak. Add a proper error hand...
```diff diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 6a3cca3d26c7..ead447a5da7f 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -581,17 +581,17 @@ static int cs4271_component_probe(struct snd_soc_component *component) ret = regcache_sync(cs4271->regmap); if (r...
6bd1ad97eb790570c167d4de4ca59fbc9c33722a
Analyze and fix the following issue in the Linux kernel code: regulator: pf9453: Fix kernel doc for mux_poll()
Problem Details: The validator is not happy: Warning: drivers/regulator/pf9453-regulator.c:303 This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Update the kernel-doc accordingly. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https...
```diff diff --git a/drivers/regulator/pf9453-regulator.c b/drivers/regulator/pf9453-regulator.c index 4cd7a9068836..cdb80f9d1bd7 100644 --- a/drivers/regulator/pf9453-regulator.c +++ b/drivers/regulator/pf9453-regulator.c @@ -289,13 +289,15 @@ static int pf9453_pmic_write(struct pf9453 *pf9453, unsigned int reg, u8 ma...
5246e3673eeeccb4f5bf4f42375dd495d465ac15
Analyze and fix the following issue in the Linux kernel code: leds: leds-lp50xx: LP5009 supports 3 modules for a total of 9 LEDs
Problem Details: LP5009 supports 9 LED outputs that are grouped into 3 modules. Cc: stable@vger.kernel.org Fixes: 242b81170fb8 ("leds: lp50xx: Add the LP50XX family of the RGB LED driver") Signed-off-by: Christian Hitz <christian.hitz@bbv.ch> Link: https://patch.msgid.link/20251022063305.972190-1-christian@klarinett.l...
```diff diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c index d50c7f3e8f99..3a0316be96ed 100644 --- a/drivers/leds/leds-lp50xx.c +++ b/drivers/leds/leds-lp50xx.c @@ -54,7 +54,7 @@ /* There are 3 LED outputs per bank */ #define LP50XX_LEDS_PER_MODULE 3 -#define LP5009_MAX_LED_MODULES 2 +#define ...
b750f5a9d64df6cfe9103c7feb7314694318818d
Analyze and fix the following issue in the Linux kernel code: drm/tiny: pixpaper: add explicit dependency on MMU
Problem Details: The DRM_GEM_SHMEM_HELPER helper requires MMU enabled because it uses vmf_insert_pfn() in its mmap implementation. On NOMMU configurations (e.g. some RISC-V randconfig builds), this symbol is unavailable and selecting DRM_GEM_SHMEM_HELPER causes a modpost undefined reference: ERROR: modpost: "vmf_i...
```diff diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index 7d9e85e932d7..f0e72d4b6a47 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -85,6 +85,7 @@ config DRM_PANEL_MIPI_DBI config DRM_PIXPAPER tristate "DRM support for PIXPAPER display panels" ...
f945afe01c6768dcfed7868c671a26e1164c2284
Analyze and fix the following issue in the Linux kernel code: platform/x86/amd: pmc: Add Lenovo Legion Go 2 to pmc quirk list
Problem Details: The Lenovo Legion Go 2 takes a long time to resume from suspend. This is due to it having an nvme resume handler that interferes with IOMMU mappings. It is a common issue with older Lenovo laptops. Adding it to that quirk list fixes this issue. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4...
```diff diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c index eb641ce0e982..404e62ad293a 100644 --- a/drivers/platform/x86/amd/pmc/pmc-quirks.c +++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c @@ -212,6 +212,23 @@ static const struct dmi_system_id fwbug_list[] = { D...
bd4f9f113dda07293ed4002a17d14f62121d324f
Analyze and fix the following issue in the Linux kernel code: platform/x86: alienware-wmi-wmax: Fix "Alienware m16 R1 AMD" quirk order
Problem Details: Quirks are matched using dmi_first_match(), therefore move the "Alienware m16 R1 AMD" entry above other m16 entries. Reported-by: Cihan Ozakca <cozakca@outlook.com> Fixes: e2468dc70074 ("Revert "platform/x86: alienware-wmi-wmax: Add G-Mode support to Alienware m16 R1"") Cc: stable@vger.kernel.org Sign...
```diff diff --git a/drivers/platform/x86/dell/alienware-wmi-wmax.c b/drivers/platform/x86/dell/alienware-wmi-wmax.c index f417dcc9af35..53f476604269 100644 --- a/drivers/platform/x86/dell/alienware-wmi-wmax.c +++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c @@ -122,20 +122,20 @@ static const struct dmi_system_id a...
5f20bc206beb902e32b77216cb7935b46ca00b0a
Analyze and fix the following issue in the Linux kernel code: platform/x86: ISST: isst_if.h: fix all kernel-doc warnings
Problem Details: Fix all kernel-doc warnings in <uapi/linux/isst_if.h>: - don't use "[]" in the variable name in kernel-doc - add a few missing entries - change "power_domain" to "power_domain_id" in kernel-doc to match the struct member name - add a leading '@' on a few existing kernel-doc lines - use '_' instead o...
```diff diff --git a/include/uapi/linux/isst_if.h b/include/uapi/linux/isst_if.h index 8197a4800604..40aa545101a3 100644 --- a/include/uapi/linux/isst_if.h +++ b/include/uapi/linux/isst_if.h @@ -52,7 +52,7 @@ struct isst_if_cpu_map { /** * struct isst_if_cpu_maps - structure for CPU map IOCTL * @cmd_count: Number ...
b4fbb13db86adb0bae1d7f968b61ea8dc9635e33
Analyze and fix the following issue in the Linux kernel code: media: qcom: camss: Add support for MSM8939
Problem Details: The camera subsystem for the MSM8939 is the same as MSM8916 except with 3 CSID instead of 2, and some higher clock rates. As a quirk, this SoC needs writing values to 2 VFE VBIF registers (see downstream msm8939-camera.dtsi vbif-{regs,settings} properties). This fixes black stripes across sensor and g...
```diff diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index 2de97f58f9ae..a734fb7dde0a 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -600,6 +600,7 @@ int msm_csiphy_subdev_init(st...
52862dc98932fff8fc3da6e3c12594f389cc892e
Analyze and fix the following issue in the Linux kernel code: media: dt-bindings: qcom,x1e80100-camss: Fix typo in CSIPHY supply description
Problem Details: Correct description of the CSIPHY 1.2 V supply ("vdd-csiphy-1p2-supply"), because it supplies 1.2 V, confirmed with DTS on the mailing lists. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Bryan O'Donoghue <bryan.odonoghue@li...
```diff diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml index b075341caafc..b87a13479a4b 100644 --- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,x1e80...
4cb5ac2626b5704ed712ac1d46b9d89fdfc12c5d
Analyze and fix the following issue in the Linux kernel code: futex: Optimize per-cpu reference counting
Problem Details: Shrikanth noted that the per-cpu reference counter was still some 10% slower than the old immutable option (which removes the reference counting entirely). Further optimize the per-cpu reference counter by: - switching from RCU to preempt; - using __this_cpu_*() since we now have preempt disabled; ...
```diff diff --git a/kernel/futex/core.c b/kernel/futex/core.c index 125804fbb5cb..2e77a6e5c865 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -1680,10 +1680,10 @@ static bool futex_ref_get(struct futex_private_hash *fph) { struct mm_struct *mm = fph->mm; - guard(rcu)(); + guard(preempt)(); - if (...
956dfda6a70885f18c0f8236a461aa2bc4f556ad
Analyze and fix the following issue in the Linux kernel code: sched/fair: Prevent cfs_rq from being unthrottled with zero runtime_remaining
Problem Details: When a cfs_rq is to be throttled, its limbo list should be empty and that's why there is a warn in tg_throttle_down() for non empty cfs_rq->throttled_limbo_list. When running a test with the following hierarchy: root / \ A* ... / | \ ... B / ...
```diff diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f1ebf67b48e2..f754a60de848 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -9606,7 +9606,7 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, guard(rq_lock_irq)(rq); cfs_rq->runtime_enabled = runtime_enabled; - cfs_rq->ru...
82420bd4e17bdaba8453fbf9e10c58c9ed0c9727
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/hdmi: Fix breakage at probing nvhdmi-mcp driver
Problem Details: After restructuring and splitting the HDMI codec driver code, each HDMI codec driver contains the own build_controls and build_pcms ops. A copy-n-paste error put the wrong entries for nvhdmi-mcp driver; both build_controls and build_pcms are swapped. Unfortunately both callbacks have the very same for...
```diff diff --git a/sound/hda/codecs/hdmi/nvhdmi-mcp.c b/sound/hda/codecs/hdmi/nvhdmi-mcp.c index 8fd8d76fa72f..1c5fdfe872f2 100644 --- a/sound/hda/codecs/hdmi/nvhdmi-mcp.c +++ b/sound/hda/codecs/hdmi/nvhdmi-mcp.c @@ -350,8 +350,8 @@ static int nvhdmi_mcp_probe(struct hda_codec *codec, static const struct hda_codec_o...
3ca8b2668ca5a410c23a7a7932cc406ebbb89ab2
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix @alloc_flags description
Problem Details: Stephen Rothwell reports htmldocs warnings when merging drm-misc tree: Documentation/gpu/drm-mm:40: include/drm/ttm/ttm_device.h:225: ERROR: Unknown target name: "ttm_allocation". [docutils] Documentation/gpu/drm-mm:43: drivers/gpu/drm/ttm/ttm_device.c:202: ERROR: Unknown target name: "ttm_allocation"...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index 5c10e5fbf43b..9a51afaf0749 100644 --- a/drivers/gpu/drm/ttm/ttm_device.c +++ b/drivers/gpu/drm/ttm/ttm_device.c @@ -199,7 +199,7 @@ EXPORT_SYMBOL(ttm_device_swapout); * @dev: The core kernel device pointer for DMA mappings ...
ad699fa78b59241c9d71a8cafb51525f3dab04d4
Analyze and fix the following issue in the Linux kernel code: media: iris: Add sanity check for stop streaming
Problem Details: Add sanity check in iris_vb2_stop_streaming. If inst->state is already IRIS_INST_ERROR, we should skip the stream_off operation because it would still send packets to the firmware. In iris_kill_session, inst->state is set to IRIS_INST_ERROR and session_close is executed, which will kfree(inst_hfi_gen2...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c index 139b821f7952..db8768d8a8f6 100644 --- a/drivers/media/platform/qcom/iris/iris_vb2.c +++ b/drivers/media/platform/qcom/iris/iris_vb2.c @@ -231,6 +231,8 @@ void iris_vb2_stop_streaming(struct vb2_queue *q)...
aec75e355c633e4b0967c99580bd8ef93e0cdc98
Analyze and fix the following issue in the Linux kernel code: media: iris: Refine internal buffer reconfiguration logic for resolution change
Problem Details: Improve the condition used to determine when input internal buffers need to be reconfigured during streamon on the capture port. Previously, the check relied on the INPUT_PAUSE sub-state, which was also being set during seek operations. This led to input buffers being queued multiple times to the firmw...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_common.c b/drivers/media/platform/qcom/iris/iris_common.c index 9fc663bdaf3f..7f1c7fe144f7 100644 --- a/drivers/media/platform/qcom/iris/iris_common.c +++ b/drivers/media/platform/qcom/iris/iris_common.c @@ -91,12 +91,14 @@ int iris_process_streamon_input(struc...