In the Linux kernel, the following vulnerability has been resolved: md/raid5-cache: fix a deadlock in r5lexitlog() Commit b13015af94cf ("md/raid5-cache: Clear conf->log after finishing work") introduce a new problem: // caller hold reconfigmutex r5lexitlog flushwork(&log->disablewritebackwork) r5cdisablewritebackasync waitevent /* * conf->log is not NULL, and mddevtrylock() * will fail, waitevent() can never pass. */ conf->log = NULL Fix this problem by setting 'config->log' to NULL before wakeup() as it used to be, so that waitevent() from r5cdisablewritebackasync() can exist. In the meantime, move forward mdunregister_thread() so that null-ptr-deref this commit fixed can still be fixed.