lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190522085729.GC17019@quack2.suse.cz>
Date:   Wed, 22 May 2019 10:57:29 +0200
From:   Jan Kara <jack@...e.cz>
To:     Ira Weiny <ira.weiny@...el.com>
Cc:     Jan Kara <jack@...e.cz>, Ted Tso <tytso@....edu>,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH 3/3] ext4: Gracefully handle ext4_break_layouts() failure
 during truncate

On Tue 21-05-19 11:27:32, Ira Weiny wrote:
> On Tue, May 21, 2019 at 09:43:58AM +0200, Jan Kara wrote:
> > ext4_break_layouts() may fail e.g. due to a signal being delivered.
> > Thus we need to handle its failure gracefully and not by taking the
> > filesystem down. Currently ext4_break_layouts() failure is rare but it
> > may become more common once RDMA uses layout leases for handling
> > long-term page pins for DAX mappings.
> > 
> > To handle the failure we need to move ext4_break_layouts() earlier
> > during setattr handling before we do hard to undo changes such as
> > modifying inode size. To be able to do that we also have to move some
> > other checks which are better done without holding i_mmap_sem earlier.
> > 
> > Reported-by: "Weiny, Ira" <ira.weiny@...el.com>
> > Signed-off-by: Jan Kara <jack@...e.cz>
> 
> 
> This fixes the bug I was seeing WRT ext4_break_layouts().  Thanks for the help!
> One more NIT comment below.
> 
> > @@ -5627,29 +5644,12 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
> >  			if (error) {
> >  				if (orphan && inode->i_nlink)
> >  					ext4_orphan_del(NULL, inode);
> > -				goto err_out;
> > +				goto out_mmap_sem;
> 
> This goto flows through a second ext4_orphan_del() call which threw me at
> first.  But I think this is ok.

It is OK but unnecessary. I've deleted this ext4_orphan_del() call. Thanks
for testing and review!

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ