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: <20260127073921.175981-1-lulu@redhat.com>
Date: Tue, 27 Jan 2026 15:39:11 +0800
From: Cindy Lu <lulu@...hat.com>
To: lulu@...hat.com,
	mst@...hat.com,
	jasowang@...hat.com,
	netdev@...r.kernel.org,
	virtualization@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] vhost: remove impossible check in VHOST_GET_FORK_FROM_OWNER ioctl

remove impossible fork_owner check in VHOST_GET_FORK_FROM_OWNER ioctl

Fixes: 7d9896e9f6d02d8a ("vhost: Reintroduce kthread API and add mode selection")

Signed-off-by: Cindy Lu <lulu@...hat.com>
---
 drivers/vhost/vhost.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index bccdc9eab267..889481c92236 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2338,11 +2338,6 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
 	if (ioctl == VHOST_GET_FORK_FROM_OWNER) {
 		u8 fork_owner_val = d->fork_owner;
 
-		if (fork_owner_val != VHOST_FORK_OWNER_TASK &&
-		    fork_owner_val != VHOST_FORK_OWNER_KTHREAD) {
-			r = -EINVAL;
-			goto done;
-		}
 		if (put_user(fork_owner_val, (u8 __user *)argp)) {
 			r = -EFAULT;
 			goto done;
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ