spin lock when using the stats for the status.
--- diff/drivers/md/dm-iostats.c	2002-12-17 17:05:11.000000000 +0000
+++ source/drivers/md/dm-iostats.c	2002-12-17 17:04:23.000000000 +0000
@@ -180,10 +180,12 @@
 static int iostats_status(struct dm_target *ti, status_type_t type,
 			  char *result, int maxlen)
 {
+	int flags;
 	struct iostats_c *ic = (struct iostats_c *) ti->private;
 
 	switch (type) {
 	case STATUSTYPE_INFO:
+		spin_lock_irqsave(&ic->lock, flags);
 		if (!test_bit(IOF_LATENCY, &ic->flags)) {
 			snprintf(result, maxlen, "%s %Lu %Lu %Lu %Lu",
 				 kdevname(to_kdev_t(ic->dev->bdev->bd_dev)),
@@ -197,6 +199,7 @@
 				 ic->totals[0], ic->totals[1],
 				 calc_latency(ic, 0), calc_latency(ic, 1));
 		}
+		spin_unlock_irqrestore(&ic->lock, flags);
 		break;
 
 	case STATUSTYPE_TABLE:
