fs/proc/task_mmu.c: fix Locked field in /proc/pid/smaps*
: While looking around in /proc on my v4.14.52 system I noticed that
: all processes got a lot of "Locked" memory in /proc/*/smaps. A lot
: more memory than a regular user can usually lock with mlock().
: commit 493b0e9d945fa9dfe96be93ae41b4ca4b6fdb317 (v4.14-rc1) seems
: to have changed the behavior of "Locked".
: Before that commit the code was like this. Notice the VM_LOCKED
: (vma->vm_flags & VM_LOCKED) ?
: (unsigned long)(mss.pss >> (10 + PSS_SHIFT)) : 0);
: After that commit Locked is now the same as Pss. This looks like a
: (unsigned long)(mss->pss >> (10 + PSS_SHIFT)));
Indeed, the commit has added mss->pss_locked with the correct value that
depends on VM_LOCKED, but forgot to actually use it. Fix it.
Fixes: 493b0e9d945f ("mm: add /proc/pid/smaps_rollup")
Signed-off-by: Vlastimil Babka <email@example.com>
Reported-by: Thomas Lindroth <firstname.lastname@example.org>
Cc: Alexey Dobriyan <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
1 file changed