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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"