Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753152AbaJ0OFe (ORCPT ); Mon, 27 Oct 2014 10:05:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39177 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752930AbaJ0OFc convert rfc822-to-8bit (ORCPT ); Mon, 27 Oct 2014 10:05:32 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: Miklos Szeredi , Al Viro cc: dhowells@redhat.com, Linus Torvalds , Linux-Fsdevel , Kernel Mailing List , linux-unionfs@vger.kernel.org Subject: Locking problem in overlayfs MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5393.1414418718.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Mon, 27 Oct 2014 14:05:18 +0000 Message-ID: <5394.1414418718@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using my testsuite, I see the attached moan from lockdep. Unfortunately, it doesn't cause the testsuite to actually fail, so I'm going to have to manually try and isolate the failing test. David ============================================= [ INFO: possible recursive locking detected ] 3.18.0-rc2-fsdevel+ #910 Tainted: G W --------------------------------------------- run/2642 is trying to acquire lock: (&sb->s_type->i_mutex_key#10/1){+.+.+.}, at: [] ovl_cleanup_whiteouts+0x29/0xb4 but task is already holding lock: (&sb->s_type->i_mutex_key#10/1){+.+.+.}, at: [] lock_rename+0xb7/0xd7 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sb->s_type->i_mutex_key#10/1); lock(&sb->s_type->i_mutex_key#10/1); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by run/2642: #0: (sb_writers#15){.+.+.+}, at: [] mnt_want_write+0x1f/0x46 #1: (&sb->s_type->i_mutex_key#17/1){+.+.+.}, at: [] do_rmdir+0xa9/0x165 #2: (&sb->s_type->i_mutex_key#17){+.+.+.}, at: [] vfs_rmdir+0x5a/0x115 #3: (sb_writers#8){.+.+.+}, at: [] mnt_want_write+0x1f/0x46 #4: (&type->s_vfs_rename_key){+.+.+.}, at: [] lock_rename+0x40/0xd7 #5: (&sb->s_type->i_mutex_key#10/1){+.+.+.}, at: [] lock_rename+0xb7/0xd7 #6: (&sb->s_type->i_mutex_key#10/2){+.+.+.}, at: [] lock_rename+0xcd/0xd7 stack backtrace: CPU: 0 PID: 2642 Comm: run Tainted: G W 3.18.0-rc2-fsdevel+ #910 Hardware name: /DG965RY, BIOS MQ96510J.86A.0816.2006.0716.2308 07/16/2006 ffffffff823989e0 ffff880038d8fa68 ffffffff815222f2 0000000000000006 ffffffff823989e0 ffff880038d8fb38 ffffffff810738f4 000000000000000b ffff880037ebc710 ffff880038d8fb00 ffff880037ebcf58 0000000000000005 Call Trace: [] dump_stack+0x4e/0x68 [] __lock_acquire+0x7b5/0x1a17 [] lock_acquire+0xa3/0x11d [] ? ovl_cleanup_whiteouts+0x29/0xb4 [] ? kfree+0x17e/0x1ca [] mutex_lock_nested+0x5a/0x304 [] ? ovl_cleanup_whiteouts+0x29/0xb4 [] ? vfs_rename+0x602/0x689 [] ovl_cleanup_whiteouts+0x29/0xb4 [] ovl_clear_empty+0x195/0x216 [] ovl_check_empty_and_clear+0x42/0x5d [] ? creds_are_invalid+0x17/0x4a [] ovl_do_remove+0x189/0x36a [] ovl_rmdir+0x11/0x13 [] vfs_rmdir+0x9f/0x115 [] do_rmdir+0xf6/0x165 [] ? do_audit_syscall_entry+0x4a/0x4c [] ? syscall_trace_enter_phase2+0x178/0x1c1 [] ? context_tracking_user_exit+0x54/0xce [] SyS_rmdir+0x11/0x13 [] tracesys_phase2+0xd4/0xd9 -- 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/