svn commit: r250819 - head/sys/geom/raid
Alexander Motin
mav at FreeBSD.org
Mon May 20 00:33:55 UTC 2013
Author: mav
Date: Mon May 20 00:33:54 2013
New Revision: 250819
URL: http://svnweb.freebsd.org/changeset/base/250819
Log:
Fix vdc->Secondary_Element_Count metadata field access from 16 to 8 bit.
In some cases it could cause kernel panic during failed drive replacement.
Reported by: trasz
MFC after: 1 week
Modified:
head/sys/geom/raid/md_ddf.c
Modified: head/sys/geom/raid/md_ddf.c
==============================================================================
--- head/sys/geom/raid/md_ddf.c Sun May 19 23:30:24 2013 (r250818)
+++ head/sys/geom/raid/md_ddf.c Mon May 20 00:33:54 2013 (r250819)
@@ -515,7 +515,7 @@ ddf_meta_find_disk(struct ddf_vol_meta *
int i, bvd, pos;
i = 0;
- for (bvd = 0; bvd < GET16(vmeta, vdc->Secondary_Element_Count); bvd++) {
+ for (bvd = 0; bvd < GET8(vmeta, vdc->Secondary_Element_Count); bvd++) {
if (vmeta->bvdc[bvd] == NULL) {
i += GET16(vmeta, vdc->Primary_Element_Count); // XXX
continue;
More information about the svn-src-head
mailing list