Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Sep 2019 11:20:54 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r352442 - stable/12/sys/arm/arm
Message-ID:  <201909171120.x8HBKssp090933@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Tue Sep 17 11:20:53 2019
New Revision: 352442
URL: https://svnweb.freebsd.org/changeset/base/352442

Log:
  MFC r351649 Check for region dups.

Modified:
  stable/12/sys/arm/arm/physmem.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm/arm/physmem.c
==============================================================================
--- stable/12/sys/arm/arm/physmem.c	Tue Sep 17 10:09:59 2019	(r352441)
+++ stable/12/sys/arm/arm/physmem.c	Tue Sep 17 11:20:53 2019	(r352442)
@@ -287,6 +287,8 @@ insert_region(struct region *regions, size_t rcnt, vm_
 
 	ep = regions + rcnt;
 	for (i = 0, rp = regions; i < rcnt; ++i, ++rp) {
+		if (rp->addr == addr && rp->size == size) /* Pure dup. */
+			return (rcnt);
 		if (flags == rp->flags) {
 			if (addr + size == rp->addr) {
 				rp->addr = addr;



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