Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2011 05:08:32 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217571 - stable/8/sys/geom/nop
Message-ID:  <201101190508.p0J58WLo064096@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Jan 19 05:08:32 2011
New Revision: 217571
URL: http://svn.freebsd.org/changeset/base/217571

Log:
  MFC r217303:
    Sector size can not be greater than MAXPHYS.

Modified:
  stable/8/sys/geom/nop/g_nop.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)

Modified: stable/8/sys/geom/nop/g_nop.c
==============================================================================
--- stable/8/sys/geom/nop/g_nop.c	Wed Jan 19 04:28:51 2011	(r217570)
+++ stable/8/sys/geom/nop/g_nop.c	Wed Jan 19 05:08:32 2011	(r217571)
@@ -176,6 +176,10 @@ g_nop_create(struct gctl_req *req, struc
 		gctl_error(req, "Invalid secsize for provider %s.", pp->name);
 		return (EINVAL);
 	}
+	if (secsize > MAXPHYS) {
+		gctl_error(req, "secsize is too big.");
+		return (EINVAL);
+	}
 	size -= size % secsize;
 	snprintf(name, sizeof(name), "%s%s", pp->name, G_NOP_SUFFIX);
 	LIST_FOREACH(gp, &mp->geom, geom) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101190508.p0J58WLo064096>