From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,T_DKIM_INVALID, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F38FD21E1 for ; Mon, 30 Jul 2018 08:58:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A782520870 for ; Mon, 30 Jul 2018 08:58:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="iH1My6uU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A782520870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbeG3Kc2 (ORCPT ); Mon, 30 Jul 2018 06:32:28 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58520 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726664AbeG3Kc1 (ORCPT ); Mon, 30 Jul 2018 06:32:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Y+X3vxVdsP+CFbA4NZjUWZ+qIthYSfvbpCPqjuFSiMA=; b=iH1My6uU3dwpY1MihdtC4EkKH vx2+Wnt6rshbmAl20Qjtgg6WqY8V5i2xEzYj4IdPGwIXfspK+zDLPMZzi/fd86d3927jAU7f5IJA+ ZGMWUTGFn0ITLHm906jHuzDW3HiqVSvkc4e0TzkSi/fBC4T8HBnpcyNHH4+QqSkHWKNJo45RzNtsD mJgi2cUTawSp0qZD79pf0AZJERW4Zc63DhbXmkIc/qPNfv0Cy3LYFjR8L/QLAH0LxZh7OP+eW95nG WlVi2VjElwdNMqwkJjkd9wzCLY+xHUmXbrOh6ErhZGdfCo8MPjFOBikFWREj/Q0FwZq1fPqkRe+mz y8jgaZRuw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fk40O-0003FI-00; Mon, 30 Jul 2018 08:58:16 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EC5B820268325; Mon, 30 Jul 2018 10:58:13 +0200 (CEST) Date: Mon, 30 Jul 2018 10:58:13 +0200 From: Peter Zijlstra To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, Boqun Feng , Byungchul Park , Erick Reyes , Ingo Molnar , Julia Cartwright , Masami Hiramatsu , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Steven Rostedt , Thomas Glexiner , Todd Kjos , Tom Zanussi , Will Deacon Subject: Re: [PATCH v11 3/3] tracing: Centralize preemptirq tracepoints and unify their usage Message-ID: <20180730085813.GB2494@hirez.programming.kicks-ass.net> References: <20180726235044.10195-1-joel@joelfernandes.org> <20180726235044.10195-4-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180726235044.10195-4-joel@joelfernandes.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 04:50:44PM -0700, Joel Fernandes wrote: > One note, I have to check for lockdep recursion in the code that calls > the trace events API and bail out if we're in lockdep recursion > protection to prevent something like the following case: a spin_lock is > taken. Then lockdep_acquired is called. That does a raw_local_irq_save > and then sets lockdep_recursion, and then calls __lockdep_acquired. In > this function, a call to get_lock_stats happens which calls > preempt_disable, which calls trace IRQS off somewhere which enters my > tracepoint code and sets the tracing_irq_cpu flag to prevent recursion. > This flag is then never cleared causing lockdep paths to never be > entered and thus causing splats and other bad things. That is now fixed, right?