Skip to contentSkip to conversation

BUG? deadlock bug at generic_shutdown_

DISCUSSION 홍신 shin hong 2 participants 2 messages Jul 30, 2009 VFS

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 4 lines · ?????? shin hong

Hi. I am reporting a suspected deadlock bug.

generic_shutdown_super() acquires lock_super(sb)
and then acquires lock_kernel().

It hasn't since commit a9e220f8322e2b0e0b8903fe00265461cffad3f0. Please work against a current kernel.

Quoted 5 lines

However, do_remount() acquires lock_super() while
it holds lock_kernel().

Therefore, concurrent execution of generic_shutdown_super() and do_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."