Date: Fri, 1 Apr 2011 16:33:12 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 190858 for review Message-ID: <201104011633.p31GXCla076049@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@190858?ac=10 Change 190858 by jhb@jhb_kavik on 2011/04/01 01:51:02 Reject attempts to manage a region outside the rman's valid range. Affected files ... .. //depot/projects/pci/sys/kern/subr_rman.c#5 edit Differences ... ==== //depot/projects/pci/sys/kern/subr_rman.c#5 (text+ko) ==== @@ -162,6 +162,8 @@ DPRINTF(("rman_manage_region: <%s> request: start %#lx, end %#lx\n", rm->rm_descr, start, end)); + if (start < rm->rm_start || end > rm->rm_end) + return EINVAL; r = int_alloc_resource(M_NOWAIT); if (r == NULL) return ENOMEM; @@ -271,7 +273,7 @@ KASSERT(TAILQ_NEXT(r, r_link)->r_flags & RF_ALLOCATED, ("adjacent free regions")); mtx_unlock(rm->rm_mtx); - return (ENOENT); + return (EBUSY); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104011633.p31GXCla076049>