Re: [BUG] possible race between md_free_disk and md_notify_reboot

From: Yu Kuai
Date: Wed Feb 19 2025 - 20:27:23 EST


Hi

在 2025/02/20 3:43, Guillaume Morin 写道:
There seems to be nothing in the code that tries to prevent this
specific race

Did you noticed that mddev_get() is called from md_notify_reboot() while
the lock is still held, and how can mddev_free() can race here if
mddev_get() succeed?

Thanks,
Kuai