]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
vm: fix vm_pgoff wrap in stack expansion
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Apr 2011 15:07:28 +0000 (08:07 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 21:47:39 +0000 (13:47 -0800)
commita2e441bdc3e86699fe95dcf3d54fc83c91d5cd9e
tree449ab1d01eceaed98a4392b79d2a678a7d5f3d6b
parenta0d5fef19e47dd30bcec109c0aff7749b0261bab
vm: fix vm_pgoff wrap in stack expansion

commit a626ca6a656450e9f4df91d0dda238fff23285f4 upstream.

Commit 982134ba6261 ("mm: avoid wrapping vm_pgoff in mremap()") fixed
the case of a expanding mapping causing vm_pgoff wrapping when you used
mremap.  But there was another case where we expand mappings hiding in
plain sight: the automatic stack expansion.

This fixes that case too.

This one also found by Robert Święcki, using his nasty system call
fuzzer tool.  Good job.

Reported-and-tested-by: Robert Święcki <robert@swiecki.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/mmap.c