From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jan Kara <jack@suse.cz>
Cc: Tony Lindgren <tony@atomide.com>,
Eric Biggers <ebiggers@google.com>, Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger@dilger.ca>,
Jaegeuk Kim <jaegeuk@kernel.org>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org
Subject: Re: Regression in next with ext4 oops
Date: Tue, 4 Oct 2016 15:56:39 +0100 [thread overview]
Message-ID: <20161004145639.GY19539@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20161004090041.GE17515@quack2.suse.cz>
On Tue, Oct 04, 2016 at 11:00:41AM +0200, Jan Kara wrote:
> Hi!
>
> On Mon 03-10-16 16:30:55, Tony Lindgren wrote:
> > I'm seeing a repeatable oops with Linux next while running
> > update-initramfs, see below. I tried reverting commit 59aa5a3aeead
> > ("fscrypto: make filename crypto functions return 0 on success")
> > as that's the only commit changing ext4_htree_store_dirent, but
> > that did not help.
> >
> > Anybody else seeing something like this?
>
> Never seen this but I suspect it is a fallout from Al's directory locking
> changes. In particular ext4_htree_fill_tree() builds rb-tree of found
> directory entries in file->private_data (and generally modifies the
> structure stored there) but after Al's changes we don't have exclusive
> access to struct file if I'm right so if two processes end up calling
> getdents() for the same 'struct file' we are doomed.
RTFS. We sure as hell *do* have exclusive access to struct file. See
/* POSIX.1-2008/SUSv4 Section XSI 2.9.7 */
if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))
f->f_mode |= FMODE_ATOMIC_POS;
in do_dentry_open() as well as
if (file && (file->f_mode & FMODE_ATOMIC_POS)) {
if (file_count(file) > 1) {
v |= FDPUT_POS_UNLOCK;
mutex_lock(&file->f_pos_lock);
}
}
in __fdget_pos() and
f = fdget_pos(fd);
if (!f.file)
return -EBADF;
in getdents(2).
next prev parent reply other threads:[~2016-10-04 14:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 23:30 Regression in next with ext4 oops Tony Lindgren
2016-10-04 9:00 ` Jan Kara
2016-10-04 14:02 ` Theodore Ts'o
2016-10-04 14:44 ` Tony Lindgren
2016-10-04 14:59 ` Al Viro
2016-10-04 19:07 ` Theodore Ts'o
2016-10-04 19:19 ` Tony Lindgren
2016-10-04 19:16 ` Tony Lindgren
2016-10-04 19:29 ` Tony Lindgren
2016-10-04 19:41 ` Kalle Valo
2016-10-04 20:34 ` Tony Lindgren
2016-10-05 9:51 ` Kalle Valo
2016-10-04 14:18 ` Tony Lindgren
2016-10-04 14:56 ` Al Viro [this message]
2016-10-05 5:44 ` Jan Kara
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=20161004145639.GY19539@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=adilger@dilger.ca \
--cc=ebiggers@google.com \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.