lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1432531070-4262-1-git-send-email-vishnu.ps@samsung.com>
Date:	Mon, 25 May 2015 10:47:50 +0530
From:	Vishnu Pratap Singh <vishnu.ps@...sung.com>
To:	paul.gortmaker@...driver.com, snitzer@...hat.com,
	dehrenberg@...omium.org, pavel@....cz, akpm@...ux-foundation.org,
	mszeredi@...e.cz, linux-kernel@...r.kernel.org
Cc:	cpgs@...sung.com, Vishnu Pratap Singh <vishnu.ps@...sung.com>
Subject: [PATCH] init/do_mounts: Add create_dev() failure log

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 <vishnu.ps@...sung.com>
---
 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");
 	mount_block_root("/dev/root", root_mountflags);
 #endif
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ