Revision 89a8640279f8bb78aaf778d1fc5c4a6778f18064 authored by David Howells on 30 October 2009, 13:13:26 UTC, committed by Linus Torvalds on 31 October 2009, 19:11:37 UTC
Don't pass NULL pointers to fput() in the error handling paths of the NOMMU do_mmap_pgoff() as it can't handle it. The following can be used as a test program: int main() { static long long a[1024 * 1024 * 20] = { 0 }; return a;} Without the patch, the code oopses in atomic_long_dec_and_test() as called by fput() after the kernel complains that it can't allocate that big a chunk of memory. With the patch, the kernel just complains about the allocation size and then the program segfaults during execve() as execve() can't complete the allocation of all the new ELF program segments. Reported-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Robin Getz <rgetz@blackfin.uclinux.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 2e2ec95
File | Mode | Size |
---|---|---|
integrity | ||
keys | ||
selinux | ||
smack | ||
tomoyo | ||
Kconfig | -rw-r--r-- | 6.0 KB |
Makefile | -rw-r--r-- | 857 bytes |
capability.c | -rw-r--r-- | 24.1 KB |
commoncap.c | -rw-r--r-- | 27.8 KB |
device_cgroup.c | -rw-r--r-- | 11.7 KB |
inode.c | -rw-r--r-- | 8.8 KB |
lsm_audit.c | -rw-r--r-- | 8.5 KB |
min_addr.c | -rw-r--r-- | 1.3 KB |
root_plug.c | -rw-r--r-- | 2.4 KB |
security.c | -rw-r--r-- | 32.5 KB |
Computing file changes ...