svn commit: r251095 - stable/8/sys/geom/raid

Alexander Motin mav at FreeBSD.org
Wed May 29 04:14:41 UTC 2013


Author: mav
Date: Wed May 29 04:14:41 2013
New Revision: 251095
URL: http://svnweb.freebsd.org/changeset/base/251095

Log:
  MFC r250819:
  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.

Modified:
  stable/8/sys/geom/raid/md_ddf.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/geom/   (props changed)

Modified: stable/8/sys/geom/raid/md_ddf.c
==============================================================================
--- stable/8/sys/geom/raid/md_ddf.c	Wed May 29 04:12:53 2013	(r251094)
+++ stable/8/sys/geom/raid/md_ddf.c	Wed May 29 04:14:41 2013	(r251095)
@@ -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-all mailing list