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: 2050327242
("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>
This commit is contained in:
parent
8e248f2dbb
commit
7b07b04025
1 changed files with 1 additions and 0 deletions
|
@ -414,6 +414,7 @@ static ssize_t vmclock_miscdev_read(struct file *fp, char __user *buf,
|
|||
}
|
||||
|
||||
static const struct file_operations vmclock_miscdev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.mmap = vmclock_miscdev_mmap,
|
||||
.read = vmclock_miscdev_read,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue