]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Fix OOPS in mmap_region() when merging adjacent VM_LOCKED file segments
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 28 Jan 2009 21:43:50 +0000 (13:43 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Feb 2009 17:53:23 +0000 (09:53 -0800)
commita440c07665d64806a94db1e39ce2dae09d1ff78b
treef2e46f40e7d1ea485d1a5670027f586de6d58058
parent4b3e1dc6ff5618366947fbc790e14ab04ba45a1d
Fix OOPS in mmap_region() when merging adjacent VM_LOCKED file segments

This patch differs from the upstream commit
de33c8db5910cda599899dd431cc30d7c1018cbf written by Linus, as it aims to
only prevent the oops from happening, not attempt to change anything
else.

The problem was introduced by commit
ba470de43188cdbff795b5da43a1474523c6c2fb

which added new references to *vma after we've potentially freed it.

From: Andrew Morton <akpm@linux-foundation.org>
Reported-by: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Tested-by: Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/mmap.c