BUG? deadlock bug at generic_shutdown_
Hi. I am reporting a suspected deadlock bug.
generic_shutdown_super() acquires lock_super(sb)
and then acquires lock_kernel().
However, do_remount() acquires lock_super() while
it holds lock_kernel().
Therefore, concurrent execution of generic_shutdown_super() and do_remount() may result deadlock.
Please examine this report. Thank you.
Sincerely
Shin Hong
Quoted 4 lines · ?????? shin hong
Hi. I am reporting a suspected deadlock bug.
generic_shutdown_super()acquireslock_super(sb)
and then acquireslock_kernel().
It hasn't since commit a9e220f8322e2b0e0b8903fe00265461cffad3f0. Please work against a current kernel.
Quoted 5 lines
However,
do_remount()acquireslock_super()while
it holdslock_kernel().Therefore, concurrent execution of
generic_shutdown_super()anddo_remount()may result deadlock.
The reason this wasn't a problem before the commit above is that generic_shutdown_super() can never execute concurrently with do_remount. For generic_shutdown_super() to be called, there must be no remaining references to the super_block. do_remount() must hold a reference to the super_block.
CONFIG_LOCKDEP finds lock inversion problems; I suspect you're wasting your time looking for them by hand.
Signature · 4 lines
Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."