Received: by oss.sgi.com id ; Wed, 10 May 2000 08:58:00 +0000 Received: from Cantor.suse.de ([194.112.123.193]:65042 "HELO Cantor.suse.de") by oss.sgi.com with SMTP id ; Wed, 10 May 2000 08:57:57 +0000 Received: from Hermes.suse.de (Hermes.suse.de [194.112.123.136]) by Cantor.suse.de (Postfix) with ESMTP id 344E31E167; Wed, 10 May 2000 10:57:55 +0200 (MEST) Received: from gruyere.muc.suse.de (unknown [10.23.1.2]) by Hermes.suse.de (Postfix) with ESMTP id 959A110A026; Wed, 10 May 2000 10:57:54 +0200 (MEST) Received: by gruyere.muc.suse.de (Postfix, from userid 14446) id 09DCF2F36E; Wed, 10 May 2000 10:57:54 +0200 (MEST) Date: Wed, 10 May 2000 10:57:54 +0200 From: "Andi Kleen" To: Daniel Moore Cc: linux-xfs@oss.sgi.com Subject: Re: race in unmount code. Message-ID: <20000510105753.A30364@gruyere.muc.suse.de> References: <200005100601.QAA72713@clouds.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200005100601.QAA72713@clouds.melbourne.sgi.com>; from dxm@clouds.melbourne.sgi.com on Wed, May 10, 2000 at 04:01:29PM +1000 Sender: owner-linux-xfs@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;linux-xfs-outgoing On Wed, May 10, 2000 at 04:01:29PM +1000, Daniel Moore wrote: > I'm pretty sure the problem is because d_umount (called from do_umount in > super.c) sets s_root to NULL then does other stuff which causes the > kernel to sleep and allows entry to get_filesystem_info from a > syscall while the superblock is in a screwy state. > > After that, I'm lost - it does seem to be XFS specific. > > (yes it's a contrived example, but it demonstrates a bug I've been > seeing in more or less normal operation) > > Any ideas people? I've got to get back to testing. The vfsmnt stuff is very new in linux -- it was introduced only a few patchlevels before the XFS kernel branched. So it is entirely possible that the generic code is buggy. Maybe this patch will help: --- linux/fs/super.c-o Mon Mar 27 20:31:13 2000 +++ linux/fs/super.c Wed May 10 10:58:32 2000 @@ -384,6 +384,8 @@ if (!buffer) return 0; for (tmp = vfsmntlist; tmp && len < PAGE_SIZE - 160; tmp = tmp->mnt_next) { + if (!tmp->mnt_sb || !tmp->mnt_sb->s_root) + continue; path = d_path(tmp->mnt_sb->s_root, buffer, PAGE_SIZE); if (!path) continue; -Andi