Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1651486ybi; Wed, 17 Jul 2019 19:28:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTVDF6QgRp9uVzMc5zb+9pMx/hFLX+d2FlsqBE0a2mwLTTCtlAoBs1100XBTO4js4yYrcH X-Received: by 2002:a65:6281:: with SMTP id f1mr42404993pgv.400.1563416937786; Wed, 17 Jul 2019 19:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563416937; cv=none; d=google.com; s=arc-20160816; b=ePCVCiHA1rRloGHf8ykS7JhrWBgRynD3EHW/P/GYPFV3WYrBbIPGazcuCkLM8S0Rsw vw1skpaYpSOESiitgD1x0ih8yyToOpHS7PiNEIHcXeUn1dYkbKC8+1PbXRi1NWpQ7sDd Ey7xmC/4gmoSJaieDC9I9A5G7ktnWyUIVKrGzl1djN8Zdlg46WTb8wbcGnIHskpJ4OR8 cYVAVK/AoW5+mUyHyq1Of3gAqF4FffS9p8LJH5oHBaqFSRaS+seRMjTaQUlhJ4lxmnIF oLOzrFDEizPWvqhhwALCe/ZlEenwMdoHBXqOyorFbijc5//u+PtbZHLFYoZYh42O58kA gJjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cyz24IR1xnB6Aqj02gNz8YzR+WntKi48LIX1RQzVD5Q=; b=VsUVLYbOkWrjRGswDv8BZn/aj8B7P2jeFtATSG9cZJpkzklBfP8JxgDNYUxftz1u/k wAzPg1Zl2SdA/HU3rOtX3kObL+fMzJGzFGf+APBm+QCBgnZMluSytywnhvTpVedz/cyw oEph5DWqk3ZBvDFDdrT5tUaqIhFkyrdVvnG6DF/KjGdOe+azs/t397+IaFSHBR8M94s/ BXvuPJPblAuVmdR4RDaCxnT4JyFXNtHf/dsS6sYCp+W+1m118dHokOlRCVtep2qIU5n/ Vk9vQHgZnu2vIgPAn6lw8C/WPsy0d6CgnJjmLPAX7Xnlmdp7LOrGGahoe0S3H52pRZdi sKRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pz+VlfMq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si12768116pgj.71.2019.07.17.19.28.40; Wed, 17 Jul 2019 19:28:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pz+VlfMq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728590AbfGRC2W (ORCPT + 99 others); Wed, 17 Jul 2019 22:28:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:45978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727847AbfGRC2W (ORCPT ); Wed, 17 Jul 2019 22:28:22 -0400 Received: from localhost (115.42.148.210.bf.2iij.net [210.148.42.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1AB6320665; Thu, 18 Jul 2019 02:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563416901; bh=ARH8EQ0IsIwQgbUtuitrXQxkvZUjzgvXwHyXqAz7rHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pz+VlfMq7GcxdgJXU9N5Bt0VTh1JerW5UtHFzXt5vDZPDXN1vG0wz/+LmFWYVMv1n WzKHK0dNDnVyEIhFY3jYcjdsMJQg7NpmuoYxqg/aaZGsACaXVTYWh7Zv4kjttDcW1h no7J54cc9xiP6MpI2hGnquBvIwVHeYQn4usjVcuQ= Date: Thu, 18 Jul 2019 11:28:19 +0900 From: Greg Kroah-Hartman To: Dan Williams Cc: linux-nvdimm@lists.01.org, Ingo Molnar , Ira Weiny , Will Deacon , Dave Jiang , Keith Busch , Peter Zijlstra , Vishal Verma , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 7/7] driver-core, libnvdimm: Let device subsystems add local lockdep coverage Message-ID: <20190718022819.GA15376@kroah.com> References: <156341206785.292348.1660822720191643298.stgit@dwillia2-desk3.amr.corp.intel.com> <156341210661.292348.7014034644265455704.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <156341210661.292348.7014034644265455704.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 17, 2019 at 06:08:26PM -0700, Dan Williams wrote: > For good reason, the standard device_lock() is marked > lockdep_set_novalidate_class() because there is simply no sane way to > describe the myriad ways the device_lock() ordered with other locks. > However, that leaves subsystems that know their own local device_lock() > ordering rules to find lock ordering mistakes manually. Instead, > introduce an optional / additional lockdep-enabled lock that a subsystem > can acquire in all the same paths that the device_lock() is acquired. > > A conversion of the NFIT driver and NVDIMM subsystem to a > lockdep-validate device_lock() scheme is included. The > debug_nvdimm_lock() implementation implements the correct lock-class and > stacking order for the libnvdimm device topology hierarchy. > > Yes, this is a hack, but hopefully it is a useful hack for other > subsystems device_lock() debug sessions. Quoting Greg: > > "Yeah, it feels a bit hacky but it's really up to a subsystem to mess up > using it as much as anything else, so user beware :) > > I don't object to it if it makes things easier for you to debug." Sure, apeal to my vanity and quote me in the changelog, it's as if you are making it trivial for me to ack this... Acked-by: Greg Kroah-Hartman :)