Re: [PATCH] blk-mq: fix possible NULL pointer access in classic polling
From: Keith Busch
Date: Fri Dec 16 2022 - 10:15:25 EST
On Fri, Dec 16, 2022 at 11:06:36PM +0800, 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.
Have you actually observed this NULL pointer access occur? Because the
poll attempt should have been abandoned much earlier due to the queue
not having QUEUE_FLAG_POLL set. If a driver has that flag set without
actually implementing ->poll(), though, that'd be a different bug.