summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-07-26 20:26:33 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-07-26 20:26:33 +0300
commitdd90ad50cb372056d01a9913ce80aaa526826593 (patch)
tree664e50c1b3b12af6c526e8ec8c383216d82f2678 /arch/powerpc
parent4c7be57f2772c8ce4e1e43c6a79b8f8d401a4795 (diff)
parentbba1f6758a9ec90c1adac5dcf78f8a15f1bad65b (diff)
downloadlinux-dd90ad50cb372056d01a9913ce80aaa526826593.tar.xz
Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull struct file leak fixes from Al Viro: "a couple of leaks on failure exits missing fdput()" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: lirc: rc_dev_get_from_fd(): fix file leak powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kvm/powerpc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 961aadc71de2..5e6c7b527677 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -1984,8 +1984,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);