Simple mutex_destroy question
Raka Gunarto
rakagunarto at gmail.com
Wed Nov 19 08:08:56 EST 2025
> On Fri, Nov 14, 2025 at 10:42 AM Lucas Tanure <tanure at linux.com> wrote:
> > I understand that mutex_destroy will only invalidate the memory, but as
> > I am freeing this is not necessary?
My knowledge is also limited, but having taken a look, devm_mutex_init
seems to handle registering mutexes in the subsystem and conditionally
no-op it if lock debugging is off (since the init and destroy is just
instrumenting the lock for debugging). Hope this helps and if anyone
would like to correct me that's also welcome.
Raka
More information about the Kernelnewbies
mailing list