From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] First casuality of hlist poisoning in 2.5.70
Date: Wed, 11 Jun 2003 17:04:37 -0700 [thread overview]
Message-ID: <16103.50069.802804.254270@charged.uio.no> (raw)
In-Reply-To: <Pine.LNX.4.44.0306111640590.28014-100000@home.transmeta.com>
>>>>> " " == Linus Torvalds <torvalds@transmeta.com> writes:
>> - hlist_del_rcu(&dentry->d_hash);
>> - hlist_add_head_rcu(&dentry->d_hash, target->d_bucket);
>> + if (!hlist_unhashed(&dentry->d_hash))
>> + hlist_del_rcu(&dentry->d_hash);
>> + if (!hlist_unhashed(&target->d_hash)) {
>> + hlist_add_head_rcu(&dentry->d_hash, target->d_bucket);
>> + dentry->d_vfs_flags &= ~DCACHE_UNHASHED;
>> + } else
>> + dentry->d_vfs_flags |= DCACHE_UNHASHED;
> Can source or target really be validly unhashed? That makes no
> sense, since we just looked it up, and we've held the directory
> semaphores over the whole thing.
When renaming, we may want to unhash the dentry in order to stop
d_lookup()s from succeeding (Recall that cached_lookup() does not
attempt to take the directory semaphore - only real_lookup() does
that).
AFAICS one should not rehash the dentry until after the d_move(). Does
that make sense?
Cheers,
Trond
next prev parent reply other threads:[~2003-06-11 23:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-11 23:34 Trond Myklebust
2003-06-11 23:50 ` Linus Torvalds
2003-06-12 0:04 ` Trond Myklebust [this message]
2003-06-12 0:32 ` Linus Torvalds
2003-06-12 5:22 ` Linus Torvalds
2003-06-12 6:04 ` Trond Myklebust
2003-06-12 7:30 ` Trond Myklebust
2003-06-12 16:26 ` viro
2003-06-19 23:01 ` Paul E. McKenney
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=16103.50069.802804.254270@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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®