Patch "vduse: Use proper spinlock for IRQ injection" has been added to the 6.4-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    vduse: Use proper spinlock for IRQ injection

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     vduse-use-proper-spinlock-for-irq-injection.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6f4ab4dfa86e69a9ff9f98faa78c4858efdc2fa1
Author: Maxime Coquelin <maxime.coquelin@xxxxxxxxxx>
Date:   Wed Jul 5 13:45:05 2023 +0200

    vduse: Use proper spinlock for IRQ injection
    
    [ Upstream commit 7ca26efb09a1543fddb29308ea3b63b66cb5d3ee ]
    
    The IRQ injection work used spin_lock_irq() to protect the
    scheduling of the softirq, but spin_lock_bh() should be
    used.
    
    With spin_lock_irq(), we noticed delay of more than 6
    seconds between the time a NAPI polling work is scheduled
    and the time it is executed.
    
    Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
    Cc: xieyongji@xxxxxxxxxxxxx
    
    Suggested-by: Jason Wang <jasowang@xxxxxxxxxx>
    Signed-off-by: Maxime Coquelin <maxime.coquelin@xxxxxxxxxx>
    Message-Id: <20230705114505.63274-1-maxime.coquelin@xxxxxxxxxx>
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
    Reviewed-by: Xie Yongji <xieyongji@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index 0d84e6a9c3cca..76d4ab451f599 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -935,10 +935,10 @@ static void vduse_dev_irq_inject(struct work_struct *work)
 {
 	struct vduse_dev *dev = container_of(work, struct vduse_dev, inject);
 
-	spin_lock_irq(&dev->irq_lock);
+	spin_lock_bh(&dev->irq_lock);
 	if (dev->config_cb.callback)
 		dev->config_cb.callback(dev->config_cb.private);
-	spin_unlock_irq(&dev->irq_lock);
+	spin_unlock_bh(&dev->irq_lock);
 }
 
 static void vduse_vq_irq_inject(struct work_struct *work)
@@ -946,10 +946,10 @@ static void vduse_vq_irq_inject(struct work_struct *work)
 	struct vduse_virtqueue *vq = container_of(work,
 					struct vduse_virtqueue, inject);
 
-	spin_lock_irq(&vq->irq_lock);
+	spin_lock_bh(&vq->irq_lock);
 	if (vq->ready && vq->cb.callback)
 		vq->cb.callback(vq->cb.private);
-	spin_unlock_irq(&vq->irq_lock);
+	spin_unlock_bh(&vq->irq_lock);
 }
 
 static bool vduse_vq_signal_irqfd(struct vduse_virtqueue *vq)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux