linux/fs/proc
Alexey Dobriyan 19c5d45a09 /proc/*/oom_score oops re badness
Eternal quest to make

	while true; do cat /proc/fs/xfs/stat >/dev/null 2>/dev/null; done
	while true; do find /proc -type f 2>/dev/null | xargs cat >/dev/null 2>/dev/null; done
	while true; do modprobe xfs; rmmod xfs; done

work reliably continues and now kernel oopses in the following way:

BUG: unable to handle ... at virtual address 6b6b6b6b
EIP is at badness
process: cat
	proc_oom_score
	proc_info_read
	sys_fstat64
	vfs_read
	proc_info_read
	sys_read

Failing code is prefetch hidden in list_for_each_entry() in badness().
badness() is reachable from two points. One is proc_oom_score, another
is out_of_memory() => select_bad_process() => badness().

Second path grabs tasklist_lock, while first doesn't.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:04 -07:00
..
Makefile [PATCH] Fix kernel build with EMBEDDED & PROC_FS & !PROC_SYSCTL 2007-03-27 09:05:16 -07:00
array.c reduce size of task_struct on 64-bit machines 2007-05-08 11:14:58 -07:00
base.c /proc/*/oom_score oops re badness 2007-05-08 11:15:04 -07:00
generic.c Fix race between proc_readdir and remove_proc_entry 2007-05-08 11:15:02 -07:00
inode-alloc.txt Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inode.c proc: remove pathetic ->deleted WARN_ON 2007-05-08 11:15:02 -07:00
internal.h proc: maps protection 2007-05-08 11:15:02 -07:00
kcore.c [PATCH] elf: fix kcore note size calculation 2006-12-07 08:39:38 -08:00
kmsg.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
mmu.c [PATCH] fix impossible VmallocChunk 2005-05-17 07:59:10 -07:00
nommu.c [PATCH] mark struct file_operations const 6 2007-02-12 09:48:45 -08:00
proc_devtree.c [POWERPC] Make struct property's value a void * 2007-04-13 03:55:18 +10:00
proc_misc.c mm/slab.c: proper prototypes 2007-05-07 12:12:52 -07:00
proc_sysctl.c [PATCH] sysctl: hide the sysctl proc inodes from selinux 2007-02-14 08:10:00 -08:00
proc_tty.c [PATCH] mark struct file_operations const 6 2007-02-12 09:48:45 -08:00
root.c [PATCH] proc: fix linkage with CONFIG_SYSCTL=y, CONFIG_PROC_SYSCTL=n 2007-04-02 10:06:08 -07:00
task_mmu.c proc: maps protection 2007-05-08 11:15:02 -07:00
task_nommu.c proc: maps protection 2007-05-08 11:15:02 -07:00
vmcore.c [PATCH] i386: Allow i386 crash kernels to handle x86_64 dumps 2007-05-02 19:27:09 +02:00