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]
Date:	Wed, 21 May 2008 11:12:34 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Hugh Dickins <hugh@...itas.com>
Cc:	Evgeniy Polyakov <johnpol@....mipt.ru>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: iput() in reclaim context

On Wed, 21 May 2008 18:52:27 +0100 (BST) Hugh Dickins <hugh@...itas.com> wrote:

> On Tue, 20 May 2008, Andrew Morton wrote:
> > On Wed, 21 May 2008 10:15:32 +0400 Evgeniy Polyakov <johnpol@....mipt.ru> wrote:
> > > On Tue, May 20, 2008 at 04:28:16PM -0700, Andrew Morton (akpm@...ux-foundation.org) wrote:
> > > > It's more than efficiency.  There are lots and lots of things we cannot
> > > > do in direct-reclaim context.
> > > > 
> > > > ...
> > > > 
> > > > c) Cannot run iput().  Or at least, we couldn't five or six years
> > > >    ago.  afaik nobody has investigated whether the situation is now
> > > >    better or worse.
> 
> I happened to notice your remark in the buffer heads defrag thread.
> Do you remember what that limitation was about?

Ages and ages ago.  I expect it was a deadlock thing.  iput_final() can
end up calling things like write_inode() which can want to do things
like opening a transaction against filesystem A while already having
one open against filesystem B.  Which is both deadlockable and BUGable.
It will take other embarrassing locks too, probably.

> Because just a few months ago I discovered a shmem race which I fixed
> by doing igrab+iput in shmem_writepage, in the reclaim context.  Feeling
> guilty now: I'd better investigate, but would welcome a starting pointer.
> 
> (If I'm lucky, it'll be that the generic code in vmscan.c cannot
> use iput, but particular filesystems might themselves be safe to.)

Yes, it was specific to the direct-reclaim calling context.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ