]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Apr 2011 15:07:28 +0000 (08:07 -0700)
commitdcd3baf9a2d9d2116d1641095f8908cf674ec877
tree7de7fabc83baf1312805d9b5f28f01d1adf3f7fd
parentc60588bcc8808f8d58c2c485992345143392db4a
vm: fix vm_pgoff wrap in stack expansion

Commit 21d2dd36a917 ("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>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c