Author: mav
Date: Thu Mar 14 05:24:25 2013
New Revision: 248263
URL: http://svnweb.freebsd.org/changeset/base/248263

Log:
  MFC r247918:
  Fix panic when Secondary_Element_Count == 1 and Secondary_Element_Seq
  is not set (255).

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     Thu Mar 14 02:03:33 2013        
(r248262)
+++ stable/9/sys/geom/raid/md_ddf.c     Thu Mar 14 05:24:25 2013        
(r248263)
@@ -881,7 +881,10 @@ ddf_vol_meta_update(struct ddf_vol_meta 
        hdr = src->hdr;
        vde = &src->vdr->entry[ddf_meta_find_vd(src, GUID)];
        vdc = ddf_meta_find_vdc(src, GUID);
-       bvd = GET8D(src, vdc->Secondary_Element_Seq);
+       if (GET8D(src, vdc->Secondary_Element_Count) == 1)
+               bvd = 0;
+       else
+               bvd = GET8D(src, vdc->Secondary_Element_Seq);
        size = GET16(src, hdr->Configuration_Record_Length) * src->sectorsize;
 
        if (dst->vdc == NULL ||
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to