On 5/11/22 2:02 AM, Song Liu wrote: > On Tue, May 10, 2022 at 5:35 AM Donald Buczek wrote: >> On 5/10/22 2:09 PM, Guoqing Jiang wrote: >>> >>> On 5/10/22 8:01 PM, Donald Buczek wrote: >>>>> I guess v2 is the best at the moment. I pushed a slightly modified v2 to >>>>> md-next. >>>> I think, this can be used to get a double-free from md_unregister_thread. >>>> >>>> Please review >>>> >>>> https://lore.kernel.org/linux-raid/8312a154-14fb-6f07-0cf1-8c970187cc49@molgen.mpg.de/ >>> That is supposed to be addressed by the second one, pls consider it too. >> Right, but this has not been pulled into md-next. I just wanted to note, that the current state of md-next has this problem. Thanks for reminder. >> If the other patch is taken, too, and works as intended, that would be solved. >> >>> [PATCH 2/2] md: protect md_unregister_thread from reentrancy > Good catch! > > Guoqing, current 2/2 doesn't apply cleanly. Could you please resend it on top of > md-next? Hmm, no issue from my side. ~/source/md> git am 0001-md-protect-md_unregister_thread-from-reentrancy.patch Applying: md: protect md_unregister_thread from reentrancy ~/source/md> git log --oneline |head -5 dc7147a88766 md: protect md_unregister_thread from reentrancy 5a36c493dc82 md: don't unregister sync_thread with reconfig_mutex held 49c3b9266a71 block: null_blk: Improve device creation with configfs db060f54e0c5 block: null_blk: Cleanup messages b3a0a73e8a79 block: null_blk: Cleanup device creation and deletion Anyway, it is attached. I will rebase it to your latest tree if something gets wrong. Thanks, Guoqing