public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* BUG? a suspected race bug at cleaner_kthread()
@ 2009-09-03  1:17 홍신 shin hong
  2009-09-03  3:21 ` Yan, Zheng 
  0 siblings, 1 reply; 2+ messages in thread
From: 홍신 shin hong @ 2009-09-03  1:17 UTC (permalink / raw)
  To: linux-btrfs

Hello. I am reporting a suspected race bug at cleaner_kthread()
in btrfs/disk-io.c of Linux 2.6.30.4.

I hope this report is helpful. Please examine the report and
please let me know your opinion.

clear_ktherad() is spawned as a thread by open_ctree().

The function is finished if kthread_should_stop() or
root->fs_info->closing becomes non-zero.

If clear_kthread() is finished before other thread invoke
kthread_stop() for clear_kthread(),
the caller of kthread_stop() might have problem (waiting indefinitely).

It seems that close_ctree() set fs_info->closing
and then kthread_stop(root->fs_info->cleaner_kthread)
so that it might result this type of error.

Thank you

Sincerely
Shin Hong

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-03  3:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03  1:17 BUG? a suspected race bug at cleaner_kthread() 홍신 shin hong
2009-09-03  3:21 ` Yan, Zheng 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox