linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: huteng19901016@gmail.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	"huteng.ht" <huteng.ht@bytedance.com>
Subject: Re: [PATCH] blk-mq: fix possible NULL pointer access in classic polling
Date: Fri, 16 Dec 2022 08:15:18 -0700	[thread overview]
Message-ID: <6e656544-ab31-8823-f4aa-3773a47b51d8@kernel.dk> (raw)
In-Reply-To: <20221216150636.18111-1-huteng.ht@bytedance.com>

On 12/16/22 8:06 AM, huteng19901016@gmail.com wrote:
> From: "huteng.ht" <huteng.ht@bytedance.com>
> 
> Since poll method in blk_mq_ops may not be implemented by driver,
> add a judgement to avoid NULL pointer access.

So the queue has QUEUE_FLAG_POLL set, but no -mq_ops->poll() set?
That seems like the real bug.

Where did you see this oops?

-- 
Jens Axboe



      parent reply	other threads:[~2022-12-16 15:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 15:06 [PATCH] blk-mq: fix possible NULL pointer access in classic polling huteng19901016
2022-12-16 15:15 ` Keith Busch
2022-12-16 15:15 ` Jens Axboe [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=6e656544-ab31-8823-f4aa-3773a47b51d8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=huteng.ht@bytedance.com \
    --cc=huteng19901016@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).