Re: [PATCH] blk-mq: fix possible NULL pointer access in classic polling

From: Jens Axboe
Date: Fri Dec 16 2022 - 10:15:30 EST


On 12/16/22 8:06 AM, huteng19901016@xxxxxxxxx wrote:
> From: "huteng.ht" <huteng.ht@xxxxxxxxxxxxx>
>
> 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