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] [day] [month] [year] [list]
Message-ID: <20171108022448.GW21978@ZenIV.linux.org.uk>
Date:   Wed, 8 Nov 2017 02:24:49 +0000
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Shakeel Butt <shakeelb@...gle.com>
Cc:     Greg Thelen <gthelen@...gle.com>, Jan Kara <jack@...e.cz>,
        Michal Hocko <mhocko@...e.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: remove might_sleep() from clear_inode()

On Tue, Nov 07, 2017 at 04:43:54PM -0800, Shakeel Butt wrote:
> Commit 7994e6f72543 ("vfs: Move waiting for inode writeback from
> end_writeback() to evict_inode()") removed inode_sync_wait() from
> end_writeback() and commit dbd5768f87ff ("vfs: Rename end_writeback()
> to clear_inode()") renamed end_writeback() to clear_inode(). After
> these patches there is no sleeping operation in clear_inode(). So,
> remove might_sleep() from it.

Point, but... this is far from the worst annoyance in clear_inode().
Starting with "BUG_ON() under spin_lock_irq() is antisocial and
not in a good way", of course, but that's not all - the whole
cycling of ->tree_lock has already been done back in
truncate_inode_pages_final() and we'd better have called that
in all cases when ->i_data might have ever contained anything.

The whole thing looks bogus these days...  I wonder if we should
simply move the remaining paranoia into destroy_inode() and get
rid of the I_CLEAR completely...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ