Commit f915a1cc754e3b82f238b64c69ad153e9be012c4
Exists in
ti-linux-3.15.y
and in
1 other branch
Merge branch 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds…
…/linux into ti-linux-3.15.y * 'master' of http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: mm: rmap: fix use-after-free in __put_anon_vma Signed-off-by: Dan Murphy <DMurphy@ti.com>
Showing 1 changed file Side-by-side Diff
mm/rmap.c
... | ... | @@ -1564,10 +1564,9 @@ |
1564 | 1564 | { |
1565 | 1565 | struct anon_vma *root = anon_vma->root; |
1566 | 1566 | |
1567 | + anon_vma_free(anon_vma); | |
1567 | 1568 | if (root != anon_vma && atomic_dec_and_test(&root->refcount)) |
1568 | 1569 | anon_vma_free(root); |
1569 | - | |
1570 | - anon_vma_free(anon_vma); | |
1571 | 1570 | } |
1572 | 1571 | |
1573 | 1572 | static struct anon_vma *rmap_walk_anon_lock(struct page *page, |