Files
android_kernel_samsung_msm8…/mm
Greg Thelen 0aaf2b6f39 tmpfs: fix mempolicy object leaks
Fix several mempolicy leaks in the tmpfs mount logic.  These leaks are
slow - on the order of one object leaked per mount attempt.

Leak 1 (umount doesn't free mpol allocated in mount):
    while true; do
        mount -t tmpfs -o mpol=interleave,size=100M nodev /mnt
        umount /mnt
    done

Leak 2 (errors parsing remount options will leak mpol):
    mount -t tmpfs -o size=100M nodev /mnt
    while true; do
        mount -o remount,mpol=interleave,size=x /mnt 2> /dev/null
    done
    umount /mnt

Leak 3 (multiple mpol per mount leak mpol):
    while true; do
        mount -t tmpfs -o mpol=interleave,mpol=interleave,size=100M nodev /mnt
        umount /mnt
    done

This patch fixes all of the above.  I could have broken the patch into
three pieces but is seemed easier to review as one.

[akpm@linux-foundation.org: fix handling of mpol_parse_str() errors, per Hugh]
Signed-off-by: Greg Thelen <gthelen@google.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Change-Id: I96c06e9b7322b3ef146a0d04a57dc61dc801c177
2020-09-23 17:32:07 +02:00
..
2012-01-03 22:54:56 -05:00
2020-09-23 17:32:06 +02:00
2020-09-23 17:32:06 +02:00
2011-07-26 16:49:47 -07:00
2019-08-05 14:20:47 +02:00
2019-08-23 13:20:00 +02:00
2020-09-23 17:32:06 +02:00
…
2020-09-23 17:32:06 +02:00
2019-08-08 12:09:23 +02:00
2019-08-23 13:20:00 +02:00
2020-09-23 17:32:07 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:29:09 +02:00
2019-08-08 12:26:41 +02:00
2019-08-06 08:16:29 +02:00
2019-08-06 08:17:38 +02:00