summaryrefslogtreecommitdiffstats
path: root/Documentation/vm/ksm.txt
diff options
context:
space:
mode:
authorGreg Thelen <gthelen@google.com>2013-02-23 01:36:02 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 02:50:23 +0100
commit49cd0a5c290f99deca3463d16c3c1c7240107889 (patch)
tree90a7f92f4b48463483644270355006419bd0f9af /Documentation/vm/ksm.txt
parenttmpfs: fix use-after-free of mempolicy object (diff)
downloadlinux-49cd0a5c290f99deca3463d16c3c1c7240107889.tar.xz
linux-49cd0a5c290f99deca3463d16c3c1c7240107889.zip
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>
Diffstat (limited to 'Documentation/vm/ksm.txt')
0 files changed, 0 insertions, 0 deletions