Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751176AbWHNBvL (ORCPT ); Sun, 13 Aug 2006 21:51:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751788AbWHNBvK (ORCPT ); Sun, 13 Aug 2006 21:51:10 -0400 Received: from smtp.osdl.org ([65.172.181.4]:55937 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1751176AbWHNBvJ (ORCPT ); Sun, 13 Aug 2006 21:51:09 -0400 Date: Sun, 13 Aug 2006 18:51:02 -0700 From: Andrew Morton To: Srihari Vijayaraghavan Cc: lkml , sfrench@samba.org, Anton Altaparmakov Subject: Re: CIFS & Lockdep warnings Message-Id: <20060813185102.e01898b9.akpm@osdl.org> In-Reply-To: <20060814010503.2932.qmail@web52605.mail.yahoo.com> References: <20060814010503.2932.qmail@web52605.mail.yahoo.com> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2908 Lines: 76 On Mon, 14 Aug 2006 11:05:03 +1000 (EST) Srihari Vijayaraghavan wrote: > This is observed on 2.6.18-rc4 on SUSE 10.1 x86 on > P-IV. The volume is question was mounted from a > Windows 2003 server. > > ======================================================= > [ INFO: possible circular locking dependency detected > ] > ------------------------------------------------------- > cp/11790 is trying to acquire lock: > (iprune_mutex){--..}, at: [] > mutex_lock+0x19/0x20 > > but task is already holding lock: > (&inode->i_mutex){--..}, at: [] > mutex_lock+0x19/0x20 > > which lock already depends on the new lock. > > > the existing dependency chain (in reverse order) is: > > -> #1 (&inode->i_mutex){--..}: > [] lock_acquire+0x56/0x73 > [] __mutex_lock_slowpath+0xa6/0x1ec > [] mutex_lock+0x19/0x20 > [] ntfs_put_inode+0x3e/0x79 [ntfs] > [] iput+0x33/0x70 > [] inotify_unmount_inodes+0x12e/0x15f > [] invalidate_inodes+0x38/0xd1 > [] generic_shutdown_super+0x5a/0x108 > [] kill_block_super+0x20/0x36 > [] deactivate_super+0x61/0x78 > [] mntput_no_expire+0x44/0x78 > [] path_release_on_umount+0x16/0x1d > [] sys_umount+0x1d2/0x208 > [] sys_oldumount+0xd/0xf > [] syscall_call+0x7/0xb NTFS takes i_mutex inside iprune_mutex. NTFS _should_ be deadlocking because of this (iprune_mutex nests inside i_mutex on the write() path) but somehow it gets away with it. > -> #0 (iprune_mutex){--..}: > [] lock_acquire+0x56/0x73 > [] __mutex_lock_slowpath+0xa6/0x1ec > [] mutex_lock+0x19/0x20 > [] shrink_icache_memory+0x33/0x1b5 > [] shrink_slab+0xce/0x125 > [] try_to_free_pages+0x125/0x1cc > [] __alloc_pages+0x184/0x26d > [] > generic_file_buffered_write+0x15a/0x53d > [] > __generic_file_aio_write_nolock+0x340/0x38d > [] generic_file_aio_write+0x61/0xb3 > [] cifs_file_aio_write+0x23/0x43 > [cifs] > [] do_sync_write+0x9d/0xce > [] vfs_write+0xaa/0x14e > [] sys_write+0x3a/0x61 > [] syscall_call+0x7/0xb CIFS takes i_prune_mutex inside i_mutex. There's no deadlock here. Arguably lockdep should be treating i_mutex in filesystem A as being a different class from i_mutex from filesystem B. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/