mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Catch errors when mounting invalid cramfs partitions.
@ 2014-05-07 21:04 Owen Kirby
  0 siblings, 0 replies; only message in thread
From: Owen Kirby @ 2014-05-07 21:04 UTC (permalink / raw)
  To: barebox

From be93e50aafc81d7978a100234e9b3c380e5c65da Mon Sep 17 00:00:00 2001
From: Owen Kirby <osk@exegin.com>
Date: Wed, 7 May 2014 12:29:39 -0700
Subject: [PATCH]   Catch errors when mounting invalid cramfs partitions.

When barebox is attempting to mount a cramfs partition with a bad magic, the
device will report success, but becomes unresponsive when trying to do any
file operations. The problem is caused by a missed error in cramfs_probe().

Signed-off-by: Owen Kirby <osk@exegin.com>
---
 fs/cramfs/cramfs.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index 8218fcf..75ff797 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -438,6 +438,7 @@ static int cramfs_probe(struct device_d *dev)
 	if (cramfs_read_super(priv)) {
 		dev_info(dev, "no valid cramfs found\n");
 		ret =  -EINVAL;
+		goto err_out;
 	}
 
 	priv->curr_base = -1;
-- 
1.7.9.5



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-07 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-07 21:04 [PATCH] Catch errors when mounting invalid cramfs partitions Owen Kirby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox