Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

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

 



On Thu, Sep 22, 2022 at 11:45:15PM +0900, Suwan Kim wrote:
> Hi Michael,
> 
> Can this patch be merged to the next rc?
> We received two bug reports about this issue and need to fix it.
> 
> Regards,
> Suwan Kim
> 
> 
> On Wed, Aug 31, 2022 at 9:44 PM Pankaj Raghav <pankydev8@xxxxxxxxx> wrote:
> >
> > On Wed, Aug 31, 2022 at 12:01:53AM +0900, Suwan Kim wrote:
> > > If a request fails at virtio_queue_rqs(), it is inserted to requeue_list
> > > and passed to virtio_queue_rq(). Then blk_mq_start_request() can be called
> > > again at virtio_queue_rq() and trigger WARN_ON_ONCE like below trace because
> > > request state was already set to MQ_RQ_IN_FLIGHT in virtio_queue_rqs()
> > > despite the failure.
> > >
> > > To avoid calling blk_mq_start_request() twice, This patch moves the
> > > execution of blk_mq_start_request() to the end of virtblk_prep_rq().
> > > And instead of requeuing failed request to plug list in the error path of
> > > virtblk_add_req_batch(), it uses blk_mq_requeue_request() to change failed
> > > request state to MQ_RQ_IDLE. Then virtblk can safely handle the request
> > > on the next trial.
> > >
> > > Fixes: 0e9911fa768f ("virtio-blk: support mq_ops->queue_rqs()")
> > > Reported-by: Alexandre Courbot <acourbot@xxxxxxxxxxxx>
> > > Tested-by: Alexandre Courbot <acourbot@xxxxxxxxxxxx>
> > > Signed-off-by: Suwan Kim <suwan.kim027@xxxxxxxxx>
> > > ---
> > Looks good.
> > Reviewed-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx>

Stefan, Paolo, any feedback here?

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux