Skip to contentSkip to conversation

Catch errors when mounting invalid cramfs partitions.

PATCH New Owen Kirby 1 participant 1 message May 7, 2014 Cramfs filesystem

lore
Share & tools
lore

Owen Kirby

author
#0 lore raw

PATCH 1/1 Catch errors when mounting invalid cramfs partitions.

From be93e50aafc81d7978a100234e9b3c380e5c65da Mon Sep 17 00:00:00 2001
From: Owen Kirby <[email protected]>
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().

---
 fs/cramfs/cramfs.c |    1 +
 1 file changed, 1 insertion(+)
fs/cramfs/cramfs.c +1 -0
index 8218fcf..75ff797 100644
@@ -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;
Signature · 8 lines
1.7.9.5



_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox