BUG? a suspected race bug at cleaner_kthread()
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
2009/9/3 =ED=99=8D=EC=8B=A0 shin hong <[email protected]>:
Quoted 6 lines
Hello. I am reporting a suspected race bug at
cleaner_kthread()inbtrfs/disk-io.cof Linux 2.6.30.4.I hope this report is helpful. Please examine the report and please let me know your opinion.
Quoted 8 lines
clear_ktherad()is spawned as a thread byopen_ctree().The function is finished if
kthread_should_stop()orroot->fs_info->closingbecomes non-zero.If
clear_kthread()is finished before other thread invokekthread_stop()forclear_kthread(),
the caller ofkthread_stop()might have problem (waiting indefinitely=
).
Quoted 5 lines
It seems that
close_ctree()setfs_info->closingand thenkthread_stop(root->fs_info->cleaner_kthread)so that it might result this type of error.
You are right. Would you please send a patch.
Note: there is similar bug in transaction_kthread.
Yan, Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html