summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 2006099..78f2af3 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -814,6 +814,8 @@ mdcreate_preload(struct md_s *sc, struct md_ioctl *mdio)
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;
OpenPOWER on IntegriCloud