Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752153AbbEZOae (ORCPT ); Tue, 26 May 2015 10:30:34 -0400 Received: from mail-bl2on0061.outbound.protection.outlook.com ([65.55.169.61]:19659 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751262AbbEZOa1 (ORCPT ); Tue, 26 May 2015 10:30:27 -0400 Authentication-Results: spf=pass (sender IP is 63.163.107.173) smtp.mailfrom=sandisk.com; mellanox.com; dkim=none (message not signed) header.d=none; X-AuditID: ac160a69-f790f6d000001879-59-55648378e11a Message-ID: <55648374.80802@sandisk.com> Date: Tue, 26 May 2015 16:30:12 +0200 From: Bart Van Assche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Nicholas A. Bellinger" , target-devel CC: linux-scsi , linux-kernel , Christoph Hellwig , "Hannes Reinecke" , Sagi Grimberg , "Paul E. McKenney" , Nicholas Bellinger Subject: Re: [PATCH-v2 2/4] target: Drop lun_sep_lock for se_lun->lun_se_dev RCU usage References: <1432623445-25776-1-git-send-email-nab@daterainc.com> <1432623445-25776-3-git-send-email-nab@daterainc.com> In-Reply-To: <1432623445-25776-3-git-send-email-nab@daterainc.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRmVeSWpSXmKPExsWyRoxnkW5Fc0qowe0/nBZ7Fk1isli5+iiT xeVdc9gsuq/vYLN4dW4Fk0Xb6jOMFm83f2e1uNH2gM2idelbJgdOj6UfVjF73N9+hMnjwaHN LB67bzaweTybfpjJY/Ppao/Pm+QC2KO4bFJSczLLUov07RK4Ml60rWUpeMdX8WffLuYGxm88 XYycHBICJhI/N05hh7DFJC7cW8/WxcjFISRwglFi/ZN3jBDODkaJSy9XssF0/L+3kh0isZlR YuX/7ywgCV4BDYnv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xc+4QxdwtVz psNOM7Si+bjWBWuum3mx8nVf3fYs+cbuwP3WZJdtzKf7wcyJ3J3PL38O2HFIV3B/urTfyfzz EZ3P5D7M7/M9xxlyM7Xf9W8GD++TPbPWel5v3bEs4Lm6p2hvwz73KRcaPm+3qLu5W9FnU8b7 g1+unj62M73PKCzpgHiA0IUqJZbijERDLeai4kQAzqampycCAAA= X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD025;1:iT/hJKIXZSA4I9zu0xWiOqYXStdhRgXIV0ebsL3Yvp8N52+F5BeqOto2vGD5xjewxCz+OK7FTdqZ0fGOYobJF09co5eACuAxXe8M/mgPACqsqmCRSmHLSdwzccLfFsI8ckx4a0cJanWyOeSttOg/iEuJdZ559917VIIhOexh0yNgZrz+pQzNqiWfXnwuwPmnDKROPJnPzxABuegmMNV3hdl7WOTshvLODNFY/PDECykDMERB0xumIK8o37Ot8VaRHc7Pz38TZn1ekbd70QNtRvHz8tHlbB4PGgLSjBbQukuyxRIpjuYM9es6RqfkthhUZ/wjLFdLa6Ox0bg4E/MD9g== X-Forefront-Antispam-Report: CIP:63.163.107.173;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(438002)(199003)(479174004)(51704005)(24454002)(189002)(76176999)(54356999)(87936001)(50466002)(69596002)(23746002)(50986999)(65816999)(86362001)(65956001)(65806001)(47776003)(64706001)(97736004)(5001770100001)(4001540100001)(2950100001)(4001350100001)(106466001)(46102003)(62966003)(77156002)(189998001)(5001920100001)(5001960100002)(68736005)(5001860100001)(92566002)(5001830100001)(81156007)(77096005)(117636001)(36756003)(64126003)(83506001)(62816006);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0201MB1028;H:milsmgep12.sandisk.com;FPR:;SPF:Pass;PTR:ErrorRetry;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0201MB1028; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(520002)(3002001);SRVR:BN3PR0201MB1028;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0201MB1028; X-Forefront-PRVS: 0588B2BD96 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2015 14:30:16.5010 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d;Ip=[63.163.107.173];Helo=[milsmgep12.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0201MB1028 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2102 Lines: 50 On 05/26/15 08:57, Nicholas A. Bellinger wrote: > @@ -625,6 +626,7 @@ int core_dev_add_initiator_node_lun_acl( > u32 lun_access) > { > struct se_node_acl *nacl = lacl->se_lun_nacl; > + struct se_device *dev = lockless_dereference(lun->lun_se_dev); > > if (!nacl) > return -EINVAL; An attempt to run this code on a system with RCU debugging enabled resulted in the following complaint: =============================== [ INFO: suspicious RCU usage. ] 4.1.0-rc1-lio-dbg+ #1 Not tainted ------------------------------- drivers/target/target_core_device.c:617 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 1 2 locks held by ln/1497: #0: (sb_writers#11){.+.+.+}, at: [] mnt_want_write+0x24/0x50 #1: (&sb->s_type->i_mutex_key#14/1){+.+.+.}, at: [] filename_create+0xad/0x1a0 stack backtrace: CPU: 0 PID: 1497 Comm: ln Not tainted 4.1.0-rc1-lio-dbg+ #1 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 0000000000000001 ffff88005955bd68 ffffffff814fa346 0000000000000011 ffff880058bf1270 ffff88005955bd98 ffffffff810ab235 ffff880050db9a68 ffff880058ae2e68 0000000000000002 ffff880058ae4120 ffff88005955be08 Call Trace: [] dump_stack+0x4f/0x7b [] lockdep_rcu_suspicious+0xd5/0x110 [] core_dev_add_initiator_node_lun_acl+0xec/0x190 [target_core_mod] [] ? get_parent_ip+0x11/0x50 [] target_fabric_mappedlun_link+0x129/0x240 [target_core_mod] [] ? target_fabric_mappedlun_link+0x9c/0x240 [target_core_mod] [] configfs_symlink+0x13d/0x360 [configfs] [] vfs_symlink+0x58/0xb0 [] SyS_symlink+0x65/0xc0 [] system_call_fastpath+0x16/0x7a -- 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/