Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1495465

Re: Regression in next with ext4 oops

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: Regression in next with ext4 oops
Date 2016-10-04 17:00 +0200
Message-ID <sozmi-4b2-19@gated-at.bofh.it> (permalink)
References <sokZX-2Vp-3@gated-at.bofh.it> <sotTA-Ep-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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).

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 01:40 +0200
  Re: Regression in next with ext4 oops Jan Kara <jack@suse.cz> - 2016-10-04 11:10 +0200
    Re: Regression in next with ext4 oops Theodore Ts'o <tytso@mit.edu> - 2016-10-04 16:10 +0200
      Re: Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 16:50 +0200
      Re: Regression in next with ext4 oops Al Viro <viro@ZenIV.linux.org.uk> - 2016-10-04 17:00 +0200
        Re: Regression in next with ext4 oops Theodore Ts'o <tytso@mit.edu> - 2016-10-04 21:10 +0200
          Re: Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 21:20 +0200
        Re: Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 21:20 +0200
          Re: Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 21:30 +0200
            Re: Regression in next with ext4 oops Kalle Valo <kvalo@codeaurora.org> - 2016-10-04 21:50 +0200
              Re: Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 22:40 +0200
                Re: Regression in next with ext4 oops Kalle Valo <kvalo@codeaurora.org> - 2016-10-05 12:00 +0200
    Re: Regression in next with ext4 oops Tony Lindgren <tony@atomide.com> - 2016-10-04 16:20 +0200
    Re: Regression in next with ext4 oops Al Viro <viro@ZenIV.linux.org.uk> - 2016-10-04 17:00 +0200
      Re: Regression in next with ext4 oops Jan Kara <jack@suse.cz> - 2016-10-05 07:50 +0200

csiph-web