Patch "vfio/pci: Fix error return code in vfio_ecap_init()" has been added to the 4.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

    vfio/pci: Fix error return code in vfio_ecap_init()

to the 4.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:
     vfio-pci-fix-error-return-code-in-vfio_ecap_init.patch
and it can be found in the queue-4.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 bcc0583001b2b8c15266039d89308109118702fc
Author: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
Date:   Sat May 15 10:04:58 2021 +0800

    vfio/pci: Fix error return code in vfio_ecap_init()
    
    [ Upstream commit d1ce2c79156d3baf0830990ab06d296477b93c26 ]
    
    The error code returned from vfio_ext_cap_len() is stored in 'len', not
    in 'ret'.
    
    Fixes: 89e1f7d4c66d ("vfio: Add PCI device driver")
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Signed-off-by: Zhen Lei <thunder.leizhen@xxxxxxxxxx>
    Reviewed-by: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
    Message-Id: <20210515020458.6771-1-thunder.leizhen@xxxxxxxxxx>
    Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index 666b234acca0..9891001244ea 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -1488,7 +1488,7 @@ static int vfio_ecap_init(struct vfio_pci_device *vdev)
 			if (len == 0xFF) {
 				len = vfio_ext_cap_len(vdev, ecap, epos);
 				if (len < 0)
-					return ret;
+					return len;
 			}
 		}
 



[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