Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757342Ab3FCLg2 (ORCPT ); Mon, 3 Jun 2013 07:36:28 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:36125 "EHLO mail-vb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755703Ab3FCLgY (ORCPT ); Mon, 3 Jun 2013 07:36:24 -0400 MIME-Version: 1.0 Date: Mon, 3 Jun 2013 14:36:23 +0300 Message-ID: Subject: pipe->mutex & sig->cred_guard_mutex - possible circular locking dependency detected From: Tommi Rantala To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, LKML , trinity@vger.kernel.org, Dave Jones Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6137 Lines: 118 Hello, Hit this while fuzzing v3.10-rc4-0-gd683b96 with trinity. Tommi [40303.740229] [40303.740752] ====================================================== [40303.741014] [ INFO: possible circular locking dependency detected ] [40303.741014] 3.10.0-rc4 #1 Not tainted [40303.741014] ------------------------------------------------------- [40303.741014] trinity-child1/23450 is trying to acquire lock: [40303.741014] (&pipe->mutex/1){+.+.+.}, at: [] fifo_open+0xf5/0x340 [40303.741014] [40303.741014] but task is already holding lock: [40303.741014] (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x31/0x80 [40303.741014] [40303.741014] which lock already depends on the new lock. [40303.741014] [40303.741014] [40303.741014] the existing dependency chain (in reverse order) is: [40303.741014] -> #1 (&sig->cred_guard_mutex){+.+.+.}: [40303.741014] [] lock_acquire+0x19a/0x230 [40303.741014] [] mutex_lock_interruptible_nested+0x72/0x430 [40303.741014] [] proc_pid_attr_write+0xc2/0x160 [40303.741014] [] __kernel_write+0x81/0x150 [40303.741014] [] write_pipe_buf+0x4d/0x80 [40303.741014] [] splice_from_pipe_feed+0x8c/0x140 [40303.741014] [] __splice_from_pipe+0x45/0x80 [40303.741014] [] splice_from_pipe+0x4c/0x70 [40303.741014] [] default_file_splice_write+0x14/0x20 [40303.741014] [] do_splice_from+0xc3/0x120 [40303.741014] [] SyS_splice+0x4b5/0x6b0 [40303.741014] [] system_call_fastpath+0x16/0x1b [40303.741014] -> #0 (&pipe->mutex/1){+.+.+.}: [40303.741014] [] __lock_acquire+0x135e/0x1bb0 [40303.741014] [] lock_acquire+0x19a/0x230 [40303.741014] [] mutex_lock_nested+0x72/0x3a0 [40303.741014] [] fifo_open+0xf5/0x340 [40303.741014] [] do_dentry_open+0x1cc/0x290 [40303.741014] [] finish_open+0x4a/0x60 [40303.741014] [] do_last+0xb52/0xe40 [40303.741014] [] path_openat+0x373/0x4d0 [40303.741014] [] do_filp_open+0x3c/0xa0 [40303.741014] [] open_exec+0x4e/0x130 [40303.741014] [] do_execve_common.isra.22+0x670/0x6e0 [40303.741014] [] do_execve+0x13/0x20 [40303.741014] [] SyS_execve+0x3e/0x60 [40303.741014] [] stub_execve+0x69/0xa0 [40303.741014] [40303.741014] other info that might help us debug this: [40303.741014] [40303.741014] Possible unsafe locking scenario: [40303.741014] [40303.741014] CPU0 CPU1 [40303.741014] ---- ---- [40303.741014] lock(&sig->cred_guard_mutex); [40303.741014] lock(&pipe->mutex/1); [40303.741014] lock(&sig->cred_guard_mutex); [40303.741014] lock(&pipe->mutex/1); [40303.741014] [40303.741014] *** DEADLOCK *** [40303.741014] [40303.741014] 1 lock held by trinity-child1/23450: [40303.741014] #0: (&sig->cred_guard_mutex){+.+.+.}, at: [] prepare_bprm_creds+0x31/0x80 [40303.741014] [40303.741014] stack backtrace: [40303.741014] CPU: 0 PID: 23450 Comm: trinity-child1 Not tainted 3.10.0-rc4 #1 [40303.741014] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [40303.741014] ffffffff83504660 ffff8800964ad950 ffffffff8228e109 ffff8800964ad990 [40303.741014] ffffffff8228744c ffff8800964ada10 ffff8800a3ccaaf0 ffff8800a3ccaab8 [40303.741014] ffff8800a3cca3e0 000000000013230e 0000000000000000 ffff8800964ada78 [40303.741014] Call Trace: [40303.741014] [] dump_stack+0x19/0x1b [40303.741014] [] print_circular_bug+0x1f9/0x208 [40303.741014] [] __lock_acquire+0x135e/0x1bb0 [40303.741014] [] ? graph_unlock+0x98/0xb0 [40303.741014] [] lock_acquire+0x19a/0x230 [40303.741014] [] ? fifo_open+0xf5/0x340 [40303.741014] [] mutex_lock_nested+0x72/0x3a0 [40303.741014] [] ? fifo_open+0xf5/0x340 [40303.741014] [] ? lock_release_holdtime+0x28/0x1a0 [40303.741014] [] ? fifo_open+0xf5/0x340 [40303.741014] [] ? do_raw_spin_unlock+0xa7/0xc0 [40303.741014] [] fifo_open+0xf5/0x340 [40303.741014] [] do_dentry_open+0x1cc/0x290 [40303.741014] [] ? pipe_release+0x110/0x110 [40303.741014] [] finish_open+0x4a/0x60 [40303.741014] [] do_last+0xb52/0xe40 [40303.741014] [] ? lg_local_unlock+0x2b/0x40 [40303.741014] [] ? mntput_no_expire+0x44/0x130 [40303.741014] [] ? mntput+0x35/0x40 [40303.741014] [] path_openat+0x373/0x4d0 [40303.741014] [] ? trace_hardirqs_off_caller+0x28/0xe0 [40303.741014] [] do_filp_open+0x3c/0xa0 [40303.741014] [] ? sched_clock_local+0x1d/0x90 [40303.741014] [] ? trace_hardirqs_off+0xd/0x10 [40303.741014] [] ? local_clock+0x4a/0x70 [40303.741014] [] open_exec+0x4e/0x130 [40303.741014] [] do_execve_common.isra.22+0x670/0x6e0 [40303.741014] [] ? do_execve_common.isra.22+0xf7/0x6e0 [40303.741014] [] do_execve+0x13/0x20 [40303.741014] [] SyS_execve+0x3e/0x60 [40303.741014] [] stub_execve+0x69/0xa0 -- 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/