summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid1.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-02 11:38:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-02 11:38:52 +0000
commitd949cd494adc86c0d6399fbc837dee967d0127f0 (patch)
treee3470e798d322382679f7a89d3f460d1af528c88 /sys/dev/softraid_raid1.c
parent9132c7686ce155cd8beaf41d4ba730cd0451284d (diff)
marco needs to learn how to do his range checks better, found by Parfait
ok oga guenther
Diffstat (limited to 'sys/dev/softraid_raid1.c')
-rw-r--r--sys/dev/softraid_raid1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index 1eda42004e8..6c10be2ea1a 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.11 2009/06/02 05:49:35 marco Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.12 2009/06/02 11:38:51 deraadt Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -209,7 +209,7 @@ sr_raid1_set_vol_state(struct sr_discipline *sd)
for (i = 0; i < nd; i++) {
s = sd->sd_vol.sv_chunks[i]->src_meta.scm_status;
- if (s > SR_MAX_STATES)
+ if (s >= SR_MAX_STATES)
panic("%s: %s: %s: invalid chunk state",
DEVNAME(sd->sd_sc),
sd->sd_meta->ssd_devname,