All of lore.kernel.org
 help / color / mirror / Atom feed
* RTDM module ownership
@ 2020-07-02  8:32 Richard Weinberger
  2020-07-03  6:14 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2020-07-02  8:32 UTC (permalink / raw)
  To: Xenomai

Hi!

I'm working on a kernel module which is used on plain Linux and
Xenomai (RTDM), while reviewing RTDM to understand refcounting I found
something that is not entirely clear to me.

Why does __rtdm_dev_open() not grab a reference on the RTDM module owner?
This leads to the case where one can rmmod the module while it is in use.
Unloading will block uninterruptible in rtdm_dev_unregister() in the
module's cleanup funktion.

In contrast, on regular Linux rmmod will refuse to unload the module
if the device node is still open because fops_get() or other helpers
gained a reference on the owner.

-- 
Thanks,
//richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-03  9:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  8:32 RTDM module ownership Richard Weinberger
2020-07-03  6:14 ` Jan Kiszka
2020-07-03  6:22   ` Richard Weinberger
2020-07-03  9:10     ` Jan Kiszka
2020-07-03  9:26       ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.