Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2013 04:12:53 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r251094 - stable/9/sys/geom/raid
Message-ID:  <201305290412.r4T4CrUS096186@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed May 29 04:12:53 2013
New Revision: 251094
URL: http://svnweb.freebsd.org/changeset/base/251094

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/9/sys/geom/raid/md_ddf.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/raid/md_ddf.c
==============================================================================
--- stable/9/sys/geom/raid/md_ddf.c	Wed May 29 04:10:57 2013	(r251093)
+++ stable/9/sys/geom/raid/md_ddf.c	Wed May 29 04:12:53 2013	(r251094)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305290412.r4T4CrUS096186>