Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751796AbdHRSHy (ORCPT ); Fri, 18 Aug 2017 14:07:54 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:7290 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbdHRSHw (ORCPT ); Fri, 18 Aug 2017 14:07:52 -0400 X-IronPort-AV: E=Sophos;i="5.41,393,1498492800"; d="scan'208";a="43189819" From: Bart Van Assche To: "mingo@kernel.org" , "longman@redhat.com" , "rostedt@goodmis.org" , "axboe@kernel.dk" CC: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" Subject: Re: [PATCH v3] blktrace: Fix potentail deadlock between delete & sysfs ops Thread-Topic: [PATCH v3] blktrace: Fix potentail deadlock between delete & sysfs ops Thread-Index: AQHTGEsKSLS3cnl/gkmAtzk7aA/ms6KKaQEA Date: Fri, 18 Aug 2017 18:07:06 +0000 Message-ID: <1503079624.2622.10.camel@wdc.com> References: <1503078848-15779-1-git-send-email-longman@redhat.com> In-Reply-To: <1503078848-15779-1-git-send-email-longman@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [63.163.107.100] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1274;20:zeZfv+tw4L2LiK5A0eLVInQQJKaTMSLyuzqvz6qEOXr9Z0dgnCy+PeRurKmV04UrpjUpE3Q5HJ/5d2YlEnvIoquM2ytA1Jmrs/sMCnJ1/ScSi9/jfFXIvKTjop+yGVU0vS0WZATz4TVDUTV7nVUjKCBVd5vsMSpVX5PydDHEZhk= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: a392fd9c-4cd9-4777-97fa-08d4e663efba x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603157)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR0401MB1274; x-ms-traffictypediagnostic: CY1PR0401MB1274: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bart.VanAssche@wdc.com; wdcipoutbound: EOP-TRUE x-exchange-antispam-report-test: UriScan:; x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR0401MB1274;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR0401MB1274; x-forefront-prvs: 040359335D x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(199003)(24454002)(189002)(377424004)(68736007)(50986999)(33646002)(6436002)(76176999)(97736004)(4326008)(54356999)(105586002)(3280700002)(2906002)(101416001)(2950100002)(14454004)(106356001)(2900100001)(5660300001)(7736002)(189998001)(103116003)(305945005)(66066001)(8936002)(81166006)(8676002)(3846002)(6116002)(478600001)(36756003)(102836003)(2501003)(25786009)(81156014)(6512007)(6506006)(229853002)(6246003)(53936002)(54906002)(77096006)(6486002)(99286003)(72206003)(3660700001)(2201001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1274;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <54C815D31ED9D449ABBD2A987693734D@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2017 18:07:06.2966 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1274 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v7II7wIp019758 Content-Length: 455 Lines: 16 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. Also, please spell "potential" correctly in the subject of this patch. Thanks, Bart.