Thread (2 messages) 2 messages, 2 authors, 2026-01-27

Re: [PATCH] vhost: remove impossible check in VHOST_GET_FORK_FROM_OWNER ioctl

From: Jason Wang <jasowang@redhat.com>
Date: 2026-01-27 08:06:30
Also in: lkml, virtualization

On Tue, Jan 27, 2026 at 3:39 PM Cindy Lu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
 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) {
There's another similar check in VHOST_SET_FORK_FROM_OWNER?

Thanks
-                       r = -EINVAL;
-                       goto done;
-               }
                if (put_user(fork_owner_val, (u8 __user *)argp)) {
                        r = -EFAULT;
                        goto done;
--
2.51.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help