mm: fix prctl_set_vma_anon_name
authorColin Cross <ccross@android.com>
Tue, 5 Aug 2014 19:05:17 +0000 (12:05 -0700)
committerColin Cross <ccross@android.com>
Fri, 22 Aug 2014 23:47:15 +0000 (23:47 +0000)
commit9bc0c15675840178cee1486c2a7f25faead1518e
treec2f6c14af2154ac6f22c7602b58f4e6b5b8eee6f
parentc3b04f9d63bd8c1366cbe971b38759fa9938830b
mm: fix prctl_set_vma_anon_name

prctl_set_vma_anon_name could attempt to set the name across
two vmas at the same time due to a typo, which might corrupt
the vma list.  Fix it to use tmp instead of end to limit
the name setting to a single vma at a time.

Change-Id: Ie32d8ddb0fd547efbeedd6528acdab5ca5b308b4
Reported-by: Jed Davis <jld@mozilla.com>
Signed-off-by: Colin Cross <ccross@android.com>
kernel/sys.c