Return-Path: Received: from mta-p7.oit.umn.edu ([134.84.196.207]:43054 "EHLO mta-p7.oit.umn.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbeLZDHM (ORCPT ); Tue, 25 Dec 2018 22:07:12 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-p7.oit.umn.edu (Postfix) with ESMTP id 787FBB16 for ; Wed, 26 Dec 2018 03:07:10 +0000 (UTC) Received: from mta-p7.oit.umn.edu ([127.0.0.1]) by localhost (mta-p7.oit.umn.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IJ-xCTK_sHON for ; Tue, 25 Dec 2018 21:07:10 -0600 (CST) Received: from mail-it1-f199.google.com (mail-it1-f199.google.com [209.85.166.199]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mta-p7.oit.umn.edu (Postfix) with ESMTPS id 457ABACA for ; Tue, 25 Dec 2018 21:07:10 -0600 (CST) Received: by mail-it1-f199.google.com with SMTP id 128so18625910itw.8 for ; Tue, 25 Dec 2018 19:07:10 -0800 (PST) From: Kangjie Lu To: kjlu@umn.edu Cc: pakki001@umn.edu, Alexey Dobriyan , Andrew Morton , Davidlohr Bueso , David Howells , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH] fs: proc: check status of register_filesystem Date: Tue, 25 Dec 2018 21:06:40 -0600 Message-Id: <20181226030642.72757-1-kjlu@umn.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: register_filesystem() could fail. The fix issues an error message if it fails. Signed-off-by: Kangjie Lu --- fs/proc/root.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/proc/root.c b/fs/proc/root.c index f4b1a9d2eca6..7dcd947cba23 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -141,7 +141,8 @@ void __init proc_root_init(void) proc_mkdir("bus", NULL); proc_sys_init(); - register_filesystem(&proc_fs_type); + if (register_filesystem(&proc_fs_type)) + pr_err("failed to register the filesystem.\n"); } static int proc_root_getattr(const struct path *path, struct kstat *stat, -- 2.17.2 (Apple Git-113)