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]
Date:	Fri, 18 Sep 2009 08:40:07 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Trond Myklebust <trond.myklebust@....uio.no>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>, a.p.zijlstra@...llo.nl
Subject: Re: [PATCH] nfs: fix bdi_unregister() before sb kill

On Thu, Sep 17 2009, Trond Myklebust wrote:
> On Thu, 2009-09-17 at 21:40 +0200, Jens Axboe wrote:
> > On Thu, Sep 17 2009, Jens Axboe wrote:
> > > Hi,
> > > 
> > > This can cause a hang on NFS umount, since the bdi gets pruned before we
> > > flush any pending dirty IO. Peter, can you check whether it fixes your
> > > issue?
> > 
> > There's another problem with NFS && backing devices. NFS may call
> > bdi_destroy() on a bdi without ever called bdi_init(). This was always a
> > bad idea, now it's an issue.
> > 
> > So, Trond, can I safely add a server->flags private flag to indicate
> > that we have called bdi_init()? Then nfs_free_server() knows when to
> > call bdi_destroy(). Seems like the safest fix, since error handling is
> > currently 'just call nfs_free_server()'.
> 
> Urgh... Is there any reason why we can't just move the call to
> bdi_init() into nfs_bdi_register()? It seems bizarre to have to
> initialise the backing_dev_info twice like this...

No reason at all, I don't know why it was implemented that way
originally.

> If we do that, then we can just look at the BDI_registered state flag in
> order to figure out if we need to call bdi_unregister()

That's not exactly pretty either, diving into internal bdi details to
find out if we did an init/register of the device. BDI_registered is
just a debug flag, it may even go away again shortly.

-- 
Jens Axboe

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