aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib
diff options
context:
space:
mode:
authorGuoju Fang <[email protected]>2019-04-25 00:48:26 +0800
committerJens Axboe <[email protected]>2019-04-24 10:56:27 -0600
commit1568ee7e3c6305d9fbb2414bfd4b56e52853d42d (patch)
tree1d06009c00ed9357f1975120991ae6ac08f7f2c5 /tools/perf/scripts/python/Perf-Trace-Util/lib
parent0257c0ed5ea3de3e32cb322852c4c40bc09d1b97 (diff)
bcache: fix crashes stopping bcache device before read miss done
The bio from upper layer is considered completed when bio_complete() returns. In most scenarios bio_complete() is called in search_free(), but when read miss happens, the bio_compete() is called when backing device reading completed, while the struct search is still in use until cache inserting finished. If someone stops the bcache device just then, the device may be closed and released, but after cache inserting finished the struct search will access a freed struct cached_dev. This patch add the reference of bcache device before bio_complete() when read miss happens, and put it after the search is not used. Signed-off-by: Guoju Fang <[email protected]> Signed-off-by: Coly Li <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions