Revision 2c8fc867602e385fd2abe76da0b6bda8ed907547 authored by Borislav Petkov on 03 October 2011, 18:28:18 UTC, committed by David S. Miller on 03 October 2011, 18:28:18 UTC
Simon Kirby reported that on his RAID setup with idedisk underneath
the box OOMs after a couple of days of runtime. Running with
CONFIG_DEBUG_KMEMLEAK pointed to idedisk_prep_fn() which unconditionally
allocates an ide_cmd struct. However, ide_requeue_and_plug() can be
called more than once per request, either from the request issue or the
IRQ handler path and do blk_peek_request() ends up in idedisk_prep_fn()
repeatedly, allocating a struct ide_cmd everytime and "forgetting" the
previous pointer.

Make sure the code reuses the old allocated chunk.

Reported-and-tested-by: Simon Kirby <sim@hostway.ca>
Cc: <stable@kernel.org> [ 39.x, 3.0.x ]
Link: http://marc.info/?l=linux-kernel&m=131667641517919
Link: http://lkml.kernel.org/r/20110922072643.GA27232@hostway.ca
Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b13776
History
File Mode Size
Documentation
arch
bench
config
python
scripts
util
.gitignore -rw-r--r-- 230 bytes
CREDITS -rw-r--r-- 603 bytes
MANIFEST -rw-r--r-- 288 bytes
Makefile -rw-r--r-- 29.7 KB
builtin-annotate.c -rw-r--r-- 7.4 KB
builtin-bench.c -rw-r--r-- 4.8 KB
builtin-buildid-cache.c -rw-r--r-- 3.1 KB
builtin-buildid-list.c -rw-r--r-- 1.5 KB
builtin-diff.c -rw-r--r-- 6.3 KB
builtin-evlist.c -rw-r--r-- 1.1 KB
builtin-help.c -rw-r--r-- 11.2 KB
builtin-inject.c -rw-r--r-- 5.6 KB
builtin-kmem.c -rw-r--r-- 17.2 KB
builtin-kvm.c -rw-r--r-- 3.6 KB
builtin-list.c -rw-r--r-- 1.4 KB
builtin-lock.c -rw-r--r-- 23.0 KB
builtin-probe.c -rw-r--r-- 11.1 KB
builtin-record.c -rw-r--r-- 22.3 KB
builtin-report.c -rw-r--r-- 15.3 KB
builtin-sched.c -rw-r--r-- 43.7 KB
builtin-script.c -rw-r--r-- 30.7 KB
builtin-stat.c -rw-r--r-- 32.4 KB
builtin-test.c -rw-r--r-- 23.2 KB
builtin-timechart.c -rw-r--r-- 23.3 KB
builtin-top.c -rw-r--r-- 27.8 KB
builtin.h -rw-r--r-- 2.0 KB
command-list.txt -rw-r--r-- 814 bytes
design.txt -rw-r--r-- 17.3 KB
perf-archive.sh -rw-r--r-- 1.2 KB
perf.c -rw-r--r-- 12.0 KB
perf.h -rw-r--r-- 4.1 KB

back to top