RTDM module ownership
richard.weinberger at gmail.com
Thu Jul 2 10:32:39 CEST 2020
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.
More information about the Xenomai