[PATCH] Catch errors when mounting invalid cramfs partitions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From be93e50aafc81d7978a100234e9b3c380e5c65da Mon Sep 17 00:00:00 2001
From: Owen Kirby <osk@xxxxxxxxxx>
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@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux