Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2011 12:26:10 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217303 - head/sys/geom/nop
Message-ID:  <201101121226.p0CCQA1J088920@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Wed Jan 12 12:26:10 2011
New Revision: 217303
URL: http://svn.freebsd.org/changeset/base/217303

Log:
  Sector size can not be greater than MAXPHYS.
  
  MFC after:	1 week

Modified:
  head/sys/geom/nop/g_nop.c

Modified: head/sys/geom/nop/g_nop.c
==============================================================================
--- head/sys/geom/nop/g_nop.c	Wed Jan 12 10:12:32 2011	(r217302)
+++ head/sys/geom/nop/g_nop.c	Wed Jan 12 12:26:10 2011	(r217303)
@@ -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?201101121226.p0CCQA1J088920>