linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "홍신 shin hong" <hongshin@gmail.com>
To: linux-fsdevel@vger.kernel.org
Subject: a suspected race bug at locks_remove_flock()
Date: Fri, 24 Jul 2009 16:55:17 +0900	[thread overview]
Message-ID: <2014bcab0907240055x5292ccf2r61a3dcb137de8f91@mail.gmail.com> (raw)

Hi. I found a suspected race condition bug at locks_remove_flocks()
in fs/locks.c of recent Linux kernel.

This bug is similar to the one reported in
ChangeLog 2.6.24 (commit 85c59580b30c82aa771aa33b37217a6b6851bc14)
and also to the one I report right before.

During the execution of locks_remove_flock(),
Big Kernel Lock(BKL) might be released and re-taken
at the call site of locks_delete_lock() unintentionally
due to the Releasing-On-Block semantics of BKL.
This is because locks_delete_lock() can invoke kmem_cache_alloc()
which can be blocked.

BKL releasing an retaking may result race condition
by breaking atomic execution of the code block
guarded by lock_kernel() and unlock_kernelt().

Please examine the possbility of race condition of this code
and let me know your opinion.

Shin Hong

                 reply	other threads:[~2009-07-24  7:55 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=2014bcab0907240055x5292ccf2r61a3dcb137de8f91@mail.gmail.com \
    --to=hongshin@gmail.com \
    --cc=linux-fsdevel@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).