public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Chaitanya Kulkarni <kch@nvidia.com>
Cc: linux-block@vger.kernel.org, axboe@kernel.dk, hch@lst.de,
	sagi@grimberg.me, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] block: fix Oops in blk_rq_poll_completion()
Date: Thu, 13 Apr 2023 07:03:45 -0700	[thread overview]
Message-ID: <ZDgLwcxill+2WTie@kbusch-mbp> (raw)
In-Reply-To: <20230413091419.6124-1-kch@nvidia.com>

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.


      reply	other threads:[~2023-04-13 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  9:14 [PATCH] block: fix Oops in blk_rq_poll_completion() Chaitanya Kulkarni
2023-04-13 14:03 ` Keith Busch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZDgLwcxill+2WTie@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox