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: <Y6aot0pDtWl/c5Nb@infradead.org>
Date:   Fri, 23 Dec 2022 23:22:31 -0800
From:   Christoph Hellwig <hch@...radead.org>
To:     Andreas Grünbacher 
        <andreas.gruenbacher@...il.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Andreas Gruenbacher <agruenba@...hat.com>,
        "Darrick J . Wong" <djwong@...nel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Matthew Wilcox <willy@...radead.org>,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-ext4@...r.kernel.org, cluster-devel@...hat.com
Subject: Re: [RFC v3 2/7] iomap: Add iomap_folio_done helper

On Fri, Dec 23, 2022 at 09:54:34PM +0100, Andreas Grünbacher wrote:
> > But for the current version I don't really understand why the error
> > unwinding changes here.
> 
> Currently, we have this order of operations in iomap_write_begin():
> 
>   folio_unlock() // folio_put() // iomap_write_failed() // ->page_done()
> 
> and this order in iomap_write_end():
> 
>   folio_unlock() // ->page_done() // folio_put() // iomap_write_failed()
> 
> The unwinding in iomap_write_begin() works because this is the trivial
> case in which nothing happens to the page. We might just as well use
> the same order of operations there as in iomap_write_end() though, and
> when you switch to that, this is what you get.

Please document this in the commit message.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ