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 |
---|---|---|
buffer_sync.c | -rw-r--r-- | 13.4 KB |
buffer_sync.h | -rw-r--r-- | 432 bytes |
cpu_buffer.c | -rw-r--r-- | 11.5 KB |
cpu_buffer.h | -rw-r--r-- | 2.8 KB |
event_buffer.c | -rw-r--r-- | 4.5 KB |
event_buffer.h | -rw-r--r-- | 858 bytes |
oprof.c | -rw-r--r-- | 4.9 KB |
oprof.h | -rw-r--r-- | 996 bytes |
oprofile_files.c | -rw-r--r-- | 4.4 KB |
oprofile_stats.c | -rw-r--r-- | 2.3 KB |
oprofile_stats.h | -rw-r--r-- | 692 bytes |
oprofilefs.c | -rw-r--r-- | 6.3 KB |
timer_int.c | -rw-r--r-- | 822 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...