From: "Yan, Zheng " <yanzheng@21cn.com>
To: "홍신 shin hong" <hongshin@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: BUG? a suspected race bug at cleaner_kthread()
Date: Thu, 3 Sep 2009 11:21:18 +0800 [thread overview]
Message-ID: <3d0408630909022021o52398945l65c89ec722df9790@mail.gmail.com> (raw)
In-Reply-To: <2014bcab0909021817o4dfa14f2g2634501878e085ff@mail.gmail.com>
2009/9/3 =ED=99=8D=EC=8B=A0 shin hong <hongshin@gmail.com>:
> 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.
>
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-09-03 3:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 1:17 BUG? a suspected race bug at cleaner_kthread() 홍신 shin hong
2009-09-03 3:21 ` Yan, Zheng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d0408630909022021o52398945l65c89ec722df9790@mail.gmail.com \
--to=yanzheng@21cn.com \
--cc=hongshin@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox