Skip to contentSkip to conversation

fix exception on snapshot mount with an invalid option

PATCH New Ryusuke Konishi 1 participant 1 message Jan 9, 2008 NILFS2 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix exception on snapshot mount with an invalid option

Hi folks,

One of my colleages found that a NULL pointer dereference BUG occurs when trying to mount a snapshot without readonly mount option (i.e. -r).

Here is a patch to fix the problem below.
It can be applied by,

 $ cd nilfs-2.0.0-testing-8
 $ patch -p0 < patch_file

Though the bug doesn't occur for proper options, it would trouble people trying snapshots.
I'm sorry for the inconvenience if it got you in trouble.

Regards,
Ryusuke Konishi
NILFS team.
---

super.c +0 -1
Index: fs/super.c
===================================================================
@@ -1146,7 +1146,6 @@
 	sd.cno = 0;
 	sd.flags = flags;
 	if (nilfs_identify((char *)data, &sd)) {
-		close_bdev_excl(sd.bdev);
 		err = -EINVAL;
 		goto failed;
 	}