Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752378AbdHRTzQ convert rfc822-to-8bit (ORCPT ); Fri, 18 Aug 2017 15:55:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbdHRTzO (ORCPT ); Fri, 18 Aug 2017 15:55:14 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 388D77E434 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH v3] blktrace: Fix potentail deadlock between delete & sysfs ops To: Bart Van Assche , "mingo@kernel.org" , "rostedt@goodmis.org" , "axboe@kernel.dk" Cc: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" References: <1503078848-15779-1-git-send-email-longman@redhat.com> <1503079624.2622.10.camel@wdc.com> From: Waiman Long Organization: Red Hat Message-ID: Date: Fri, 18 Aug 2017 15:55:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <1503079624.2622.10.camel@wdc.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 18 Aug 2017 19:55:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 623 Lines: 20 On 08/18/2017 02:07 PM, Bart Van Assche wrote: > On Fri, 2017-08-18 at 13:54 -0400, Waiman Long wrote: >> Instead, a global blktrace >> mutex will be used to serialize the read/write of the blktrace sysfs >> attributes. > Hello Waiman, > > Using a mutex to serialize code is wrong. What is needed is exact > documentation of what data structures and/or member variables are > protected by bdev->bd_mutex and by blktrace_mutex. Yes, I missed the blk_trace_ioctl(). I should have modified it to use blktrace_mutex as well. > Also, please spell "potential" correctly in the subject of this patch. Will do. Thanks, Longman