From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752038AbcLCX3R (ORCPT ); Sat, 3 Dec 2016 18:29:17 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:34306 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbcLCX3Q (ORCPT ); Sat, 3 Dec 2016 18:29:16 -0500 Date: Sat, 3 Dec 2016 23:29:12 +0000 From: Al Viro To: Ian Kent Cc: Andrew Morton , autofs mailing list , Kernel Mailing List , "Eric W. Biederman" , linux-fsdevel , Omar Sandoval Subject: Re: [PATCH 1/7] vfs - merge path_is_mountpoint() and path_is_mountpoint_rcu() Message-ID: <20161203232912.GE1555@ZenIV.linux.org.uk> References: <148029910861.27779.4517883721395202453.stgit@pluto.themaw.net> <20161203051322.GA24765@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161203051322.GA24765@ZenIV.linux.org.uk> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 03, 2016 at 05:13:22AM +0000, Al Viro wrote: > * path_has_submounts() is broken. At the very least, it's > AB-BA between mount_lock and rename_lock. I would suggest trying to > put read_seqlock_excl(&mount_lock) around the call of d_walk() in there, > and using __lookup_mnt() in the callback (without retries on the mount_lock, > of course - read_seqlock_excl done on the outside is enough). I'm not sure > if it won't cause trouble with contention, though; that needs testing. As > it is, that function is broken in #work.autofs, same as it is in -mm and > -next. Fix for path_has_submounts() (as above) force-pushed. It does need testing and profiling, obviously.