Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88589c52 authored by Sandeep Patil's avatar Sandeep Patil Committed by Alistair Strachan
Browse files

UPSTREAM: mm: proc: smaps_rollup: fix pss_locked calculation

commit 27dd768ed8db48beefc4d9e006c58e7a00342bde upstream.

The 'pss_locked' field of smaps_rollup was being calculated incorrectly.
It accumulated the current pss everytime a locked VMA was found.  Fix
that by adding to 'pss_locked' the same time as that of 'pss' if the vma
being walked is locked.

Link: http://lkml.kernel.org/r/20190203065425.14650-1-sspatil@android.com


Fixes: 493b0e9d945f ("mm: add /proc/pid/smaps_rollup")
Signed-off-by: default avatarSandeep Patil <sspatil@android.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Reviewed-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Daniel Colascione <dancol@google.com>
Cc: <stable@vger.kernel.org>	[4.14.x, 4.19.x]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 716926f4096552ddf849b2c71815e0fbf88289f7)
Signed-off-by: default avatarSandeep Patil <sspatil@android.com>

Bug: 122593651
Test: Using vm with b/122593651#comment7
Change-Id: Id310bbd532db4f20e24581f7961bd274d3840e4b
parent 70d7ef53
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment