2024-05-23 18:56:36

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again

On Thu, 23 May 2024 12:35:31 -0600 Yuanyuan Zhong <[email protected]> wrote:

> 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.

Please describe the userspace-visible runtime effects of this bug.
This aids others in deciding which kernel version(s) need the patch.

Thanks.


2024-05-23 19:18:33

by Yuanyuan Zhong

[permalink] [raw]
Subject: Re: [PATCH] mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again

On Thu, May 23, 2024 at 11:56 AM Andrew Morton
<[email protected]> wrote:
>
> Please describe the userspace-visible runtime effects of this bug.
> This aids others in deciding which kernel version(s) need the patch.
>
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.

Please let me know if separate v2 is needed. Thanks

2024-05-24 03:02:39

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] mm: /proc/pid/smaps_rollup: avoid skipping vma after getting mmap_lock again

On Thu, 23 May 2024 12:16:57 -0700 Yuanyuan Zhong <[email protected]> wrote:

> On Thu, May 23, 2024 at 11:56 AM Andrew Morton
> <[email protected]> wrote:
> >
> > Please describe the userspace-visible runtime effects of this bug.
> > This aids others in deciding which kernel version(s) need the patch.
> >
> 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.
>
> Please let me know if separate v2 is needed. Thanks

All is good, thanks. I added the above text and the cc:stable tag.