]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: fix dereference of rq->mq_ctx if allocation fails
authorJeff Moyer <jmoyer@redhat.com>
Tue, 3 Dec 2013 21:23:00 +0000 (14:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Dec 2013 21:24:28 +0000 (14:24 -0700)
commitf301afe8849459baae05c7a5fd0f338065be5fb1
treecf6d053aee1a645f5ec9fc8e81d5f153b5a8692d
parentc0d58a7096a9b86c0bebb40730075738c6373a42
blk-mq: fix dereference of rq->mq_ctx if allocation fails

If __GFP_WAIT isn't set and we fail allocating, when we go
to drop the reference on the ctx, we will attempt to dereference
the NULL rq. Fix that.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c