Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590Ab1DOURb (ORCPT ); Fri, 15 Apr 2011 16:17:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10480 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753477Ab1DOURa (ORCPT ); Fri, 15 Apr 2011 16:17:30 -0400 Date: Fri, 15 Apr 2011 16:16:52 -0400 From: Dave Jones To: Linus Torvalds Cc: Linux Kernel Subject: hugetlb locking bug. Message-ID: <20110415201652.GA5131@redhat.com> Mail-Followup-To: Dave Jones , Linus Torvalds , Linux Kernel MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3130 Lines: 74 Just hit this lockdep report.. Dave ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.39-rc3+ #3 ------------------------------------------------------- trinity/11299 is trying to acquire lock: (&sb->s_type->i_mutex_key#18){+.+.+.}, at: [] hugetlbfs_file_mmap+0x7f/0x10d but task is already holding lock: (&mm->mmap_sem){++++++}, at: [] sys_mmap_pgoff+0xf8/0x16a which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_sem){++++++}: [] lock_acquire+0xd0/0xfb [] might_fault+0x89/0xac [] filldir+0x6f/0xc7 [] dcache_readdir+0x67/0x204 [] vfs_readdir+0x78/0xb1 [] sys_getdents+0x7e/0xd1 [] system_call_fastpath+0x16/0x1b -> #0 (&sb->s_type->i_mutex_key#18){+.+.+.}: [] __lock_acquire+0x99e/0xc81 [] lock_acquire+0xd0/0xfb [] __mutex_lock_common+0x4c/0x35b [] mutex_lock_nested+0x3e/0x43 [] hugetlbfs_file_mmap+0x7f/0x10d [] mmap_region+0x26d/0x446 [] do_mmap_pgoff+0x2a4/0x2fe [] sys_mmap_pgoff+0x118/0x16a [] sys_mmap+0x22/0x24 [] system_call_fastpath+0x16/0x1b other info that might help us debug this: 1 lock held by trinity/11299: #0: (&mm->mmap_sem){++++++}, at: [] sys_mmap_pgoff+0xf8/0x16a stack backtrace: Pid: 11299, comm: trinity Not tainted 2.6.39-rc3+ #3 Call Trace: [] print_circular_bug+0xa6/0xb5 [] __lock_acquire+0x99e/0xc81 [] ? hugetlbfs_file_mmap+0x7f/0x10d [] lock_acquire+0xd0/0xfb [] ? hugetlbfs_file_mmap+0x7f/0x10d [] ? hugetlbfs_file_mmap+0x7f/0x10d [] __mutex_lock_common+0x4c/0x35b [] ? hugetlbfs_file_mmap+0x7f/0x10d [] ? __slab_alloc+0xdb/0x3b7 [] ? trace_hardirqs_on_caller+0x10b/0x12f [] ? __slab_alloc+0xe4/0x3b7 [] ? mmap_region+0x1b7/0x446 [] mutex_lock_nested+0x3e/0x43 [] hugetlbfs_file_mmap+0x7f/0x10d [] mmap_region+0x26d/0x446 [] do_mmap_pgoff+0x2a4/0x2fe [] sys_mmap_pgoff+0x118/0x16a [] ? trace_hardirqs_on_caller+0x10b/0x12f [] sys_mmap+0x22/0x24 [] system_call_fastpath+0x16/0x1b -- 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/