From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751674AbbEZGZh (ORCPT ); Tue, 26 May 2015 02:25:37 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:37179 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbEZGZg (ORCPT ); Tue, 26 May 2015 02:25:36 -0400 Date: Tue, 26 May 2015 08:25:34 +0200 From: Pavel Machek To: Vishnu Pratap Singh Cc: paul.gortmaker@windriver.com, snitzer@redhat.com, dehrenberg@chromium.org, akpm@linux-foundation.org, mszeredi@suse.cz, linux-kernel@vger.kernel.org, cpgs@samsung.com Subject: Re: [PATCH] init/do_mounts: Add create_dev() failure log Message-ID: <20150526062534.GA11401@amd> References: <1432531070-4262-1-git-send-email-vishnu.ps@samsung.com> <1432561783-3317-1-git-send-email-vishnu.ps@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432561783-3317-1-git-send-email-vishnu.ps@samsung.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2015-05-25 19:19:43, Vishnu Pratap Singh wrote: > if create_dev() function fails to create the root mount device (/dev/root), > then it goes to panic as root device not found but there is no check/log > present in case of failure, So i have added the log in case it fails to create > the root device. It will help in debugging. > > Signed-off-by: Vishnu Pratap Singh > --- > init/do_mounts.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/init/do_mounts.c b/init/do_mounts.c > index 8369ffa..a68aaf6 100644 > --- a/init/do_mounts.c > +++ b/init/do_mounts.c > @@ -532,7 +532,8 @@ void __init mount_root(void) > } > #endif > #ifdef CONFIG_BLOCK > - create_dev("/dev/root", ROOT_DEV); > + if(create_dev("/dev/root", ROOT_DEV) < 0) > + printk(KERN_ERR "Failed to create %s device !!\n", "/dev/root"); No change, AFAICT. Please fix stuff I pointed in the email, and you can get my acked-by ;-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html