id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
b29a62d87cc0af3e9d134e9e0863b2cb053070b8 | Analyze and fix the following issue in the Linux kernel code: mul_u64_u64_div_u64: make it precise always | Problem Details:
Patch series "mul_u64_u64_div_u64: new implementation", v3.
This provides an implementation for mul_u64_u64_div_u64() that always
produces exact results.
This patch (of 2):
Library facilities must always return exact results. If the caller may be
contented with approximations then it should do the... | ```diff
diff --git a/lib/math/div64.c b/lib/math/div64.c
index 191761b1b623..b7fc75246399 100644
--- a/lib/math/div64.c
+++ b/lib/math/div64.c
@@ -186,55 +186,77 @@ EXPORT_SYMBOL(iter_div_u64_rem);
#ifndef mul_u64_u64_div_u64
u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c)
{
- u64 res = 0, div, rem;
- int shift;
+ if (... |
02f4bbefcada38cab86b365e5c795e0f858356bc | Analyze and fix the following issue in the Linux kernel code: mm: kmem: add lockdep assertion to obj_cgroup_memcg | Problem Details:
obj_cgroup_memcg() is supposed to safe to prevent the returned memory
cgroup from being freed only when the caller is holding the rcu read lock
or objcg_lock or cgroup_mutex. It is very easy to ignore thoes conditions
when users call some upper APIs which call obj_cgroup_memcg() internally
like mem_cg... | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 1b79760af685..07eadf7ecbba 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -366,11 +366,11 @@ static inline bool folio_memcg_kmem(struct folio *folio);
* After the initialization objcg->memcg is always point... |
edb4a8bffde725db0c9db2b4a508e01f150dba40 | Analyze and fix the following issue in the Linux kernel code: powerpc/vdso: refactor error handling | Problem Details:
Linus noticed that the error handling in __arch_setup_additional_pages()
fails to clear the mm VDSO pointer if _install_special_mapping() fails.
In practice there should be no actual bug, because if there's an error the
VDSO pointer is cleared later in arch_setup_additional_pages().
However it's no l... | ```diff
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 220a76cae7c1..ee4b9d676cff 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -214,13 +214,6 @@ static int __arch_setup_additional_pages(struct linux_binprm *bprm, int uses_int
/* Add required alignment. */
v... |
c64d66153b3413095c57805e66b8b6e2ff8633c0 | Analyze and fix the following issue in the Linux kernel code: maple_tree: fix comment typo with corresponding maple_status | Problem Details:
In comment of function mas_start(), we list the return value of different
cases. According to the comment context, tell the maple_status here is
more consistent with others.
Let's correct it with ma_active in the case it's a tree.
Link: https://lkml.kernel.org/r/20240812150925.31551-2-richard.weiyan... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index b3a3d5a00577..884e2d130876 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -1347,7 +1347,7 @@ static void mas_node_count(struct ma_state *mas, int count)
* - If mas->node is an error or not mas_start, return NULL.
* - If it's an empty tree: ... |
7a0529d0c2aa552498cc9b5c116f6e2ab8c2ac43 | Analyze and fix the following issue in the Linux kernel code: maple_tree: fix comment typo of ma_root | Problem Details:
In comment of mas_start(), we lists the return value for different cases.
In case of a single entry, we set mas->status to ma_root, while the
comment uses mas_root, which is not a maple_status.
Fix the typo according to the code.
Link: https://lkml.kernel.org/r/20240812150925.31551-1-richard.weiyang... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 14d7864b8d53..b3a3d5a00577 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -1346,7 +1346,7 @@ static void mas_node_count(struct ma_state *mas, int count)
* Return:
* - If mas->node is an error or not mas_start, return NULL.
* - If it's an empt... |
617f8e4d76b81361884db852005f519012ddd244 | Analyze and fix the following issue in the Linux kernel code: maple_tree: add test to replicate low memory race conditions | Problem Details:
Add new callback fields to the userspace implementation of struct
kmem_cache. This allows for executing callback functions in order to
further test low memory scenarios where node allocation is retried.
This callback can help test race conditions by calling a function when a
low memory event is teste... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index b547ff211ac7..14d7864b8d53 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -7005,6 +7005,19 @@ void mt_set_non_kernel(unsigned int val)
kmem_cache_set_non_kernel(maple_node_cache, val);
}
+extern void kmem_cache_set_callback(struct kmem_cache *... |
e1b8b883bb838339eec728de5d02e2f252a7d3d9 | Analyze and fix the following issue in the Linux kernel code: maple_tree: reset mas->index and mas->last on write retries | Problem Details:
The following scenario can result in a race condition:
Consider a node with the following indices and values
a<------->b<----------->c<--------->d
0xA NULL 0xB
CPU 1 CPU 2
--------- ---------
mas_set_range(a,b)
mas_erase()
-> range is expanded (a,c) beca... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index aa3a5df15b8e..b547ff211ac7 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -5451,14 +5451,19 @@ EXPORT_SYMBOL_GPL(mas_store);
*/
int mas_store_gfp(struct ma_state *mas, void *entry, gfp_t gfp)
{
+ unsigned long index = mas->index;
+ unsigned lon... |
c0f398c3b2cf67976bca216f80668b9c93368385 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb_vmemmap: batch HVO work when demoting | Problem Details:
Batch the HVO work, including de-HVO of the source and HVO of the
destination hugeTLB folios, to speed up demotion.
After commit bd225530a4c7 ("mm/hugetlb_vmemmap: fix race with speculative
PFN walkers"), each request of HVO or de-HVO, batched or not, invokes
synchronize_rcu() once. For example, when... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 1fdd9eab240c..d2b9555e6c45 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3921,100 +3921,124 @@ out:
return 0;
}
-static int demote_free_hugetlb_folio(struct hstate *h, struct folio *folio)
+static long demote_free_hugetlb_folios(struct hstate *src, struct h... |
cb0f01beb16669e91510fcdb2cea213931aee017 | Analyze and fix the following issue in the Linux kernel code: mm/mprotect: fix dax pud handlings | Problem Details:
This is only relevant to the two archs that support PUD dax, aka, x86_64
and ppc64. PUD THPs do not yet exist elsewhere, and hugetlb PUDs do not
count in this case.
DAX have had PUD mappings for years, but change protection path never
worked. When the path is triggered in any form (a simple test pro... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index ce44caa40eed..6370026689e0 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -342,6 +342,17 @@ void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address,
void __split_huge_pud(struct vm_area_struct *vma... |
144bb0aee33aa4185be7004affad23072ba82abd | Analyze and fix the following issue in the Linux kernel code: mm/x86: make pud_leaf() only care about PSE bit | Problem Details:
When working on mprotect() on 1G dax entries, I hit an zap bad pud error
when zapping a huge pud that is with PROT_NONE permission.
Here the problem is x86's pud_leaf() requires both PRESENT and PSE bits
set to report a pud entry as a leaf, but that doesn't look right, as it's
not following the pXd_le... | ```diff
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index e39311a89bf4..a2a3bd4c1bda 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -1078,8 +1078,7 @@ static inline pmd_t *pud_pgtable(pud_t pud)
#define pud_leaf pud_leaf
static inline bool pud_leaf... |
7f06e3aa2e836c11a70d161ae19dc4414eecd80d | Analyze and fix the following issue in the Linux kernel code: mm/mprotect: push mmu notifier to PUDs | Problem Details:
mprotect() does mmu notifiers in PMD levels. It's there since 2014 of
commit a5338093bfb4 ("mm: move mmu notifier call from change_protection to
change_pmd_range").
At that time, the issue was that NUMA balancing can be applied on a huge
range of VM memory, even if nothing was populated. The notific... | ```diff
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 37cf8d249405..d423080e6509 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -363,9 +363,6 @@ static inline long change_pmd_range(struct mmu_gather *tlb,
unsigned long next;
long pages = 0;
unsigned long nr_huge_updates = 0;
- struct mmu_notifier_range rang... |
5b198b4759ef7e618817d390601740b30ff56041 | Analyze and fix the following issue in the Linux kernel code: mm/dax: dump start address in fault handler | Problem Details:
Patch series "mm/mprotect: Fix dax puds", v5.
Dax supports pud pages for a while, but mprotect on puds was missing since
the start. This series tries to fix that by providing pud handling in
mprotect(). The goal is to add more types of pud mappings like hugetlb or
pfnmaps. This series paves way for... | ```diff
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index 2051e4f73c8a..9c1a729cd77e 100644
--- a/drivers/dax/device.c
+++ b/drivers/dax/device.c
@@ -235,9 +235,9 @@ static vm_fault_t dev_dax_huge_fault(struct vm_fault *vmf, unsigned int order)
int id;
struct dev_dax *dev_dax = filp->private_data;
- ... |
6963f00813f49375360544fe923e62f2070601af | Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: add optimization hint on page existence check | Problem Details:
In commit 21e516b913c1 ("mm: vmalloc: dump page owner info if page is
already mapped"), a BUG_ON macro was changed into an if statement, where
the compiler optimization hint introduced in the BUG_ON macro was removed
along with this change. This patch adds back the hint.
Link: https://lkml.kernel.org... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 884e21fed28f..dfa8f09e7e9d 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -105,7 +105,7 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
if (!pte)
return -ENOMEM;
do {
- if (!pte_none(ptep_get(pte))) {
+ if (unlikely(!pte_no... |
3a80b8228f6ff0b3e56205231bef8ca69cb739d8 | Analyze and fix the following issue in the Linux kernel code: mm: reduce deferred struct page init ifdeffery | Problem Details:
Patch series "mm: Fix several issues with unaccepted memory", v2.
The patchset addresses several issues related to unaccepted memory.
Pacth 1/7 preparatory cleanup.
Patch 2/7 ensures that __alloc_pages_bulk() will not exhaust all
accepted memory without accepting more.
Patches 3/7-5/7 are preparati... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 60742d057b05..006cab0d2f2f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -322,6 +322,11 @@ static inline bool deferred_pages_enabled(void)
{
return false;
}
+
+static inline bool _deferred_grow_zone(struct zone *zone, unsigned int order)
+{
+ retu... |
07222371912c835d12b3541791d0516f50c7b45b | Analyze and fix the following issue in the Linux kernel code: memcg: replace memcg ID idr with xarray | Problem Details:
At the moment memcg IDs are managed through IDR which requires external
synchronization mechanisms and makes the allocation code a bit awkward.
Let's switch to xarray and make the code simpler.
[shakeel.butt@linux.dev: fix error path in mem_cgroup_alloc(), per Dan]
Link: https://lkml.kernel.org/r/2... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 8971d3473a7b..cb2996d5d3f4 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3363,29 +3363,12 @@ static void memcg_wb_domain_size_changed(struct mem_cgroup *memcg)
*/
#define MEM_CGROUP_ID_MAX ((1UL << MEM_CGROUP_ID_SHIFT) - 1)
-static DEFINE_IDR(me... |
072cd213b75eb01fcf40eff898f8d5c008ce1457 | Analyze and fix the following issue in the Linux kernel code: selftest mm/mseal: fix test_seal_mremap_move_dontunmap_anyaddr | Problem Details:
the syscall remap accepts following:
mremap(src, size, size, MREMAP_MAYMOVE | MREMAP_DONTUNMAP, dst)
when the src is sealed, the call will fail with error code:
EPERM
Previously, the test uses hard-coded 0xdeaddead as dst, and it
will fail on the system with newer glibc installed.
This patch remove... | ```diff
diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
index 7eec3f0152e3..bd0bfda7aae7 100644
--- a/tools/testing/selftests/mm/mseal_test.c
+++ b/tools/testing/selftests/mm/mseal_test.c
@@ -110,6 +110,16 @@ static int sys_madvise(void *start, size_t len, int types)
ret... |
cc0a0f98553528791ae33ba5ee8c118b52ae2028 | Analyze and fix the following issue in the Linux kernel code: kfence: introduce burst mode | Problem Details:
Introduce burst mode, which can be configured with kfence.burst=$count,
where the burst count denotes the additional successive slab allocations
to be allocated through KFENCE for each sample interval.
The idea is that this can give developers an additional knob to make
KFENCE more aggressive when deb... | ```diff
diff --git a/Documentation/dev-tools/kfence.rst b/Documentation/dev-tools/kfence.rst
index 936f6aaa75c8..541899353865 100644
--- a/Documentation/dev-tools/kfence.rst
+++ b/Documentation/dev-tools/kfence.rst
@@ -53,6 +53,13 @@ configurable via the Kconfig option ``CONFIG_KFENCE_DEFERRABLE``.
The KUnit test s... |
17fe833b0de08a78bfb51388e0615969d73ea8ad | Analyze and fix the following issue in the Linux kernel code: mm: fix (harmless) type confusion in lock_vma_under_rcu() | Problem Details:
There is a (harmless) type confusion in lock_vma_under_rcu(): After
vma_start_read(), we have taken the VMA lock but don't know yet whether
the VMA has already been detached and scheduled for RCU freeing. At this
point, ->vm_start and ->vm_end are accessed.
vm_area_struct contains a union such that -... | ```diff
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 165c58b12ccc..003619fab20e 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -660,6 +660,9 @@ struct vma_numab_state {
* per VM-area/task. A VM area is any part of the process virtual memory
* space that has a speci... |
0e400844724222a67b962b0f12c7964b5e9a236c | Analyze and fix the following issue in the Linux kernel code: zswap: track swapins from disk more accurately | Problem Details:
Currently, there are a couple of issues with our disk swapin tracking for
dynamic zswap shrinker heuristics:
1. We only increment the swapin counter on pivot pages. This means we
are not taking into account pages that also need to be swapped in,
but are already taken care of as part of the reada... | ```diff
diff --git a/mm/page_io.c b/mm/page_io.c
index ff8c99ee3af7..aa190e3cb050 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -521,7 +521,13 @@ void swap_read_folio(struct folio *folio, struct swap_iocb **plug)
if (zswap_load(folio)) {
folio_unlock(folio);
- } else if (data_race(sis->flags & SWP_FS_OPS)) {
+... |
e31c38e037621c445bb4393fd77e0a76e6e0899a | Analyze and fix the following issue in the Linux kernel code: zswap: implement a second chance algorithm for dynamic zswap shrinker | Problem Details:
Patch series "improving dynamic zswap shrinker protection scheme", v3.
When experimenting with the memory-pressure based (i.e "dynamic") zswap
shrinker in production, we observed a sharp increase in the number of
swapins, which led to performance regression. We were able to trace this
regression to t... | ```diff
diff --git a/include/linux/zswap.h b/include/linux/zswap.h
index 6cecb4a4f68b..9cd1beef0654 100644
--- a/include/linux/zswap.h
+++ b/include/linux/zswap.h
@@ -13,17 +13,15 @@ extern atomic_t zswap_stored_pages;
struct zswap_lruvec_state {
/*
- * Number of pages in zswap that should be protected from the s... |
69b50d4351ed924f29e3d46b159e28f70dfc707f | Analyze and fix the following issue in the Linux kernel code: mm: only enforce minimum stack gap size if it's sensible | Problem Details:
The generic mmap_base code tries to leave a gap between the top of the
stack and the mmap base address, but enforces a minimum gap size (MIN_GAP)
of 128MB, which is too large on some setups. In particular, on arm tasks
without ADDR_LIMIT_32BIT, the STACK_TOP value is less than 128MB, so it's
impossibl... | ```diff
diff --git a/mm/util.c b/mm/util.c
index ac01925a4179..4f1275023eb7 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -463,7 +463,7 @@ static unsigned long mmap_base(unsigned long rnd, struct rlimit *rlim_stack)
if (gap + pad > gap)
gap += pad;
- if (gap < MIN_GAP)
+ if (gap < MIN_GAP && MIN_GAP < MAX_GAP)
ga... |
a06e79d383cf0ab694d3d012261b9df36e6dfc3e | Analyze and fix the following issue in the Linux kernel code: mm: remove duplicated include in vma_internal.h | Problem Details:
The header files linux/bug.h is included twice in vma_internal.h, so one
inclusion of each can be removed.
Link: https://lkml.kernel.org/r/20240802060216.24591-1-yang.lee@linux.alibaba.com
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: ht... | ```diff
diff --git a/mm/vma_internal.h b/mm/vma_internal.h
index 14c24d5cb582..b930ab12a587 100644
--- a/mm/vma_internal.h
+++ b/mm/vma_internal.h
@@ -12,7 +12,6 @@
#include <linux/backing-dev.h>
#include <linux/bitops.h>
#include <linux/bug.h>
-#include <linux/bug.h>
#include <linux/cacheflush.h>
#include <linux/... |
81920438a6dce78e6eac17ee34f29bf6c32074b1 | Analyze and fix the following issue in the Linux kernel code: mm: zswap: fix global shrinker error handling logic | Problem Details:
This patch fixes the zswap global shrinker, which did not shrink the zpool
as expected.
The issue addressed is that shrink_worker() did not distinguish between
unexpected errors and expected errors, such as failed writeback from an
empty memcg. The shrinker would stop shrinking after iterating throug... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index bd97f9824d8a..71b75ff1f3fb 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -1287,10 +1287,10 @@ static struct shrinker *zswap_alloc_shrinker(void)
static int shrink_memcg(struct mem_cgroup *memcg)
{
- int nid, shrunk = 0;
+ int nid, shrunk = 0, scanned = 0;
if (!me... |
c5519e0a9bfb6365445de0521a6fe7000b375ecf | Analyze and fix the following issue in the Linux kernel code: mm: zswap: fix global shrinker memcg iteration | Problem Details:
Patch series "mm: zswap: fixes for global shrinker", v5.
This series addresses issues in the zswap global shrinker that could not
shrink stored pages. With this series, the shrinker continues to shrink
pages until it reaches the accept threshold more reliably, gives much
higher writeback when the zsw... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index adeaf9c97fde..bd97f9824d8a 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -765,12 +765,25 @@ void zswap_folio_swapin(struct folio *folio)
}
}
+/*
+ * This function should be called when a memcg is being offlined.
+ *
+ * Since the global shrinker shrink_worker() may ... |
7e60dcb22252d4415b66f7fb33e6d713e19036e0 | Analyze and fix the following issue in the Linux kernel code: mm/z3fold: add __percpu annotation to *unbuddied pointer in struct z3fold_pool | Problem Details:
Compiling z3fold.c results in several sparse warnings:
z3fold.c:797:21: warning: incorrect type in initializer (different address spaces)
z3fold.c:797:21: expected void const [noderef] __percpu *__vpp_verify
z3fold.c:797:21: got struct list_head *
z3fold.c:852:37: warning: incorrect type in init... | ```diff
diff --git a/mm/z3fold.c b/mm/z3fold.c
index 2ebfed32871b..379d24b4fef9 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -144,7 +144,7 @@ struct z3fold_pool {
const char *name;
spinlock_t lock;
spinlock_t stale_lock;
- struct list_head *unbuddied;
+ struct list_head __percpu *unbuddied;
struct list_head st... |
a17c7d8fd2b097a422fc892b660e879e19c20214 | Analyze and fix the following issue in the Linux kernel code: userfaultfd: move core VMA manipulation logic to mm/userfaultfd.c | Problem Details:
Patch series "Make core VMA operations internal and testable", v4.
There are a number of "core" VMA manipulation functions implemented in
mm/mmap.c, notably those concerning VMA merging, splitting, modifying,
expanding and shrinking, which logically don't belong there.
More importantly this functiona... | ```diff
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 27a3e9285fbf..b3ed7207df7e 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -104,21 +104,6 @@ bool userfaultfd_wp_unpopulated(struct vm_area_struct *vma)
return ctx->features & UFFD_FEATURE_WP_UNPOPULATED;
}
-static void userfaultfd_set_vm_flags... |
394290cba9664ed3ab80d0e247402102a9b7287a | Analyze and fix the following issue in the Linux kernel code: mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig options | Problem Details:
Patch series "mm: split PTE/PMD PT table Kconfig cleanups+clarifications".
This series is a follow up to the fixes:
"[PATCH v1 0/2] mm/hugetlb: fix hugetlb vs. core-mm PT locking"
When working on the fixes, I wondered why 8xx is fine (-> never uses split
PT locks) and how PT locking even works prope... | ```diff
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c
index 2286c2ea60ec..831793cd6ff9 100644
--- a/arch/arm/mm/fault-armv.c
+++ b/arch/arm/mm/fault-armv.c
@@ -61,7 +61,7 @@ static int do_adjust_pte(struct vm_area_struct *vma, unsigned long address,
return ret;
}
-#if USE_SPLIT_PTE_PTLOCKS
+#if ... |
e0b2fdb352b7991664b23ae5e15b537cd79a7820 | Analyze and fix the following issue in the Linux kernel code: kmemleak-test: add percpu leak | Problem Details:
Add a per-CPU memory leak, which will be reported like:
unreferenced object 0x3efa840195f8 (size 64):
comm "modprobe", pid 4667, jiffies 4294688677
hex dump (first 32 bytes on cpu 0):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 0... | ```diff
diff --git a/samples/kmemleak/kmemleak-test.c b/samples/kmemleak/kmemleak-test.c
index f7470ed85a79..544c36d51d56 100644
--- a/samples/kmemleak/kmemleak-test.c
+++ b/samples/kmemleak/kmemleak-test.c
@@ -79,6 +79,8 @@ static int kmemleak_test_init(void)
per_cpu(kmemleak_test_pointer, i));
}
+ pr_info("__... |
6c99d4eb7c5e0999349cdb9d824ea0ac450d0c8f | Analyze and fix the following issue in the Linux kernel code: kmemleak: enable tracking for percpu pointers | Problem Details:
Patch series "kmemleak: support for percpu memory leak detect'.
This is a rework of this series:
https://lore.kernel.org/lkml/20200921020007.35803-1-chenjun102@huawei.com/
Originally I was investigating a percpu leak on our customer nodes and
having this functionality was a huge help, which lead to t... | ```diff
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 764b08100570..6b498c6d9c34 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -224,6 +224,10 @@ static int kmemleak_error;
static unsigned long min_addr = ULONG_MAX;
static unsigned long max_addr;
+/* minimum and maximum address that may be valid per-CPU point... |
afb6d780b9b17914ba720088dac2bfa2505f36c8 | Analyze and fix the following issue in the Linux kernel code: mm/swap: remove boilerplate | Problem Details:
Remove boilerplate by using a macro to choose the corresponding lock and
handler for each folio_batch in cpu_fbatches.
[yuzhao@google.com: handle zero-length local_lock_t]
Link: https://lkml.kernel.org/r/Zq_0X04WsqgUnz30@google.com
[yuzhao@google.com: fix "BUG: using smp_processor_id() in preemptibl... | ```diff
diff --git a/mm/swap.c b/mm/swap.c
index 4a66d2f87f26..67a246772811 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -220,16 +220,43 @@ static void folio_batch_move_lru(struct folio_batch *fbatch, move_fn_t move_fn)
folios_put(fbatch);
}
-static void folio_batch_add_and_move(struct folio_batch *fbatch,
- struct ... |
bed71b50b0c2dc38c5e94c84dd660add2d1609e0 | Analyze and fix the following issue in the Linux kernel code: mm/swap: remove remaining _fn suffix | Problem Details:
Remove remaining _fn suffix from cpu_fbatches handlers, which are already
self-explanatory.
Link: https://lkml.kernel.org/r/20240711021317.596178-5-yuzhao@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ```diff
diff --git a/mm/swap.c b/mm/swap.c
index 774ae9eab1e6..4a66d2f87f26 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -160,7 +160,7 @@ EXPORT_SYMBOL(put_pages_list);
typedef void (*move_fn_t)(struct lruvec *lruvec, struct folio *folio);
-static void lru_add_fn(struct lruvec *lruvec, struct folio *folio)
+static vo... |
ac59a1f0146f46bad7d5f8d1b20756ece43122ec | Analyze and fix the following issue in the Linux kernel code: memory tiering: count PGPROMOTE_SUCCESS when mem tiering is enabled. | Problem Details:
memory tiering can be enabled/disabled at runtime and
sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING is used to
check it. In migrate_misplaced_folio(), the check is missing when
PGPROMOTE_SUCCESS is incremented. Add the missing check.
Link: https://lkml.kernel.org/r/20240724130115.793641... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index 923ea80ba744..8578a930cad1 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2636,7 +2636,9 @@ int migrate_misplaced_folio(struct folio *folio, struct vm_area_struct *vma,
putback_movable_pages(&migratepages);
if (nr_succeeded) {
count_vm_numa_events(NUMA_PA... |
3eb2091c653480e02e9c2a114c4725ec654bca63 | Analyze and fix the following issue in the Linux kernel code: memory tiering: read last_cpupid correctly in do_huge_pmd_numa_page() | Problem Details:
Patch series "Various memory tiering fixes", v3.
This patch (of 3):
last_cpupid is only available when memory tiering is off or the folio is
in toptier node. Complete the check to read last_cpupid when it is
available.
Before the fix, the default last_cpupid will be used even if memory
tiering mod... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1ec32c02b19c..632a92edec4e 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1707,7 +1707,8 @@ vm_fault_t do_huge_pmd_numa_page(struct vm_fault *vmf)
* For memory tiering mode, cpupid of slow memory page is used
* to record page access time. S... |
c2a967f6ab0ec896648c0497d3dc15d8f136b148 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb_vmemmap: don't synchronize_rcu() without HVO | Problem Details:
hugetlb_vmemmap_optimize_folio() and hugetlb_vmemmap_restore_folio() are
wrappers meant to be called regardless of whether HVO is enabled.
Therefore, they should not call synchronize_rcu(). Otherwise, it
regresses use cases not enabling HVO.
So move synchronize_rcu() to __hugetlb_vmemmap_optimize_fo... | ```diff
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index 0c3f56b3578e..57b7f591eee8 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -43,6 +43,8 @@ struct vmemmap_remap_walk {
#define VMEMMAP_SPLIT_NO_TLB_FLUSH BIT(0)
/* Skip the TLB flush when we remap the PTE */
#define VMEMMAP_REMAP_N... |
fcb4824b264058f9ee1ac2aa6b7155468978fde6 | Analyze and fix the following issue in the Linux kernel code: mm: fix typo in Kconfig | Problem Details:
Fix typo in Kconfig help
Link: https://lkml.kernel.org/r/78656.1720853990@turing-police
Fixes: e93d4166b40a ("mm: memcg: put cgroup v1-specific code under a config option")
Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner... | ```diff
diff --git a/init/Kconfig b/init/Kconfig
index 5783a0b87517..f34371530e68 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -986,7 +986,7 @@ config MEMCG_V1
going to shrink due to deprecation process. New deployments with v1
controller are highly discouraged.
- San N is unsure.
+ Say N if unsure.
... |
590b9d576caec6b4c46bba49ed36223a399c3fc5 | Analyze and fix the following issue in the Linux kernel code: mm: kvmalloc: align kvrealloc() with krealloc() | Problem Details:
Besides the obvious (and desired) difference between krealloc() and
kvrealloc(), there is some inconsistency in their function signatures and
behavior:
- krealloc() frees the memory when the requested size is zero, whereas
kvrealloc() simply returns a pointer to the existing allocation.
- kreall... | ```diff
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index bab27f9d8cc6..8632c05e7997 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -62,7 +62,6 @@ int kvm_vcpu_init_nested(struct kvm_vcpu *vcpu)
*/
num_mmus = atomic_read(&kvm->online_vcpus) * S2_MMU_PER_VCPU;
tmp = kvrea... |
3ddc2fefe6f34ec870fcb22f4cd656e53db079f2 | Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: implement vrealloc() | Problem Details:
Patch series "Align kvrealloc() with krealloc()", v2.
Besides the obvious (and desired) difference between krealloc() and
kvrealloc(), there is some inconsistency in their function signatures and
behavior:
- krealloc() frees the memory when the requested size is zero, whereas
kvrealloc() simply r... | ```diff
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index e4a631ec430b..ad2ce7a6ab7a 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -189,6 +189,10 @@ extern void *__vcalloc_noprof(size_t n, size_t size, gfp_t flags) __alloc_size(1
extern void *vcalloc_noprof(size_t n, size_t s... |
d9dd3ac77cf7cabd35732893f3aefba1daa1c2e1 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: wow: fix wait condition for AOAC report request | Problem Details:
Each condition binding to the same wait should be unique. AOAC code misused
the wait of FW offload series and broke the above rule. It added another
macro to generate wait condition of WoWLAN/AOAC, but the results conflict
to the ones of FW offload series. It means that we might be completed
wrongly in... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index dc642697d74a..436c01880ed4 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -4320,6 +4320,7 @@ int rtw89_core_init(struct rtw89_dev *rtwdev)
rtw89... |
052a45c1cb1b32f05dd63a295d65496d8b403283 | Analyze and fix the following issue in the Linux kernel code: alloc_tag: fix allocation tag reporting when CONFIG_MODULES=n | Problem Details:
codetag_module_init() is used to initialize sections containing allocation
tags. This function is used to initialize module sections as well as core
kernel sections, in which case the module parameter is set to NULL. This
function has to be called even when CONFIG_MODULES=n to initialize core
kernel ... | ```diff
diff --git a/lib/codetag.c b/lib/codetag.c
index 5ace625f2328..afa8a2d4f317 100644
--- a/lib/codetag.c
+++ b/lib/codetag.c
@@ -125,7 +125,6 @@ static inline size_t range_size(const struct codetag_type *cttype,
cttype->desc.tag_size;
}
-#ifdef CONFIG_MODULES
static void *get_symbol(struct module *mod, co... |
409faf8c97d5abb0597ea43e99c8b3dd8dbe99e3 | Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: optimize vmap_lazy_nr arithmetic when purging each vmap_area | Problem Details:
When running the vmalloc stress on a 448-core system, observe the average
latency of purge_vmap_node() is about 2 seconds by using the eBPF/bcc
'funclatency.py' tool [1].
# /your-git-repo/bcc/tools/funclatency.py -u purge_vmap_node & pid1=$! && sleep 8 && modprobe test_vmalloc nr_threads=$(nproc) ru... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ac53d46ac8a5..a0df1e2e155a 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2191,6 +2191,7 @@ static void purge_vmap_node(struct work_struct *work)
{
struct vmap_node *vn = container_of(work,
struct vmap_node, purge_work);
+ unsigned long nr_purged_pages = 0;... |
5e9784e997620af7c1399029282f5d6964b41942 | Analyze and fix the following issue in the Linux kernel code: codetag: debug: mark codetags for poisoned page as empty | Problem Details:
When PG_hwpoison pages are freed they are treated differently in
free_pages_prepare() and instead of being released they are isolated.
Page allocation tag counters are decremented at this point since the page
is considered not in use. Later on when such pages are released by
unpoison_memory(), the al... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c565de8f48e9..91ace8ca97e2 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1054,6 +1054,13 @@ __always_inline bool free_pages_prepare(struct page *page,
reset_page_owner(page, order);
page_table_check_free(page, order);
pgalloc_tag_sub(page, 1... |
e399257349098bf7c84343f99efb2bc9c22eb9fd | Analyze and fix the following issue in the Linux kernel code: mm/memcontrol: respect zswap.writeback setting from parent cg too | Problem Details:
Currently, the behavior of zswap.writeback wrt. the cgroup hierarchy
seems a bit odd. Unlike zswap.max, it doesn't honor the value from parent
cgroups. This surfaced when people tried to globally disable zswap
writeback, i.e. reserve physical swap space only for hibernation [1] -
disabling zswap.wr... | ```diff
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 86311c2907cd..95c18bc17083 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1717,9 +1717,10 @@ The following nested keys are defined.
entries fault back in... |
a3f6a89c834a4cba0f881da21307b26de3796133 | Analyze and fix the following issue in the Linux kernel code: scripts: fix gfp-translate after ___GFP_*_BITS conversion to an enum | Problem Details:
Richard reports that since 772dd0342727c ("mm: enumerate all gfp flags"),
gfp-translate is broken, as the bit numbers are implicit, leaving the
shell script unable to extract them. Even more, some bits are now at a
variable location, making it double extra hard to parse using a simple
shell script.
U... | ```diff
diff --git a/scripts/gfp-translate b/scripts/gfp-translate
index 6c9aed17cf56..8385ae0d5af9 100755
--- a/scripts/gfp-translate
+++ b/scripts/gfp-translate
@@ -62,25 +62,57 @@ if [ "$GFPMASK" = "none" ]; then
fi
# Extract GFP flags from the kernel source
-TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1
-gr... |
bfe0857c20c663fcc1592fa4e3a61ca12b07dac9 | Analyze and fix the following issue in the Linux kernel code: Revert "mm: skip CMA pages when they are not available" | Problem Details:
This reverts commit 5da226dbfce3 ("mm: skip CMA pages when they are not
available") and b7108d66318a ("Multi-gen LRU: skip CMA pages when they are
not eligible").
lruvec->lru_lock is highly contended and is held when calling
isolate_lru_folios. If the lru has a large number of CMA folios
consecutivel... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index cfa839284b92..bd489c1af228 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1604,25 +1604,6 @@ static __always_inline void update_lru_sizes(struct lruvec *lruvec,
}
-#ifdef CONFIG_CMA
-/*
- * It is waste of effort to scan and reclaim CMA pages if it is not availab... |
f806de88d8f7f8191afd0fd9b94db4cd058e7d4f | Analyze and fix the following issue in the Linux kernel code: maple_tree: remove rcu_read_lock() from mt_validate() | Problem Details:
The write lock should be held when validating the tree to avoid updates
racing with checks. Holding the rcu read lock during a large tree
validation may also cause a prolonged rcu read window and "rcu_preempt
detected stalls" warnings.
Link: https://lore.kernel.org/all/0000000000001d12d4062005aea1@go... | ```diff
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index aa3a5df15b8e..6df3a8b95808 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -7566,14 +7566,14 @@ static void mt_validate_nulls(struct maple_tree *mt)
* 2. The gap is correctly set in the parents
*/
void mt_validate(struct maple_tree *mt)
+ __mus... |
6dacd79d28842ff01f18b4900d897741aac5999e | Analyze and fix the following issue in the Linux kernel code: kexec_file: fix elfcorehdr digest exclusion when CONFIG_CRASH_HOTPLUG=y | Problem Details:
Fix the condition to exclude the elfcorehdr segment from the SHA digest
calculation.
The j iterator is an index into the output sha_regions[] array, not into
the input image->segment[] array. Once it reaches
image->elfcorehdr_index, all subsequent segments are excluded. Besides,
if the purgatory seg... | ```diff
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 3d64290d24c9..3eedb8c226ad 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -752,7 +752,7 @@ static int kexec_calculate_store_digests(struct kimage *image)
#ifdef CONFIG_CRASH_HOTPLUG
/* Exclude elfcorehdr segment to allow future ch... |
ab7ca09520e9c41c219a4427fe0dae24024bfe7f | Analyze and fix the following issue in the Linux kernel code: mm/slub: add check for s->flags in the alloc_tagging_slab_free_hook | Problem Details:
When enable CONFIG_MEMCG & CONFIG_KFENCE & CONFIG_KMEMLEAK, the following
warning always occurs,This is because the following call stack occurred:
mem_pool_alloc
kmem_cache_alloc_noprof
slab_alloc_node
kfence_alloc
Once the kfence allocation is successful,slab->obj_exts will no... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index c9d8a2497fd6..a77f354f8325 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2116,6 +2116,10 @@ alloc_tagging_slab_free_hook(struct kmem_cache *s, struct slab *slab, void **p,
if (!mem_alloc_profiling_enabled())
return;
+ /* slab->obj_exts might not be NULL if it was cre... |
6576dd6695f2afca3f4954029ac4a64f82ba60ab | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix state management in error path of log writing function | Problem Details:
After commit a694291a6211 ("nilfs2: separate wait function from
nilfs_segctor_write") was applied, the log writing function
nilfs_segctor_do_construct() was able to issue I/O requests continuously
even if user data blocks were split into multiple logs across segments,
but two potential flaws were intro... | ```diff
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 0ca3110d6386..871ec35ea8e8 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1812,6 +1812,9 @@ static void nilfs_segctor_abort_construction(struct nilfs_sc_info *sci,
nilfs_abort_logs(&logs, ret ? : err);
list_splice_tail_init(&sci-... |
5787fcaab9eb5930f5378d6a1dd03d916d146622 | Analyze and fix the following issue in the Linux kernel code: nilfs2: fix missing cleanup on rollforward recovery error | Problem Details:
In an error injection test of a routine for mount-time recovery, KASAN
found a use-after-free bug.
It turned out that if data recovery was performed using partial logs
created by dsync writes, but an error occurred before starting the log
writer to create a recovered checkpoint, the inodes whose data ... | ```diff
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c
index b638dc06df2f..61e25a980f73 100644
--- a/fs/nilfs2/recovery.c
+++ b/fs/nilfs2/recovery.c
@@ -715,6 +715,33 @@ static void nilfs_finish_roll_forward(struct the_nilfs *nilfs,
brelse(bh);
}
+/**
+ * nilfs_abort_roll_forward - cleaning up after a fa... |
683408258917541bdb294cd717c210a04381931e | Analyze and fix the following issue in the Linux kernel code: nilfs2: protect references to superblock parameters exposed in sysfs | Problem Details:
The superblock buffers of nilfs2 can not only be overwritten at runtime
for modifications/repairs, but they are also regularly swapped, replaced
during resizing, and even abandoned when degrading to one side due to
backing device issues. So, accessing them requires mutual exclusion using
the reader/wr... | ```diff
diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c
index a5569b7f47a3..14868a3dd592 100644
--- a/fs/nilfs2/sysfs.c
+++ b/fs/nilfs2/sysfs.c
@@ -836,9 +836,15 @@ ssize_t nilfs_dev_revision_show(struct nilfs_dev_attr *attr,
struct the_nilfs *nilfs,
char *buf)
{
- struct nilfs_super_block **sbp = nilfs->... |
4828d207dc5161dc7ddf9a4f6dcfd80c7dd7d20a | Analyze and fix the following issue in the Linux kernel code: userfaultfd: don't BUG_ON() if khugepaged yanks our page table | Problem Details:
Since khugepaged was changed to allow retracting page tables in file
mappings without holding the mmap lock, these BUG_ON()s are wrong - get
rid of them.
We could also remove the preceding "if (unlikely(...))" block, but then we
could reach pte_offset_map_lock() with transhuge pages not just for file
... | ```diff
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index 290b2a0d84ac..acc56c75ba99 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -807,9 +807,10 @@ retry:
err = -EFAULT;
break;
}
-
- BUG_ON(pmd_none(*dst_pmd));
- BUG_ON(pmd_trans_huge(*dst_pmd));
+ /*
+ * For shmem mappings, khugepaged i... |
71c186efc1b2cf1aeabfeff3b9bd5ac4c5ac14d8 | Analyze and fix the following issue in the Linux kernel code: userfaultfd: fix checks for huge PMDs | Problem Details:
Patch series "userfaultfd: fix races around pmd_trans_huge() check", v2.
The pmd_trans_huge() code in mfill_atomic() is wrong in three different
ways depending on kernel version:
1. The pmd_trans_huge() check is racy and can lead to a BUG_ON() (if you hit
the right two race windows) - I've tested ... | ```diff
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index e54e5c8907fa..290b2a0d84ac 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -787,21 +787,23 @@ retry:
}
dst_pmdval = pmdp_get_lockless(dst_pmd);
- /*
- * If the dst_pmd is mapped as THP don't
- * override it and just be strict.
- */
- ... |
3e3de7947c751509027d26b679ecd243bc9db255 | Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: ensure vmap_block is initialised before adding to queue | Problem Details:
Commit 8c61291fd850 ("mm: fix incorrect vbq reference in
purge_fragmented_block") extended the 'vmap_block' structure to contain a
'cpu' field which is set at allocation time to the id of the initialising
CPU.
When a new 'vmap_block' is being instantiated by new_vmap_block(), the
partially initialised... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index af2de36549d6..ac53d46ac8a5 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2626,6 +2626,7 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
vb->dirty_max = 0;
bitmap_set(vb->used_map, 0, (1UL << order));
INIT_LIST_HEAD(&vb->free_list);
+ vb-... |
b808f629215685c1941b1cd567c7b7ccb3c90278 | Analyze and fix the following issue in the Linux kernel code: selftests: mm: fix build errors on armhf | Problem Details:
The __NR_mmap isn't found on armhf. The mmap() is commonly available
system call and its wrapper is present on all architectures. So it should
be used directly. It solves problem for armhf and doesn't create problem
for other architectures.
Remove sys_mmap() functions as they aren't doing anything ... | ```diff
diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
index a818f010de47..bfcea5cf9a48 100644
--- a/tools/testing/selftests/mm/mseal_test.c
+++ b/tools/testing/selftests/mm/mseal_test.c
@@ -81,17 +81,6 @@ static int sys_mprotect_pkey(void *ptr, size_t size, unsigned long... |
faa2e484b393c56bc1243dca6676a70bc485f775 | Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix USB/SDIO devices not transmitting beacons | Problem Details:
All USB devices supported by rtw88 have the same problem: they don't
transmit beacons in AP mode. (Some?) SDIO devices are also affected.
The cause appears to be clearing BIT_EN_BCNQ_DL of REG_FWHW_TXQ_CTRL
before uploading the beacon reserved page, so don't clear the bit for
USB and SDIO devices.
Tes... | ```diff
diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
index ab7d414d0ba6..b9b0114e253b 100644
--- a/drivers/net/wireless/realtek/rtw88/fw.c
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
@@ -1468,10 +1468,12 @@ int rtw_fw_write_data_rsvd_page(struct rtw_dev *rtwdev, u16 p... |
25b85075150fe8adddb096db8a4b950353045ee1 | Analyze and fix the following issue in the Linux kernel code: drm/msm: fix %s null argument error | Problem Details:
The following build error was triggered because of NULL string argument:
BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c: In function 'mdp5_smp_dump':
BUILDSTDERR: drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c:352:51: error: '%s' directive argument is null [-Werror=format-overflow=]
BUILDSTDERR: 35... | ```diff
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
index 3a7f7edda96b..500b7dc895d0 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
@@ -351,7 +351,7 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *... |
1328cb7c34bf6d056df9ff694ee5194537548258 | Analyze and fix the following issue in the Linux kernel code: drm/msm/dsi: correct programming sequence for SM8350 / SM8450 | Problem Details:
According to the display-drivers, 5nm DSI PLL (v4.2, v4.3) have
different boundaries for pll_clock_inverters programming. Follow the
vendor code and use correct values.
Fixes: 2f9ae4e395ed ("drm/msm/dsi: add support for DSI-PHY on SM8350 and SM8450")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@l... | ```diff
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
index 3b59137ca674..031446c87dae 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c
@@ -135,7 +135,7 @@ static void dsi_pll_calc_dec_frac(struct dsi_pll_7nm *pll... |
c7c412202623951dcfc22316f5255fd84fd56186 | Analyze and fix the following issue in the Linux kernel code: drm/msm/dp: enable widebus on all relevant chipsets | Problem Details:
Hardware document indicates that widebus is recommended on DP on all
MDSS chipsets starting version 5.x.x and above.
Follow the guideline and mark widebus support on all relevant
chipsets for DP.
Fixes: 766f705204a0 ("drm/msm/dp: Remove now unused connector_type from desc")
Fixes: 1b2d98bdd7b7 ("drm/... | ```diff
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 9622e58dce3e..e1228fb093ee 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -119,7 +119,7 @@ struct msm_dp_desc {
};
static const struct msm_dp_desc sc7180_dp_descs[] = {... |
caedbf17c48dcd9f076aa7157c1bb8ab8082c418 | Analyze and fix the following issue in the Linux kernel code: drm/msm: add msm8998 hdmi phy/pll support | Problem Details:
Add support for the HDMI PHY as present on the Qualcomm MSM8998 SoC.
This code is mostly copy & paste of the vendor code from msm-4.4
kernel.lnx.4.4.r38-rel.
Signed-off-by: Arnaud Vrac <avrac@freebox.fr>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Marc Gonzalez <mgonzale... | ```diff
diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index f5e2838c6a76..13110fcc46a8 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -37,6 +37,7 @@ msm-display-$(CONFIG_DRM_MSM_HDMI) += \
hdmi/hdmi_phy.o \
hdmi/hdmi_phy_8960.o \
hdmi/hdmi_phy_8996.o \
+... |
7f12a963b65872fda1219f065c1cc1b1b9a806e8 | Analyze and fix the following issue in the Linux kernel code: bcachefs: fix rebalance accounting | Problem Details:
Fixes: 49aa7830396b ("bcachefs: Fix rebalance_work accounting")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> | ```diff
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c
index a2274429e7f4..20219c1e6ddf 100644
--- a/fs/bcachefs/buckets.c
+++ b/fs/bcachefs/buckets.c
@@ -876,7 +876,7 @@ int bch2_trigger_extent(struct btree_trans *trans,
need_rebalance_delta -= s != 0;
need_rebalance_sectors_delta -= s;
- s = bch2... |
64dce81f8c373c681e62d5ffe0397c45a35d48a2 | Analyze and fix the following issue in the Linux kernel code: ipmi: docs: don't advertise deprecated sysfs entries | Problem Details:
"i2c-adapter" class entries are deprecated since 2009. Switch to the
proper location.
Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
Closes: https://lore.kernel.org/r/80c4a898-5867-4162-ac85-bdf7c7c68746@gmail.com
Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)")
Signed-off-by: Wolf... | ```diff
diff --git a/Documentation/driver-api/ipmi.rst b/Documentation/driver-api/ipmi.rst
index e224e47b6b09..dfa021eacd63 100644
--- a/Documentation/driver-api/ipmi.rst
+++ b/Documentation/driver-api/ipmi.rst
@@ -540,7 +540,7 @@ at module load time (for a module) with::
alerts_broken
The addresses are normal I2C... |
c94da2159dfdcc44b78a8b1f3ebe4909d4efc9ec | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62p: Fix ESM interrupt sources | Problem Details:
Fix interrupt sources for rti routed to the ESM0 as per [0], in 10.4
Interrupt Sources
Add comments to describe what interrupt sources are routed to ESM
modules.
[0] https://www.ti.com/lit/pdf/spruj83
Fixes: b5080c7c1f7e ("arm64: dts: ti: k3-am62p: Add nodes for more IPs")
Signed-off-by: Judith Mend... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
index 9701fc69aed9..9b6f51379108 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
@@ -260,8 +260,9 @@
mai... |
5c19aeb8ae4fc539a73d7ff8b25decd745950c39 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j721s2-evm-gesi-exp-board: Rename gpio-hog node name | Problem Details:
Fix the gpio hog node name to p15-hog to match up with gpio-hog
convention. This fixes dtbs_check warning:
p15: $nodename:0: 'p15' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$'
Acked-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Link: https://lore.kernel.org/r/20240830102822.3970269-1-nm@ti.com
Sign... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-evm-gesi-exp-board.dtso b/arch/arm64/boot/dts/ti/k3-j721s2-evm-gesi-exp-board.dtso
index 1be28283c7d9..8583178fa1f3 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-evm-gesi-exp-board.dtso
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-evm-gesi-exp-board.dtso
@@ -48,7 +48,7 @@... |
47ca0776e3637e8cfbf84483a0b0c22fbdf3a9f7 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am642-evm-nand: Rename pinctrl node and gpio-hog names | Problem Details:
Rename the pin mux and gpio-hog node names to match up with binding
rules. This fixes dtbs_check warnings:
'gpmc0-pins-default' does not match any of the regexes: '-pins(-[0-9]+)?$|-pin$', 'pinctrl-[0-9]+'
'gpio0-36' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$'
While at it, change the phandle name... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso b/arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
index f08c0e272b53..92faf762894c 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
@@ -12,7 +12,7 @@
#include "k3-pinctrl.h"
&main_pmx0 {
- ... |
2bea7920da8001172f54359395700616269ccb70 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am654-idk: Fix dtbs_check warning in ICSSG dmas | Problem Details:
ICSSG doesn't use mgmnt rsp dmas. But these are added in the dmas for
icssg1-eth and icssg0-eth node.
These mgmnt rsp dmas result in below dtbs_check warnings.
/workdir/arch/arm64/boot/dts/ti/k3-am654-idk.dtb: icssg1-eth: dmas: [[39, 49664], [39, 49665], [39, 49666], [39, 49667], [39, 49668], [39, 49... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am654-idk.dtso b/arch/arm64/boot/dts/ti/k3-am654-idk.dtso
index 97f7eb34b99a..b0ce2cb2fdc8 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-idk.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am654-idk.dtso
@@ -59,9 +59,7 @@
<&main_udmap 0xc107>, /* egress slice 1 */
... |
6c67a0f1647d486674a064d4abcadfb083a6f6da | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j784s4: Include entire FSS region in ranges | Problem Details:
Add FSS regions at 0x50000000, 0x400000000, and 0x600000000. Although
not used currently by the Linux FSS driver, these regions belong to
the FSS and should be included in the ranges mapping.
While here, a couple of these numbers had missing zeros which was
hidden by odd alignments, fix both these iss... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
index f3a6ed1c979d..f603380fc91c 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi
@@ -678,16 +678,16 @@
compatible = "simple-bus... |
a919e59c0c1563437ab1892ff39df441da7521a4 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j721s2: Include entire FSS region in ranges | Problem Details:
Add FSS regions at 0x50000000, 0x400000000, and 0x600000000. Although
not used currently by the Linux FSS driver, these regions belong to
the FSS and should be included in the ranges mapping.
While here, a couple of these numbers had missing zeros which was
hidden by odd alignments, fix both these iss... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi
index 8feb42c89e47..9d96b19d0e7c 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi
@@ -622,8 +622,8 @@
#address-cells = <2>;
#... |
16dee71beec8957ab89ee15e6f17fcb33503a9d2 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-j721e: Include entire FSS region in ranges | Problem Details:
Add FSS regions at 0x50000000, 0x400000000, and 0x600000000. Although
not used currently by the Linux FSS driver, these regions belong to
the FSS and should be included in the ranges mapping.
While here, a couple of these numbers had missing zeros which was
hidden by odd alignments, fix both these iss... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
index 6b6ef6a30614..3731ffb4a5c9 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
@@ -354,8 +354,8 @@
<0x0 0x47034000 0x0 0x470340... |
55799866382524cc5dae5bf90d2fa469dc7889a8 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am65: Include entire FSS region in ranges | Problem Details:
Add FSS regions at 0x50000000, 0x400000000, and 0x600000000. Although
not used currently by the Linux FSS driver, these regions belong to
the FSS and should be included in the ranges mapping.
While here, a couple of these numbers had missing zeros which was
hidden by odd alignments, fix both these iss... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
index 43c6118d2bf0..1a251d13f80a 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
@@ -292,13 +292,13 @@
ranges = <0x0 0x47000000 0x0 0x47000000 0x0 0x100>, /* FSS C... |
f962e8361adfa84e8252d3fc3e5e6bb879f029b1 | Analyze and fix the following issue in the Linux kernel code: net: mctp-serial: Fix missing escapes on transmit | Problem Details:
0x7d and 0x7e bytes are meant to be escaped in the data portion of
frames, but this didn't occur since next_chunk_len() had an off-by-one
error. That also resulted in the final byte of a payload being written
as a separate tty write op.
The chunk prior to an escaped byte would be one byte short, and t... | ```diff
diff --git a/drivers/net/mctp/mctp-serial.c b/drivers/net/mctp/mctp-serial.c
index 7a40d07ff77b..f39bbe255497 100644
--- a/drivers/net/mctp/mctp-serial.c
+++ b/drivers/net/mctp/mctp-serial.c
@@ -91,8 +91,8 @@ static int next_chunk_len(struct mctp_serial *dev)
* will be those non-escaped bytes, and does not i... |
4654cf52cbd07cb2d6ab6f55bcc5eb2dae8b736a | Analyze and fix the following issue in the Linux kernel code: PCI: vmd: Fix indentation issue in vmd_shutdown() | Problem Details:
The code in vmd_shutdown() had an indentation issue where spaces were
used instead of tabs. This commit corrects the indentation to use tabs,
adhering to the Linux kernel coding style guidelines.
Issue reported by the checkpatch.pl script:
ERROR: code indent should use tabs where possible
#1056: ... | ```diff
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index a726de0af011..28ce903b96b6 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -1053,9 +1053,9 @@ static void vmd_remove(struct pci_dev *dev)
static void vmd_shutdown(struct pci_dev *dev)
{
- st... |
de55149b6639e903c4d06eb0474ab2c05060e61d | Analyze and fix the following issue in the Linux kernel code: xfs: fix a sloppy memory handling bug in xfs_iroot_realloc | Problem Details:
While refactoring code, I noticed that when xfs_iroot_realloc tries to
shrink a bmbt root block, it allocates a smaller new block and then
copies "records" and pointers to the new block. However, bmbt root
blocks cannot ever be leaves, which means that it's not technically
correct to copy records. We... | ```diff
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c
index 9d11ae015909..622382300904 100644
--- a/fs/xfs/libxfs/xfs_inode_fork.c
+++ b/fs/xfs/libxfs/xfs_inode_fork.c
@@ -463,15 +463,15 @@ xfs_iroot_realloc(
}
/*
- * Only copy the records and pointers if there are any.
+ * Only c... |
c460f0f1a2bc219495e19e43daac6f8c902d81d8 | Analyze and fix the following issue in the Linux kernel code: xfs: fix FITRIM reporting again | Problem Details:
Don't report FITRIMming more bytes than possibly exist in the
filesystem.
Fixes: 410e8a18f8e93 ("xfs: don't bother reporting blocks trimmed via FITRIM")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de> | ```diff
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index bf1e3f330018..d8c4a5dcca7a 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -707,7 +707,7 @@ xfs_ioc_trim(
return last_error;
range.len = min_t(unsigned long long, range.len,
- XFS_FSB_TO_B(mp, max_blocks));
+ XFS_FSB_T... |
64dfa18d6e322034c8a30b080f4c380a0b20bb7f | Analyze and fix the following issue in the Linux kernel code: xfs: fix C++ compilation errors in xfs_fs.h | Problem Details:
Several people reported C++ compilation errors due to things that C
compilers allow but C++ compilers do not. Fix both of these problems,
and hope there aren't more of these brown paper bags in 2 months when we
finally get these fixes through the process into a released xfsprogs.
NOTE: I am submittin... | ```diff
diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h
index c85c8077fac3..860284064c5a 100644
--- a/fs/xfs/libxfs/xfs_fs.h
+++ b/fs/xfs/libxfs/xfs_fs.h
@@ -8,6 +8,7 @@
/*
* SGI's XFS filesystem's major stuff (constants, structures)
+ * NOTE: This file must be compile-able with C++ compilers.
*/
... |
9e9be9840fad01dec3ee958fc401c4863c360202 | Analyze and fix the following issue in the Linux kernel code: xfs: fix broken variable-sized allocation detection in xfs_rtallocate_extent_block | Problem Details:
This function tries to find a suitable free space extent starting from
a particular rtbitmap block. Some time ago, I added a clamping function
to prevent the free space scans from running off the end of the bitmap,
but I didn't quite get the logic right.
Let's say there's an allocation request with a... | ```diff
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index d27bfec08ef8..72123e2337d8 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -244,6 +244,7 @@ xfs_rtallocate_extent_block(
xfs_rtxnum_t end; /* last rtext in chunk */
xfs_rtxnum_t i; /* current rtext trying */
xfs_rtxnum_t nex... |
e99aa0401eb4d3b0ce67cc8a9b98595958b0d038 | Analyze and fix the following issue in the Linux kernel code: xfs: don't scan off the end of the rt volume in xfs_rtallocate_extent_block | Problem Details:
The loop conditional here is not quite correct because an rtbitmap block
can represent rtextents beyond the end of the rt volume. There's no way
that it makes sense to scan for free space beyond EOFS, so don't do it.
This overrun has been present since v2.6.0.
Also fix the type of bestlen, which was ... | ```diff
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index c65ee8d1d38d..58081ce5247b 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -229,22 +229,20 @@ xfs_rtallocate_extent_block(
xfs_rtxnum_t *rtx) /* out: start rtext allocated */
{
struct xfs_mount *mp = args->mp;
- xfs_rtxnum_t b... |
a18a69bbec083093c3bfebaec13ce0b4c6b2af7e | Analyze and fix the following issue in the Linux kernel code: xfs: use the recalculated transaction reservation in xfs_growfs_rt_bmblock | Problem Details:
After going great length to calculate the transaction reservation for
the new geometry, we should also use it to allocate the transaction it
was calculated for.
Fixes: 578bd4ce7100 ("xfs: recompute growfsrtfree transaction reservation while growing rt volume")
Signed-off-by: Christoph Hellwig <hch@lst... | ```diff
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index d290749b0304..a9f08d96f1fe 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -730,10 +730,12 @@ xfs_growfs_rt_bmblock(
xfs_rtsummary_blockcount(mp, nmp->m_rsumlevels,
nmp->m_sb.sb_rbmblocks));
- /* recompute growfsrt reservati... |
dbfbb376b50c770f91263d8310e81573f9ad41db | Analyze and fix the following issue in the Linux kernel code: drm/msm/a6xx: Add A621 support | Problem Details:
A621 is a clear A662 derivative (same lineage as A650), no explosions
or sick features, other than a NoC bug which can stall the GPU..
Add support for it.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/611100/
Signed-off-by: Rob Clark <robdc... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
index 3f7f9b035e26..0312b6ee0356 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_catalog.c
@@ -129,6 +129,59 @@ static const struct adreno_reglist a615_hwcg[] = {
{},... |
a30f9f65b5ac82d4390548c32ed9c7f05de7ddf5 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a5xx: workaround early ring-buffer emptiness check | Problem Details:
There is another cause for soft lock-up of GPU in empty ring-buffer:
race between GPU executing last commands and CPU checking ring for
emptiness. On GPU side IRQ for retire is triggered by CACHE_FLUSH_TS
event and RPTR shadow (which is used to check ring emptiness) is updated
a bit later from CP_CONTE... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 8a1176983f58..e09044930547 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -65,6 +65,8 @@ void a5xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
static... |
ce050f307ad93bcc5958d0dd35fc276fd394d274 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a5xx: fix races in preemption evaluation stage | Problem Details:
On A5XX GPUs when preemption is used it's invietable to enter a soft
lock-up state in which GPU is stuck at empty ring-buffer doing nothing.
This appears as full UI lockup and not detected as GPU hang (because
it's not). This happens due to not triggering preemption when it was
needed. Sometimes this s... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.h b/drivers/gpu/drm/msm/adreno/a5xx_gpu.h
index c7187bcc5e90..b4d06ca3e499 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.h
@@ -36,6 +36,7 @@ struct a5xx_gpu {
uint64_t preempt_iova[MSM_GPU_MAX_RINGS];
atomic_t ... |
64fd6d01a52904bdbda0ce810a45a428c995a4ca | Analyze and fix the following issue in the Linux kernel code: drm/msm/a5xx: properly clear preemption records on resume | Problem Details:
Two fields of preempt_record which are used by CP aren't reset on
resume: "data" and "info". This is the reason behind faults which happen
when we try to switch to the ring that was active last before suspend.
In addition those faults can't be recovered from because we use suspend
and resume to do so (... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
index f58dd564d122..67a8ef4adf6b 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c
@@ -204,6 +204,8 @@ void a5xx_preempt_hw_init(struct msm_gpu *gpu)
return;... |
db9dec2db76146d65e1cfbb6afb2e2bd5dab67f8 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a5xx: disable preemption in submits by default | Problem Details:
Fine grain preemption (switching from/to points within submits)
requires extra handling in command stream of those submits, especially
when rendering with tiling (using GMEM). However this handling is
missing at this point in mesa (and always was). For this reason we get
random GPU faults and hangs if ... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index 34827fe807d4..8a1176983f58 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -150,9 +150,13 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *subm... |
4b84551a35e36bbed48850dc870191a13f0841fd | Analyze and fix the following issue in the Linux kernel code: nfsd: use system_unbound_wq for nfsd_file_gc_worker() | Problem Details:
After many rounds of changes in filecache.c, the fix by commit
ce7df055(NFSD: Make the file_delayed_close workqueue UNBOUND)
is gone, now we are getting syslog messages like these:
[ 1618.186688] workqueue: nfsd_file_gc_worker [nfsd] hogged CPU for >13333us 4 times, consider switching to WQ_UNBOUND
[ ... | ```diff
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 93e2ffa5eae6..9e9d246f993c 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -112,7 +112,7 @@ static void
nfsd_file_schedule_laundrette(void)
{
if (test_bit(NFSD_FILE_CACHE_UP, &nfsd_file_flags))
- queue_delayed_work(system_wq, &nfsd_... |
8a7926176378460e0d91e02b03f0ff20a8709a60 | Analyze and fix the following issue in the Linux kernel code: nfsd: fix refcount leak when file is unhashed after being found | Problem Details:
If we wait_for_construction and find that the file is no longer hashed,
and we're going to retry the open, the old nfsd_file reference is
currently leaked. Put the reference before retrying.
Fixes: c6593366c0bf ("nfsd: don't kill nfsd_files because of lease break error")
Signed-off-by: Jeff Layton <jl... | ```diff
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 9d7bb65b0746..6af4e6027227 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -1051,6 +1051,7 @@ wait_for_construction:
status = nfserr_jukebox;
goto construction_err;
}
+ nfsd_file_put(nf);
open_retry = false;
fh_put(fhp)... |
81a95c2b1d605743220f28db04b8da13a65c4059 | Analyze and fix the following issue in the Linux kernel code: nfsd: remove unneeded EEXIST error check in nfsd_do_file_acquire | Problem Details:
Given that we do the search and insertion while holding the i_lock, I
don't think it's possible for us to get EEXIST here. Remove this case.
Fixes: c6593366c0bf ("nfsd: don't kill nfsd_files because of lease break error")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Tested-by: Youzhong Yang <youzho... | ```diff
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index 01d76f6bc80a..9d7bb65b0746 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -1037,8 +1037,6 @@ retry:
if (likely(ret == 0))
goto open_file;
- if (ret == -EEXIST)
- goto retry;
trace_nfsd_file_insert_err(rqstp, inode, may_flags, ... |
8e6e2ffa6569a205f1805cbaeca143b556581da6 | Analyze and fix the following issue in the Linux kernel code: nfsd: add list_head nf_gc to struct nfsd_file | Problem Details:
nfsd_file_put() in one thread can race with another thread doing
garbage collection (running nfsd_file_gc() -> list_lru_walk() ->
nfsd_file_lru_cb()):
* In nfsd_file_put(), nf->nf_ref is 1, so it tries to do nfsd_file_lru_add().
* nfsd_file_lru_add() returns true (with NFSD_FILE_REFERENCED bit set... | ```diff
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
index f4704f5d4086..01d76f6bc80a 100644
--- a/fs/nfsd/filecache.c
+++ b/fs/nfsd/filecache.c
@@ -216,6 +216,7 @@ nfsd_file_alloc(struct net *net, struct inode *inode, unsigned char need,
return NULL;
INIT_LIST_HEAD(&nf->nf_lru);
+ INIT_LIST_HEAD(&nf->... |
43b42ed438bfff6bb5a51cc27a1658c03cd223fd | Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Fix the previous conversion to kstrtoul() | Problem Details:
The previous replacement from simple_strtoul() to kstrtoul() forgot
that the passed pointer must be an unsigned long int pointer, while
the value used there is a sized_t pointer. Fix it.
Fixes: 61bc4deff033 ("ALSA: pcm: replace simple_strtoul to kstrtoul")
Reported-by: kernel test robot <lkp@intel.co... | ```diff
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index 73d4fc49a0ca..5001181208df 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -183,7 +183,7 @@ static void snd_pcm_lib_preallocate_proc_write(struct snd_info_entry *entry,
struct snd_pcm_substream *substream = entry->priva... |
6a422a96bc84cf9b9f0ff741f293a1f9059e0883 | Analyze and fix the following issue in the Linux kernel code: hwmon: ltc2991: fix register bits defines | Problem Details:
In the LTC2991, V5 and V6 channels use the low nibble of the
"V5, V6, V7, and V8 Control Register" for configuration, but currently,
the high nibble is defined.
This patch changes the defines to use the low nibble.
Fixes: 2b9ea4262ae9 ("hwmon: Add driver for ltc2991")
Signed-off-by: Pawel Dembicki <p... | ```diff
diff --git a/drivers/hwmon/ltc2991.c b/drivers/hwmon/ltc2991.c
index 573cd8f5721b..7ca139e4b6af 100644
--- a/drivers/hwmon/ltc2991.c
+++ b/drivers/hwmon/ltc2991.c
@@ -42,9 +42,9 @@
#define LTC2991_V7_V8_FILT_EN BIT(7)
#define LTC2991_V7_V8_TEMP_EN BIT(5)
#define LTC2991_V7_V8_DIFF_EN BIT(4)
-#define LTC29... |
7a7f974594cd5d6723242cb8c018b59db16fe27b | Analyze and fix the following issue in the Linux kernel code: modpost: improve the section mismatch warning format | Problem Details:
This commit improves the section mismatch warning format when there is
no suitable symbol name to print.
The section mismatch warning prints the reference source in the form
of <symbol_name>+<offset> and the reference destination in the form
of <symbol_name>.
However, there are some corner cases wher... | ```diff
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 66bd89b2a8b6..704963cba5fe 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -697,10 +697,7 @@ static char *get_modinfo(struct elf_info *info, const char *tag)
static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)
{
-... |
96490176f1e11947be2bdd2700075275e2c27310 | Analyze and fix the following issue in the Linux kernel code: kconfig: remove P_SYMBOL property | Problem Details:
P_SYMBOL is a pseudo property that was previously used for data linking
purposes.
It is no longer used except for debug prints. Remove it.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | ```diff
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 2bc96cd28253..c82d08bbd704 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -168,7 +168,6 @@ enum prop_type {
P_SELECT, /* select BAR */
P_IMPLY, /* imply BAR */
P_RANGE, /* range 7..100 (for a symbol) */
- P_SYM... |
2893f00322922b2adce07fd6d0db37d6b8e30977 | Analyze and fix the following issue in the Linux kernel code: tinyconfig: remove unnecessary 'is not set' for choice blocks | Problem Details:
This reverts the following commits:
- 236dec051078 ("kconfig: tinyconfig: provide whole choice blocks to
avoid warnings")
- b0f269728ccd ("x86/config: Fix warning for 'make ARCH=x86_64
tinyconfig'")
Since commit f79dc03fe68c ("kconfig: refactor choice value calculation"),
it is no longer nec... | ```diff
diff --git a/arch/x86/configs/tiny.config b/arch/x86/configs/tiny.config
index be3ee4294903..aabafa3faa6d 100644
--- a/arch/x86/configs/tiny.config
+++ b/arch/x86/configs/tiny.config
@@ -1,6 +1,2 @@
CONFIG_NOHIGHMEM=y
-# CONFIG_HIGHMEM4G is not set
-# CONFIG_HIGHMEM64G is not set
-# CONFIG_UNWINDER_ORC is not ... |
b0d9c74d8865361eb214d066e8620e13ace14ba1 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-sdb: align pin config nodes with bindings | Problem Details:
Bindings expect pin configuration nodes in pinctrl to match certain
naming and not be part of another fake node:
imx7d-sdb-sht11.dtb: pinctrl@30330000: 'imx7d-sdb' does not match any of the regexes: 'grp$', 'pinctrl-[0-9]+'
Drop the "imx7d-sdb" wrapping node and adjust the names to have "grp"
prefi... | ```diff
diff --git a/arch/arm/boot/dts/nxp/imx/imx7d-sdb-reva.dts b/arch/arm/boot/dts/nxp/imx/imx7d-sdb-reva.dts
index cabdaa6dc518..40156cd9195f 100644
--- a/arch/arm/boot/dts/nxp/imx/imx7d-sdb-reva.dts
+++ b/arch/arm/boot/dts/nxp/imx/imx7d-sdb-reva.dts
@@ -21,23 +21,21 @@
};
&iomuxc {
- imx7d-sdb {
- pinctrl_tsc... |
0e49cfe364dea4345551516eb2fe53135a10432b | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx7d-zii-rmu2: fix Ethernet PHY pinctrl property | Problem Details:
There is no "fsl,phy" property in pin controller pincfg nodes:
imx7d-zii-rmu2.dtb: pinctrl@302c0000: enet1phyinterruptgrp: 'fsl,pins' is a required property
imx7d-zii-rmu2.dtb: pinctrl@302c0000: enet1phyinterruptgrp: 'fsl,phy' does not match any of the regexes: 'pinctrl-[0-9]+'
Fixes: f496e675008... | ```diff
diff --git a/arch/arm/boot/dts/nxp/imx/imx7d-zii-rmu2.dts b/arch/arm/boot/dts/nxp/imx/imx7d-zii-rmu2.dts
index 521493342fe9..8f5566027c25 100644
--- a/arch/arm/boot/dts/nxp/imx/imx7d-zii-rmu2.dts
+++ b/arch/arm/boot/dts/nxp/imx/imx7d-zii-rmu2.dts
@@ -350,7 +350,7 @@
&iomuxc_lpsr {
pinctrl_enet1_phy_interru... |
72a6e22c604c95ddb3b10b5d3bb85b6ff4dbc34f | Analyze and fix the following issue in the Linux kernel code: fscache: delete fscache_cookie_lru_timer when fscache exits to avoid UAF | Problem Details:
The fscache_cookie_lru_timer is initialized when the fscache module
is inserted, but is not deleted when the fscache module is removed.
If timer_reduce() is called before removing the fscache module,
the fscache_cookie_lru_timer will be added to the timer list of
the current cpu. Afterwards, a use-afte... | ```diff
diff --git a/fs/netfs/fscache_main.c b/fs/netfs/fscache_main.c
index 42e98bb523e3..49849005eb7c 100644
--- a/fs/netfs/fscache_main.c
+++ b/fs/netfs/fscache_main.c
@@ -103,6 +103,7 @@ void __exit fscache_exit(void)
kmem_cache_destroy(fscache_cookie_jar);
fscache_proc_cleanup();
+ timer_shutdown_sync(&fscac... |
10ba0854c5e6165b58e17bda5fb671e729fecf9e | Analyze and fix the following issue in the Linux kernel code: PCI: qcom: Disable mirroring of DBI and iATU register space in BAR region | Problem Details:
PARF hardware block which is a wrapper on top of DWC PCIe controller
mirrors the DBI and ATU register space. It uses PARF_SLV_ADDR_SPACE_SIZE
register to get the size of the memory block to be mirrored and uses
PARF_DBI_BASE_ADDR, PARF_ATU_BASE_ADDR registers to determine the base
address of DBI and AT... | ```diff
diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
index 1b5aba1f0c92..bc3a5d6b0177 100644
--- a/drivers/pci/controller/dwc/pcie-designware.c
+++ b/drivers/pci/controller/dwc/pcie-designware.c
@@ -112,6 +112,7 @@ int dw_pcie_get_resources(struct dw_pcie *pci... |
bba1251edf8501f85304b7d65ae2aac309f2d0a1 | Analyze and fix the following issue in the Linux kernel code: PCI: qcom-ep: Modify 'global_irq' and 'perst_irq' IRQ device names | Problem Details:
Currently, the IRQ device name for both of these IRQs doesn't have Qcom
specific prefix and PCIe domain number. This causes 2 issues:
1. Pollutes the global IRQ namespace since 'global' is a common name.
2. When more than one EP controller instance is present in the SoC, naming
conflict will occur.
H... | ```diff
diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
index 0bb0a056dd8f..d0a27fa6fdc8 100644
--- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
+++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
@@ -711,8 +711,15 @@ static irqreturn_t qcom_pcie_ep_perst_irq_thread(int irq... |
95bebcbd657cf8eb86025a2b20961e43d2e433f5 | Analyze and fix the following issue in the Linux kernel code: PCI: qcom-ep: Reword the error message for receiving unknown global IRQ event | Problem Details:
Current error message just prints the contents of PARF_INT_ALL_STATUS
register as if like the IRQ event number. It could mislead the users.
Reword it to make it clear that the error message is actually showing the
interrupt status register to help debug spurious IRQ events.
While at it, let's also swi... | ```diff
diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
index 972a90eba494..0bb0a056dd8f 100644
--- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
+++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
@@ -679,7 +679,8 @@ static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq... |
6c8c4d077f156cf64b16acd2a084a1a78f0a0dd4 | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: correct TQ Systems DTS patterns | Problem Details:
Fix file patterns for TQ systems DTS after re-organizing the ARM DTS
structure to fix get_maintainers.pl self-tests like:
./MAINTAINERS:23329: warning: no file matches F: arch/arm/boot/dts/imx*mba*.dts*
Fixes: 724ba6751532 ("ARM: dts: Move .dts files to vendor sub-directories")
Signed-off-by: Krzys... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 42decde38320..a8dbc4e3658d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23171,9 +23171,8 @@ TQ SYSTEMS BOARD & DRIVER SUPPORT
L: linux@ew.tq-group.com
S: Supported
W: https://www.tq-group.com/en/products/tq-embedded/
-F: arch/arm/boot/dts/imx*mba*.dts*
-F: arch/... |
b686ecdeacf6658e1348c1a32a08e2e72f7c0f00 | Analyze and fix the following issue in the Linux kernel code: riscv: misaligned: Restrict user access to kernel memory | Problem Details:
raw_copy_{to,from}_user() do not call access_ok(), so this code allowed
userspace to access any virtual memory address.
Cc: stable@vger.kernel.org
Fixes: 7c83232161f6 ("riscv: add support for misaligned trap handling in S-mode")
Fixes: 441381506ba7 ("riscv: misaligned: remove CONFIG_RISCV_M_MODE speci... | ```diff
diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c
index 192cd5603e95..d4fd8af7aaf5 100644
--- a/arch/riscv/kernel/traps_misaligned.c
+++ b/arch/riscv/kernel/traps_misaligned.c
@@ -417,7 +417,7 @@ int handle_misaligned_load(struct pt_regs *regs)
val.data_u64 = 0;
if (... |
3d3020c461936009dc58702e267ff67b0076cbf2 | Analyze and fix the following issue in the Linux kernel code: bcachefs: Mark more errors as autofix | Problem Details:
errors that are known to always be safe to fix should be autofix: this
should be most errors even at this point, but that will need some
thorough review.
note that errors are still logged in the superblock, so we'll still know
that they happened.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.... | ```diff
diff --git a/fs/bcachefs/sb-errors_format.h b/fs/bcachefs/sb-errors_format.h
index d3a498617303..f0c14702f9e6 100644
--- a/fs/bcachefs/sb-errors_format.h
+++ b/fs/bcachefs/sb-errors_format.h
@@ -23,7 +23,7 @@ enum bch_fsck_flags {
x(jset_past_bucket_end, 9, 0) \
x(jset_seq_blacklisted, 10, 0) \... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.