block: null_blk: fix use after free
authorMing Lei <tom.leiming@gmail.com>
Thu, 1 May 2014 07:12:36 +0000 (15:12 +0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:46 +0000 (12:54 -0600)
commit5b97ee15debc0f81fe024c35abcc9d04bbf4c8ba
treee9508e2215777bb9bd593bc609bc16c06c5b75ad
parente867a74eafafc7a0bffdc123901612df14f83e6a
block: null_blk: fix use after free

entry(cmd->ll_list) may belong to new request once end_cmd()
returns, so fix the bug with the patch.

Without the change, it is easy to observe oops when
doing null_blk(timer) test.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/null_blk.c