From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:56712 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeLZG7D (ORCPT ); Wed, 26 Dec 2018 01:59:03 -0500 Date: Wed, 26 Dec 2018 06:58:50 +0000 From: Al Viro To: Alexey Dobriyan Cc: Kangjie Lu , pakki001@umn.edu, Andrew Morton , Davidlohr Bueso , David Howells , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fs: proc: check status of register_filesystem Message-ID: <20181226065850.GG2217@ZenIV.linux.org.uk> References: <20181226030642.72757-1-kjlu@umn.edu> <20181226061856.GA2122@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181226061856.GA2122@avx2> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Dec 26, 2018 at 09:18:56AM +0300, Alexey Dobriyan wrote: > On Tue, Dec 25, 2018 at 09:06:40PM -0600, Kangjie Lu wrote: > > register_filesystem() could fail. The fix issues an error message if it > > fails. > > > - register_filesystem(&proc_fs_type); > > + if (register_filesystem(&proc_fs_type)) > > + pr_err("failed to register the filesystem.\n"); > > No, register_filesystem() should do it. Folks, check when would it fail. If we have something called "proc" already registered by the time when proc_root_init() runs... might as well have been a panic().