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
include
scripting-engines
ui
PERF-VERSION-GEN -rwxr-xr-x 773 bytes
abspath.c -rw-r--r-- 883 bytes
alias.c -rw-r--r-- 1.4 KB
annotate.c -rw-r--r-- 14.2 KB
annotate.h -rw-r--r-- 2.9 KB
bitmap.c -rw-r--r-- 482 bytes
build-id.c -rw-r--r-- 2.0 KB
build-id.h -rw-r--r-- 212 bytes
cache.h -rw-r--r-- 2.5 KB
callchain.c -rw-r--r-- 10.5 KB
callchain.h -rw-r--r-- 3.2 KB
cgroup.c -rw-r--r-- 3.2 KB
cgroup.h -rw-r--r-- 341 bytes
color.c -rw-r--r-- 6.6 KB
color.h -rw-r--r-- 1.7 KB
config.c -rw-r--r-- 9.7 KB
cpumap.c -rw-r--r-- 3.4 KB
cpumap.h -rw-r--r-- 258 bytes
ctype.c -rw-r--r-- 1.4 KB
debug.c -rw-r--r-- 2.0 KB
debug.h -rw-r--r-- 1.0 KB
debugfs.c -rw-r--r-- 4.5 KB
debugfs.h -rw-r--r-- 702 bytes
dwarf-aux.c -rw-r--r-- 21.8 KB
dwarf-aux.h -rw-r--r-- 4.0 KB
environment.c -rw-r--r-- 256 bytes
event.c -rw-r--r-- 20.9 KB
event.h -rw-r--r-- 4.4 KB
evlist.c -rw-r--r-- 12.9 KB
evlist.h -rw-r--r-- 2.4 KB
evsel.c -rw-r--r-- 9.7 KB
evsel.h -rw-r--r-- 4.2 KB
exec_cmd.c -rw-r--r-- 2.7 KB
exec_cmd.h -rw-r--r-- 445 bytes
generate-cmdlist.sh -rwxr-xr-x 447 bytes
header.c -rw-r--r-- 28.5 KB
header.h -rw-r--r-- 3.1 KB
help.c -rw-r--r-- 7.8 KB
help.h -rw-r--r-- 781 bytes
hist.c -rw-r--r-- 23.2 KB
hist.h -rw-r--r-- 3.6 KB
hweight.c -rw-r--r-- 896 bytes
levenshtein.c -rw-r--r-- 2.5 KB
levenshtein.h -rw-r--r-- 242 bytes
map.c -rw-r--r-- 14.8 KB
map.h -rw-r--r-- 6.6 KB
pager.c -rw-r--r-- 1.8 KB
parse-events.c -rw-r--r-- 24.6 KB
parse-events.h -rw-r--r-- 1.2 KB
parse-options.c -rw-r--r-- 13.6 KB
parse-options.h -rw-r--r-- 7.4 KB
path.c -rw-r--r-- 3.3 KB
probe-event.c -rw-r--r-- 45.8 KB
probe-event.h -rw-r--r-- 4.1 KB
probe-finder.c -rw-r--r-- 38.4 KB
probe-finder.h -rw-r--r-- 3.0 KB
pstack.c -rw-r--r-- 1.4 KB
pstack.h -rw-r--r-- 402 bytes
python.c -rw-r--r-- 28.3 KB
quote.c -rw-r--r-- 1.2 KB
quote.h -rw-r--r-- 924 bytes
run-command.c -rw-r--r-- 4.0 KB
run-command.h -rw-r--r-- 1.8 KB
session.c -rw-r--r-- 33.9 KB
session.h -rw-r--r-- 4.9 KB
setup.py -rw-r--r-- 1.3 KB
sigchain.c -rw-r--r-- 976 bytes
sigchain.h -rw-r--r-- 192 bytes
sort.c -rw-r--r-- 7.8 KB
sort.h -rw-r--r-- 2.4 KB
strbuf.c -rw-r--r-- 2.9 KB
strbuf.h -rw-r--r-- 3.0 KB
strfilter.c -rw-r--r-- 4.1 KB
strfilter.h -rw-r--r-- 1.3 KB
string.c -rw-r--r-- 5.8 KB
strlist.c -rw-r--r-- 3.6 KB
strlist.h -rw-r--r-- 2.2 KB
svghelper.c -rw-r--r-- 14.7 KB
svghelper.h -rw-r--r-- 1.0 KB
symbol.c -rw-r--r-- 62.6 KB
symbol.h -rw-r--r-- 6.4 KB
thread.c -rw-r--r-- 2.7 KB
thread.h -rw-r--r-- 1.3 KB
thread_map.c -rw-r--r-- 1.2 KB
thread_map.h -rw-r--r-- 378 bytes
top.c -rw-r--r-- 6.6 KB
top.h -rw-r--r-- 1.7 KB
trace-event-info.c -rw-r--r-- 9.7 KB
trace-event-parse.c -rw-r--r-- 61.6 KB
trace-event-read.c -rw-r--r-- 9.7 KB
trace-event-scripting.c -rw-r--r-- 4.3 KB
trace-event.h -rw-r--r-- 6.3 KB
types.h -rw-r--r-- 446 bytes
usage.c -rw-r--r-- 1.7 KB
util.c -rw-r--r-- 2.0 KB
util.h -rw-r--r-- 5.7 KB
values.c -rw-r--r-- 6.5 KB
values.h -rw-r--r-- 618 bytes
wrapper.c -rw-r--r-- 790 bytes
xyarray.c -rw-r--r-- 364 bytes
xyarray.h -rw-r--r-- 432 bytes

back to top