vfio: do not set FMODE_LSEEK flag
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 29 Jun 2022 13:07:02 +0000 (15:07 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 16 Jul 2022 13:19:15 +0000 (09:19 -0400)
This file does not support llseek, so don't set the flag advertising it.

Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/vfio/vfio.c

index 61e71c1..d194dda 100644 (file)
@@ -1129,7 +1129,7 @@ static struct file *vfio_device_open(struct vfio_device *device)
         * Appears to be missing by lack of need rather than
         * explicitly prevented.  Now there's need.
         */
-       filep->f_mode |= (FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE);
+       filep->f_mode |= (FMODE_PREAD | FMODE_PWRITE);
 
        if (device->group->type == VFIO_NO_IOMMU)
                dev_warn(device->dev, "vfio-noiommu device opened by user "