linux-stable/fs/proc
Yuanyuan Zhong 2eeff6e36c mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again
commit 6d065f507d upstream.

After switching smaps_rollup to use VMA iterator, searching for next entry
is part of the condition expression of the do-while loop.  So the current
VMA needs to be addressed before the continue statement.

Otherwise, with some VMAs skipped, userspace observed memory
consumption from /proc/pid/smaps_rollup will be smaller than the sum of
the corresponding fields from /proc/pid/smaps.

Link: https://lkml.kernel.org/r/20240523183531.2535436-1-yzhong@purestorage.com
Fixes: c4c84f0628 ("fs/proc/task_mmu: stop using linked list and highest_vm_end")
Signed-off-by: Yuanyuan Zhong <yzhong@purestorage.com>
Reviewed-by: Mohamed Khalfella <mkhalfella@purestorage.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:47:42 +02:00
..
Kconfig
Makefile
array.c fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand() 2024-02-23 09:25:17 +01:00
base.c mm/ksm: fix ksm_zero_pages accounting 2024-06-16 13:47:41 +02:00
bootconfig.c
cmdline.c proc: mark /proc/cmdline as permanent 2023-02-02 22:50:02 -08:00
consoles.c proc: consoles: use console_list_lock for list iteration 2022-12-02 11:25:02 +01:00
cpuinfo.c
devices.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
fd.c proc: Move fdinfo PTRACE_MODE_READ check into the inode .permission operation 2024-06-16 13:47:33 +02:00
fd.h fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
generic.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
inode.c procfs: convert to ctime accessor functions 2023-07-24 10:30:03 +02:00
internal.h proc: nommu: fix empty /proc/<pid>/maps 2023-09-19 13:21:34 -07:00
interrupts.c
kcore.c fs/proc/kcore: reinstate bounce buffer for KCORE_TEXT regions 2023-08-04 13:03:42 -07:00
kmsg.c printk changes for 6.1 2022-10-10 11:24:19 -07:00
loadavg.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
meminfo.c mm: memtest: convert to memtest_report_meminfo() 2023-08-21 13:37:47 -07:00
namespaces.c
nommu.c
page.c mm: support page_mapcount() on page_has_type() pages 2024-05-02 16:32:43 +02:00
proc_net.c v6.6-fs.proc.uapi 2023-08-28 11:43:19 -07:00
proc_sysctl.c sysctl: Fix out of bounds access for empty sysctl registers 2024-02-05 20:14:17 +00:00
proc_tty.c
root.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
self.c procfs: convert to ctime accessor functions 2023-07-24 10:30:03 +02:00
softirqs.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
stat.c proc/stat: remove arch_idle_time() 2023-04-18 16:39:33 -07:00
task_mmu.c mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again 2024-06-16 13:47:42 +02:00
task_nommu.c proc: nommu: fix empty /proc/<pid>/maps 2023-09-19 13:21:34 -07:00
thread_self.c procfs: convert to ctime accessor functions 2023-07-24 10:30:03 +02:00
uptime.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
util.c
version.c proc: mark more files as permanent 2022-10-03 14:21:45 -07:00
vmcore.c proc/vmcore: fix signedness bug in read_from_oldmem() 2023-07-27 13:07:05 -07:00