svn commit: r213076 - projects/sv/sys/kern

Attilio Rao attilio at FreeBSD.org
Thu Sep 23 15:10:28 UTC 2010


Author: attilio
Date: Thu Sep 23 15:10:28 2010
New Revision: 213076
URL: http://svn.freebsd.org/changeset/base/213076

Log:
  Fix a protection stub left-over in r212295.

Modified:
  projects/sv/sys/kern/kern_shutdown.c

Modified: projects/sv/sys/kern/kern_shutdown.c
==============================================================================
--- projects/sv/sys/kern/kern_shutdown.c	Thu Sep 23 14:06:15 2010	(r213075)
+++ projects/sv/sys/kern/kern_shutdown.c	Thu Sep 23 15:10:28 2010	(r213076)
@@ -686,7 +686,9 @@ dump_write(struct dumperinfo *di, void *
     off_t offset, size_t length)
 {
 
-	if (length != 0 && (offset < di->mediaoffset ||
+	/* If the upper bound is 0, dumper likely will not use disks. */
+	if ((di->mediaoffset + di->mediasize) != 0 && length != 0 &&
+	    (offset < di->mediaoffset ||
 	    offset - di->mediaoffset + length > di->mediasize)) {
 		printf("Attempt to write outside dump device boundaries.\n");
 		return (ENXIO);


More information about the svn-src-projects mailing list