summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-08-18 02:03:40 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-08-24 18:43:27 -0700
commitf9dc428249ed962a70acf301f01eae8578449161 (patch)
tree73bf92e0edafd9cd4ef7a3c6af3040fa8865cc8b /include
parentc7a4e939f87cc75a9a664485b10c0bf7db632156 (diff)
mm, swap: ratelimit bad swap entry reports
A corrupt page table hands the same bogus entry to get_swap_device() on every access to the mapping, and every rejection is logged. One machine logged 6185620 copies of the same line in a few hours. swap_dup_entry_direct() prints the same message from the fork path, once per call: the WARN_ON_ONCE() guarding it warns once, the pr_err() inside does not. Rate limit all three prints. Link: https://lore.kernel.org/20260818-swap_part_one-v1-1-a4fc58119fc0@debian.org Fixes: 23b230ba8ac3 ("mm/swap: print bad swap offset entry in get_swap_device") Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Barry Song <baohua@kernel.org> Reviewed-by: Nhat Pham <nphamcs@gmail.com> Acked-by: Kairui Song <kasong@tencent.com> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Cc: Baoquan He <baoquan.he@linux.dev> Cc: Chris Li <chrisl@kernel.org> Cc: Kemeng Shi <shikemeng@huaweicloud.com> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions