From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Takashi Iwai <tiwai@suse.de>, Eric Paris <eparis@redhat.com>,
Jiri Slaby <jirislaby@gmail.com>,
Pekka Enberg <penberg@kernel.org>, Thomas Meyer <thomas@m3y3r.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.36: Sound stop working
Date: Thu, 12 Aug 2010 22:52:46 +0100 [thread overview]
Message-ID: <20100812215246.GK31363@ZenIV.linux.org.uk> (raw)
In-Reply-To: <AANLkTi=s-KFuUnmNaDN6OYaiwZiaBLbYB5MCwde7tvvw@mail.gmail.com>
On Thu, Aug 12, 2010 at 02:41:51PM -0700, Linus Torvalds wrote:
> Yeah. The f_count stuff is disgusting. This revert patch makes things
> work for me again. And I suspect it's the right thing to do
> regardless. I reacted to that ugly __fput() hackery when I pulled the
> fanotify tree, but I let it slide. I clearly should have let my taste
> guide me more.
>
> fsnotify playing games with fput/fget is almost certainly totally wrong.
>
> Al, what was the problem that caused you to think that we want to have
> a 'struct file' here? Is it just the fact that some of those fsnotify
> things use that 'path' structure that is embedded in the parent? But
> isn't the simplest fix for that to just _copy_ the "struct path"
> rather than pass the "struct file" around?
I agree that what this crap is doing to f_count is blatantly wrong,
of course - no arguments here. I *do* have a reason to want struct
file, but not that way, TYVM.
Basically, dentry_open() is not even promised to work on arbitrary
dentry. Thanks to !@#!@#!@#!@# intents crap we are not promised
that the damn thing won't need setup by ->lookup/->d_revalidate.
We _are_ more or less promised that it'll work while the file is
opened (provided that /proc/*/fd/* is openable), but that's it.
It's not an API that can be made to work on an arbitrary dentries. If
caller knows what it's dealing with, it's OK, but not in general. And
no, I'm not fond of that situation, to put it mildly.
I'll see what can be done to fix that mess more or less right way...
next prev parent reply other threads:[~2010-08-12 21:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 20:00 2.6.36: Sound stop working Thomas Meyer
2010-08-12 20:10 ` Pekka Enberg
2010-08-12 20:20 ` Linus Torvalds
2010-08-12 21:01 ` Linus Torvalds
2010-08-12 20:26 ` Takashi Iwai
2010-08-12 21:01 ` Jiri Slaby
2010-08-12 21:14 ` Maxim Levitsky
2010-08-12 21:17 ` Takashi Iwai
2010-08-12 21:41 ` Linus Torvalds
2010-08-12 21:50 ` Linus Torvalds
2010-08-12 21:52 ` Al Viro [this message]
2010-08-12 22:19 ` Linus Torvalds
2010-08-13 1:53 ` Eric Paris
2010-08-13 7:50 ` Jiri Slaby
2010-08-12 22:07 ` Takashi Iwai
2010-08-12 21:18 ` Linus Torvalds
2010-08-12 21:24 ` Jiri Slaby
2010-08-12 21:45 ` Takashi Iwai
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=20100812215246.GK31363@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=eparis@redhat.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=thomas@m3y3r.de \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.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