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>
Thu, 1 May 2014 15:17:41 +0000 (09:17 -0600)
commitfc27691f3537a0df087214322467b642d1f6dedb
tree9b2060931a6776ec3e2bffce0adcba04643d0ec3
parentec4a340789be16831ae96be5f7552238a7a6e903
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