From: David Woodhouse <dwmw2@infradead.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Richard Cochran" <richardcochran@gmail.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Mateusz Polchlopek <mateusz.polchlopek@intel.com>,
"Mohamed Abuelfotoh, Hazem" <abuehaze@amazon.com>
Subject: [PATCH net-next 5/4] ptp: vmclock: Add .owner to vmclock_miscdev_fops
Date: Fri, 07 Feb 2025 09:13:54 +0000 [thread overview]
Message-ID: <9f5ee0186d6062eb31ed197d1b4a45c5eec110b2.camel@infradead.org> (raw)
In-Reply-To: <20250206-vmclock-probe-v1-0-17a3ea07be34@linutronix.de>
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
From: David Woodhouse <dwmw@amazon.co.uk>
Without the .owner field, the module can be unloaded while /dev/vmclock0
is open, leading to an oops.
Fixes: 205032724226 ("ptp: Add support for the AMZNC10C 'vmclock' device")
Cc: stable@vger.kernel.org
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
drivers/ptp/ptp_vmclock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ptp/ptp_vmclock.c b/drivers/ptp/ptp_vmclock.c
index 26fcc1185ee7..b3a83b03d9c1 100644
--- a/drivers/ptp/ptp_vmclock.c
+++ b/drivers/ptp/ptp_vmclock.c
@@ -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,
};
--
2.48.1
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
prev parent reply other threads:[~2025-02-07 9:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-06 17:45 [PATCH net-next 0/4] ptp: vmclock: bugfixes and cleanups for error handling Thomas Weißschuh
2025-02-06 17:45 ` [PATCH net-next 1/4] ptp: vmclock: Set driver data before its usage Thomas Weißschuh
2025-02-07 7:07 ` Mateusz Polchlopek
2025-02-06 17:45 ` [PATCH net-next 2/4] ptp: vmclock: Don't unregister misc device if it was not registered Thomas Weißschuh
2025-02-06 17:45 ` [PATCH net-next 3/4] ptp: vmclock: Clean up miscdev and ptp clock through devres Thomas Weißschuh
2025-02-06 17:45 ` [PATCH net-next 4/4] ptp: vmclock: Remove goto-based cleanup logic Thomas Weißschuh
2025-02-07 5:43 ` [PATCH net-next 0/4] ptp: vmclock: bugfixes and cleanups for error handling Richard Cochran
2025-02-07 7:13 ` Mateusz Polchlopek
2025-02-07 9:10 ` David Woodhouse
2025-02-07 9:25 ` Thomas Weißschuh
2025-02-07 9:29 ` David Woodhouse
2025-02-07 9:13 ` David Woodhouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9f5ee0186d6062eb31ed197d1b4a45c5eec110b2.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=abuehaze@amazon.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mateusz.polchlopek@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=stable@vger.kernel.org \
--cc=thomas.weissschuh@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®