blk-mq: fix dereference of rq->mq_ctx if allocation fails
authorJeff Moyer <jmoyer@redhat.com>
Fri, 24 Jan 2014 21:09:58 +0000 (13:09 -0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:40 +0000 (12:54 -0600)
commit112af67961228202d742ad6a0907e2fe6181fe0c
tree3b098adb7b50bb4dcd346c1947e174623a0c9c0f
parent1ab2f1841be2669741228b42fe61033b9fcffc6d
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