In dm_create_persistent(), when setting up an existing snapshot, if the valid
bit from the snapshot header is not set, refuse to activate the snapshot.
[Kevin Corry]

--- diff/drivers/md/dm-exception-store.c	2003-06-17 10:07:31.000000000 +0100
+++ source/drivers/md/dm-exception-store.c	2003-06-17 10:07:34.000000000 +0100
@@ -590,6 +590,12 @@
 		/*
 		 * Sanity checks.
 		 */
+		if (!ps->valid) {
+			DMWARN("snapshot is marked invalid");
+			r = -EINVAL;
+			goto bad;
+		}
+
 		if (ps->chunk_size != chunk_size) {
 			DMWARN("chunk size for existing snapshot different "
 			       "from that requested");
