id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
478ad02d6844217cc7568619aeb0809d93ade43d
Analyze and fix the following issue in the Linux kernel code: Disable FOP_DONTCACHE for now due to bugs
Problem Details: This is kind of last-minute, but Al Viro reported that the new FOP_DONTCACHE flag causes memory corruption due to use-after-free issues. This was triggered by commit 974c5e6139db ("xfs: flag as supporting FOP_DONTCACHE"), but that is not the underlying bug - it is just the first user of the flag. Vla...
```diff diff --git a/include/linux/fs.h b/include/linux/fs.h index 016b0fe1536e..a4fd649e2c3f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2186,7 +2186,7 @@ struct file_operations { /* Supports asynchronous lock callbacks */ #define FOP_ASYNC_LOCK ((__force fop_flags_t)(1 << 6)) /* File system suppo...
df523db15a06c37cbabad8f477ae87d08c9081f2
Analyze and fix the following issue in the Linux kernel code: rust: dma: add missing Markdown code span
Problem Details: Add missing Markdown code span. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: ad2907b4e308 ("rust: add dma coherent allocator abstraction") Reviewed-by: Benno Lossin <benno.lossin@proton.me> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.ker...
```diff diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs index 8cdc76043ee7..35fd8a638473 100644 --- a/rust/kernel/dma.rs +++ b/rust/kernel/dma.rs @@ -94,7 +94,7 @@ pub mod attrs { pub const DMA_ATTR_ALLOC_SINGLE_PAGES: Attrs = Attrs(bindings::DMA_ATTR_ALLOC_SINGLE_PAGES); /// This tells the DMA-mapping...
f54c750333381bfeaa0e4a69b9563d4e4e21f1b3
Analyze and fix the following issue in the Linux kernel code: rust: task: add missing Markdown code spans and intra-doc links
Problem Details: Add missing Markdown code spans and also convert them into intra-doc links. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: e0020ba6cbcb ("rust: add PidNamespace") Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/2025032421035...
```diff diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs index 9e6f6854948d..9dce3705ff63 100644 --- a/rust/kernel/task.rs +++ b/rust/kernel/task.rs @@ -158,10 +158,10 @@ impl Task { } } - /// Returns a PidNamespace reference for the currently executing task's/thread's pid namespace. + /// R...
1dbaf8b1bafb8557904eb54b98bb323a3061dd2c
Analyze and fix the following issue in the Linux kernel code: rust: pci: fix docs related to missing Markdown code spans
Problem Details: In particular: - Add missing Markdown code spans. - Improve title for `DeviceId`, adding a link to the struct in the C side, rather than referring to `bindings::`. - Convert `TODO` from documentation to a normal comment, and put code in block. This was found using the Clippy `doc_mark...
```diff diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index 3aeb1250c27f..c17a32b76d74 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -118,7 +118,9 @@ macro_rules! module_pci_driver { }; } -/// Abstraction for bindings::pci_device_id. +/// Abstraction for the PCI device ID structure ([`struct pc...
abd21a163d4188c180cabb6747b1d94e3c0586b9
Analyze and fix the following issue in the Linux kernel code: rust: alloc: add missing Markdown code span
Problem Details: Add missing Markdown code span. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test") Reviewed-by: Benno Lossin <benno.lossin@proton.me> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: htt...
```diff diff --git a/rust/kernel/alloc/allocator_test.rs b/rust/kernel/alloc/allocator_test.rs index c37d4c0c64e9..d19c06ef0498 100644 --- a/rust/kernel/alloc/allocator_test.rs +++ b/rust/kernel/alloc/allocator_test.rs @@ -4,7 +4,7 @@ //! of those types (e.g. `CString`) use kernel allocators for instantiation. //! /...
673ec360cfb099a5f44dabee0f0e6c9b282efa7e
Analyze and fix the following issue in the Linux kernel code: rust: alloc: add missing Markdown code spans
Problem Details: Add missing Markdown code spans. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: b6a006e21b82 ("rust: alloc: introduce allocation flags") Reviewed-by: Benno Lossin <benno.lossin@proton.me> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel....
```diff diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs index fc9c9c41cd79..a2c49e5494d3 100644 --- a/rust/kernel/alloc.rs +++ b/rust/kernel/alloc.rs @@ -94,10 +94,10 @@ pub mod flags { /// /// A lower watermark is applied to allow access to "atomic reserves". The current /// implementation does...
9f047636831a61ce0840929555245dd17695206a
Analyze and fix the following issue in the Linux kernel code: rust: platform: fix docs related to missing Markdown code spans
Problem Details: Convert `TODO` from documentation to a normal comment, and put code in block. This was found using the Clippy `doc_markdown` lint, which we may want to enable. Fixes: 683a63befc73 ("rust: platform: add basic platform device / driver abstractions") Reviewed-by: Benno Lossin <benno.lossin@proton.me> Ac...
```diff diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs index fd4a494f30e8..a02ae5b25b74 100644 --- a/rust/kernel/platform.rs +++ b/rust/kernel/platform.rs @@ -151,10 +151,11 @@ macro_rules! module_platform_driver { ///``` pub trait Driver: Send { /// The type holding driver private data about eac...
69157b00b526c31522a00b9908bfd53fa21b47f2
Analyze and fix the following issue in the Linux kernel code: platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m
Problem Details: When CONFIG_HWMON is built as a loadable module, the HSMP drivers cannot be built-in: ERROR: modpost: "hsmp_create_sensor" [drivers/platform/x86/amd/hsmp/amd_hsmp.ko] undefined! ERROR: modpost: "hsmp_create_sensor" [drivers/platform/x86/amd/hsmp/hsmp_acpi.ko] undefined! Enforce that through the usual...
```diff diff --git a/drivers/platform/x86/amd/hsmp/Kconfig b/drivers/platform/x86/amd/hsmp/Kconfig index d6f7a62d55b5..2911120792e8 100644 --- a/drivers/platform/x86/amd/hsmp/Kconfig +++ b/drivers/platform/x86/amd/hsmp/Kconfig @@ -12,6 +12,7 @@ menu "AMD HSMP Driver" config AMD_HSMP_ACPI tristate "AMD HSMP ACPI devi...
7ff5f091409f1c1bca6374bcce54d71e8328d17f
Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-wmi: fix build without CONFIG_SUSPEND
Problem Details: The patch "Refactor Ally suspend/resume" introduced an acpi_s2idle_dev_ops for use with ROG Ally which caused a build error if CONFIG_SUSPEND was not defined. Signed-off-by: Luke Jones <luke@ljones.dev> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505...
```diff diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 7eda56f7713c..f7191fdded14 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -5015,23 +5015,24 @@ static int asus_hotk_restore(struct device *device) return 0; } -static void asus_ally_s...
79ee1d20e37cd553cc961962fca8107e69a0c293
Analyze and fix the following issue in the Linux kernel code: mips: econet: Fix incorrect Kconfig dependencies
Problem Details: config ECONET selects SERIAL_OF_PLATFORM and that depends on SERIAL_8250 so we need to select SERIAL_8250 directly. Also do not enable DEBUG_ZBOOT unless DEBUG_KERNEL is set. Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.or...
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c3dbdc808664..1e48184ecf1e 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -395,9 +395,10 @@ config ECONET bool "EcoNet MIPS family" select BOOT_RAW select CPU_BIG_ENDIAN - select DEBUG_ZBOOT + select DEBUG_ZBOOT if DEBUG_KERNEL select E...
6e7272afc9ab556be01de19b54bea3a1f9a9668f
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix endian issue in trace events
Problem Details: Avoid using __le32 directly in trace events to fix sparse complains: drivers/infiniband/hw/hns/./hns_roce_trace.h:48:1: sparse: sparse: cast to restricted __le32 drivers/infiniband/hw/hns/./hns_roce_trace.h:48:1: sparse: sparse: restricted __le32 degrades to integer drivers/infiniband/hw/hns/./hns_roc...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_trace.h b/drivers/infiniband/hw/hns/hns_roce_trace.h index 23cbdbaeffaa..59ceb591b3a1 100644 --- a/drivers/infiniband/hw/hns/hns_roce_trace.h +++ b/drivers/infiniband/hw/hns/hns_roce_trace.h @@ -52,7 +52,7 @@ DECLARE_EVENT_CLASS(wqe_template, TP_STRUCT__e...
259e9bd07c57b0fd8588f68e9adbe2c41170f4fe
Analyze and fix the following issue in the Linux kernel code: RDMA/core: Avoid hmm_dma_map_alloc() for virtual DMA devices
Problem Details: Drivers such as rxe, which use virtual DMA, must not call into the DMA mapping core since they lack physical DMA capabilities. Otherwise, a NULL pointer dereference is observed as shown below. This patch ensures the RDMA core handles virtual and physical DMA paths appropriately. This fixes the followi...
```diff diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c index 51d518989914..c752ae9fad6c 100644 --- a/drivers/infiniband/core/umem_odp.c +++ b/drivers/infiniband/core/umem_odp.c @@ -60,9 +60,11 @@ static int ib_init_umem_odp(struct ib_umem_odp *umem_odp, { struct ib_device *dev =...
9857af0fcff385c75433f2162c30c62eb912ef6d
Analyze and fix the following issue in the Linux kernel code: binder: fix yet another UAF in binder_devices
Problem Details: Commit e77aff5528a18 ("binderfs: fix use-after-free in binder_devices") addressed a use-after-free where devices could be released without first being removed from the binder_devices list. However, there is a similar path in binder_free_proc() that was missed: =======================================...
```diff diff --git a/drivers/android/binder.c b/drivers/android/binder.c index 682bbe4ad550..c463ca4a8fff 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -5241,6 +5241,7 @@ static void binder_free_proc(struct binder_proc *proc) __func__, proc->outstanding_txns); device = container_of(proc-...
0267cbf297bf7ed9ef5181feceea9fe03c84318e
Analyze and fix the following issue in the Linux kernel code: module: Account for the build time module name mangling
Problem Details: Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle the module name with s/-/_/g. Since this happens late in the build, only the kernel needs to bother with this, the modpost tool still sees the original name. Reported-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Peter ...
```diff diff --git a/kernel/module/main.c b/kernel/module/main.c index e4b6968dc308..81035f6552ec 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -169,6 +169,30 @@ static inline void add_taint_module(struct module *mod, unsigned flag, set_bit(flag, &mod->taints); } +/* + * Like strncmp(), except s/...
ee40c9920ac286c5bfe7c811e66ff899266d2582
Analyze and fix the following issue in the Linux kernel code: mm: fix copy_vma() error handling for hugetlb mappings
Problem Details: If, during a mremap() operation for a hugetlb-backed memory mapping, copy_vma() fails after the source vma has been duplicated and opened (ie. vma_link() fails), the error is handled by closing the new vma. This updates the hugetlbfs reservation counter of the reservation map which at this point is r...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 8f3ac832ee7f..4861a7e304bb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -275,6 +275,7 @@ long hugetlb_change_protection(struct vm_area_struct *vma, bool is_hugetlb_entry_migration(pte_t pte); bool is_hugetlb_entry_hw...
06717a7b6c86514dbd6ab322e8083ffaa4db5712
Analyze and fix the following issue in the Linux kernel code: memcg: always call cond_resched() after fn()
Problem Details: I am seeing soft lockup on certain machine types when a cgroup OOMs. This is happening because killing the process in certain machine might be very slow, which causes the soft lockup and RCU stalls. This happens usually when the cgroup has MANY processes and memory.oom.group is set. Example I am see...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c96c1f2b9cf5..2d4d65f25fec 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1168,7 +1168,6 @@ void mem_cgroup_scan_tasks(struct mem_cgroup *memcg, { struct mem_cgroup *iter; int ret = 0; - int i = 0; BUG_ON(mem_cgroup_is_root(memcg)); @@ -117...
113ed54ad276c352ee5ce109bdcf0df118a43bda
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios
Problem Details: A kernel crash was observed when replacing free hugetlb folios: BUG: kernel NULL pointer dereference, address: 0000000000000028 PGD 0 P4D 0 Oops: Oops: 0000 [#1] SMP NOPTI CPU: 28 UID: 0 PID: 29639 Comm: test_cma.sh Tainted 6.15.0-rc6-zp #41 PREEMPT(voluntary) RIP: 0010:alloc_and_dissolve_hugetlb_foli...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7ae38bfb9096..55e6796b24d0 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2949,12 +2949,20 @@ int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn) while (start_pfn < end_pfn) { folio = pfn_folio(start_pfn); + + /* + * The fol...
70d1eb031a68cbde4eed8099674be21778441c94
Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: only zero-init on vrealloc shrink
Problem Details: The common case is to grow reallocations, and since init_on_alloc will have already zeroed the whole allocation, we only need to zero when shrinking the allocation. Link: https://lkml.kernel.org/r/20250515214217.619685-2-kees@kernel.org Fixes: a0309faf1cb0 ("mm: vmalloc: support more granular vrealloc...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 74bd00fd734d..00cf1b575c89 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -4093,8 +4093,8 @@ void *vrealloc_noprof(const void *p, size_t size, gfp_t flags) * would be a good heuristic for when to shrink the vm_area? */ if (size <= old_size) { - /* Zero ou...
f7a35a3c36d1e36059c5654737d9bee3454f01a3
Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: actually use the in-place vrealloc region
Problem Details: Patch series "mm: vmalloc: Actually use the in-place vrealloc region". This fixes a performance regression[1] with vrealloc()[1]. The refactoring to not build a new vmalloc region only actually worked when shrinking. Actually return the resized area when it grows. Ugh. Link: https://lkml.kernel.o...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 2d7511654831..74bd00fd734d 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -4111,6 +4111,7 @@ void *vrealloc_noprof(const void *p, size_t size, gfp_t flags) if (want_init_on_alloc(flags)) memset((void *)p + old_size, 0, size - old_size); vm->requested_siz...
12ca42c237756182aad8ab04654c952765cb9061
Analyze and fix the following issue in the Linux kernel code: alloc_tag: allocate percpu counters for module tags dynamically
Problem Details: When a module gets unloaded it checks whether any of its tags are still in use and if so, we keep the memory containing module's allocation tags alive until all tags are unused. However percpu counters referenced by the tags are freed by free_module(). This will lead to UAF if the memory allocated by...
```diff diff --git a/include/linux/alloc_tag.h b/include/linux/alloc_tag.h index a946e0203e6d..8f7931eb7d16 100644 --- a/include/linux/alloc_tag.h +++ b/include/linux/alloc_tag.h @@ -104,6 +104,16 @@ DECLARE_PER_CPU(struct alloc_tag_counters, _shared_alloc_tag); #else /* ARCH_NEEDS_WEAK_PER_CPU */ +#ifdef MODULE +...
221fcbf77578826fad8f4bfa0530b5b55bf9676a
Analyze and fix the following issue in the Linux kernel code: module: release codetag section when module load fails
Problem Details: When module load fails after memory for codetag section is ready, codetag section memory will not be properly released. This causes memory leak, and if next module load happens to get the same module address, codetag may pick the uninitialized section when manipulating tags during module unload, and l...
```diff diff --git a/kernel/module/main.c b/kernel/module/main.c index a2859dc3eea6..5c6ab20240a6 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2829,6 +2829,7 @@ static void module_deallocate(struct module *mod, struct load_info *info) { percpu_modfree(mod); module_arch_freeing_init(mod); + code...
07c9214c790e66d49cf12c316f648dcd208c4145
Analyze and fix the following issue in the Linux kernel code: mm/cma: make detection of highmem_start more robust
Problem Details: Pratyush Yadav reports the following crash: ------------[ cut here ]------------ kernel BUG at arch/x86/mm/physaddr.c:23! ception 0x06 IP 10:ffffffff812ebbf8 error 0 cr2 0xffff88903ffff000 CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.15.0-rc6+ #231 PREEMPT(undef) Hardware name:...
```diff diff --git a/mm/cma.c b/mm/cma.c index 15632939f20a..c04be488b099 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -608,7 +608,10 @@ static int __init __cma_declare_contiguous_nid(phys_addr_t *basep, * complain. Find the boundary by adding one to the last valid * address. */ - highmem_start = __pa(high_memory -...
e7d952cc39fca34386ec9f15f68cb2eaac01b5ae
Analyze and fix the following issue in the Linux kernel code: perf/headers: Clean up <linux/perf_event.h> a bit
Problem Details: Do a bit of readability spring cleaning: - Fix misaligned structure member in perf_addr_filter: the new struct perf_addr_filter::action member was too long, but when it was added it was not aligned properly. Align all fields to the customary column 41 alignment of most of the rest of the ...
```diff diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index a96c00e2ceca..52dc7cfab0e0 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -26,18 +26,9 @@ # include <asm/local64.h> #endif -#define PERF_GUEST_ACTIVE 0x01 -#define PERF_GUEST_USER 0x02 - -struct perf_gues...
97e69f12edb19a17589ca0b6f3988b2a28af87c8
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix missing BTREE_UPDATE_internal_snapshot_node
Problem Details: Repair code will do updates on older snapshot versions, so needs the correct annotation. Reported-by: syzbot+42581416dba62b364750@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/namei.c b/fs/bcachefs/namei.c index a84b69d6caef..ff7ba297d3ef 100644 --- a/fs/bcachefs/namei.c +++ b/fs/bcachefs/namei.c @@ -857,7 +857,8 @@ int __bch2_check_dirent_target(struct btree_trans *trans, n->v.d_inum = cpu_to_le64(target->bi_inum); } - ret = bch2_trans_update(trans...
7098ba57c443868cab250a3a5db72c89ffbd9026
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix REFLINK_P_MAY_UPDATE_OPTIONS
Problem Details: If we're doing a reflink copy of existing reflinked data, we may only set REFLINK_P_MAY_UPDATE_OPTIONS if it was set on the reflink pointer we're copying from. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c index 3a13dbcab6ba..41ca86cba2cd 100644 --- a/fs/bcachefs/reflink.c +++ b/fs/bcachefs/reflink.c @@ -711,7 +711,8 @@ s64 bch2_remap_range(struct bch_fs *c, SET_REFLINK_P_IDX(&dst_p->v, offset); if (reflink_p_may_update_opts_field && - may...
5af9f1fa576874b24627d4c05e3a84672204c200
Analyze and fix the following issue in the Linux kernel code: rtc: loongson: Add missing alarm notifications for ACPI RTC events
Problem Details: When an application sets and enables an alarm on Loongson RTC devices, the alarm notification fails to propagate to userspace because the ACPI event handler omits calling rtc_update_irq(). As a result, processes waiting via select() or poll() on RTC device files fail to receive alarm notifications. T...
```diff diff --git a/drivers/rtc/rtc-loongson.c b/drivers/rtc/rtc-loongson.c index 97e5625c064c..2ca7ffd5d7a9 100644 --- a/drivers/rtc/rtc-loongson.c +++ b/drivers/rtc/rtc-loongson.c @@ -129,6 +129,14 @@ static u32 loongson_rtc_handler(void *id) { struct loongson_rtc_priv *priv = (struct loongson_rtc_priv *)id; + ...
3639b35857e2cc5a75de6f2bb10a1cc3f949193f
Analyze and fix the following issue in the Linux kernel code: rtc: stm32: drop unused module alias
Problem Details: The driver only support OF probe so drop the unused platform module alias. Fixes: 4e64350f42e2 ("rtc: add STM32 RTC driver") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250423130318.31244-8-jo...
```diff diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 1b715db47160..ef8fb88aab48 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -1283,7 +1283,6 @@ static struct platform_driver stm32_rtc_driver = { module_platform_driver(stm32_rtc_driver); -MODULE_ALIAS("platform:" DRI...
149834a414e1fc25411a2e0e913ba3127e5758c9
Analyze and fix the following issue in the Linux kernel code: rtc: s3c: drop unused module alias
Problem Details: The driver only support OF probe so drop the unused platform module alias. Fixes: ae05c95074e0 ("rtc: s3c: add s3c_rtc_data structure to use variant data instead of s3c_cpu_type") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Fixes: 0d297df03890 ("ARM: s3c: simplify platform code") Reviewed-by...
```diff diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 58c957eb753d..5dd575865adf 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -609,4 +609,3 @@ module_platform_driver(s3c_rtc_driver); MODULE_DESCRIPTION("Samsung S3C RTC Driver"); MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); M...
d5e85c8bfaa630c5e854ac712b7f7d1f696c9954
Analyze and fix the following issue in the Linux kernel code: rtc: pm8xxx: drop unused module alias
Problem Details: The driver only support OF probe so drop the unused platform module alias. Fixes: 5a418558cdae ("rtc: pm8xxx: add support for devicetree") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250423130...
```diff diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 5da237e7b9b2..e624f848c22b 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -683,7 +683,6 @@ static struct platform_driver pm8xxx_rtc_driver = { module_platform_driver(pm8xxx_rtc_driver); -MODULE_ALIAS("platform:r...
c61f165617b19ad47be98791adb82ec7df9fa96b
Analyze and fix the following issue in the Linux kernel code: rtc: jz4740: drop unused module alias
Problem Details: The driver only support OF probe so drop the unused platform module alias. Fixes: 24e1f2c9383e ("rtc: ingenic: Only support probing from devicetree") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Acked-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20250423130318.3124...
```diff diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 44bba356268c..11fce47be780 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -437,4 +437,3 @@ module_platform_driver(jz4740_rtc_driver); MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); MODULE_LICENSE("GPL"); M...
ac45f6e2473b36932d26fdf325d47c733f947ed8
Analyze and fix the following issue in the Linux kernel code: rtc: da9063: drop unused module alias
Problem Details: The driver only support OF probe so drop the unused platform module alias. Fixes: 80ca3277bc7f ("rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driver") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kern...
```diff diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c index d05b8be98087..557c9b29dcc1 100644 --- a/drivers/rtc/rtc-da9063.c +++ b/drivers/rtc/rtc-da9063.c @@ -495,4 +495,3 @@ module_platform_driver(da9063_rtc_driver); MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>"); MODULE_DESCRIPTION("Re...
5f28ab049fb3179112dc04f1e8e9a475b8655602
Analyze and fix the following issue in the Linux kernel code: rtc: cpcap: drop unused module alias
Problem Details: The driver only supports OF probe so drop the unused platform module alias. Fixes: dd3bf50b35e3 ("rtc: cpcap: new rtc driver") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20250423130318.31244-3-j...
```diff diff --git a/drivers/rtc/rtc-cpcap.c b/drivers/rtc/rtc-cpcap.c index 568a89e79c11..c170345ac076 100644 --- a/drivers/rtc/rtc-cpcap.c +++ b/drivers/rtc/rtc-cpcap.c @@ -320,7 +320,6 @@ static struct platform_driver cpcap_rtc_driver = { module_platform_driver(cpcap_rtc_driver); -MODULE_ALIAS("platform:cpcap-r...
9f05c3943eb621d3f5d6eaced5ac7c2d58f582a8
Analyze and fix the following issue in the Linux kernel code: rtc: at91rm9200: drop unused module alias
Problem Details: The driver only support OF probe so drop the unused platform module alias. Fixes: 288d9cf1764a ("rtc: at91rm9200: use of_device_get_match_data()") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/202...
```diff diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index f6b0102a843a..643734dbae33 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -654,4 +654,3 @@ module_platform_driver_probe(at91_rtc_driver, at91_rtc_probe); MODULE_AUTHOR("Rick Bronson"); MODULE_DESCRI...
ead4532832795f700fd8962cb1f2aad74f3dfca7
Analyze and fix the following issue in the Linux kernel code: rtc: pm8xxx: fix uefi offset lookup
Problem Details: On many Qualcomm platforms the PMIC RTC control and time registers are read-only so that the RTC time can not be updated. Instead an offset needs be stored in some machine-specific non-volatile memory, which a driver can take into account. On platforms where the offset is stored in a Qualcomm specific...
```diff diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 3c1dddcc81df..5da237e7b9b2 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -576,13 +576,20 @@ static int pm8xxx_rtc_probe_offset(struct pm8xxx_rtc *rtc_dd) } /* Use UEFI storage as fallback if available */ - if ...
7917be170928189fefad490d1a1237fdfa6b856f
Analyze and fix the following issue in the Linux kernel code: RISC-V: KVM: lock the correct mp_state during reset
Problem Details: Currently, the kvm_riscv_vcpu_sbi_system_reset() function locks vcpu->arch.mp_state_lock when updating tmp->arch.mp_state.mp_state which is incorrect hence fix it. Fixes: 2121cadec45a ("RISCV: KVM: Introduce mp_state_lock to avoid lock inversion") Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>...
```diff diff --git a/arch/riscv/kvm/vcpu_sbi.c b/arch/riscv/kvm/vcpu_sbi.c index 31fd3cc98d66..6e09b518a5d1 100644 --- a/arch/riscv/kvm/vcpu_sbi.c +++ b/arch/riscv/kvm/vcpu_sbi.c @@ -143,9 +143,9 @@ void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu, struct kvm_vcpu *tmp; kvm_for_each_vcpu(i, tmp, vcpu->k...
60625ff9085247f818eb0eb5f1512377ba511b33
Analyze and fix the following issue in the Linux kernel code: watchdog: Correct kerneldoc warnings
Problem Details: Correct kerneldoc syntax or drop kerneldoc entirely for function comments not being kerneldoc to fix warnings like: pretimeout_noop.c:19: warning: Function parameter or struct member 'wdd' not described in 'pretimeout_noop' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewe...
```diff diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c index 132699e2f247..b636650b714b 100644 --- a/drivers/watchdog/pcwd_usb.c +++ b/drivers/watchdog/pcwd_usb.c @@ -579,7 +579,7 @@ static struct notifier_block usb_pcwd_notifier = { .notifier_call = usb_pcwd_notify_sys, }; -/** +/* * usb...
b6f8a417e17f1929bb8e7e6ba9f4677f1f3ce364
Analyze and fix the following issue in the Linux kernel code: watchdog: stm32: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250406203531.61322-1-krzysztof.kozlowski@linaro.org S...
```diff diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c index 8ad06b54c5ad..b356a272ff9a 100644 --- a/drivers/watchdog/stm32_iwdg.c +++ b/drivers/watchdog/stm32_iwdg.c @@ -291,7 +291,7 @@ static int stm32_iwdg_irq_init(struct platform_device *pdev, return 0; if (of_property_read_bool(n...
f8cdcc98c9833b8527121922b374148cafb8108d
Analyze and fix the following issue in the Linux kernel code: watchdog: cros-ec: Avoid -Wflex-array-member-not-at-end warning
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of a flexible structure where the size of the flexible-array member is known at compile-time, and refactor the rest of the code, accordi...
```diff diff --git a/drivers/watchdog/cros_ec_wdt.c b/drivers/watchdog/cros_ec_wdt.c index 716c23f4388c..9ffe7f505645 100644 --- a/drivers/watchdog/cros_ec_wdt.c +++ b/drivers/watchdog/cros_ec_wdt.c @@ -25,26 +25,22 @@ static int cros_ec_wdt_send_cmd(struct cros_ec_device *cros_ec, union cros_ec_wdt_data *arg) { ...
325f510fcd9cda5a44bcb662b74ba4e3dabaca10
Analyze and fix the following issue in the Linux kernel code: watchdog: da9052_wdt: respect TWDMIN
Problem Details: We have to wait at least the minimium time for the watchdog window (TWDMIN) before writings to the wdt register after the watchdog is activated. Otherwise the chip will assert TWD_ERROR and power down to reset mode. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roec...
```diff diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index 5bef70cb74b3..afb7887c3a1e 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -180,6 +180,7 @@ static int da9052_wdt_probe(struct platform_device *pdev) da9052_wdt = &driver_data->wdt; da9052_wd...
8807f0afacc480ea9b8c143e765868907b5c4c47
Analyze and fix the following issue in the Linux kernel code: watchdog: da9052_wdt: do not disable wdt during probe
Problem Details: If the watchog is started by the bootloader, we do not want the watchdog to be disabled. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-3-a38a560fef0e@gmail.com Signed-off-by: Guenter...
```diff diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index fa9078d4c136..5bef70cb74b3 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -194,11 +194,15 @@ static int da9052_wdt_probe(struct platform_device *pdev) if (da9052->fault_log & DA9052_FAULTLOG_VDD...
ec90349a9433937e2fd83a57e16f40bce1fc1481
Analyze and fix the following issue in the Linux kernel code: watchdog: da9052_wdt: use timeout value from external inputs
Problem Details: Introduce the `timeout` module parameter and pass it to watchdog_init_timeout(). If the parameter is not set or contains an invalid value, fallback on the `timeout-secs` devicetree property value. If none of the above is valid, go for the old default value. Signed-off-by: Marcus Folkesson <marcus.fol...
```diff diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index a8ff1e6a7903..fa9078d4c136 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -36,6 +36,12 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WAT...
776d14d201ae8b266208e0eae6510692bc58d9f2
Analyze and fix the following issue in the Linux kernel code: watchdog: da9052_wdt: add support for nowayout
Problem Details: Add nowayout module parameter for not stopping the watchdog when userspace application quits. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250326-da9052-fixes-v3-1-a38a560fef0e@gmail.com Signed-off-by: Gu...
```diff diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index 77039f2f0be5..a8ff1e6a7903 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -30,6 +30,12 @@ struct da9052_wdt_data { unsigned long jpast; }; +static bool nowayout = WATCHDOG_NOWAYOUT; +module_p...
628e124404b3db5e10e17228e680a2999018ab33
Analyze and fix the following issue in the Linux kernel code: perf tests switch-tracking: Fix timestamp comparison
Problem Details: The test might fail on the Arm64 platform with the error: # perf test -vvv "Track with sched_switch" Missing sched_switch events # The issue is caused by incorrect handling of timestamp comparisons. The comparison result, a signed 64-bit value, was being directly cast to an int, leading to inco...
```diff diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c index 8df3f9d9ffd2..6b3aac283c37 100644 --- a/tools/perf/tests/switch-tracking.c +++ b/tools/perf/tests/switch-tracking.c @@ -264,7 +264,7 @@ static int compar(const void *a, const void *b) const struct event_node *nodeb = b;...
f8bb3ed3197966fb60bedcbdc126d2bd5bc0a77f
Analyze and fix the following issue in the Linux kernel code: drm/nouveau/tegra: Fix error pointer vs NULL return in nvkm_device_tegra_resource_addr()
Problem Details: The nvkm_device_tegra_resource() function returns a mix of error pointers and NULL. The callers only expect it to return NULL on error. Change it to only return NULL. Fixes: 76b8f81a5b92 ("drm/nouveau: improve handling of 64-bit BARs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed...
```diff diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 0ca2dfe99676..114e50ca1827 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -196,7 +196,7 @@ nvkm_device_tegra_res...
3f2f028814abf68ce4d74bfd2627cb84d2afa389
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix btree_iter_next_node() for new locking asserts
Problem Details: We can't unlock a should_be_locked path unless we're in a transaction restart. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 97f3faac8067..b4bf4217a3fa 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -1991,12 +1991,12 @@ struct btree *bch2_btree_iter_next_node(struct btree_trans *trans, struct btree_ bch2_btree_path_downgrade(trans, path)...
9b133c0d74b17db2dc0d2d70b6591b0ebb604463
Analyze and fix the following issue in the Linux kernel code: bcachefs: Small check_fix_ptr fixes
Problem Details: We don't want to change the bucket gen, on gen mismatch: it's possible to have multiple btree nodes with different gens in the same bucket that we want to keep, if we have to recover from btree node scan. It's also not necessary to set g->gen_valid; add a comment to that effect. Signed-off-by: Kent O...
```diff diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 8bb6384190c5..09eb5a543ae4 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -156,10 +156,14 @@ static int bch2_check_fix_ptr(struct btree_trans *trans, g->gen_valid = true; g->gen = p.ptr.gen; } else { + /* this po...
cade003209cfe728de2ef880d5704cc322a7ce1f
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix opts.recovery_pass_last
Problem Details: This was lost in the giant recovery pass rework - but it's used heavily by bcachefs subcommand utilities. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/recovery_passes.c b/fs/bcachefs/recovery_passes.c index f74f14227137..dabb29b08ad0 100644 --- a/fs/bcachefs/recovery_passes.c +++ b/fs/bcachefs/recovery_passes.c @@ -525,6 +525,9 @@ int bch2_run_recovery_passes(struct bch_fs *c, enum bch_recovery_pass from) c->opts.recovery_passes | ...
f351d91edd507391518a4f5870185fa5bf38446b
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix allocate -> self healing path
Problem Details: When we go to allocate and find taht a bucket in the freespace btree is actually allocated, we're supposed to return nonzero to tell the allocator to skip it. This fixes an emergency read only due to a bucket/ptr gen mismatch - we also don't return the correct bucket gen when this happens. Signed-off...
```diff diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index a38b9c6c891e..173e81c2bbcb 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -1475,6 +1475,8 @@ delete: w->c = c; w->pos = BBPOS(iter->btree_id, iter->pos); queue_work(c->write_ref_wq, &...
016c4b48b86d18b14f8a45beabefc5ccf7caf594
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix endianness in casefold check/repair
Problem Details: Fixes: 010c89468134 ("bcachefs: Check for casefolded dirents in non casefolded dirs") Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index dbfa3e0b8abb..49f46df8340e 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -2204,11 +2204,11 @@ static int check_dirent(struct btree_trans *trans, struct btree_iter *iter, buf.buf))) { struct qstr name = bch2_dirent_get_name(d); u...
4673dec88da803fa23f1af9e04761683a30dd6aa
Analyze and fix the following issue in the Linux kernel code: drm/panel: nt37801: Fix IS_ERR() vs NULL check in probe()
Problem Details: The devm_drm_panel_alloc() function returns error pointers, it doesn't return NULL. Update the check to match. Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37801 panel driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> ...
```diff diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37801.c b/drivers/gpu/drm/panel/panel-novatek-nt37801.c index 84d367eab058..d6a37d7e0cc6 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt37801.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt37801.c @@ -257,8 +257,8 @@ static int novatek_nt37801_probe(struct m...
022546cdbf26ec6f42af7e2706702d5703df42f6
Analyze and fix the following issue in the Linux kernel code: drm/panel: nt37801: select CONFIG_DRM_DISPLAY_DSC_HELPER
Problem Details: The newly added driver uses the DSC helper module, but does not select its Kconfig symbol, so configurations are possible that cause a link failure: ERROR: modpost: "drm_dsc_pps_payload_pack" [drivers/gpu/drm/panel/panel-novatek-nt37801.ko] undefined! Fixes: 4fca6849864d ("drm/panel: Add Novatek NT37...
```diff diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 721581d425b4..cfebb08e8a62 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -522,6 +522,8 @@ config DRM_PANEL_NOVATEK_NT37801 depends on OF depends on DRM_MIPI_DSI depends on BACKLIGHT_CLASS_D...
079e5c56a5c41d285068939ff7b0041ab10386fa
Analyze and fix the following issue in the Linux kernel code: bpf: Fix error return value in bpf_copy_from_user_dynptr
Problem Details: On error, copy_from_user returns number of bytes not copied to destination, but current implementation of copy_user_data_sleepable does not handle that correctly and returns it as error value, which may confuse user, expecting meaningful negative error value. Fixes: a498ee7576de ("bpf: Implement dynpt...
```diff diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 289ff0caa83e..132c8be6f635 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -3555,8 +3555,12 @@ static __always_inline int copy_user_data_sleepable(void *dst, const void *unsaf { int ret; - if (!tsk) /* Read from ...
0b5ccb0de1e2cf83f18f012f0e6ba4365be9dd4b
Analyze and fix the following issue in the Linux kernel code: cxl/edac: Support for finding memory operation attributes from the current boot
Problem Details: Certain operations on memory, such as memory repair, are permitted only when the address and other attributes for the operation are from the current boot. This is determined by checking whether the memory attributes for the operation match those in the CXL gen_media or CXL DRAM memory event records rep...
```diff diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig index 51987f2a2548..48b7314afdb8 100644 --- a/drivers/cxl/Kconfig +++ b/drivers/cxl/Kconfig @@ -164,6 +164,27 @@ config CXL_EDAC_ECS of a memory ECS feature established by the platform/device. Otherwise say 'n'. +config CXL_EDAC_MEM_REPAIR + bool ...
0c6e6f1357cbdc158d555346a728aa4aeb0d7011
Analyze and fix the following issue in the Linux kernel code: cxl/edac: Add CXL memory device patrol scrub control feature
Problem Details: CXL spec 3.2 section 8.2.10.9.11.1 describes the device patrol scrub control feature. The device patrol scrub proactively locates and makes corrections to errors in regular cycle. Allow specifying the number of hours within which the patrol scrub must be completed, subject to minimum and maximum limit...
```diff diff --git a/drivers/cxl/Kconfig b/drivers/cxl/Kconfig index cf1ba673b8c2..af72416edcd4 100644 --- a/drivers/cxl/Kconfig +++ b/drivers/cxl/Kconfig @@ -114,6 +114,39 @@ config CXL_FEATURES If unsure say 'n' +config CXL_EDAC_MEM_FEATURES + bool "CXL: EDAC Memory Features" + depends on EXPERT + depends on ...
8b926f237743f020518162c62b93cb7107a2b5eb
Analyze and fix the following issue in the Linux kernel code: PCI/pwrctrl: Cancel outstanding rescan work when unregistering
Problem Details: It's possible to trigger use-after-free here by: (a) forcing rescan_work_func() to take a long time and (b) utilizing a pwrctrl driver that may be unloaded for some reason Cancel outstanding work to ensure it is finished before we allow our data structures to be cleaned up. [bhelgaas: tidy commi...
```diff diff --git a/drivers/pci/pwrctrl/core.c b/drivers/pci/pwrctrl/core.c index 9cc7e2b7f2b5..6bdbfed584d6 100644 --- a/drivers/pci/pwrctrl/core.c +++ b/drivers/pci/pwrctrl/core.c @@ -101,6 +101,8 @@ EXPORT_SYMBOL_GPL(pci_pwrctrl_device_set_ready); */ void pci_pwrctrl_device_unset_ready(struct pci_pwrctrl *pwrctr...
059717c2ba1f745f35f4bbb8991e408c12031f1e
Analyze and fix the following issue in the Linux kernel code: ACPI: MRRM: Fix default max memory region
Problem Details: Per the spec, the default max memory region must be 1 covering all system memory. When platform does not provide ACPI MRRM table or when CONFIG_ACPI is opted out, the acpi_mrrm_max_mem_region() function defaults to returning 1 region complying to RDT spec. Signed-off-by: Anil S Keshavamurthy <anil.s...
```diff diff --git a/drivers/acpi/acpi_mrrm.c b/drivers/acpi/acpi_mrrm.c index 2f22f013959a..26c1a4e6b6ec 100644 --- a/drivers/acpi/acpi_mrrm.c +++ b/drivers/acpi/acpi_mrrm.c @@ -14,7 +14,8 @@ #include <linux/string.h> #include <linux/sysfs.h> -static int max_mem_region = -ENOENT; +/* Default assume one memory regi...
96959283a58d91ae20d025546f00e16f0a555208
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Always select CONFIG_SYSFB for Hyper-V guests
Problem Details: The Hyper-V host provides guest VMs with a range of MMIO addresses that guest VMBus drivers can use. The VMBus driver in Linux manages that MMIO space, and allocates portions to drivers upon request. As part of managing that MMIO space in a Generation 2 VM, the VMBus driver must reserve the portion of ...
```diff diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index eefa0b559b73..1cd188b73b74 100644 --- a/drivers/hv/Kconfig +++ b/drivers/hv/Kconfig @@ -9,6 +9,7 @@ config HYPERV select PARAVIRT select X86_HV_CALLBACK_VECTOR if X86 select OF_EARLY_FLATTREE if OF + select SYSFB if !HYPERV_VTL_MODE help Sel...
dd1af0c4c56d7c60eaf7f30f9d816ed1befbd7d7
Analyze and fix the following issue in the Linux kernel code: PCI: hv: Remove unnecessary flex array in struct pci_packet
Problem Details: struct pci_packet contains a "message" field that is a flex array of struct pci_message. struct pci_packet is usually followed by a second struct in a containing struct that is defined locally in individual functions in pci-hyperv.c. As such, the compiler flag -Wflex-array-member-not-at-end (introduced...
```diff diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 682f1ca2d684..b4f29ee75848 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -310,8 +310,6 @@ struct pci_packet { void (*completion_func)(void *context, struct pci_response ...
0315fef2aff9f251ddef8a4b53db9187429c3553
Analyze and fix the following issue in the Linux kernel code: uio_hv_generic: Align ring size to system page
Problem Details: Following the ring header, the ring data should align to system page boundary. Adjust the size if necessary. Cc: stable@vger.kernel.org Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus") Signed-off-by: Long Li <longli@microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook...
```diff diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index cc3a350dbbd5..aac67a4413ce 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -243,6 +243,9 @@ hv_uio_probe(struct hv_device *dev, if (!ring_size) ring_size = SZ_2M; + /* Adjust ring size if necess...
c951ab8fd3589cf6991ed4111d2130816f2e3ac2
Analyze and fix the following issue in the Linux kernel code: uio_hv_generic: Use correct size for interrupt and monitor pages
Problem Details: Interrupt and monitor pages should be in Hyper-V page size (4k bytes). This can be different from the system page size. This size is read and used by the user-mode program to determine the mapped data region. An example of such user-mode program is the VMBus driver in DPDK. Cc: stable@vger.kernel.org...
```diff diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c index 69c1df0f4ca5..cc3a350dbbd5 100644 --- a/drivers/uio/uio_hv_generic.c +++ b/drivers/uio/uio_hv_generic.c @@ -274,13 +274,13 @@ hv_uio_probe(struct hv_device *dev, pdata->info.mem[INT_PAGE_MAP].name = "int_page"; pdata->info.mem[IN...
09eea7ad0b8e973dcf5ed49902838e5d68177f8e
Analyze and fix the following issue in the Linux kernel code: Drivers: hv: Allocate interrupt and monitor pages aligned to system page boundary
Problem Details: There are use cases that interrupt and monitor pages are mapped to user-mode through UIO, so they need to be system page aligned. Some Hyper-V allocation APIs introduced earlier broke those requirements. Fix this by using page allocation functions directly for interrupt and monitor pages. Cc: stable@...
```diff diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 8351360bba16..be490c598785 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -206,11 +206,20 @@ int vmbus_connect(void) INIT_LIST_HEAD(&vmbus_connection.chn_list); mutex_init(&vmbus_connection.channel_mutex); + /* + ...
86c48271e0d60c82665e9fd61277002391efcef7
Analyze and fix the following issue in the Linux kernel code: x86/hyperv: Fix APIC ID and VP index confusion in hv_snp_boot_ap()
Problem Details: To start an application processor in SNP-isolated guest, a hypercall is used that takes a virtual processor index. The hv_snp_boot_ap() function uses that START_VP hypercall but passes as VP index to it what it receives as a wakeup_secondary_cpu_64 callback: the APIC ID. As those two aren't generally ...
```diff diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index 3b569291dfed..9a8fc144e195 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -672,3 +672,36 @@ bool hv_is_hyperv_initialized(void) return hypercall_msr.enable; } EXPORT_SYMBOL_GPL(hv_is_hyperv_initialized); + +i...
23aa0c355921a39111f1646ef6592da20af9394c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: microsoft,vmbus: Add interrupt and DMA coherence properties
Problem Details: To boot in the VTL mode, VMBus on arm64 needs interrupt description which the binding documentation lacks. The transactions on the bus are DMA coherent which is not mentioned as well. Add the interrupt property and the DMA coherence property to the VMBus binding. Update the example to match that. Fix ...
```diff diff --git a/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml b/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml index a8d40c766dcd..0bea4f5287ce 100644 --- a/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml +++ b/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml @@ -10,8 ...
a9c0b33ef2306327dd2db02c6274107065ff9307
Analyze and fix the following issue in the Linux kernel code: tools: hv: Enable debug logs for hv_kvp_daemon
Problem Details: Allow the KVP daemon to log the KVP updates triggered in the VM with a new debug flag(-d). When the daemon is started with this flag, it logs updates and debug information in syslog with loglevel LOG_DEBUG. This information comes in handy for debugging issues where the key-value pairs for certain pools...
```diff diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index b9ce3aab15fe..1f64c680be13 100644 --- a/tools/hv/hv_kvp_daemon.c +++ b/tools/hv/hv_kvp_daemon.c @@ -84,6 +84,7 @@ enum { }; static int in_hand_shake; +static int debug; static char *os_name = ""; static char *os_major = ""; @@ -184,6...
ecc1ca9185c377822c66cbf61ecfed914455d884
Analyze and fix the following issue in the Linux kernel code: tpm_crb: ffa_tpm: fix/update comments describing the CRB over FFA ABI
Problem Details: -Fix the comment describing the 'start' function, which was a cut/paste mistake for a different function. -The comment for DIRECT_REQ and DIRECT_RESP only mentioned AArch32 and listed 32-bit function IDs. Update to include 64-bit. Signed-off-by: Stuart Yoder <stuart.yoder@arm.com> Reviewed-by: Jar...
```diff diff --git a/drivers/char/tpm/tpm_crb_ffa.c b/drivers/char/tpm/tpm_crb_ffa.c index 66b38b2cbdd5..4ead61f01299 100644 --- a/drivers/char/tpm/tpm_crb_ffa.c +++ b/drivers/char/tpm/tpm_crb_ffa.c @@ -38,9 +38,11 @@ * messages. * * All requests with FFA_MSG_SEND_DIRECT_REQ and FFA_MSG_SEND_DIRECT_RESP - * are u...
a0b62cc310239c7f1323fb20bd3789f21bdd8615
Analyze and fix the following issue in the Linux kernel code: PCI/DPC: Log Error Source ID only when valid
Problem Details: DPC Error Source ID is only valid when the DPC Trigger Reason indicates that DPC was triggered due to reception of an ERR_NONFATAL or ERR_FATAL Message (PCIe r6.0, sec 7.9.14.5). When DPC was triggered by ERR_NONFATAL (PCI_EXP_DPC_STATUS_TRIGGER_RSN_NFE) or ERR_FATAL (PCI_EXP_DPC_STATUS_TRIGGER_RSN_FE...
```diff diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c index 3daaf61c79c9..9d85f1b3b761 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -261,37 +261,45 @@ void dpc_process_error(struct pci_dev *pdev) struct aer_err_info info = {}; pci_read_config_word(pdev, cap + PCI_EXP_DPC_STAT...
a424b598e6a6c1e69a2bb801d6fd16e805ab2c38
Analyze and fix the following issue in the Linux kernel code: PCI/DPC: Initialize aer_err_info before using it
Problem Details: Previously the struct aer_err_info "info" was allocated on the stack without being initialized, so it contained junk except for the fields we explicitly set later. Initialize "info" at declaration so it starts as all zeros. Fixes: 8aefa9b0d910 ("PCI/DPC: Print AER status in DPC event handling") Signe...
```diff diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c index df42f15c9829..3daaf61c79c9 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -258,7 +258,7 @@ static int dpc_get_aer_uncorrect_severity(struct pci_dev *dev, void dpc_process_error(struct pci_dev *pdev) { u16 cap = pdev->dpc...
01daf71a4f57062055f68f8163ed1ad88fb47990
Analyze and fix the following issue in the Linux kernel code: thermal: qcom: ipq5018: make ops_ipq5018 struct static
Problem Details: Fix a sparse warning by making the ops_ipq5018 struct static. Fixes: 04b31cc53fe0 ("thermal/drivers/qcom/tsens: Add support for IPQ5018 tsens") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505202356.S21Sc7bk-lkp@intel.com/ Signed-off-by: George Moussa...
```diff diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c index 27360e70d62a..faa5d00788ca 100644 --- a/drivers/thermal/qcom/tsens-v1.c +++ b/drivers/thermal/qcom/tsens-v1.c @@ -243,7 +243,7 @@ struct tsens_plat_data data_8976 = { .fields = tsens_v1_regfields, }; -const struct tsens_o...
320302baed05c6456164652541f23d2a96522c06
Analyze and fix the following issue in the Linux kernel code: iommu/vt-d: Restore context entry setup order for aliased devices
Problem Details: Commit 2031c469f816 ("iommu/vt-d: Add support for static identity domain") changed the context entry setup during domain attachment from a set-and-check policy to a clear-and-reset approach. This inadvertently introduced a regression affecting PCI aliased devices behind PCIe-to-PCI bridges. Specifical...
```diff diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index bb871674d8ac..226e174577ff 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -1808,6 +1808,7 @@ static int dmar_domain_attach_device(struct dmar_domain *domain, return ret; info->domain = domain; + in...
18e899017500f1992d3816e326972c8954fbff2a
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/airoha: Fix spelling mistake "calibrarion" -> "calibration"
Problem Details: There is a spelling mistake in a dev_info message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250522083157.1957240-1-colin.i.king@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
```diff diff --git a/drivers/thermal/airoha_thermal.c b/drivers/thermal/airoha_thermal.c index 9a7a702a17de..b9fd6bfc88e5 100644 --- a/drivers/thermal/airoha_thermal.c +++ b/drivers/thermal/airoha_thermal.c @@ -352,7 +352,7 @@ static void airoha_thermal_setup_adc_val(struct device *dev, priv->default_offset = airoha...
528b541b71cf03e263272b051b70696f92258e9d
Analyze and fix the following issue in the Linux kernel code: mtd: nand: brcmnand: fix NAND timeout when accessing eMMC
Problem Details: When booting a board to NAND and accessing NAND while eMMC transactions are occurring the NAND will sometimes timeout. This is due to both NAND and eMMC controller sharing the same data bus on BCMBCA chips. Fix is to extend NAND timeout to allow eMMC transactions time to complete. Signed-off-by: David...
```diff diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 299dd2bca5b4..b43281b8204f 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -101,7 +101,7 @@ struct brcm_nand_dma_desc { #define BRCMNAND_MIN_DEVSIZE (4U...
dd133162c9cff5951a692fab9811fadf46a46457
Analyze and fix the following issue in the Linux kernel code: ACPI: platform_profile: Avoid initializing on non-ACPI platforms
Problem Details: The platform profile driver is loaded even on platforms that do not have ACPI enabled. The initialization of the sysfs entries was recently moved from platform_profile_register() to the module init call, and those entries need acpi_kobj to be initialized which is not the case when ACPI is disabled. Th...
```diff diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c index ffbfd32f4cf1..b43f4459a4f6 100644 --- a/drivers/acpi/platform_profile.c +++ b/drivers/acpi/platform_profile.c @@ -688,6 +688,9 @@ static int __init platform_profile_init(void) { int err; + if (acpi_disabled) + return -EOP...
fe6446215bfad11cf3b446f38b28dc7708973c25
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: Fix OOB memory read access in KUnit test
Problem Details: KASAN reported out of bounds access - cs_dsp_mock_bin_add_name_or_info(), because the source string length was rounded up to the allocation size. Cc: Simon Trimmer <simont@opensource.cirrus.com> Cc: Charles Keepax <ckeepax@opensource.cirrus.com> Cc: Richard Fitzgerald <rf@opensource.cirrus.com> Cc: pa...
```diff diff --git a/drivers/firmware/cirrus/test/cs_dsp_mock_bin.c b/drivers/firmware/cirrus/test/cs_dsp_mock_bin.c index 80e67474ddb8..3f8777ee4dc0 100644 --- a/drivers/firmware/cirrus/test/cs_dsp_mock_bin.c +++ b/drivers/firmware/cirrus/test/cs_dsp_mock_bin.c @@ -96,10 +96,11 @@ static void cs_dsp_mock_bin_add_name_...
882826f58b2c48cafc7084a799207e76f2c74fe0
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: qcom: fix USB_XHCI dependency
Problem Details: SND_USB_AUDIO_QMI depends on USB_XHCI_SIDEBAND, but that is a bool symbol and allows it to be built-in even when XHCI itself is in a loadable module. That configuration causes a link failure: arm-linux-gnueabi-ld: sound/usb/qcom/qc_audio_offload.o: in function `uaudio_event_ring_cleanup_free': qc_audi...
```diff diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig index 6daa551738da..41c47301bc19 100644 --- a/sound/usb/Kconfig +++ b/sound/usb/Kconfig @@ -178,7 +178,8 @@ config SND_BCD2000 config SND_USB_AUDIO_QMI tristate "Qualcomm Audio Offload driver" - depends on QCOM_QMI_HELPERS && SND_USB_AUDIO && USB_XHCI_SIDE...
e2d8ae899760ff71168d08047962caae07ab36a1
Analyze and fix the following issue in the Linux kernel code: ASoC: qdsp6: fix compile-testing without CONFIG_OF
Problem Details: The driver builds cleanly only when CONFIG_OF is enabled, otherwise the compiler notices an unused symbol: sound/soc/qcom/qdsp6/q6usb.c:401:34: error: 'q6usb_dai_device_id' defined but not used [-Werror=unused-const-variable=] The driver does not support legacy board files, so the of_match_ptr() anno...
```diff diff --git a/sound/soc/qcom/qdsp6/q6usb.c b/sound/soc/qcom/qdsp6/q6usb.c index adba0446f301..ebe0c2425927 100644 --- a/sound/soc/qcom/qdsp6/q6usb.c +++ b/sound/soc/qcom/qdsp6/q6usb.c @@ -407,7 +407,7 @@ MODULE_DEVICE_TABLE(of, q6usb_dai_device_id); static struct platform_driver q6usb_dai_platform_driver = { ...
662a9ece32add94469138ae66999ee16cb37a531
Analyze and fix the following issue in the Linux kernel code: usb: misc: onboard_usb_dev: fix build warning for CONFIG_USB_ONBOARD_DEV_USB5744=n
Problem Details: When the USB5744 option is disabled, the onboard_usb driver warns about unused functions: drivers/usb/misc/onboard_usb_dev.c:358:12: error: 'onboard_dev_5744_i2c_write_byte' defined but not used [-Werror=unused-function] 358 | static int onboard_dev_5744_i2c_write_byte(struct i2c_client *client, u16...
```diff diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index 1048e3912068..5b481876af1b 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -310,6 +310,7 @@ static void onboard_dev_attach_usb_driver(struct work_struct *work) pr_err("Failed...
2b3c61b87519ff5d52fd9d6eb2632975f4e18b04
Analyze and fix the following issue in the Linux kernel code: statmount: update STATMOUNT_SUPPORTED macro
Problem Details: According to commit 8f6116b5b77b ("statmount: add a new supported_mask field"), STATMOUNT_SUPPORTED macro shall be updated whenever a new flag is added. Fixes: 7a54947e727b ("Merge patch series "fs: allow changing idmappings"") Signed-off-by: "Dmitry V. Levin" <ldv@strace.io> Link: https://lore.kernel...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 924298d11df7..28e193324ba4 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -5797,7 +5797,9 @@ static int grab_requested_root(struct mnt_namespace *ns, struct path *root) STATMOUNT_SB_SOURCE | \ STATMOUNT_OPT_ARRAY | \ STATMOUNT_OP...
66782b2acbc3291faba7e14d9b22b77a4f3f94e4
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix btree_path_get_locks when not doing trans restart
Problem Details: btree_path_get_locks, on failure, shouldn't unlock if we're not issuing a transaction restart: we might drop locks we're not supposed to (if path->should_be_locked is set). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index b366407878d0..831275f8e79f 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -1799,7 +1799,7 @@ btree_path_idx_t bch2_path_get(struct btree_trans *trans, locks_want = min(locks_want, BTREE_MAX_DEPTH); if (locks_wa...
659489f37bd0471d5a77abdfe86eb105ad11297e
Analyze and fix the following issue in the Linux kernel code: bcachefs: Kill bch2_path_put_nokeep()
Problem Details: bch2_path_put_nokeep() was intended for paths we wouldn't need to preserve for a transaction restart - it always frees them right away when the ref hits 0. But since paths are shared, freeing unconditionally is a bug, the path might have been used elsewhere and have should_be_locked set, i.e. we need ...
```diff diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c index 0f0b80c8c29a..b366407878d0 100644 --- a/fs/bcachefs/btree_iter.c +++ b/fs/bcachefs/btree_iter.c @@ -1431,15 +1431,6 @@ void bch2_path_put(struct btree_trans *trans, btree_path_idx_t path_idx, bool in __bch2_path_free(trans, path_idx); } ...
6d07a289504a246aa97cdac0fec61a15834801b7
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: Support wildcard netdev hook specs
Problem Details: User space may pass non-nul-terminated NFTA_DEVICE_NAME attribute values to indicate a suffix wildcard. Expect for multiple devices to match the given prefix in nft_netdev_hook_alloc() and populate 'ops_list' with them all. When checking for duplicate hooks, compare the shortest prefix so a device may ...
```diff diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index fabc82c98871..a7240736f98e 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -2330,24 +2330,22 @@ static struct nft_hook *nft_netdev_hook_alloc(struct net *net, * indirectly serializing all the ot...
7e5c6aa67e6f6133c5a2c53852e1dd9af2c0c3fc
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: add packets conntrack state to debug trace info
Problem Details: Add the minimal relevant info needed for userspace ("nftables monitor trace") to provide the conntrack view of the packet: - state (new, related, established) - direction (original, reply) - status (e.g., if connection is subject to dnat) - id (allows to query ctnetlink for remaining conntrack state i...
```diff diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 7d6bc19a0153..2beb30be2c5f 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h @@ -1841,6 +1841,10 @@ enum nft_xfrm_keys { * @NFTA_TRACE_MARK: nfmark (NLA_U32...
22a9613de4c29d7d0770bfb8a5a9d73eb8df7dad
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_tunnel: fix geneve_opt dump
Problem Details: When dumping a nft_tunnel with more than one geneve_opt configured the netlink attribute hierarchy should be as follow: NFTA_TUNNEL_KEY_OPTS | |--NFTA_TUNNEL_KEY_OPTS_GENEVE | | | |--NFTA_TUNNEL_KEY_GENEVE_CLASS | |--NFTA_TUNNEL_KEY_GENEVE_TYPE | |--NFTA_TUNNEL_KEY_GENEVE_DATA | |--NFTA_T...
```diff diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c index 0c63d1367cf7..a12486ae089d 100644 --- a/net/netfilter/nft_tunnel.c +++ b/net/netfilter/nft_tunnel.c @@ -621,10 +621,10 @@ static int nft_tunnel_opts_dump(struct sk_buff *skb, struct geneve_opt *opt; int offset = 0; - inner = nla...
9a119669fb1924cd9658c16da39a5a585e129e50
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: nft_fib: consistent l3mdev handling
Problem Details: fib has two modes: 1. Obtain output device according to source or destination address 2. Obtain the type of the address, e.g. local, unicast, multicast. 'fib daddr type' should return 'local' if the address is configured in this netns or unicast otherwise. 'fib daddr . iif type' should return 'local'...
```diff diff --git a/include/net/netfilter/nft_fib.h b/include/net/netfilter/nft_fib.h index 6e202ed5e63f..7370fba844ef 100644 --- a/include/net/netfilter/nft_fib.h +++ b/include/net/netfilter/nft_fib.h @@ -2,6 +2,7 @@ #ifndef _NFT_FIB_H_ #define _NFT_FIB_H_ +#include <net/l3mdev.h> #include <net/netfilter/nf_tabl...
61fc01f8f7f8e299b9fed5a5e5e068ef0e40593d
Analyze and fix the following issue in the Linux kernel code: crypto: qat - add missing header inclusion
Problem Details: Without this header, the build of the new qat_6xxx driver fails when CONFIG_PCI_IOV is not set: In file included from drivers/crypto/intel/qat/qat_common/adf_gen6_shared.c:7: drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.h: In function 'adf_gen4_init_pf_pfvf_ops': drivers/crypto/intel/...
```diff diff --git a/drivers/crypto/intel/qat/qat_common/adf_gen2_pfvf.h b/drivers/crypto/intel/qat/qat_common/adf_gen2_pfvf.h index a716545a764c..34a63cf40db2 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_gen2_pfvf.h +++ b/drivers/crypto/intel/qat/qat_common/adf_gen2_pfvf.h @@ -5,6 +5,7 @@ #include <linux/ty...
0a3cf32da469ff1df6e016f5f82b439a63d14461
Analyze and fix the following issue in the Linux kernel code: crypto: api - Redo lookup on EEXIST
Problem Details: When two crypto algorithm lookups occur at the same time with different names for the same algorithm, e.g., ctr(aes-generic) and ctr(aes), they will both be instantiated. However, only one of them can be registered. The second instantiation will fail with EEXIST. Avoid failing the second lookup by m...
```diff diff --git a/crypto/api.c b/crypto/api.c index 133d9b626922..5724d62e9d07 100644 --- a/crypto/api.c +++ b/crypto/api.c @@ -219,10 +219,19 @@ again: if (crypto_is_test_larval(larval)) crypto_larval_kill(larval); alg = ERR_PTR(-ETIMEDOUT); - } else if (!alg) { + } else if (!alg || PTR_ERR(alg) == -EEXIS...
e60acc420368e3fcb8c158207d37a502c4eee9e2
Analyze and fix the following issue in the Linux kernel code: usb: typec: tipd: fix typo in TPS_STATUS_HIGH_VOLAGE_WARNING macro
Problem Details: "VOLAGE" should become "VOLTAGE" Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com> Reviewed-by: Brigham Campbell <me@brighamcampbell.com> Link: https://lore.kernel.org/r/20250521214851.386796-1-jihed.chaibi.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/usb/typec/tipd/tps6598x.h b/drivers/usb/typec/tipd/tps6598x.h index 9b23e9017452..cecb8d11d239 100644 --- a/drivers/usb/typec/tipd/tps6598x.h +++ b/drivers/usb/typec/tipd/tps6598x.h @@ -27,7 +27,7 @@ #define TPS_STATUS_OVERCURRENT BIT(16) #define TPS_STATUS_GOTO_MIN_ACTIVE BIT(26) #defi...
ae4432e01dd967a64f6670a152d91d5328032726
Analyze and fix the following issue in the Linux kernel code: USB: typec: fix const issue in typec_match()
Problem Details: typec_match() takes a const pointer, and then decides to cast it away into a non-const one, which is not a good thing to do overall. Fix this up by properly setting the pointers to be const to preserve that attribute. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.k...
```diff diff --git a/drivers/usb/typec/bus.c b/drivers/usb/typec/bus.c index ae90688d23e4..a884cec9ab7e 100644 --- a/drivers/usb/typec/bus.c +++ b/drivers/usb/typec/bus.c @@ -449,7 +449,7 @@ ATTRIBUTE_GROUPS(typec); static int typec_match(struct device *dev, const struct device_driver *driver) { - struct typec_altm...
5f5cc794fac605afd3bef8065e33096aeacf6257
Analyze and fix the following issue in the Linux kernel code: USB: gadget: udc: fix const issue in gadget_match_driver()
Problem Details: gadget_match_driver() takes a const pointer, and then decides to cast it away into a non-const one, which is not a good thing to do overall. Fix this up by properly setting the pointers to be const to preserve that attribute. Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type...
```diff diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 4b3d5075621a..d709e24c1fd4 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -1570,7 +1570,7 @@ static int gadget_match_driver(struct device *dev, const struct device_driver *d { struct usb_gadget...
d1d89e8eee6f0e91cfad2a0375ad679fd5c1ae83
Analyze and fix the following issue in the Linux kernel code: USB: gadget: fix up const issue with struct usb_function_instance
Problem Details: In struct usb_function, the struct usb_function_instance pointer variable "fi" is listed as const, but it is written to in numerous places, making the const marking of it a total lie. Fix this up by just removing the const pointer attribute as this is modified in numerous places. Link: https://lore.k...
```diff diff --git a/drivers/usb/gadget/function/f_mass_storage.h b/drivers/usb/gadget/function/f_mass_storage.h index 3b8c4ce2a40a..82ecd3fedb3a 100644 --- a/drivers/usb/gadget/function/f_mass_storage.h +++ b/drivers/usb/gadget/function/f_mass_storage.h @@ -110,7 +110,7 @@ struct fsg_config { }; static inline stru...
3041bbbeb41b807d2e24d7d78d9cc1387d95898a
Analyze and fix the following issue in the Linux kernel code: af_unix: Don't pass struct socket to maybe_add_creds().
Problem Details: We will move SOCK_PASS{CRED,PIDFD,SEC} from struct socket.flags to struct sock for better handling with SOCK_PASSRIGHTS. Then, we don't need to access struct socket in maybe_add_creds(). Let's pass struct sock to maybe_add_creds() and its caller queue_oob(). While at it, we append the unix_ prefix a...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 464e183ffdb8..a39497fd6e98 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1869,7 +1869,7 @@ static int unix_scm_to_skb(struct scm_cookie *scm, struct sk_buff *skb, bool sen { int err = 0; - UNIXCB(skb).pid = get_pid(scm->pid); + UNIX...
f2eae58c4428bd792c8e91e3666ab0718d87b44a
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: Fix Arrow Lake U/H NPU PCI ID
Problem Details: The ARL requires that the GMA and NPU devices both be in D3Hot in order for PC10 and S0iX to be achieved in S2idle. The original ARL-H/U addition to the intel_pmc_core driver attempted to do this by switching them to D3 in the init and resume calls of the intel_pmc_core driver. The problem is the ARL-...
```diff diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c index 320993bd6d31..f9c48738b853 100644 --- a/drivers/platform/x86/intel/pmc/arl.c +++ b/drivers/platform/x86/intel/pmc/arl.c @@ -681,6 +681,7 @@ static struct pmc_info arl_pmc_info_list[] = { #define ARL_NPU_PCI_DEV 0...
4e83ae6ec87dddac070ba349d3b839589b1bb957
Analyze and fix the following issue in the Linux kernel code: mips, net: ensure that SOCK_COREDUMP is defined
Problem Details: For historical reasons mips has to override the socket enum values but the defines are all the same. So simply move the ARCH_HAS_SOCKET_TYPES scope. Fixes: a9194f88782a ("coredump: add coredump socket") Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h index 4724a563c5bf..43a09f0dd3ff 100644 --- a/arch/mips/include/asm/socket.h +++ b/arch/mips/include/asm/socket.h @@ -36,15 +36,6 @@ enum sock_type { SOCK_PACKET = 10, }; -#define SOCK_MAX (SOCK_PACKET + 1) -/* Mask which covers a...
db26d62d79e4068934ad0dccdb92715df36352b9
Analyze and fix the following issue in the Linux kernel code: netfs: Fix undifferentiation of DIO reads from unbuffered reads
Problem Details: On cifs, "DIO reads" (specified by O_DIRECT) need to be differentiated from "unbuffered reads" (specified by cache=none in the mount parameters). The difference is flagged in the protocol and the server may behave differently: Windows Server will, for example, mandate that DIO reads are block aligned....
```diff diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c index b5a4a28e0fe7..e4420591cf35 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c @@ -77,7 +77,8 @@ static void v9fs_issue_read(struct netfs_io_subrequest *subreq) /* if we just extended the file size, any portion not in * cache won't be on server and ...
2b2805404c926b8dcd5c5c13d240722da714906e
Analyze and fix the following issue in the Linux kernel code: i2c: mlxbf: avoid 64-bit division
Problem Details: The 64-bit division in mlxbf_i2c_get_ticks() causes link failures when compile-testing on 32-bit machines: ERROR: modpost: "__udivdi3" [drivers/i2c/busses/i2c-mlxbf.ko] undefined! Change this to a div_u64(), which should replace the constant division with a a multiply/shift combination in the mlxbf_i...
```diff diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c index 39359942e4d7..8345f7e6385d 100644 --- a/drivers/i2c/busses/i2c-mlxbf.c +++ b/drivers/i2c/busses/i2c-mlxbf.c @@ -1083,7 +1083,7 @@ static u32 mlxbf_i2c_get_ticks(struct mlxbf_i2c_priv *priv, u64 nanoseconds, * Frequency...
bdf4442f4c7e8feb0733ee4de4d4ff7aa8b1c11d
Analyze and fix the following issue in the Linux kernel code: i2c: designware: Don't warn about missing get_clk_rate_khz
Problem Details: Converting the WARN_ON() to a dev_dbg() message in i2c_dw_clk_rate(). That removes the need to supply a dummy implementation for the callback (or alternatively a dummy clk device) when the fallback path is preferred where the existing values already in the clock registers are used - when a firmware ha...
```diff diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index 8eb7bd640f8d..5b1e8f74c4ac 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -572,8 +572,10 @@ u32 i2c_dw_clk_rate(struct dw_i2c_dev *dev) * Clo...
2fe2b969d911a09abcd6a47401a3c66c38a310e6
Analyze and fix the following issue in the Linux kernel code: i2c: designware: Invoke runtime suspend on quick slave re-registration
Problem Details: Replaced pm_runtime_put() with pm_runtime_put_sync_suspend() to ensure the runtime suspend is invoked immediately when unregistering a slave. This prevents a race condition where suspend was skipped when unregistering and registering slave in quick succession. For example, consider the rapid sequence ...
```diff diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c index 5cd4a5f7a472..b936a240db0a 100644 --- a/drivers/i2c/busses/i2c-designware-slave.c +++ b/drivers/i2c/busses/i2c-designware-slave.c @@ -96,7 +96,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave) i...
66e64b457c238cc8f43870b3ff137b7d660fdb81
Analyze and fix the following issue in the Linux kernel code: i2c: I2C_DESIGNWARE_AMDISP should depend on DRM_AMD_ISP
Problem Details: The AMD Image Signal Processor I2C functionality is only present on AMD platforms with ISP support, and its platform device is instantiated by the AMD ISP driver. Hence add a dependency on DRM_AMD_ISP, to prevent asking the user about this driver when configuring a kernel that does not support the AMD...
```diff diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index adb2910525b1..827b3dc3aa81 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -594,6 +594,7 @@ config I2C_DESIGNWARE_PLATFORM config I2C_DESIGNWARE_AMDISP tristate "Synopsys DesignWare Platform for AMDISP" +...
37ef4aa4039c42f4b15dc7e40d3e437b7f031522
Analyze and fix the following issue in the Linux kernel code: mfd: sprd-sc27xx: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-8-318e14bdba0a@linaro.org Si...
```diff diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c index 7186e2108108..d6b4350779e6 100644 --- a/drivers/mfd/sprd-sc27xx-spi.c +++ b/drivers/mfd/sprd-sc27xx-spi.c @@ -210,7 +210,10 @@ static int sprd_pmic_probe(struct spi_device *spi) return ret; } - device_init_wakeup(&spi->dev, ...
82ae581e56c36dbaee4e8da12d52018eeca01d4a
Analyze and fix the following issue in the Linux kernel code: mfd: rt5033: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-7-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/rt5033.c b/drivers/mfd/rt5033.c index 84ebc96f58e4..2204bf1c5a51 100644 --- a/drivers/mfd/rt5033.c +++ b/drivers/mfd/rt5033.c @@ -98,7 +98,11 @@ static int rt5033_i2c_probe(struct i2c_client *i2c) return ret; } - device_init_wakeup(rt5033->dev, rt5033->wakeup); + if (rt5033->wake...
fd37695dae093533d444237c86c3181a7339abb4
Analyze and fix the following issue in the Linux kernel code: mfd: max8925: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20250406-mfd-device-wakekup-leak-v1-6-318e14bdba0a@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
```diff diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c index 556aea7ec0a0..ab19ff0c7867 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c @@ -201,6 +201,7 @@ static void max8925_remove(struct i2c_client *client) struct max8925_chip *chip = i2c_get_clientdata(client); max89...