On Thu, Apr 13, 2023 at 02:14:19AM -0700, Chaitanya Kulkarni wrote: > Add a NULL check before we poll on req->bio in blk_rq_poll_completion(). > Without this patch blktests/nvme/047 fails :- > > * Debug-diff:- > > linux-block (for-next) # git diff > diff --git a/block/blk-mq.c b/block/blk-mq.c > index 1b304f66f4e8..31473f55b374 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1335,6 +1335,8 @@ EXPORT_SYMBOL_GPL(blk_rq_is_poll); > static void blk_rq_poll_completion(struct request *rq, struct completion *wait) > { > do { > + if (!rq->bio) > + BUG_ON(1); > bio_poll(rq->bio, NULL, 0); > cond_resched(); > } while (!completion_done(wait)); This is already fixed upstream and stable.