Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3358818ybl; Sun, 11 Aug 2019 22:03:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqztpAfflNTuwhQ1DDK0qOhFncnJtbbVegwvSpfmzEI4hrXLyM2aRLP85Qf4afGovg6UaRmp X-Received: by 2002:a17:902:e6:: with SMTP id a93mr31145252pla.175.1565586228130; Sun, 11 Aug 2019 22:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565586228; cv=none; d=google.com; s=arc-20160816; b=IY5Z5Ezx1xy3w5Hmbj6CzqXJMUt0BW74+8u4yd9uOs9pH94fdxZr+L2Iebxi7LhVBA ARslw6dX4hGmq+14cbh6qSCXqmC5cYqQLiUTVWTd/PZMKY0S9vhExsmkyX61o1Rf7Qqd 8x5AxdRRa+6kvT1f714WLqC4gtX6HKMnmlItwfT+U8FUsFzjqO5VNJiqw6FmQqt+LT2e Vqcr2BXb9zo/1+CtiPaTxkS7t/NOPP2RKwbg8WsPad0E8rIZ4C/+R898Qc/gBiu0EpAR 4bD0k/2lTYfBYiEfkbU3Mo06EgrDDWgXK8V4ZPrtUun+hVo6OVh6sf4Rjbsw2cyGX475 t6xA== 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=2Iwsmnny343n+0u2hyBK1VlQnKa6LsQIdyx8NUBdPpU=; b=XtHH0iF9wUA1WatpcI1ehRMotm4inPQmKHsP6zZPspVPgo0JYzpM1PAthox2DaUsrs tnOVnk81cgg2D5h4wV63A7UxFVETN4ubLLstPTWFxTmAlFfaRpBy+e2fLRvkhdxt+k6R 3d8ZQrq9OqgTmg/jJZJCQHNx5aVS+rwEdsKfI+vig8zSwRcLGkW5GOYdUM1V5FHpigkN eUwbJboL4e5N+Gj1FM9K1xDsw/7tUREUBBh2bCk81IsJ/xj1c+/8Kn2iib/hdZVf85PF K47cy4L9sd5zeY0qyHL5T1ULRTmBB3tBMptsN9fiEgpgdmY2vdwwy5HP6jiVR1RXfG49 j3Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fT8rKH3Z; 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 j23si62312512pgh.535.2019.08.11.22.03.32; Sun, 11 Aug 2019 22:03:48 -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=fT8rKH3Z; 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 S1726727AbfHLFDA (ORCPT + 99 others); Mon, 12 Aug 2019 01:03:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:42274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbfHLFDA (ORCPT ); Mon, 12 Aug 2019 01:03:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 49A7320842; Mon, 12 Aug 2019 05:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565586178; bh=dkXz6e/E5uuKCjklSsio9Wi/z0A/ofiJ0WK3lYOv9I0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fT8rKH3ZfEKa3aaCJ3w/qjJiTZogdSB366BUTlCy64cqkbHQjl/vPdnjNhGwe2rwq Of+b8YNEsxtk4PrxSPLAjYq78YQY/NCTMajihlv/b0Es50X/F+xy/V951fFSFDauQy jrIxTuXD6NzDJOHkwIOpOBm/SB28M2sirMimZZ+Y= Date: Mon, 12 Aug 2019 07:02:56 +0200 From: Greg Kroah-Hartman To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, kbuild test robot , Jonathan Corbet , Josh Triplett , Lai Jiangshan , linux-doc@vger.kernel.org, Mathieu Desnoyers , "Paul E. McKenney" , "Rafael J. Wysocki" , rcu@vger.kernel.org, Steven Rostedt , Tejun Heo Subject: Re: [PATCH 3/3] driver/core: Fix build error when SRCU and lockdep disabled Message-ID: <20190812050256.GC5834@kroah.com> References: <20190811221111.99401-1-joel@joelfernandes.org> <20190811221111.99401-3-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190811221111.99401-3-joel@joelfernandes.org> 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 Sun, Aug 11, 2019 at 06:11:11PM -0400, Joel Fernandes (Google) wrote: > Properly check if lockdep lock checking is disabled at config time. If > so, then lock_is_held() is undefined so don't do any checking. > > This fix is similar to the pattern used in srcu_read_lock_held(). > > Link: https://lore.kernel.org/lkml/201908080026.WSAFx14k%25lkp@intel.com/ > Fixes: c9e4d3a2fee8 ("acpi: Use built-in RCU list checking for acpi_ioremaps list") What tree is this commit in? > Reported-by: kbuild test robot > Signed-off-by: Joel Fernandes (Google) > --- > This patch is based on the -rcu dev branch. Ah... > drivers/base/core.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/base/core.c b/drivers/base/core.c > index 32cf83d1c744..fe25cf690562 100644 > --- a/drivers/base/core.c > +++ b/drivers/base/core.c > @@ -99,7 +99,11 @@ void device_links_read_unlock(int not_used) > > int device_links_read_lock_held(void) > { > - return lock_is_held(&device_links_lock); > +#ifdef CONFIG_DEBUG_LOCK_ALLOC > + return lock_is_held(&(device_links_lock.dep_map)); > +#else > + return 1; > +#endif return 1? So the lock is always held? confused, greg k-h