Re: [PATCH] block: fix Oops in blk_rq_poll_completion()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux