]> git.karo-electronics.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 20:32:49 +0000 (12:32 -0800)
commitc1bf02fadd5bbd27c6ba3a8de4c8cdc0e36231e7
tree013db061a5610073660d8e78a2cbe3ba8e4315ab
parentd77e3459f7edf03567024ad9442dace4bcb81b9c
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