Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2777422ybt; Mon, 22 Jun 2020 06:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuZ13Qdo7/kp9hHCqjCkWkM4uLvG2yx7NetU6kBZRnsE9L6LBZkeudQwTxz6nBEls1RPz5 X-Received: by 2002:aa7:dc50:: with SMTP id g16mr17638118edu.318.1592833816756; Mon, 22 Jun 2020 06:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592833816; cv=none; d=google.com; s=arc-20160816; b=Q22Ateq8Rppin8iRKyKBXQZmB7AFN/0wPxr9S6K+Ci1DkgqHfc1zeXsyp5IJaMY4yN RzbbNMz1hNopp9Hyat276t91/8tknxF1pvVbmsiywUoTH/GcYD4nu88zG0s08qEtFTlJ Sik98pRMyIgiDU4BI1q4fifxHGs0zklZSzIDK5l6TArWJkyz8SaV5aGxL1/NYuJFrNNp qmgEo/QqkkjnJAPqN0LXcWxpA1zFD0iD4hWlSXMzrQxqIkKMQcyZbQINVb3IWRKUruT2 iVx7TVBF09NkstgCwPB78EmCPvisFL5jfNPFrhLTg2SxyPS2RyOJxyHYc7x7t40ds1L+ eqYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=hOeM/gkgvhCb9go7ivtJgOpNYj4p2PJ2PbbdqRWYKUk=; b=xzwejaNmEWw0yFs+qjc3ANZC/kMphGcfosQyesLyKVGrfkqUSK3k6OHkTPI4AHIoqc b/LcdjIs2+fCuHSdooYUY483ZJXEHX0MjYMc/cTGORVQerxzzV50tJgKFEtVe1kv0/Zo QlzUffEwRzOfjfJWcwsgwmC2Wn/9LqrMUSaoAAi4MDdcYDmrfJ5Bp3KdaVLD/WsbbP8v rKlQ2HQTbruxJMV7g+5MCrxdyNefG5TzWAqfNfGnVl83fXgoOwNF+I+ubQHMMuUkAO6B aaCMaInXz9C3NDBfy9kt/CrQNjIe7ttlBCCpueoGvxn8ihrY+IAU26OqnW91Hwllm562 QdhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id np3si9550339ejb.144.2020.06.22.06.49.53; Mon, 22 Jun 2020 06:50:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729069AbgFVNrH (ORCPT + 99 others); Mon, 22 Jun 2020 09:47:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:52788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbgFVNrG (ORCPT ); Mon, 22 Jun 2020 09:47:06 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 CA66A20732; Mon, 22 Jun 2020 13:47:05 +0000 (UTC) Date: Mon, 22 Jun 2020 09:47:04 -0400 From: Steven Rostedt To: Peter Enderborg Cc: Greg Kroah-Hartman , , "Rafael J . Wysocki" , Andrew Morton , Jonathan Corbet , , Randy Dunlap , Ingo Molnar Subject: Re: [PATCH 1/2] tracefs: Remove unnecessary debug_fs checks. Message-ID: <20200622094704.589220a9@oasis.local.home> In-Reply-To: <20200622083019.15479-2-peter.enderborg@sony.com> References: <20200617133738.6631-1-peter.enderborg@sony.com> <20200622083019.15479-1-peter.enderborg@sony.com> <20200622083019.15479-2-peter.enderborg@sony.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Jun 2020 10:30:18 +0200 Peter Enderborg wrote: > This is a preparation for debugfs restricted mode. > We don't need debugfs to trace, the removed check stop tracefs to work > if debugfs is not initialised. We instead tries to automount within > debugfs and relay on it's handling. The code path is to create a > backward compatibility from when tracefs was part of debugfs, it is now > standalone and does not need debugfs. When debugfs is in restricted > it is compiled in but not active and return EPERM to clients and > tracefs wont work if it assumes it is active it is compiled in > kernel. > > Reported-by: kernel test robot > Signed-off-by: Peter Enderborg Acked-by: Steven Rostedt (VMware) -- Steve > --- > kernel/trace/trace.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index ec44b0e2a19c..34ed82364edb 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -8946,9 +8946,7 @@ struct dentry *tracing_init_dentry(void) > if (tr->dir) > return NULL; > > - if (WARN_ON(!tracefs_initialized()) || > - (IS_ENABLED(CONFIG_DEBUG_FS) && > - WARN_ON(!debugfs_initialized()))) > + if (WARN_ON(!tracefs_initialized())) > return ERR_PTR(-ENODEV); > > /*