summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-11-22 14:00:11 +0400
committerJens Axboe <axboe@kernel.dk>2012-11-23 17:32:55 +0400
commit893d290f1d7496db97c9471bc352ad4a11dc8a25 (patch)
treec6d5444d06949edfd5d13fa0beed0992dd2ae469 /fs
parent836413e8c78ecbc55aa31f3cb600f8ee1aa355a2 (diff)
downloadlinux-893d290f1d7496db97c9471bc352ad4a11dc8a25.tar.xz
block: Don't access request after it might be freed
After we've done __elv_add_request() and __blk_run_queue() in blk_execute_rq_nowait(), the request might finish and be freed immediately. Therefore checking if the type is REQ_TYPE_PM_RESUME isn't safe afterwards, because if it isn't, rq might be gone. Instead, check beforehand and stash the result in a temporary. This fixes crashes in blk_execute_rq_nowait() I get occasionally when running with lots of memory debugging options enabled -- I think this race is usually harmless because the window for rq to be reallocated is so small. Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions