Patch "caif_virtio: fix wrong pointer check in cfv_probe()" has been added to the 6.12-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

    caif_virtio: fix wrong pointer check in cfv_probe()

to the 6.12-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:
     caif_virtio-fix-wrong-pointer-check-in-cfv_probe.patch
and it can be found in the queue-6.12 subdirectory.

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



commit dedf690f7f3eb1cf9c13836bbe90b60433709a85
Author: Vitaliy Shevtsov <v.shevtsov@xxxxxxxxxxxxxxxxx>
Date:   Thu Feb 27 23:46:27 2025 +0500

    caif_virtio: fix wrong pointer check in cfv_probe()
    
    [ Upstream commit a466fd7e9fafd975949e5945e2f70c33a94b1a70 ]
    
    del_vqs() frees virtqueues, therefore cfv->vq_tx pointer should be checked
    for NULL before calling it, not cfv->vdev. Also the current implementation
    is redundant because the pointer cfv->vdev is dereferenced before it is
    checked for NULL.
    
    Fix this by checking cfv->vq_tx for NULL instead of cfv->vdev before
    calling del_vqs().
    
    Fixes: 0d2e1a2926b1 ("caif_virtio: Introduce caif over virtio")
    Signed-off-by: Vitaliy Shevtsov <v.shevtsov@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Gerhard Engleder <gerhard@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://patch.msgid.link/20250227184716.4715-1-v.shevtsov@xxxxxxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 7fea00c7ca8a6..c60386bf2d1a4 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -745,7 +745,7 @@ static int cfv_probe(struct virtio_device *vdev)
 
 	if (cfv->vr_rx)
 		vdev->vringh_config->del_vrhs(cfv->vdev);
-	if (cfv->vdev)
+	if (cfv->vq_tx)
 		vdev->config->del_vqs(cfv->vdev);
 	free_netdev(netdev);
 	return err;




[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