Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932347Ab3GKMxX (ORCPT ); Thu, 11 Jul 2013 08:53:23 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:41812 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755913Ab3GKMxT (ORCPT ); Thu, 11 Jul 2013 08:53:19 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 11 Jul 2013 16:53:18 +0400 Message-ID: Subject: Re: CIFS-related deadlock in 3.10-rc7 From: Pavel Shilovsky To: "Alexander E. Patrakov" Cc: linux-cifs , "linux-kernel@vger.kernel.org" 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: 3640 Lines: 81 2013/7/7 Alexander E. Patrakov : > While playing a file from a CIFS-mounted samba share (over wireless, > if that matters), I got this deadlock: > > [ 2164.132440] ============================================= > [ 2164.132443] [ INFO: possible recursive locking detected ] > [ 2164.132446] 3.10.0-rc7-rafael+ #26 Tainted: G C > [ 2164.132448] --------------------------------------------- > [ 2164.132452] vlc/2370 is trying to acquire lock: > [ 2164.132454] (&cifsi->lock_sem){++++.+}, at: [] > cifs_reopen_file+0x270/0x5b0 [cifs] > [ 2164.132472] > but task is already holding lock: > [ 2164.132475] (&cifsi->lock_sem){++++.+}, at: [] > cifs_strict_readv+0x88/0x160 [cifs] > [ 2164.132488] > other info that might help us debug this: > [ 2164.132491] Possible unsafe locking scenario: > > [ 2164.132494] CPU0 > [ 2164.132496] ---- > [ 2164.132498] lock(&cifsi->lock_sem); > [ 2164.132502] lock(&cifsi->lock_sem); > [ 2164.132505] > *** DEADLOCK *** > > [ 2164.132508] May be due to missing lock nesting notation > > [ 2164.132511] 1 lock held by vlc/2370: > [ 2164.132513] #0: (&cifsi->lock_sem){++++.+}, at: > [] cifs_strict_readv+0x88/0x160 [cifs] > [ 2164.132526] > stack backtrace: > [ 2164.132531] CPU: 3 PID: 2370 Comm: vlc Tainted: G C > 3.10.0-rc7-rafael+ #26 > [ 2164.132534] Hardware name: Sony Corporation VPCZ23A4R/VAIO, BIOS > R1013H5 05/21/2012 > [ 2164.132537] ffff880235033f80 ffff8802281fb958 ffffffff8165b7ae > ffff8802281fba48 > [ 2164.132544] ffffffff810a0042 ffff8802281fb978 ffffffff826360d0 > ffff8802281fb9c8 > [ 2164.132550] 0000000000000000 0000000000000000 00000000000389b0 > ffff880200000542 > [ 2164.132556] Call Trace: > [ 2164.132564] [] dump_stack+0x19/0x1b > [ 2164.132569] [] __lock_acquire+0x1522/0x1ee0 > [ 2164.132579] [] ? cifs_get_inode_info+0x181/0x690 [cifs] > [ 2164.132587] [] ? cifs_reopen_file+0x270/0x5b0 [cifs] > [ 2164.132591] [] lock_acquire+0x87/0x150 > [ 2164.132598] [] ? cifs_reopen_file+0x270/0x5b0 [cifs] > [ 2164.132604] [] down_write+0x3f/0x70 > [ 2164.132612] [] ? cifs_reopen_file+0x270/0x5b0 [cifs] > [ 2164.132622] [] ? cifs_set_fid+0x26/0x40 [cifs] > [ 2164.132632] [] cifs_reopen_file+0x270/0x5b0 [cifs] > [ 2164.132642] [] cifs_readpage_worker+0x1ab/0x4e0 [cifs] > [ 2164.132652] [] cifs_readpage+0x5e/0x160 [cifs] > [ 2164.132660] [] generic_file_aio_read+0x217/0x760 > [ 2164.132670] [] cifs_strict_readv+0x131/0x160 [cifs] > [ 2164.132675] [] do_sync_read+0x75/0xb0 > [ 2164.132681] [] vfs_read+0xa7/0x180 > [ 2164.132686] [] SyS_read+0x50/0xa0 > [ 2164.132691] [] system_call_fastpath+0x1a/0x1f > > -- > Alexander E. Patrakov > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thank you for pointing it out. I created a patch that should fix the problem - will sent separately. -- Best regards, Pavel Shilovsky. -- 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/