Skip to content

Commit 7b07b04

Browse files
dwmw2Paolo Abeni
authored andcommitted
ptp: vmclock: Add .owner to vmclock_miscdev_fops
Without the .owner field, the module can be unloaded while /dev/vmclock0 is open, leading to an oops. Fixes: 2050327 ("ptp: Add support for the AMZNC10C 'vmclock' device") Cc: stable@vger.kernel.org Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 8e248f2 commit 7b07b04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ptp/ptp_vmclock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ static ssize_t vmclock_miscdev_read(struct file *fp, char __user *buf,
414414
}
415415

416416
static const struct file_operations vmclock_miscdev_fops = {
417+
.owner = THIS_MODULE,
417418
.mmap = vmclock_miscdev_mmap,
418419
.read = vmclock_miscdev_read,
419420
};

0 commit comments

Comments
 (0)