id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
c6d9a4a93725ea396d48a39cdef67befe6b392c3 | Analyze and fix the following issue in the Linux kernel code: Makefile: drop warn-stack-size plugin opt | Problem Details:
Now that the minimum supported version of LLVM for building the kernel has
been bumped to 13.0.1, the inner ifeq statement is always false, as the
build will fail during the configuration stage for older LLVM versions.
This effectively reverts commit 24845dcb170e ("Makefile: LTO: have linker
check -Wf... | ```diff
diff --git a/Makefile b/Makefile
index 41fa8a2565f5..6c921a465c85 100644
--- a/Makefile
+++ b/Makefile
@@ -951,14 +951,6 @@ CC_FLAGS_LTO += -fvisibility=hidden
# Limit inlining across translation units to reduce binary size
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
-
-# Check for frame size exceeding t... |
9c1b86f8ce04ec4aa22c1119480b3950bf4724c8 | Analyze and fix the following issue in the Linux kernel code: kbuild: raise the minimum supported version of LLVM to 13.0.1 | Problem Details:
Patch series "Bump the minimum supported version of LLVM to 13.0.1".
This series bumps the minimum supported version of LLVM for building the
kernel to 13.0.1. The first patch does the bump and all subsequent
patches clean up all the various workarounds and checks for earlier
versions.
Quoting the f... | ```diff
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst
index 50b3d1cb1115..d7306b8cad13 100644
--- a/Documentation/process/changes.rst
+++ b/Documentation/process/changes.rst
@@ -30,7 +30,7 @@ you probably needn't concern yourself with pcmciautils.
Program Minimal ver... |
b73aa539a7789d2366aa7ffa627cede77d6f1c4e | Analyze and fix the following issue in the Linux kernel code: panic: suppress gnu_printf warning | Problem Details:
with GCC 13.2.1 and W=1, there's compiling warning like this:
kernel/panic.c: In function `__warn':
kernel/panic.c:676:17: warning: function `__warn' might be a candidate for `gnu_printf' format attribute [-Wsuggest-attribute=format]
676 | vprintk(args->fmt, args->args);
| ... | ```diff
diff --git a/kernel/panic.c b/kernel/panic.c
index 2807639aab51..d49b68184c56 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -666,8 +666,13 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
pr_warn("WARNING: CPU: %d PID: %d at %pS\n",
raw_smp_processor_id(), current->pid, call... |
3911fb647b65f11d42bc97e0890bba8ef7e1e0e6 | Analyze and fix the following issue in the Linux kernel code: lib/win_minmax: fix header comments | Problem Details:
Don't use "/**" kernel-doc comment marker for non-kernel-doc
comment.
Correct the filename but omit the path since we know where it is
and it could change (but not likely).
Link: https://lkml.kernel.org/r/20240107220155.29013-1-rdunlap@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>... | ```diff
diff --git a/include/linux/win_minmax.h b/include/linux/win_minmax.h
index 4ca2842d2842..6a5bb052fcc2 100644
--- a/include/linux/win_minmax.h
+++ b/include/linux/win_minmax.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/**
- * lib/minmax.c: windowed min/max tracker by Kathleen Nichols.
+/*
+ * win_... |
c20241400c04d70cc2b6aa3f10c080e51600c260 | Analyze and fix the following issue in the Linux kernel code: ocfs2: spelling fix | Problem Details:
Modify reques to request in the comment.
Link: https://lkml.kernel.org/r/20240108015604.38377-1-zhangyongzhen@kylinos.cn
Signed-off-by: Yongzhen Zhang <zhangyongzhen@kylinos.cn>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc:... | ```diff
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 64a6ef638495..cb40cafbc062 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -1615,7 +1615,7 @@ update_holders:
unlock:
lockres_clear_flags(lockres, OCFS2_LOCK_UPCONVERT_FINISHING);
- /* ocfs2_unblock_lock reques on seeing OCFS2_LOCK_UPCO... |
2947a4567f3a79127d2d540384e7f042106c1a24 | Analyze and fix the following issue in the Linux kernel code: treewide: update LLVM Bugzilla links | Problem Details:
LLVM moved their issue tracker from their own Bugzilla instance to GitHub
issues. While all of the links are still valid, they may not necessarily
show the most up to date information around the issues, as all updates
will occur on GitHub, not Bugzilla.
Another complication is that the Bugzilla issue... | ```diff
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 051247027da0..457cee9b03ee 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -144,11 +144,11 @@ CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mlong-double... |
f2d5dcb48f7ba9e3ff249d58fc1fa963d374e66a | Analyze and fix the following issue in the Linux kernel code: bounds: support non-power-of-two CONFIG_NR_CPUS | Problem Details:
ilog2() rounds down, so for example when PowerPC 85xx sets CONFIG_NR_CPUS
to 24, we will only allocate 4 bits to store the number of CPUs instead of
5. Use bits_per() instead, which rounds up. Found by code inspection.
The effect of this would probably be a misaccounting when doing NUMA
balancing, s... | ```diff
diff --git a/kernel/bounds.c b/kernel/bounds.c
index b529182e8b04..c5a9fcd2d622 100644
--- a/kernel/bounds.c
+++ b/kernel/bounds.c
@@ -19,7 +19,7 @@ int main(void)
DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
#ifdef CONFIG_SMP
- DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
+ ... |
7d8cebb9630af71f04cb27314a4effbc0f4f8648 | Analyze and fix the following issue in the Linux kernel code: Docs/admin-guide/mm/damon/usage: fix wrong quotas diabling condition | Problem Details:
After the introduction of DAMOS quotas, DAMOS quotas is not disabled if
both size and time quotas are zero but the quota goal is set. The new
rule is also applied to DAMON sysfs interface, but the usage doc is not
updated. Update it.
Link: https://lkml.kernel.org/r/20240217005842.87348-6-sj@kernel.o... | ```diff
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index ae5b986a5976..22254997723c 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -329,7 +329,8 @@ respectively. Then, DAMON tries to use only ... |
669971b406f0d4a6ffe0816ec1281cbf8f99e307 | Analyze and fix the following issue in the Linux kernel code: Docs/mm/damon: move DAMON operation sets list from the usage to the design document | Problem Details:
The list of DAMON operation sets and their explanation, which may better
to be on design document, is written on the usage document. Move the
detail to design document and make the usage document only reference the
design document.
[sj@kernel.org: fix a typo on a reference link]
Link: https://lkml.... | ```diff
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index 0335d584956b..68d00e8f0140 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -180,19 +180,14 @@ In each context directory, two files (``ava... |
0a1ebc17a710011486e919983e03837d450ff2ee | Analyze and fix the following issue in the Linux kernel code: Docs/mm/damon/maintainer-profile: fix reference links for mm-[un]stable tree | Problem Details:
Patch series "Docs/mm/damon: misc readability improvements".
Fix trivial mistakes and improve layout of information on different
documents for DAMON.
This patch (of 5):
A couple of sentences on maintainer-profile.rst are having reference links
for mm-unstable and mm-stable trees with wrong rst mark... | ```diff
diff --git a/Documentation/mm/damon/maintainer-profile.rst b/Documentation/mm/damon/maintainer-profile.rst
index a84c14e59053..5a306e4de22e 100644
--- a/Documentation/mm/damon/maintainer-profile.rst
+++ b/Documentation/mm/damon/maintainer-profile.rst
@@ -21,8 +21,8 @@ be queued in mm-stable [3]_ , and finally p... |
952237b5a9b79acf1212b40ad1e993557e3cb0ca | Analyze and fix the following issue in the Linux kernel code: kasan: increase the number of bits to shift when recording extra timestamps | Problem Details:
In 5d4c6ac94694 ("kasan: record and report more information") I thought
that printk only displays a maximum of 99999 seconds, but actually printk
can display a larger number of seconds.
So increase the number of bits to shift when recording the extra timestamp
(44 bits), without affecting the precisio... | ```diff
diff --git a/mm/kasan/common.c b/mm/kasan/common.c
index 610efae91220..f2747ed30da0 100644
--- a/mm/kasan/common.c
+++ b/mm/kasan/common.c
@@ -55,7 +55,7 @@ void kasan_set_track(struct kasan_track *track, depot_stack_handle_t stack)
u64 ts_nsec = local_clock();
track->cpu = cpu;
- track->timestamp = ts_ns... |
902ccb86ed02eea5b81c2afb514c0a7d72f63de2 | Analyze and fix the following issue in the Linux kernel code: dax: fix incorrect list of data cache aliasing architectures | Problem Details:
commit d92576f1167c ("dax: does not work correctly with virtual aliasing caches")
prevents DAX from building on architectures with virtually aliased
dcache with:
depends on !(ARM || MIPS || SPARC)
This check is too broad (e.g. recent ARMv7 don't have virtually aliased
dcaches), and also misses many... | ```diff
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 7643b1a078d9..54e528779877 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -13,6 +13,7 @@
#include <linux/uio.h>
#include <linux/dax.h>
#include <linux/fs.h>
+#include <linux/cacheinfo.h>
#include "dax-private.h"
/**
@@ -456,9 +45... |
8690bbcf3b7010b31fdbf3851e1add6ae19b8624 | Analyze and fix the following issue in the Linux kernel code: Introduce cpu_dcache_is_aliasing() across all architectures | Problem Details:
Introduce a generic way to query whether the data cache is virtually
aliased on all architectures. Its purpose is to ensure that subsystems
which are incompatible with virtually aliased data caches (e.g. FS_DAX)
can reliably query this.
For data cache aliasing, there are three scenarios dependending o... | ```diff
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 1b0483c51cc1..7d294a3242a4 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -6,6 +6,7 @@
config ARC
def_bool y
select ARC_TIMERS
+ select ARCH_HAS_CPU_CACHE_ALIASING
select ARCH_HAS_CACHE_LINE_SIZE
select ARCH_HAS_DEBUG_VM_PGTABLE
select A... |
1df4ca0155acb37b9b1d03ab91323d70a309ff54 | Analyze and fix the following issue in the Linux kernel code: dax: check for data cache aliasing at runtime | Problem Details:
Replace the following fs/Kconfig:FS_DAX dependency:
depends on !(ARM || MIPS || SPARC)
By a runtime check within alloc_dax(). This runtime check returns
ERR_PTR(-EOPNOTSUPP) if the @ops parameter is non-NULL (which means
the kernel is using an aliased mapping) on an architecture which
has data cach... | ```diff
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 97ef2a9d878d..7643b1a078d9 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -451,6 +451,16 @@ struct dax_device *alloc_dax(void *private, const struct dax_operations *ops)
dev_t devt;
int minor;
+ /*
+ * Unavailable on architecture... |
562ce8285b5da3f0d2087341f262c0c728d43f31 | Analyze and fix the following issue in the Linux kernel code: virtio: treat alloc_dax() -EOPNOTSUPP failure as non-fatal | Problem Details:
In preparation for checking whether the architecture has data cache
aliasing within alloc_dax(), modify the error handling of virtio
virtio_fs_setup_dax() to treat alloc_dax() -EOPNOTSUPP failure as
non-fatal.
Link: https://lkml.kernel.org/r/20240215144633.96437-7-mathieu.desnoyers@efficios.com
Co-dev... | ```diff
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 5f1be1da92ce..a28466c2da71 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -16,6 +16,7 @@
#include <linux/fs_context.h>
#include <linux/fs_parser.h>
#include <linux/highmem.h>
+#include <linux/cleanup.h>
#include <linux/uio.h>
#incl... |
cf7fe690abbbe520034843b97423d35e0acf9bd8 | Analyze and fix the following issue in the Linux kernel code: dcssblk: handle alloc_dax() -EOPNOTSUPP failure | Problem Details:
In preparation for checking whether the architecture has data cache
aliasing within alloc_dax(), modify the error handling of dcssblk
dcssblk_add_store() to handle alloc_dax() -EOPNOTSUPP failures.
Considering that s390 is not a data cache aliasing architecture,
and considering that DCSSBLK selects DA... | ```diff
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 4b7ecd4fd431..f363c1d51d9a 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -549,6 +549,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
int rc, i, j, num_of_segmen... |
c29290728decdf58b48b10a58861beca3f2f87f0 | Analyze and fix the following issue in the Linux kernel code: dm: treat alloc_dax() -EOPNOTSUPP failure as non-fatal | Problem Details:
In preparation for checking whether the architecture has data cache
aliasing within alloc_dax(), modify the error handling of dm alloc_dev()
to treat alloc_dax() -EOPNOTSUPP failure as non-fatal.
Link: https://lkml.kernel.org/r/20240215144633.96437-5-mathieu.desnoyers@efficios.com
Fixes: d92576f1167c ... | ```diff
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 8dcabf84d866..10c73af93d00 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2054,6 +2054,7 @@ static void cleanup_mapped_device(struct mapped_device *md)
static struct mapped_device *alloc_dev(int minor)
{
int r, numa_node_id = dm_get_numa_node();
+... |
f4d373ddd699561d81e79f17bb68064b1a9b686b | Analyze and fix the following issue in the Linux kernel code: nvdimm/pmem: Treat alloc_dax() -EOPNOTSUPP failure as non-fatal | Problem Details:
In preparation for checking whether the architecture has data cache
aliasing within alloc_dax(), modify the error handling of nvdimm/pmem
pmem_attach_disk() to treat alloc_dax() -EOPNOTSUPP failure as non-fatal.
[ Based on commit "nvdimm/pmem: Fix leak on dax_add_host() failure". ]
Link: https://lkml... | ```diff
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 9fe358090720..e9898457a7bd 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -560,17 +560,19 @@ static int pmem_attach_disk(struct device *dev,
dax_dev = alloc_dax(pmem, &pmem_dax_ops);
if (IS_ERR(dax_dev)) {
rc = PTR_ERR(da... |
6d439c18d9b190ab1e0f1196bc45590f95752bf1 | Analyze and fix the following issue in the Linux kernel code: dax: alloc_dax() return ERR_PTR(-EOPNOTSUPP) for CONFIG_DAX=n | Problem Details:
Change the return value from NULL to PTR_ERR(-EOPNOTSUPP) for
CONFIG_DAX=n to be consistent with the fact that CONFIG_DAX=y
never returns NULL.
This is done in preparation for using cpu_dcache_is_aliasing() in a
following change which will properly support architectures which detect
data cache aliasin... | ```diff
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index f4b635526345..97ef2a9d878d 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -319,6 +319,11 @@ EXPORT_SYMBOL_GPL(dax_alive);
* that any fault handlers or operations that might have seen
* dax_alive(), have completed. Any operations th... |
2807c54b3809ca5e51e5a9dfa5e9ddb8993a0e6f | Analyze and fix the following issue in the Linux kernel code: dax: add empty static inline for CONFIG_DAX=n | Problem Details:
Patch series "Introduce cpu_dcache_is_aliasing() to fix DAX regression",
v6.
This commit introduced in v4.0 prevents building FS_DAX on 32-bit ARM,
even on ARMv7 which does not have virtually aliased data caches:
commit d92576f1167c ("dax: does not work correctly with virtual aliasing caches")
Even ... | ```diff
diff --git a/include/linux/dax.h b/include/linux/dax.h
index b463502b16e1..e3ffe7c7f01d 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -63,6 +63,8 @@ void kill_dax(struct dax_device *dax_dev);
void dax_write_cache(struct dax_device *dax_dev, bool wc);
bool dax_write_cache_enabled(struct dax_dev... |
f6932a275461e339de69df01195c50951f039153 | Analyze and fix the following issue in the Linux kernel code: nvdimm/pmem: fix leak on dax_add_host() failure | Problem Details:
Fix a leak on dax_add_host() error, where "goto out_cleanup_dax" is done
before setting pmem->dax_dev, which therefore issues the two following
calls on NULL pointers:
out_cleanup_dax:
kill_dax(pmem->dax_dev);
put_dax(pmem->dax_dev);
Link: https://lkml.kernel.org/r/20240208184913.4843... | ```diff
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 4e8fdcb3f1c8..9fe358090720 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -566,12 +566,11 @@ static int pmem_attach_disk(struct device *dev,
set_dax_nomc(dax_dev);
if (is_nvdimm_sync(nd_region))
set_dax_synchronous(dax_de... |
fb5451e5f72b31002760083a99fbb41771c4f1ad | Analyze and fix the following issue in the Linux kernel code: arm64/mm: implement pte_batch_hint() | Problem Details:
When core code iterates over a range of ptes and calls ptep_get() for each
of them, if the range happens to cover contpte mappings, the number of pte
reads becomes amplified by a factor of the number of PTEs in a contpte
block. This is because for each call to ptep_get(), the implementation
must read ... | ```diff
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index a8f1a35e3086..d759a20d2929 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -1213,6 +1213,15 @@ static inline void contpte_try_unfold(struct mm_struct *mm, unsigned long addr,
__contp... |
6b1e4efb6f5499ae8f9f5cdda7502285a0edbf51 | Analyze and fix the following issue in the Linux kernel code: arm64/mm: implement new [get_and_]clear_full_ptes() batch APIs | Problem Details:
Optimize the contpte implementation to fix some of the
exit/munmap/dontneed performance regression introduced by the initial
contpte commit. Subsequent patches will solve it entirely.
During exit(), munmap() or madvise(MADV_DONTNEED), mappings must be
cleared. Previously this was done 1 PTE at a tim... | ```diff
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 8643227c318b..a8f1a35e3086 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -965,6 +965,37 @@ static inline pte_t __ptep_get_and_clear(struct mm_struct *mm,
return pte;
}
+static in... |
311a6cf29690bb8295327bad0e76e0ad48cadcc4 | Analyze and fix the following issue in the Linux kernel code: arm64/mm: implement new wrprotect_ptes() batch API | Problem Details:
Optimize the contpte implementation to fix some of the fork performance
regression introduced by the initial contpte commit. Subsequent patches
will solve it entirely.
During fork(), any private memory in the parent must be write-protected.
Previously this was done 1 PTE at a time. But the core-mm ... | ```diff
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 831099cfc96b..8643227c318b 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -978,16 +978,12 @@ static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
}
#endif /* CONFIG_TRAN... |
0cf18e839f64fff9a58569cc9a596bf97310e044 | Analyze and fix the following issue in the Linux kernel code: mm/memory: handle !page case in zap_present_pte() separately | Problem Details:
We don't need uptodate accessed/dirty bits, so in theory we could replace
ptep_get_and_clear_full() by an optimized ptep_clear_full() function.
Let's rely on the provided pte.
Further, there is no scenario where we would have to insert uffd-wp
markers when zapping something that is not a normal page ... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index 6712453888fa..2b1e9abbe1e0 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1499,10 +1499,6 @@ static inline bool should_zap_folio(struct zap_details *details,
if (should_zap_cows(details))
return true;
- /* E.g. the caller passes NULL for the case of a zero fol... |
012688f6006c01655e250c1612b544561b7c50be | Analyze and fix the following issue in the Linux kernel code: selftests: fix the zswap invasive shrink test | Problem Details:
The zswap no invasive shrink selftest breaks because we rename the zswap
writeback counter (see [1]). Fix the test.
[1]: https://patchwork.kernel.org/project/linux-kselftest/patch/20231205193307.2432803-1-nphamcs@gmail.com/
Link: https://lkml.kernel.org/r/20240205225608.3083251-3-nphamcs@gmail.com
F... | ```diff
diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c
index 47fdaa146443..32ce975b21d1 100644
--- a/tools/testing/selftests/cgroup/test_zswap.c
+++ b/tools/testing/selftests/cgroup/test_zswap.c
@@ -52,7 +52,7 @@ static int get_zswap_stored_pages(size_t *value)
... |
2b2178c40747dcfc54a477dd4def4318b06d30ad | Analyze and fix the following issue in the Linux kernel code: selftests: zswap: add zswap selftest file to zswap maintainer entry | Problem Details:
Patch series "fix and extend zswap kselftests", v3.
Fix a broken zswap kselftest due to cgroup zswap writeback counter
renaming, and add 2 zswap kselftests, one to cover the (z)swapin case, and
another to check that no zswapping happens when the cgroup limit is 0.
Also, add the zswap kselftest file t... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index c3c9cf33595c..1dbc57efa6d0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -24412,6 +24412,7 @@ F: include/linux/zpool.h
F: include/linux/zswap.h
F: mm/zpool.c
F: mm/zswap.c
+F: tools/testing/selftests/cgroup/test_zswap.c
THE REST
M: Linus Torvalds <torvalds@lin... |
08a5b9fe771455b94a0642ed4b4f462e1119bd90 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add missing prefixes used in compatibles | Problem Details:
A new check for vendor-prefixes used in compatibles finds some missing
ones. Add the missing ones already in use.
This omits some ancient prefixes in powerpc and arm32 as there are a
bunch of out of business one-offs that take too much time to track down
who they were.
Reviewed-by: Krzysztof Kozlowsk... | ```diff
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 71e37cea8689..b5c8d385ac62 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -230,6 +230,8 @@ patte... |
43b1d3e68ee7f41c494ee5558d8def3d3d0b7f1b | Analyze and fix the following issue in the Linux kernel code: kexec: Allocate kernel above bzImage's pref_address | Problem Details:
A relocatable kernel will relocate itself to pref_address if it is
loaded below pref_address. This means a booted kernel may be relocating
itself to an area with reserved memory on modern systems, potentially
clobbering arbitrary data that may be important to the system.
This is often the case, as the... | ```diff
diff --git a/Documentation/arch/x86/boot.rst b/Documentation/arch/x86/boot.rst
index c513855a54bb..4fd492cb4970 100644
--- a/Documentation/arch/x86/boot.rst
+++ b/Documentation/arch/x86/boot.rst
@@ -878,7 +878,8 @@ Protocol: 2.10+
address if possible.
A non-relocatable kernel will unconditionally move i... |
5bdd181821b2c65b074cfad07d7c7d5d3cfe20bf | Analyze and fix the following issue in the Linux kernel code: x86/asm: Remove the __iomem annotation of movdir64b()'s dst argument | Problem Details:
Commit e56d28df2f66 ("x86/virt/tdx: Configure global KeyID on all
packages") causes a sparse warning:
arch/x86/virt/vmx/tdx/tdx.c:683:27: warning: incorrect type in argument 1 (different address spaces)
arch/x86/virt/vmx/tdx/tdx.c:683:27: expected void [noderef] __iomem *dst
arch/x86/virt/vmx... | ```diff
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 3814a9263d64..294cd2a40818 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -379,7 +379,7 @@ static inline void iosubmit_cmds512(void __iomem *dst, const void *src,
const u8 *end = from + count * 64;
while (f... |
7a975748d4dc0a524c99a390c6f74b7097ef8cf7 | Analyze and fix the following issue in the Linux kernel code: drm/xe: Use pointers in trace events | Problem Details:
Commit a0df2cc858c3 ("drm/xe/xe_bo_move: Enhance xe_bo_move trace")
inadvertently reverted commit 8d038f49c1f3 ("drm/xe: Fix cast on trace
variable"), breaking the build on 32bits.
As noted by Ville, there's no point in converting the pointers to u64
and add casts everywhere. In fact, it's better to j... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_trace.h b/drivers/gpu/drm/xe/xe_trace.h
index 0cce98a6b14b..3b97633d81d8 100644
--- a/drivers/gpu/drm/xe/xe_trace.h
+++ b/drivers/gpu/drm/xe/xe_trace.h
@@ -27,16 +27,16 @@ DECLARE_EVENT_CLASS(xe_gt_tlb_invalidation_fence,
TP_ARGS(fence),
TP_STRUCT__entry(
- ... |
0d024974014f39207c5f52e770059b5bac35ea6d | Analyze and fix the following issue in the Linux kernel code: drm/dp: add an API to indicate if sink supports VSC SDP | Problem Details:
YUV420 format is supported only in the VSC SDP packet and not through
MSA. Hence add an API which indicates the sink support which can be used
by the rest of the DP programming.
changes in v5:
- rebased on top of drm-tip
changes in v4:
- bail out early if dpcd rev check fails
changes in v3:
- fix... | ```diff
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index 10ee82e34de7..9ac52cf5d4d8 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -2913,6 +2913,29 @@ void drm_dp_vsc_sdp_log(struct drm_printer *p, const struct dr... |
376b4f0522484f43660dab8e4e92b471863b49f9 | Analyze and fix the following issue in the Linux kernel code: xfs: move remote symlink target read function to libxfs | Problem Details:
Move xfs_readlink_bmap_ilocked to xfs_symlink_remote.c so that the
swapext code can use it to convert a remote format symlink back to
shortform format after a metadata repair. While we're at it, fix a
broken printf prefix.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hell... | ```diff
diff --git a/fs/xfs/libxfs/xfs_symlink_remote.c b/fs/xfs/libxfs/xfs_symlink_remote.c
index 7c39cb0307d9..d88af5c3c79f 100644
--- a/fs/xfs/libxfs/xfs_symlink_remote.c
+++ b/fs/xfs/libxfs/xfs_symlink_remote.c
@@ -17,6 +17,9 @@
#include "xfs_buf_item.h"
#include "xfs_log.h"
#include "xfs_symlink_remote.h"
+#inc... |
2b6a5ec26887cba195022286b039f2cc0ec683b1 | Analyze and fix the following issue in the Linux kernel code: xfs: fix xfs_bunmapi to allow unmapping of partial rt extents | Problem Details:
When XFS_BMAPI_REMAP is passed to bunmapi, that means that we want to
remove part of a block mapping without touching the allocator. For
realtime files with rtextsize > 1, that also means that we should skip
all the code that changes a partial remove request into an unwritten
extent conversion. IOWs,... | ```diff
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index fb99b75f02e2..939947d00bc9 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -5459,7 +5459,7 @@ __xfs_bunmapi(
if (del.br_startoff + del.br_blockcount > end + 1)
del.br_blockcount = end + 1 - del.br_startoff;
-... |
c0afba9a8363f17d4efed22a8764df33389aebe8 | Analyze and fix the following issue in the Linux kernel code: xfs: fix imprecise logic in xchk_btree_check_block_owner | Problem Details:
A reviewer was confused by the init_sa logic in this function. Upon
checking the logic, I discovered that the code is imprecise. What we
want to do here is check that there is an ownership record in the rmap
btree for the AG that contains a btree block.
For an inode-rooted btree (e.g. the bmbt) the ... | ```diff
diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c
index 1935b9ce1885..c3a9f33e5a8d 100644
--- a/fs/xfs/scrub/btree.c
+++ b/fs/xfs/scrub/btree.c
@@ -385,7 +385,12 @@ xchk_btree_check_block_owner(
agno = xfs_daddr_to_agno(bs->cur->bc_mp, daddr);
agbno = xfs_daddr_to_agbno(bs->cur->bc_mp, daddr);
- in... |
4e587917ee1cc28ac3a04cd55937419b9e65d81d | Analyze and fix the following issue in the Linux kernel code: xfs: add secondary and indirect classes to the health tracking system | Problem Details:
Establish two more classes of health tracking bits:
* Indirect problems, which suggest problems in other health domains
that we weren't able to preserve.
* Secondary problems, which track state that's related to primary
evidence of health problems; and
The first class we'll use in an upcomin... | ```diff
diff --git a/fs/xfs/libxfs/xfs_health.h b/fs/xfs/libxfs/xfs_health.h
index ff98c03212b8..032d45fcbd51 100644
--- a/fs/xfs/libxfs/xfs_health.h
+++ b/fs/xfs/libxfs/xfs_health.h
@@ -31,6 +31,19 @@
* - !checked && sick => errors have been observed during normal operation,
* but the met... |
6b631c60c90a1e5264bc9bcdca2c0adb492d7a62 | Analyze and fix the following issue in the Linux kernel code: xfs: teach repair to fix file nlinks | Problem Details:
Fix the file link counts since we just computed the correct ones.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de> | ```diff
diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile
index e53a26b58046..253744092915 100644
--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -194,6 +194,7 @@ xfs-y += $(addprefix scrub/, \
ialloc_repair.o \
inode_repair.o \
newbt.o \
+ nlinks_repair.o \
reap.o \
refcoun... |
7038c6e5261eef2442bff086f80a493dbd8bfdc9 | Analyze and fix the following issue in the Linux kernel code: xfs: repair cannot update the summary counters when logging quota flags | Problem Details:
While running xfs/804 (quota repairs racing with fsstress), I observed a
filesystem shutdown in the primary sb write verifier:
run fstests xfs/804 at 2022-05-23 18:43:48
XFS (sda4): Mounting V5 Filesystem
XFS (sda4): Ending clean mount
XFS (sda4): Quotacheck needed: Please wait.
XFS (sda4): Quotacheck... | ```diff
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index 745d5b8f405a..3d2c4dbb6909 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -687,6 +687,39 @@ xrep_find_ag_btree_roots(
}
#ifdef CONFIG_XFS_QUOTA
+/* Update some quota flags in the superblock. */
+static void
+xrep_update_qfla... |
5385f1a60d4e5b73e8ecd2757865352b68f54fb9 | Analyze and fix the following issue in the Linux kernel code: xfs: repair file modes by scanning for a dirent pointing to us | Problem Details:
Repair might encounter an inode with a totally garbage i_mode. To fix
this problem, we have to figure out if the file was a regular file, a
directory, or a special file. One way to figure this out is to check if
there are any directories with entries pointing down to the busted file.
This patch reco... | ```diff
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c
index 0ca62d59f84a..7e859c412a5b 100644
--- a/fs/xfs/scrub/inode_repair.c
+++ b/fs/xfs/scrub/inode_repair.c
@@ -43,6 +43,8 @@
#include "scrub/btree.h"
#include "scrub/trace.h"
#include "scrub/repair.h"
+#include "scrub/iscan.h"
+#include ... |
fc325b1a915f6d0c821bfcea21fb3f1354c4323b | Analyze and fix the following issue in the Linux kernel code: riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION | Problem Details:
The new riscv specific arch_hugetlb_migration_supported() must be
guarded with a #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION to avoid
the following build error:
In file included from include/linux/hugetlb.h:851,
from kernel/fork.c:52:
>> arch/riscv/include/asm/hugetlb.h:15:42: err... | ```diff
diff --git a/arch/riscv/include/asm/hugetlb.h b/arch/riscv/include/asm/hugetlb.h
index 20f9c3ba2341..22deb7a2a6ec 100644
--- a/arch/riscv/include/asm/hugetlb.h
+++ b/arch/riscv/include/asm/hugetlb.h
@@ -11,8 +11,10 @@ static inline void arch_clear_hugepage_flags(struct page *page)
}
#define arch_clear_hugepag... |
c21f014818600ae017f97ee087e7c136b1916aa7 | Analyze and fix the following issue in the Linux kernel code: riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly | Problem Details:
Previous commit dbfbda3bd6bf ("riscv: mm: update T-Head memory type
definitions") from patch [1] missed a `<` for bit shifting, result in
bit(61) does not set in _PAGE_NOCACHE_THEAD and leaves bit(0) set instead.
This patch get this fixed.
Link: https://lore.kernel.org/linux-riscv/20230912072510.2510-... | ```diff
diff --git a/arch/riscv/include/asm/pgtable-64.h b/arch/riscv/include/asm/pgtable-64.h
index b42017d76924..b99bd66107a6 100644
--- a/arch/riscv/include/asm/pgtable-64.h
+++ b/arch/riscv/include/asm/pgtable-64.h
@@ -136,7 +136,7 @@ enum napot_cont_order {
* 10010 - IO Strongly-ordered, Non-cacheable, Non-buf... |
680341382da56bd192ebfa4e58eaf4fec2e5bca7 | Analyze and fix the following issue in the Linux kernel code: riscv: add CALLER_ADDRx support | Problem Details:
CALLER_ADDRx returns caller's address at specified level, they are used
for several tracers. These macros eventually use
__builtin_return_address(n) to get the caller's address if arch doesn't
define their own implementation.
In RISC-V, __builtin_return_address(n) only works when n == 0, we need
to wa... | ```diff
diff --git a/arch/riscv/include/asm/ftrace.h b/arch/riscv/include/asm/ftrace.h
index 329172122952..15055f9df4da 100644
--- a/arch/riscv/include/asm/ftrace.h
+++ b/arch/riscv/include/asm/ftrace.h
@@ -25,6 +25,11 @@
#define ARCH_SUPPORTS_FTRACE_OPS 1
#ifndef __ASSEMBLY__
+
+extern void *return_address(unsigne... |
3a561ea2413ea5a740f3b1d6b5355d46f88a7456 | Analyze and fix the following issue in the Linux kernel code: PM: EM: Fix nr_states warnings in static checks | Problem Details:
During the static checks nr_states has been mentioned by the kernel test
robot. Fix the warning in those 2 places.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ```diff
diff --git a/kernel/power/energy_model.c b/kernel/power/energy_model.c
index 7101fa3fa0c0..b686ac0345bd 100644
--- a/kernel/power/energy_model.c
+++ b/kernel/power/energy_model.c
@@ -280,6 +280,7 @@ static int em_compute_costs(struct device *dev, struct em_perf_state *table,
* em_dev_compute_costs() - Calcula... |
f85450f134f0b4ca7e042dc3dc89155656a2299d | Analyze and fix the following issue in the Linux kernel code: tools/power x86_energy_perf_policy: Fix file leak in get_pkg_num() | Problem Details:
In function get_pkg_num() if fopen_or_die() succeeds it returns a file
pointer to be used. But fclose() is never called before returning from
the function.
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ```diff
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 5fd9e594079c..ebda9c366b2b 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_per... |
98bc7e26e14fbb26a6abf97603d59532475e97f8 | Analyze and fix the following issue in the Linux kernel code: pstore/zone: Add a null pointer check to the psz_kmsg_read | Problem Details:
kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240118100206.213928-1-chentao@kylinos.cn
Signed-off-by: ... | ```diff
diff --git a/fs/pstore/zone.c b/fs/pstore/zone.c
index 2770746bb7aa..abca117725c8 100644
--- a/fs/pstore/zone.c
+++ b/fs/pstore/zone.c
@@ -973,6 +973,8 @@ static ssize_t psz_kmsg_read(struct pstore_zone *zone,
char *buf = kasprintf(GFP_KERNEL, "%s: Total %d times\n",
kmsg_dump_reason_str(record->r... |
a43e0fc5e9134a46515de2f2f8d4100b74e50de3 | Analyze and fix the following issue in the Linux kernel code: pstore: inode: Only d_invalidate() is needed | Problem Details:
Unloading a modular pstore backend with records in pstorefs would
trigger the dput() double-drop warning:
WARNING: CPU: 0 PID: 2569 at fs/dcache.c:762 dput.part.0+0x3f3/0x410
Using the combo of d_drop()/dput() (as mentioned in
Documentation/filesystems/vfs.rst) isn't the right approach here, and
le... | ```diff
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index d0d9bfdad30c..56815799ce79 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -307,7 +307,6 @@ int pstore_put_backend_records(struct pstore_info *psi)
{
struct pstore_private *pos, *tmp;
struct dentry *root;
- int rc = 0;
root = psinfo_loc... |
e10aea105e9ed14b62a11844fec6aaa87c6935a3 | Analyze and fix the following issue in the Linux kernel code: kasan/test: avoid gcc warning for intentional overflow | Problem Details:
The out-of-bounds test allocates an object that is three bytes too short
in order to validate the bounds checking. Starting with gcc-14, this
causes a compile-time warning as gcc has grown smart enough to understand
the sizeof() logic:
mm/kasan/kasan_test.c: In function 'kmalloc_oob_16':
mm/kasan/kas... | ```diff
diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c
index 318d9cec111a..2d8ae4fbe63b 100644
--- a/mm/kasan/kasan_test.c
+++ b/mm/kasan/kasan_test.c
@@ -440,7 +440,8 @@ static void kmalloc_oob_16(struct kunit *test)
/* This test is specifically crafted for the generic mode. */
KASAN_TEST_NEEDS_CONFIG_... |
cfb837e8433179995709578ca5b4741adcd54ec7 | Analyze and fix the following issue in the Linux kernel code: mm: document memalloc_noreclaim_save() and memalloc_pin_save() | Problem Details:
The memalloc_noreclaim_save() function currently has no documentation
comment, so the implications of its usage are not obvious. Namely that it
not only prevents entering reclaim (as the name suggests), but also allows
using all memory reserves and thus should be only used in contexts that
are allocat... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b9ce285d8c9c..998861865b84 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1624,15 +1624,15 @@ extern struct pid *cad_pid;
#define PF_SUPERPRIV 0x00000100 /* Used super-user privileges */
#define PF_DUMPCORE 0x00000200 /* Du... |
501e3dc505f7c8ce8da0532db81e99fae6688074 | Analyze and fix the following issue in the Linux kernel code: selftests/damon/_chk_dependency: get debugfs mount point from /proc/mounts | Problem Details:
DAMON debugfs selftests dependency checker assumes debugfs would be
mounted at /sys/kernel/debug. That would be ok for many cases, but some
systems might mounted the file system on some different places. Parse the
real mount point using /proc/mounts file.
Link: https://lkml.kernel.org/r/202402072031... | ```diff
diff --git a/tools/testing/selftests/damon/_chk_dependency.sh b/tools/testing/selftests/damon/_chk_dependency.sh
index 350f8c2b071d..dda3a87dc00a 100644
--- a/tools/testing/selftests/damon/_chk_dependency.sh
+++ b/tools/testing/selftests/damon/_chk_dependency.sh
@@ -4,7 +4,14 @@
# Kselftest framework requireme... |
f08db42b1c3a6c62ab13ac466f5d8d72d3dd79c5 | Analyze and fix the following issue in the Linux kernel code: selftests/damon: add a test for the pid leak of dbgfs_target_ids_write() | Problem Details:
Commit ebb3f994dd92 ("mm/damon/dbgfs: fix 'struct pid' leaks in
'dbgfs_target_ids_write()'") fixes a pid leak bug in DAMON debugfs
interface, namely dbgfs_target_ids_write() function. Add a selftest for
the issue to prevent the problem from mistakenly recurring.
Link: https://lkml.kernel.org/r/202402... | ```diff
diff --git a/tools/testing/selftests/damon/.gitignore b/tools/testing/selftests/damon/.gitignore
index 7d6c6e062be7..d861701f0327 100644
--- a/tools/testing/selftests/damon/.gitignore
+++ b/tools/testing/selftests/damon/.gitignore
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
huge_count_read_write
... |
831bc31a5e82dc189040111fa2ab2f81b8521a9b | Analyze and fix the following issue in the Linux kernel code: mm: hugetlb: improve the handling of hugetlb allocation failure for freed or in-use hugetlb | Problem Details:
alloc_and_dissolve_hugetlb_folio() preallocates a new hugetlb page before
it takes hugetlb_lock. In 3 out of 4 cases the page is not really used
and therefore the newly allocated page is just freed right away. This is
wasteful and it might cause pre-mature failures in those cases.
Address that by mo... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 44f1e6366d04..3d651fc1dd66 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3029,21 +3029,9 @@ static int alloc_and_dissolve_hugetlb_folio(struct hstate *h,
{
gfp_t gfp_mask = htlb_alloc_mask(h) | __GFP_THISNODE;
int nid = folio_nid(old_folio);
- struct folio ... |
3b631bd06550040b37cd2ebb00e2374404db0360 | Analyze and fix the following issue in the Linux kernel code: mm/zswap: remove duplicate_entry debug value | Problem Details:
cat /sys/kernel/debug/zswap/duplicate_entry
2086447
When testing, the duplicate_entry value is very high, but no warning
message in the kernel log. From the comment of duplicate_entry "Duplicate
store was encountered (rare)", it seems something goes wrong.
Actually it's incremented in the beginning ... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index f8a4ac389118..91df925359c8 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -71,8 +71,6 @@ static u64 zswap_reject_compress_poor;
static u64 zswap_reject_alloc_fail;
/* Store failed because the entry metadata could not be allocated (rare) */
static u64 zswap_reject_kmemc... |
f9c0f1c32cb568e16ef0676d8e7827a3ad443742 | Analyze and fix the following issue in the Linux kernel code: mm/zswap: add more comments in shrink_memcg_cb() | Problem Details:
Patch series "mm/zswap: optimize zswap lru list", v2.
This series is motivated when observe the zswap lru list shrinking, noted
there are some unexpected cases in zswap_writeback_entry().
bpftrace -e 'kr:zswap_writeback_entry {@[(int32)retval]=count()}'
There are some -ENOMEM because when the swap e... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index 2bf4bf1d356c..35da20d3617f 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -1207,10 +1207,12 @@ static int zswap_writeback_entry(struct zswap_entry *entry,
/*
* folio is locked, and the swapcache is now secured against
- * concurrent swapping to and from the slot. ... |
fe58582c0e362d5e52b97985142b0dcef920b745 | Analyze and fix the following issue in the Linux kernel code: mm/cma: drop CONFIG_CMA_DEBUG | Problem Details:
All pr_debug() prints in (mm/cma.c) could be enabled via standard Makefile
based method. Besides cma_debug_show_areas() should always be called
during cma_alloc() failure path. This seemingly redundant config,
CONFIG_CMA_DEBUG can be dropped without any problem.
[lukas.bulwahn@gmail.com: remove debu... | ```diff
diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index f005c66f378c..055da410ac71 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -37,12 +37,6 @@
#define pr_fmt(fmt) "cma: " fmt
-#ifdef CONFIG_CMA_DEBUG
-#ifndef DEBUG
-# define DEBUG
-#endif
-#endif
-
#include <asm/pag... |
f81ed7c4e1dea1f90aa2304548c59eb5edcc3bd7 | Analyze and fix the following issue in the Linux kernel code: selftests/mm: run_vmtests.sh: add hugetlb_madv_vs_map | Problem Details:
hugetlb_madv_vs_map selftest was not part of the mm test-suite since we
didn't have a fix for the problem it found.
Now that the problem is already fixed (see previous commit), let's enable
this selftest in the default test-suite.
Link: https://lkml.kernel.org/r/20240205191843.4009640-3-leitao@debian... | ```diff
diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index 81b5980886da..de03d38907d6 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -264,6 +264,7 @@ nr_hugepages_tmp=$(cat /proc/sys/vm/nr_hugepages)
# For ... |
df7a6d1f64056aec572162c5d35ed9ff86ece6f3 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: restore the reservation if needed | Problem Details:
Patch series "mm/hugetlb: Restore the reservation", v2.
This is a fix for a case where a backing huge page could stolen after
madvise(MADV_DONTNEED).
A full reproducer is in selftest. See
https://lore.kernel.org/all/20240105155419.1939484-1-leitao@debian.org/
In order to test this patch, I instrumen... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ed1581b670d4..44f1e6366d04 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5585,6 +5585,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,
struct page *page;
struct hstate *h = hstate_vma(vma);
unsigned long sz = huge_page_s... |
4e76c8cc3378a20923965e3345f40f6b8ae0bdba | Analyze and fix the following issue in the Linux kernel code: kasan: add atomic tests | Problem Details:
Test that KASan can detect some unsafe atomic accesses.
As discussed in the linked thread below, these tests attempt to cover
the most common uses of atomics and, therefore, aren't exhaustive.
Link: https://lkml.kernel.org/r/20240202113259.3045705-1-paul.heidekrueger@tum.de
Link: https://lore.kernel.... | ```diff
diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c
index 971cfff4ca0b..318d9cec111a 100644
--- a/mm/kasan/kasan_test.c
+++ b/mm/kasan/kasan_test.c
@@ -697,6 +697,84 @@ static void kmalloc_uaf3(struct kunit *test)
KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr1)[8]);
}
+static void kasan_atomic... |
287d5fedb377ddc232b216b882723305b27ae31a | Analyze and fix the following issue in the Linux kernel code: mm: memcg: use larger batches for proactive reclaim | Problem Details:
Before 388536ac291 ("mm:vmscan: fix inaccurate reclaim during proactive
reclaim") we passed the number of pages for the reclaim request directly
to try_to_free_mem_cgroup_pages, which could lead to significant
overreclaim. After 0388536ac291 the number of pages was limited to a
maximum 32 (SWAP_CLUSTE... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 484a9d2862d4..cb216d30a221 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6981,6 +6981,8 @@ static ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf,
reclaim_options = MEMCG_RECLAIM_MAY_SWAP | MEMCG_RECLAIM_PROACTIVE;
while (nr_recla... |
53723298ba436830fdf0744c19b57b2a18f44041 | Analyze and fix the following issue in the Linux kernel code: mm/memory: pass PTE to copy_present_pte() | Problem Details:
We already read it, let's just forward it.
This patch is based on work by Ryan Roberts.
[david@redhat.com: fix the hmm "exclusive_cow" selftest]
Link: https://lkml.kernel.org/r/13f296b8-e882-47fd-b939-c2141dc28717@redhat.com
Link: https://lkml.kernel.org/r/20240129124649.189745-13-david@redhat.com
... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index bef6fd925d04..ca888431680c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -959,10 +959,9 @@ static inline void __copy_present_pte(struct vm_area_struct *dst_vma,
*/
static inline int
copy_present_pte(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
... |
6e8f588708971e0626f5be808e8c4b6cdb86eb0b | Analyze and fix the following issue in the Linux kernel code: arm64/mm: make set_ptes() robust when OAs cross 48-bit boundary | Problem Details:
Patch series "mm/memory: optimize fork() with PTE-mapped THP", v3.
Now that the rmap overhaul[1] is upstream that provides a clean interface
for rmap batching, let's implement PTE batching during fork when
processing PTE-mapped THPs.
This series is partially based on Ryan's previous work[2] to implem... | ```diff
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 79ce70fbb751..52d0b0a763f1 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -341,6 +341,22 @@ static inline void __sync_cache_and_tags(pte_t pte, unsigned int nr_pages)
mte_sync_tags(... |
a60cc288a1a2604bd86d3df129f269887018c3cb | Analyze and fix the following issue in the Linux kernel code: test_xarray: add tests for advanced multi-index use | Problem Details:
Patch series "test_xarray: advanced API multi-index tests", v2.
This is a respin of the test_xarray multi-index tests [0] which use and
demonstrate the advanced API which is used by the page cache. This should
let folks more easily follow how we use multi-index to support for example
a min order late... | ```diff
diff --git a/lib/test_xarray.c b/lib/test_xarray.c
index e77d4856442c..1050e9113d2a 100644
--- a/lib/test_xarray.c
+++ b/lib/test_xarray.c
@@ -674,6 +674,181 @@ static noinline void check_multi_store(struct xarray *xa)
#endif
}
+#ifdef CONFIG_XARRAY_MULTI
+/* mimics page cache __filemap_add_folio() */
+stat... |
565474afe08ad28de0d655c5ed36aab3702cb93d | Analyze and fix the following issue in the Linux kernel code: mm: ptdump: add check_wx_pages debugfs attribute | Problem Details:
Add a readable attribute in debugfs to trigger a W^X pages check at any
time.
To trigger the test, just read /sys/kernel/debug/check_wx_pages It will
report FAILED if the test failed, SUCCESS otherwise.
Detailed result is provided into dmesg.
Link: https://lkml.kernel.org/r/e947fb1a9f3f5466344823e53... | ```diff
diff --git a/mm/ptdump.c b/mm/ptdump.c
index 03c1bdae4a43..106e1d66e9f9 100644
--- a/mm/ptdump.c
+++ b/mm/ptdump.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/pagewalk.h>
+#include <linux/debugfs.h>
#include <linux/ptdump.h>
#include <linux/kasan.h>
@@ -163,3 +164,24 @@ void ptdu... |
6cdc82db0c044d36137dd98f33e8aa0b8742987f | Analyze and fix the following issue in the Linux kernel code: mm: ptdump: have ptdump_check_wx() return bool | Problem Details:
Have ptdump_check_wx() return true when the check is successful or false
otherwise.
[akpm@linux-foundation.org: fix a couple of build issues (x86_64 allmodconfig)]
Link: https://lkml.kernel.org/r/7943149fe955458cb7b57cd483bf41a3aad94684.1706610398.git.christophe.leroy@csgroup.eu
Signed-off-by: Christo... | ```diff
diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
index e305b6593c4e..696822f75582 100644
--- a/arch/arm64/mm/ptdump.c
+++ b/arch/arm64/mm/ptdump.c
@@ -345,7 +345,7 @@ static struct ptdump_info kernel_ptdump_info = {
.base_addr = PAGE_OFFSET,
};
-void ptdump_check_wx(void)
+bool ptdump_check_wx(... |
a90f0a02f139a13d3c26dd20644b50fc731f17da | Analyze and fix the following issue in the Linux kernel code: arm: ptdump: rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX | Problem Details:
Patch series "mm: ptdump: Refactor CONFIG_DEBUG_WX and check_wx_pages
debugfs attribute", v2.
This series refactors CONFIG_DEBUG_WX for the 5 architectures implementing
CONFIG_GENERIC_PTDUMP
First rename stuff in ARM which uses similar names while not implementing
CONFIG_GENERIC_PTDUMP.
Then define ... | ```diff
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 5fbbac1b708b..f1fc278081d0 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -17,7 +17,7 @@ config ARM_PTDUMP_DEBUGFS
kernel.
If in doubt, say "N"
-config DEBUG_WX
+config ARM_DEBUG_WX
bool "Warn on W+X mappings at ... |
dce41f5ae2539d1c20ae8de4e039630aec3c3f3c | Analyze and fix the following issue in the Linux kernel code: mm/mempolicy: implement the sysfs-based weighted_interleave interface | Problem Details:
Patch series "mm/mempolicy: weighted interleave mempolicy and sysfs
extension", v5.
Weighted interleave is a new interleave policy intended to make use of
heterogeneous memory environments appearing with CXL.
The existing interleave mechanism does an even round-robin distribution of
memory across all... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy b/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy
new file mode 100644
index 000000000000..8ac327fd7fb6
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy
@@ -0,0 +1,4 @@
+What: /sys/kernel/mm/mempolicy/
+Date: January 2... |
f921003b40d107e805b29358fd1035eadae3806c | Analyze and fix the following issue in the Linux kernel code: mm/damon/dbgfs: implement deprecation notice file | Problem Details:
Implement a read-only file for DAMON debugfs interface deprecation notice,
to let users who manually read/write the DAMON debugfs files from their
shell command line easily notice the fact.
[arnd@arndb.de: fix bogus string length]
Link: https://lkml.kernel.org/r/20240202124339.892862-1-arnd@kernel.o... | ```diff
diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c
index 7dac24e69e3b..f66865acb523 100644
--- a/mm/damon/dbgfs.c
+++ b/mm/damon/dbgfs.c
@@ -805,6 +805,17 @@ static void dbgfs_destroy_ctx(struct damon_ctx *ctx)
damon_destroy_ctx(ctx);
}
+static ssize_t damon_dbgfs_deprecated_read(struct file *file,
+ char _... |
5878303c5353bdd9b7949db9edbaded53c150173 | Analyze and fix the following issue in the Linux kernel code: mm/zswap: fix race between lru writeback and swapoff | Problem Details:
LRU writeback has race problem with swapoff, as spotted by Yosry [1]:
CPU1 CPU2
shrink_memcg_cb swap_off
list_lru_isolate zswap_invalidate
zswap_swapoff
kfree(tree)
// UAF
spin_lock(&tree->lock)
The problem is that the entry in lru list can't protect the tree from
being swapoff... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index bccef2af43cc..ddc8f930d343 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -277,7 +277,7 @@ static inline struct zswap_tree *swap_zswap_tree(swp_entry_t swp)
zpool_get_type((p)->zpools[0]))
static int zswap_writeback_entry(struct zswap_entry *entry,
- struct zsw... |
5cec4eb7fad6fb1e9a3dd8403b558d1eff7490ff | Analyze and fix the following issue in the Linux kernel code: mm and cache_info: remove unnecessary CPU cache info update | Problem Details:
For each CPU hotplug event, we will update per-CPU data slice size and
corresponding PCP configuration for every online CPU to make the
implementation simple. But, Kyle reported that this takes tens seconds
during boot on a machine with 34 zones and 3840 CPUs.
So, in this patch, for each CPU hotplug ... | ```diff
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index f1e79263fe61..23b8cba4a2a3 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -898,6 +898,37 @@ err:
return rc;
}
+static unsigned int cpu_map_shared_cache(bool online, unsigned int cpu,
+ cpumask_t **map)
+{
+... |
13ef7424577ff9b663aeaa4fda67e186d9856df3 | Analyze and fix the following issue in the Linux kernel code: mm: memcg: don't periodically flush stats when memcg is disabled | Problem Details:
The root memcg is onlined even when memcg is disabled. When it's onlined
a 2 second periodic stat flush is started, but no stat flushing is
required when memcg is disabled because there can be no child memcgs.
Most calls to flush memcg stats are avoided when memcg is disabled as a
result of the mem_c... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index df11d6d19ee3..484a9d2862d4 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5621,7 +5621,7 @@ static int mem_cgroup_css_online(struct cgroup_subsys_state *css)
if (alloc_shrinker_info(memcg))
goto offline_kmem;
- if (unlikely(mem_cgroup_is_root(m... |
d749cc7547bb46be73da848576ea155daf8186f3 | Analyze and fix the following issue in the Linux kernel code: mm: kmsan: remove runtime checks from kmsan_unpoison_memory() | Problem Details:
Similarly to what's been done in commit 85716a80c16d ("kmsan: allow using
__msan_instrument_asm_store() inside runtime"), it should be safe to call
kmsan_unpoison_memory() from within the runtime, as it does not allocate
memory or take locks. Remove the redundant runtime checks.
This should fix false... | ```diff
diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c
index 5d6e2dee5692..0b09daa188ef 100644
--- a/mm/kmsan/hooks.c
+++ b/mm/kmsan/hooks.c
@@ -359,6 +359,12 @@ void kmsan_handle_dma_sg(struct scatterlist *sg, int nents,
}
/* Functions from kmsan-checks.h follow. */
+
+/*
+ * To create an origin, kmsan_poison_me... |
42d9358252e5d055223487d9f653c2a2ac859a2a | Analyze and fix the following issue in the Linux kernel code: mm/memory_hotplug: export mhp_supports_memmap_on_memory() | Problem Details:
In preparation for adding sysfs ABI to toggle memmap_on_memory semantics
for drivers adding memory, export the mhp_supports_memmap_on_memory()
helper. This allows drivers to check if memmap_on_memory support is
available before trying to request it, and display an appropriate
message if it isn't availa... | ```diff
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index ee00015575aa..7a9ff464608d 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -137,6 +137,7 @@ struct mhp_params {
bool mhp_range_allowed(u64 start, u64 size, bool need_mapping);
struct range ... |
6ca03f1bb5a7427a66df62c954b3500a4255cdb9 | Analyze and fix the following issue in the Linux kernel code: userfaultfd: fix return error if mmap_changing is non-zero in MOVE ioctl | Problem Details:
To be consistent with other uffd ioctl's returning EAGAIN when
mmap_changing is detected, we should change UFFDIO_MOVE to do the same.
Link: https://lkml.kernel.org/r/20240117223922.1445327-1-lokeshgidra@google.com
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Acked-by: Suren Baghdasaryan <sure... | ```diff
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 959551ff9a95..05c8e8a05427 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -2047,7 +2047,7 @@ static int userfaultfd_move(struct userfaultfd_ctx *ctx,
ret = move_pages(ctx, mm, uffdio_move.dst, uffdio_move.src,
uffdio_move.len, uffdio_mov... |
d9b3ce8769e371554a669f262bbc61c02a40efcc | Analyze and fix the following issue in the Linux kernel code: mm: writeback: ratelimit stat flush from mem_cgroup_wb_stats | Problem Details:
One of our workloads (Postgres 14) has regressed when migrated from 5.10
to 6.1 upstream kernel. The regression can be reproduced by sysbench's
oltp_write_only benchmark. It seems like the always on rstat flush in
mem_cgroup_wb_stats() is causing the regression. So, rate limit that
specific rstat fl... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index db92401257f7..df11d6d19ee3 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4800,7 +4800,7 @@ void mem_cgroup_wb_stats(struct bdi_writeback *wb, unsigned long *pfilepages,
struct mem_cgroup *memcg = mem_cgroup_from_css(wb->memcg_css);
struct mem_cgr... |
2444172cfde45a3d6e655f50c620727c76bab4a2 | Analyze and fix the following issue in the Linux kernel code: tools/mm: add thpmaps script to dump THP usage info | Problem Details:
With the proliferation of large folios for file-backed memory, and more
recently the introduction of multi-size THP for anonymous memory, it is
becoming useful to be able to see exactly how large folios are mapped into
processes. For some architectures (e.g. arm64), if most memory is mapped
using con... | ```diff
diff --git a/tools/mm/Makefile b/tools/mm/Makefile
index 1c5606cc3334..7bb03606b9ea 100644
--- a/tools/mm/Makefile
+++ b/tools/mm/Makefile
@@ -3,7 +3,8 @@
#
include ../scripts/Makefile.include
-TARGETS=page-types slabinfo page_owner_sort
+BUILD_TARGETS=page-types slabinfo page_owner_sort
+INSTALL_TARGETS = ... |
8409a385a6b41b7042aae1a4e4053963da997ffe | Analyze and fix the following issue in the Linux kernel code: mm/zswap: improve with alloc_workqueue() call | Problem Details:
The core-api create_workqueue is deprecated, this patch replaces the
create_workqueue with alloc_workqueue. The previous implementation
workqueue of zswap was a bounded workqueue, this patch uses
alloc_workqueue() to create an unbounded workqueue. The WQ_UNBOUND
attribute is desirable making the work... | ```diff
diff --git a/mm/zswap.c b/mm/zswap.c
index db4625af65fb..2c3d77c6fe72 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -1887,7 +1887,8 @@ static int zswap_setup(void)
zswap_enabled = false;
}
- shrink_wq = create_workqueue("zswap-shrink");
+ shrink_wq = alloc_workqueue("zswap-shrink",
+ WQ_UNBOUND|WQ_MEM_RE... |
2777781ca9b63c919bfe261aa2dbc1705067c59b | Analyze and fix the following issue in the Linux kernel code: dt-bindings: arm-smmu: Fix SM8[45]50 GPU SMMU 'if' condition | Problem Details:
The 'if' condition for the SM8[45]50 GPU SMMU is too large,
add the other compatible strings to the condition to only
allow the clocks for the GPU SMMU nodes.
Fixes: 4fff78dc2490 ("dt-bindings: arm-smmu: Document SM8[45]50 GPU SMMU")
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-... | ```diff
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
index 4a8d4022aebc..7197e0eaa657 100644
--- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml
@@ -486,7 +486,12 @@ allOf:
... |
32ca5ebfde9a0deb50cedfa37646f86bb319542b | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix possible null pointer dereference after drm_dbg_printer conversion | Problem Details:
Request can be NULL if no guilty request was identified so simply use
engine->i915 instead.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: d50892a9554c ("drm/i915: switch from drm_debug_printer() to device specific drm_dbg_printer()")
Reported-by: Dan Carpenter <dan.carpenter@linaro.o... | ```diff
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
index 0f6406f0cca0..1247cc418a1c 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
@@ -96,8 +96,8 @@ static void heartbeat_commit(st... |
1fa8d07ae1a5fa4e87de42c338e8fc27f46d8bb6 | Analyze and fix the following issue in the Linux kernel code: gpu: host1x: Skip reset assert on Tegra186 | Problem Details:
On Tegra186, secure world applications may need to access host1x
during suspend/resume, and rely on the kernel to keep Host1x out
of reset during the suspend cycle. As such, as a quirk,
skip asserting Host1x's reset on Tegra186.
We don't need to keep the clocks enabled, as BPMP ensures the clock
stays... | ```diff
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 42fd504abbcd..89983d7d73ca 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -169,6 +169,7 @@ static const struct host1x_info host1x06_info = {
.num_sid_entries = ARRAY_SIZE(tegra186_sid_table),
.sid_table = tegra18... |
c8f6f88d25929ad2f290b428efcae3b526f3eab0 | Analyze and fix the following issue in the Linux kernel code: block: Clear zone limits for a non-zoned stacked queue | Problem Details:
Device mapper may create a non-zoned mapped device out of a zoned device
(e.g., the dm-zoned target). In such case, some queue limit such as the
max_zone_append_sectors and zone_write_granularity endup being non zero
values for a block device that is not zoned. Avoid this by clearing
these limits in bl... | ```diff
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 2120b6f9fef8..b6bbe683d218 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -865,6 +865,10 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
t->zone_write_granularity = max(t->zone_write_granularity,
b->z... |
32e5a120a5105bce01561978ee55aee8e40ac0dc | Analyze and fix the following issue in the Linux kernel code: drm/tegra: put drm_gem_object ref on error in tegra_fb_create | Problem Details:
Inside tegra_fb_create(), drm_gem_object_lookup() increments ref count of
the found object. But if the following size check fails then the last
found object's ref count should be put there as the unreferencing loop
can't detect this situation.
Found by Linux Verification Center (linuxtesting.org).
Fi... | ```diff
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index a719af1dc9a5..46170753699d 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -159,6 +159,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
if (gem->size < size) {
err = -EINVAL;
+ d... |
bbfaf2aea7164db59739728d62d9cc91d64ff856 | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix the runtime resume failure issue | Problem Details:
Don't set power state flag when system enter runtime suspend,
or it may cause runtime resume failure issue.
Fixes: 3a9626c816db ("drm/amd: Stop evicting resources on APUs in suspend")
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex... | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index cc21ed67a330..7099ff9cf8c5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -1528,6 +1528,9 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)... |
9671761792156f2339627918bafcd713a8a6f777 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix null-pointer dereference on edid reading | Problem Details:
Use i2c adapter when there isn't aux_mode in dc_link to fix a
null-pointer derefence that happens when running
igt@kms_force_connector_basic in a system with DCN2.1 and HDMI connector
detected as below:
[ +0.178146] BUG: kernel NULL pointer dereference, address: 00000000000004c0
[ +0.000010] #PF: su... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ef27dd71cbbc..5853cf022917 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6534,10 +6534,15 @@ amdgpu_dm_connector_l... |
bae67893578d608e35691dcdfa90c4957debf1d3 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix memory leak in dm_sw_fini() | Problem Details:
After destroying dmub_srv, the memory associated with it is
not freed, causing a memory leak:
unreferenced object 0xffff896302b45800 (size 1024):
comm "(udev-worker)", pid 222, jiffies 4294894636
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 377d532ca761..ef27dd71cbbc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2278,6 +2278,7 @@ static int dm_sw_fini(v... |
27a6c49394b1a203beeb94752c9a1d6318f24ddf | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix input states translation error for dcn35 & dcn351 | Problem Details:
[Why]
Currently there is an error while translating input clock sates into
output clock states. The highest fclk setting from output sates is
being dropped because of this error.
[How]
For dcn35 and dcn351, make output_states equal to input states.
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Ack... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c
index 23a608274096..1ba6933d2b36 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper... |
d2b48f340d9e4a8fbeb1cdc84cd8da6ad143a907 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv | Problem Details:
Fixes potential null pointer dereference warnings in the
dc_dmub_srv_cmd_list_queue_execute() and dc_dmub_srv_is_hw_pwr_up()
functions.
In both functions, the 'dc_dmub_srv' variable was being dereferenced
before it was checked for null. This could lead to a null pointer
dereference if 'dc_dmub_srv' is... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
index 2b79a0e5638e..363d522603a2 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
@@ -125,7 +125,7 @@ bool dc_dmub_srv_cmd_list_queue_execute(struc... |
c1bb68f6b2f6be5297c5fbad5caebf67d0dd3034 | Analyze and fix the following issue in the Linux kernel code: bpf, docs: Fix typos in instruction-set.rst | Problem Details:
* "BPF ADD" should be "BPF_ADD".
* "src" should be "src_reg" in several places. The latter is the field name
in the instruction. The former refers to the value of the register, or the
immediate.
* Add '' around field names in one sentence, for consistency with the rest
of the document.
Signed-... | ```diff
diff --git a/Documentation/bpf/standardization/instruction-set.rst b/Documentation/bpf/standardization/instruction-set.rst
index 868d9f6177e3..45cffe94c752 100644
--- a/Documentation/bpf/standardization/instruction-set.rst
+++ b/Documentation/bpf/standardization/instruction-set.rst
@@ -178,8 +178,8 @@ Unused fi... |
21db6199f201fab18d225cce7d94b5fcbc459bf6 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix null-pointer dereference on edid reading | Problem Details:
Use i2c adapter when there isn't aux_mode in dc_link to fix a
null-pointer derefence that happens when running
igt@kms_force_connector_basic in a system with DCN2.1 and HDMI connector
detected as below:
[ +0.178146] BUG: kernel NULL pointer dereference, address: 00000000000004c0
[ +0.000010] #PF: su... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a8a43122ff34..5bbe7d1a53fb 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6655,10 +6655,15 @@ amdgpu_dm_connector_l... |
b6968f9b5035e8e5a74a83209853f274345c74a2 | Analyze and fix the following issue in the Linux kernel code: perf list: fix short description for some cache events | Problem Details:
Correct the short description of the following events:
DCW_REQ, DCW_REQ_CHIP_HIT, DCW_REQ_DRAWER_HIT, DCW_REQ_IV,
DCW_ON_CHIP, DCW_ON_CHIP_IV, DCW_ON_CHIP_CHIP_HIT,
DCW_ON_CHIP_DRAWER_HIT, CW_ON_MODULE, DCW_ON_DRAWER,
DCW_OFF_DRAWER, IDCW_ON_MODULE_IV, IDCW_ON_MODULE_CHIP_HIT,
IDCW_ON_MODULE_DRAWER_HIT... | ```diff
diff --git a/tools/perf/pmu-events/arch/s390/cf_z16/extended.json b/tools/perf/pmu-events/arch/s390/cf_z16/extended.json
index c2b10ec1c6e0..02cce3a629cb 100644
--- a/tools/perf/pmu-events/arch/s390/cf_z16/extended.json
+++ b/tools/perf/pmu-events/arch/s390/cf_z16/extended.json
@@ -94,77 +94,77 @@
"Unit": "C... |
ff6bd76f4d997642ef390bffe42e93d6f7be87d3 | Analyze and fix the following issue in the Linux kernel code: arm64: tegra: Fix Tegra234 MGBE power-domains | Problem Details:
The MGBE power-domains on Tegra234 are mapped to the MGBE controllers as
follows:
MGBE0 (0x68000000) --> Power-Domain MGBEB
MGBE1 (0x69000000) --> Power-Domain MGBEC
MGBE2 (0x6a000000) --> Power-Domain MGBED
Update the device-tree nodes for Tegra234 to correct this.
Fixes: 610cdf3186bc ("arm64: t... | ```diff
diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
index 3f16595d099c..d1bd328892af 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
@@ -1459,7 +1459,7 @@
<&mc TEGRA234_MEMORY_CLIENT_MGBEAWR &emc>;
interc... |
bafd4e75c1ac5a9da0aec5c7c52c7a72613a0cf3 | Analyze and fix the following issue in the Linux kernel code: perf stat: Fix metric-only aggregation index | Problem Details:
Aggregation index was being computed using the evsel's cpumap which
may have a different (typically the same or fewer) entries.
Before:
```
$ perf stat --metric-only -A -M memory_bandwidth_total -a sleep 1
Performance counter stats for 'system wide':
MB/s memory_bandwidth_total MB/s memory... | ```diff
diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index ae37395f90c0..bfc1d705f437 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -1137,11 +1137,16 @@ static void print_no_aggr_metric(struct perf_stat_config *config,
u64 ena, run, val;
doub... |
a59fb796a36bb6c2b7e6e256a9e5f9ba18109937 | Analyze and fix the following issue in the Linux kernel code: perf metrics: Compute unmerged uncore metrics individually | Problem Details:
When merging counts from multiple uncore PMUs the metric is only
computed for the metric leader. When merging/aggregation is disabled,
prior to this patch just the leader's metric would be computed. Fix
this by computing the metric for each PMU.
On a SkylakeX:
Before:
```
$ perf stat -A -M memory_band... | ```diff
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 966cca5a3e88..b24a1c177a80 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -44,6 +44,8 @@ struct metric_event *metricgroup__lookup(struct rblist *metric_events,
if (!metric_events)
return NULL... |
eee41e6b287e2adfefbe3b6fc80c66097c076f89 | Analyze and fix the following issue in the Linux kernel code: perf stat: Pass fewer metric arguments | Problem Details:
Pass metric_expr and evsel rather than specific variables from the
struct, thereby reducing the number of arguments. This will enable
later fixes.
To reduce the size of the diff, local variables are added to match the
previous parameter names. This isn't done in the case of "name" as
evsel->name is mo... | ```diff
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index cf573ff3fa84..10b452792037 100644
--- a/tools/perf/util/stat-shadow.c
+++ b/tools/perf/util/stat-shadow.c
@@ -355,11 +355,12 @@ static void print_nsecs(struct perf_stat_config *config,
print_metric(config, ctxp, NULL, NULL, "CPU... |
e2e1d724e948c87a31c18c34c6b6a193a9b2a0f0 | Analyze and fix the following issue in the Linux kernel code: timers: Move marking timer bases idle into tick_nohz_stop_tick() | Problem Details:
The timer base is marked idle when get_next_timer_interrupt() is
executed. But the decision whether the tick will be stopped and whether the
system is able to go idle is done later. When the timer bases is marked
idle and a new first timer is enqueued remote an IPI is raised. Even if it
is not required... | ```diff
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 481b7ab65e2c..47df30b871e4 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -163,6 +163,7 @@ static inline void timers_update_nohz(void) { }
DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
exte... |
392703b6a18bbecbb2ae652619a705454f0fa0d6 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Update interrupts | Problem Details:
All the RZ/G2L and alike SoC's (listed below) have ECCRAM0/1 interrupts
supported by the IRQC block, reflect the same in DT binding doc.
- R9A07G043U - RZ/G2UL
- R9A07G044L/R9A07G044LC - RZ/{G2L,G2LC}
- R9A07G054 - RZ/V2L
- R9A08G045 - RZ/G3S
For the RZ/G3S S... | ```diff
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml
index d3b5aec0a3f7..daef4ee06f4e 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzg2l-irqc.yaml
+++ b/Document... |
266e95786452d97f42dcb9a881bba223584b9648 | Analyze and fix the following issue in the Linux kernel code: cpu: Remove stray semicolon | Problem Details:
This syntax error was introduced by commit da92df490eea ("cpu: Mark
cpu_possible_mask as __ro_after_init").
Fixes: da92df490eea ("cpu: Mark cpu_possible_mask as __ro_after_init")
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://... | ```diff
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 7b36b3a4e336..cc4a8068747c 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -3106,7 +3106,7 @@ const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;
EXPORT_SYMBOL(cpu_all_bits);
#ifdef CONFIG_INIT_ALL_POSSIBLE
-struct cpumask __cpu_possible_mask __ro_after... |
bc80e83ebbb274fcd40b17dd8c4f8a6b74808feb | Analyze and fix the following issue in the Linux kernel code: ALSA: hda: beep: Drop stale mutex | Problem Details:
The beep->mutex is no longer used since the drop of beep_mode=2.
Let's get rid of it.
Fixes: 0920c9b4c4d8 ("ALSA: hda - Remove beep_mode=2")
Link: https://lore.kernel.org/r/20240222153148.19691-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
index e63621bcb214..e51d47572557 100644
--- a/sound/pci/hda/hda_beep.c
+++ b/sound/pci/hda/hda_beep.c
@@ -231,7 +231,6 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
codec->beep = beep;
INIT_WORK(&beep->beep_work, &snd_h... |
3651306ae4c7f3f54caa9feb826a93cc69ccebbf | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/display: Address kdoc for 'is_psr_su' in 'fill_dc_dirty_rects' | Problem Details:
The is_psr_su parameter is a boolean flag indicating whether the Panel
Self Refresh Selective Update (PSR SU) feature is enabled which is a
power-saving feature that allows only the updated regions of the screen
to be refreshed, reducing the amount of data that needs to be sent to
the display.
Fixes t... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 78a05bd5c2f7..a8a43122ff34 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5235,6 +5235,10 @@ static inline void fil... |
145242ed6f3f9b0f89f6a51cfceda3d430605d2a | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix memory leak in dm_sw_fini() | Problem Details:
After destroying dmub_srv, the memory associated with it is
not freed, causing a memory leak:
unreferenced object 0xffff896302b45800 (size 1024):
comm "(udev-worker)", pid 222, jiffies 4294894636
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0... | ```diff
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 8b13cb334b36..78a05bd5c2f7 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2289,6 +2289,7 @@ static int dm_sw_fini(v... |
f634ee1737e7b856bd4c3f040af867007d1cb7b8 | Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Use kcalloc() instead of kzalloc() | Problem Details:
We are trying to get rid of all multiplications from allocation
functions to prevent integer overflows. Here the multiplication is
obviously safe, but using kcalloc() is more appropriate and improves
readability. This patch has no effect on runtime behavior.
Link: https://www.kernel.org/doc/html/next/... | ```diff
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c
index fc50931c2aec..c5de6ed5bf58 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c
@@ -164,7 +16... |
2b53b3668e5c889f4a2852152164ee7c558959eb | Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn: Enable VCN 4.0.6 Support | Problem Details:
Modified driver to use the appropriate FW files and instance.
v2: squash in fixes (Alex)
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ```diff
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index eb2a88991206..b2535023764f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -59,6 +59,7 @@
#define FIRMWARE_VCN4_0_3 "amdgpu/vcn_4_0_3.bin"
#define FIRMWAR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.