svn commit: r205730 - stable/8/sys/dev/md

Edward Tomasz Napierala trasz at FreeBSD.org
Sat Mar 27 14:43:40 UTC 2010


Author: trasz
Date: Sat Mar 27 14:43:40 2010
New Revision: 205730
URL: http://svn.freebsd.org/changeset/base/205730

Log:
  MFC r204408:
  
  Fix panic on invalid 'mdconfig -at preload' usage.
  
  PR:		kern/80136

Modified:
  stable/8/sys/dev/md/md.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/md/md.c
==============================================================================
--- stable/8/sys/dev/md/md.c	Sat Mar 27 13:43:18 2010	(r205729)
+++ stable/8/sys/dev/md/md.c	Sat Mar 27 14:43:40 2010	(r205730)
@@ -814,6 +814,8 @@ mdcreate_preload(struct md_s *sc, struct
 
 	if (mdio->md_options & ~(MD_AUTOUNIT | MD_FORCE))
 		return (EINVAL);
+	if (mdio->md_base == 0)
+		return (EINVAL);
 	sc->flags = mdio->md_options & MD_FORCE;
 	/* Cast to pointer size, then to pointer to avoid warning */
 	sc->pl_ptr = (u_char *)(uintptr_t)mdio->md_base;


More information about the svn-src-stable-8 mailing list