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:	Mon, 17 Sep 2012 21:39:47 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	hch@...radead.org, torvalds@...ux-foundation.org,
	Trond.Myklebust@...app.com
Subject: Re: [PATCH 1/2] vfs: dcache: fix deadlock in tree traversal

On Mon, Sep 17, 2012 at 10:23:30PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.cz>
> 
> IBM reported a deadlock in select_parent().  This was found to be caused by
> taking rename_lock when already locked when restarting the tree traversal.
> 
> There are two cases when the traversal needs to be restarted:
> 
>  1) concurrent d_move(); this can only happen when not already locked,
>  since taking rename_lock protects against concurrent d_move().
> 
>  2) racing with final d_put() on child just at the moment of ascending
>  to parent; rename_lock doesn't protect against this rare race, so it
>  can happen when already locked.
> 
> Because of case 2. we need to be able to handle restarting the traversal
> when rename_lock is already held.  This patch fixes all three callers of
> try_to_ascend().
> 
> IBM reported that the deadlock is gone with this patch.  However, there's still
> a soft lockup which is addressed by the next patch.

Egads...  The problem is real and analysis, AFAICS, is correct, but result
is extremely ugly ;-/  Let me try to come up with something saner; I'll
push that one to Linus if nothing better comes to mind, but I'd really
prefer to avoid adding to ugliness in fs/dcache.c - we already have too
much of that...
--
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