linux/mm
David Howells 89a8640279 NOMMU: Don't pass NULL pointers to fput() in do_mmap_pgoff()
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>
2009-10-31 12:11:37 -07:00
..
allocpercpu.c
backing-dev.c backing-dev: ensure that a removed bdi no longer has super_block referencing it 2009-10-29 11:46:12 +01:00
bootmem.c
bounce.c
debug-pagealloc.c
dmapool.c
fadvise.c
failslab.c
filemap.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
filemap_xip.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
fremap.c
highmem.c
hugetlb.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
hwpoison-inject.c
init-mm.c
internal.h
Kconfig Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-10-29 08:59:06 -07:00
Kconfig.debug
kmemcheck.c
kmemleak-test.c
kmemleak.c kmemleak: Check for NULL pointer returned by create_object() 2009-10-09 13:28:47 -07:00
ksm.c ksm: more on default values 2009-10-08 07:36:38 -07:00
maccess.c
madvise.c
Makefile
memcontrol.c memcg: reduce check for softlimit excess 2009-10-01 16:11:13 -07:00
memory-failure.c hwpoison: fix oops on ksm pages 2009-10-29 07:39:24 -07:00
memory.c Merge branch 'hwpoison-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6 2009-10-29 08:20:00 -07:00
memory_hotplug.c
mempolicy.c do_mbind(): fix memory leak 2009-10-29 07:39:29 -07:00
mempool.c
migrate.c
mincore.c
mlock.c
mm_init.c
mmap.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nommu.c NOMMU: Don't pass NULL pointers to fput() in do_mmap_pgoff() 2009-10-31 12:11:37 -07:00
oom_kill.c
page-writeback.c writeback: account IO throttling wait as iowait 2009-10-09 12:40:42 +02:00
page_alloc.c revert "mm: oom analysis: add buffer cache information to show_free_areas()" 2009-10-29 07:39:27 -07:00
page_cgroup.c
page_io.c
page_isolation.c
pagewalk.c
percpu.c percpu: allow pcpu_alloc() to be called with IRQs off 2009-10-29 00:25:59 +09:00
prio_tree.c
quicklist.c
readahead.c
rmap.c mm/rmap.c: fix comment 2009-10-01 16:11:12 -07:00
shmem.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
shmem_acl.c
slab.c
slob.c
slub.c
sparse-vmemmap.c
sparse.c
swap.c
swap_state.c
swapfile.c swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL 2009-10-01 21:15:46 +02:00
thrash.c
truncate.c
util.c
vmalloc.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
vmscan.c vmscan: order evictable rescue in LRU putback 2009-10-29 07:39:30 -07:00
vmstat.c