lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211129034328.1604-1-longpeng2@huawei.com>
Date:   Mon, 29 Nov 2021 11:43:28 +0800
From:   "Longpeng(Mike)" <longpeng2@...wei.com>
To:     <pbonzini@...hat.com>
CC:     <cornelia.huck@...ibm.com>, <kvm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <arei.gonglei@...wei.com>,
        Longpeng <longpeng2@...wei.com>
Subject: [PATCH] kvm/eventfd: fix the misleading comment in kvm_irqfd_assign

From: Longpeng <longpeng2@...wei.com>

The comment above the invocation of vfs_poll() is misleading, move
it to the right place.

Fixes: 684a0b719ddb ("KVM: eventfd: Fix lock order inversion")
Signed-off-by: Longpeng <longpeng2@...wei.com>
---
 virt/kvm/eventfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 2ad013b..cd01814 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -406,12 +406,12 @@ bool __attribute__((weak)) kvm_arch_irqfd_route_changed(
 
 	spin_unlock_irq(&kvm->irqfds.lock);
 
+	events = vfs_poll(f.file, &irqfd->pt);
+
 	/*
 	 * Check if there was an event already pending on the eventfd
 	 * before we registered, and trigger it as if we didn't miss it.
 	 */
-	events = vfs_poll(f.file, &irqfd->pt);
-
 	if (events & EPOLLIN)
 		schedule_work(&irqfd->inject);
 
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ