From: "David S. Miller" <davem@redhat.com>
To: bsuparna@in.ibm.com
Cc: linux-kernel@vger.kernel.org, ak@suse.de, kanoj@google.engr.sgi.com
Subject: Re: Oddness in i_shared_lock and page_table_lock nesting hierarchies ?
Date: Sun, 5 Nov 2000 19:14:29 -0800 [thread overview]
Message-ID: <200011060314.TAA22656@pizda.ninka.net> (raw)
In-Reply-To: <CA25698E.002082E9.00@d73mta05.au.ibm.com> (bsuparna@in.ibm.com)
In-Reply-To: <CA25698E.002082E9.00@d73mta05.au.ibm.com>
From: bsuparna@in.ibm.com
Date: Sun, 5 Nov 2000 11:21:05 +0530
However, in the vmtruncate code, it looks like the hierarchy is
reversed.
It is a well known bug amongst gurus :-) I sent a linux24 bug addition
to Ted Ty'tso a week or so ago but he dropped it aparently.
Ted, I'm resending this below, please add it to the linux24 list
thanks.
X-Coding-System: undecided-unix
Date: Fri, 13 Oct 2000 17:36:04 -0700
From: "David S. Miller" <davem@redhat.com>
To: tytso@mit.edu
Subject: New BUG for todo list
This bug will essentially hard-hang an SMP system if triggered. Linus
and myself both know about it already for some time now, the fix is
straight forward, just nobody has coded it up and tested it yet.
The problem basically is that mm/memory.c:vmtruncate() violates the
lock acquisition ordering rules when both mm->page_table_lock and
mapping->i_shared_lock must both be acquired. All other instances (in
the mmap/munmap syscalls for example) acuire the page_table_lock then
the i_shared_lock. vmtruncate() on the other hand acquires the locks
i_shared_lock first then page_table_lock.
Essentially I would describe this in the TODO list as:
vmtruncate() violates page_table_lock/i_shared_lock
acquisition ordering rules leading to deadlock
The fix is to actually keep vmtruncate() how it is, and change the
ordering rules for the rest of the kernel to follow vmtruncate()'s
lock ordering. Linus agreed with me on this because the more natural
data inspection flow is to go from the object to mappings of that
object.
I'm going to try and work on this change this weekend, but I want it
to be in the bug list so that it _is_ accounted for.
Later,
David S. Miller
davem@redhat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-06 3:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-05 5:51 bsuparna
2000-11-06 3:14 ` David S. Miller [this message]
2000-11-06 18:42 ` tytso
2000-11-06 13:50 bsuparna
2000-11-09 12:16 bsuparna
2000-11-10 6:44 ` David S. Miller
2000-11-10 6:55 aprasad
2000-11-10 7:34 ` David S. Miller
2000-11-10 9:29 bsuparna
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=200011060314.TAA22656@pizda.ninka.net \
--to=davem@redhat.com \
--cc=ak@suse.de \
--cc=bsuparna@in.ibm.com \
--cc=kanoj@google.engr.sgi.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®