diff options
| author | Oleksandr Natalenko <oleksandr@natalenko.name> | 2026-11-18 12:26:10 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-11-22 22:24:14 -0800 |
| commit | 190936e7a5da594ffcc3bee75eabb586a3866443 (patch) | |
| tree | baa17f5184b9a05d67c0431046d461fa72086cde /tools/perf/scripts/python/bin | |
| parent | 034008e9ce52245e0502484b9d5a9e14e80a704a (diff) | |
mm/swapfile: really fix integer overflow in swap_show() and swapon()
One of the enterprise customers uses 6 TiB of swap, and the values
reported in /proc/swaps as well as in dmesg are still not correct.
Cast si->pages to long explicitly so that the bitshift in K() doesn't
truncate the value to 32 bits.
Also do the same in swapon() for the same reason.
Link: https://patch.msgid.link/20261118112610.122799-1-oleksandr@natalenko.name
Fixes: 642929a2ded0 ("mm/swapfile: fix an integer overflow in swap_show()")
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Reviewed-by: Youngjun Park <youngjun.park@lge.com>
Cc: Rafael Aquini <aquini@redhat.com>
Cc: Christopher Li <chrisl@kernel.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Baoquan He <baoquan.he@linux.dev>
Cc: Barry Song <baohua@kernel.org>
Cc: <stable@vger.kernel.org>
mm/swapfile.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
