diff options
author | Colin Cross <ccross@android.com> | 2014-08-05 12:05:17 -0700 |
---|---|---|
committer | Ed Tam <etam@google.com> | 2015-10-22 18:15:15 -0700 |
commit | 8ba26315f96649ecd4f1a716e922d20da885f413 (patch) | |
tree | 758d1057a227facb767ea6dc854c22f7d137ece3 | |
parent | a314b7cb329143e142812e713a002c20db367f18 (diff) |
mm: fix prctl_set_vma_anon_nameandroid-6.0.1_r0.11android-6.0.1_r0.1
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>
-rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 743623ef729a..ce3d8f58783d 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1909,7 +1909,7 @@ static int prctl_set_vma_anon_name(unsigned long start, unsigned long end, tmp = end; /* Here vma->vm_start <= start < tmp <= (end|vma->vm_end). */ - error = prctl_update_vma_anon_name(vma, &prev, start, end, + error = prctl_update_vma_anon_name(vma, &prev, start, tmp, (const char __user *)arg); if (error) return error; |