Patch "powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()" has been added to the 5.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

    powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()

to the 5.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:
     powerpc-fix-a-file-leak-in-kvm_vcpu_ioctl_enable_cap.patch
and it can be found in the queue-5.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 9db685eb50108da50dce99cc310f709da1b08f86
Author: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date:   Thu May 30 23:54:55 2024 -0400

    powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
    
    [ Upstream commit b4cf5fc01ce83e5c0bcf3dbb9f929428646b9098 ]
    
    missing fdput() on one of the failure exits
    
    Fixes: eacc56bb9de3e # v5.2
    Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index eb8c72846b7fc..7c5986aec64e2 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -1950,8 +1950,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
 			break;
 
 		r = -ENXIO;
-		if (!xive_enabled())
+		if (!xive_enabled()) {
+			fdput(f);
 			break;
+		}
 
 		r = -EPERM;
 		dev = kvm_device_from_filp(f.file);




[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