Date: Sat, 27 Feb 2010 10:41:30 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r204408 - head/sys/dev/md Message-ID: <201002271041.o1RAfUjV035457@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002271041.o1RAfUjV035457>