reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "홍신 shin hong" <hongshin@gmail.com>
To: reiserfs-devel@vger.kernel.org
Subject: a suspected bug at let_transaction_grow()
Date: Tue, 1 Sep 2009 22:39:34 +0900	[thread overview]
Message-ID: <2014bcab0909010639k437e0fc5y14c47de28c1c57d5@mail.gmail.com> (raw)

Hi. I would like to report a suspected bug at let_transaction_grow()
in fs/reiserfs/journal.c of Linux 2.6.30.4.

I found this suspected bug while I survey the usage of atomic instruction
and memory barriers. I am not certain whether this report is real or not
since I do not have ReiserFS background. But I hope that this report is helpful.
Please examine the report and let me know your opinion.

In let_transaction_grow(), I found the following code for busy-waiting:

	while ((atomic_read(&journal->j_wcount) > 0 ||
                  atomic_read(&journal->j_jlock)) &&
                  journal->j_trans_id == trans_id) {
	    queue_log_writer(sb);
	}

However, it may result starvation(or infinite loop) since there is no
memory barrier for atomic_read()
(atomic_read() may read out-of-dates value).

Thank you.

Sincerely
Shin Hong

                 reply	other threads:[~2009-09-01 13:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2014bcab0909010639k437e0fc5y14c47de28c1c57d5@mail.gmail.com \
    --to=hongshin@gmail.com \
    --cc=reiserfs-devel@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;
as well as URLs for NNTP newsgroup(s).