[dm-devel] BUG? a suspected race condition at dm_get_md()

홍신 shin hong hongshin at gmail.com
Thu Aug 6 06:30:00 UTC 2009


Hi. I am reporting a suspected race bug
while I read md device driver in recent Linux code.

Please examine the code and let me know your opinion.

At dm_put(), the decrement of md->holders is synchronized by _minor_lock.
But in dm_get_md(), the increment of md->holders is not.
Therefore,  race condition between dm_get_md() and dm_put()
might be possible when md->holders == 1.

Since I do not have much background, I am not sure whether
it is real bug or not. But, please examine the code and let me
know your opinion. Thank you.

Sincerely
Shin Hong




More information about the dm-devel mailing list