From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC, PATCH] dont insert sockets/pipes dentries into dentry_hashtable.
Date: Tue, 31 Oct 2006 23:19:54 -0800 (PST) [thread overview]
Message-ID: <20061031.231954.23010447.davem@davemloft.net> (raw)
In-Reply-To: <200610311948.48970.dada1@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Tue, 31 Oct 2006 19:48:48 +0100
> We currently insert sockets/pipes dentries into the global dentry
> hashtable. This is *useless* because there is currently no way
> these entries can be used for a lookup(). (/proc/xxx/fd/xxx uses a
> different mechanism)
It turns out that while procfs uses a different "mechanism", those
procfs symlinks do point to the real socket dentry, so when you
readlink() on it you do d_path() on the real socket dentry.
If you unhash these things, I'm pretty sure you'll see an ugly
"(deleted)" at the end of the symlink string for /proc/$pid/fd/$X
files that are sockets or something like that.
Al Viro just suggested a way around this to me:
1) Just mark the dentry HASHED by hand in the dentry flags, but don't
actually hash it.
2) Create a special dentry->d_deleted method for sockets that returns
0 and clears by hand the HASHED flag bit in the dentry (see what
dput() does when this happens).
It's an abuse but it will work.
next prev parent reply other threads:[~2006-11-01 7:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20061024141739.GB18364@nuim.ie>
[not found] ` <20061025084726.GE18364@nuim.ie>
[not found] ` <20061025.230615.92585270.davem@davemloft.net>
2006-10-31 18:48 ` Eric Dumazet
2006-11-01 7:19 ` David Miller [this message]
2006-11-01 8:21 ` Eric Dumazet
2006-11-01 8:34 ` David Miller
2006-11-01 8:38 ` Al Viro
2006-11-01 8:42 ` Al Viro
2006-11-01 9:04 ` Eric Dumazet
2006-11-01 13:54 ` Eric Dumazet
2006-11-22 17:53 ` [PATCH] [DCACHE] : avoid RCU for never hashed dentries Eric Dumazet
2006-11-22 18:00 ` [PATCH] [NET] dont insert socket dentries into dentry_hashtable Eric Dumazet
2006-11-28 23:35 ` David Miller
2006-11-29 0:13 ` Andrew Morton
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=20061031.231954.23010447.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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
Powered by JetHome