On 10/8/24 5:48 AM, Zhu Yanjun wrote:
在 2024/10/8 4:37, Bart Van Assche 写道:+static DEFINE_MUTEX(srpt_mc_mutex); /* Protects srpt_memory_caches. */Not sure if a function mutex_destroy is also needed in this commit or not.
Probably not since the module memory is freed shortly after srpt_cleanup_module() has been called. From kernel/locking/mutex-debug.c: void mutex_destroy(struct mutex *lock) { DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)); lock->magic = NULL; } Bart.