Commit 54ef7a47 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Al Viro
Browse files

vfio: do not set FMODE_LSEEK flag



This file does not support llseek, so don't set the flag advertising it.

Acked-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c9eb2d42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 "