Author: trasz
Date: Sat Feb 27 10:41:30 2010
New Revision: 204408
URL: http://svn.freebsd.org/changeset/base/204408

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

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c        Sat Feb 27 10:19:39 2010        (r204407)
+++ head/sys/dev/md/md.c        Sat Feb 27 10:41:30 2010        (r204408)
@@ -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;
_______________________________________________
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"

Reply via email to