|
|
Subscribe / Log in / New account

So do they just leak on module unload?

So do they just leak on module unload?

Posted Oct 23, 2025 13:15 UTC (Thu) by daroc (editor, #160859)
In reply to: So do they just leak on module unload? by taladar
Parent article: DebugFS on Rust

As I understand it, they're tied to a specific directory name, not to a module. So any part of the kernel that asks to unload that directory will unload them. Therefore yes: a newer version of the same module can tear down old entries if it wants to.

On the Rust side of things, the files can persist until the File object is dropped or the scoped directory handle is dropped, depending on which API you use. Unless the driver takes special action to ensure those things leak, they should normally be dropped on module unload. So Rust drivers, at least, don't need to worry about that.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds