Page MenuHomeFreeBSD

D31312.diff
No OneTemporary

D31312.diff

Index: sys/kern/subr_rman.c
===================================================================
--- sys/kern/subr_rman.c
+++ sys/kern/subr_rman.c
@@ -160,6 +160,11 @@
rm->rm_descr, start, end));
if (start < rm->rm_start || end > rm->rm_end)
return EINVAL;
+#if defined(INVARIANTS) || defined(_STANDALONE)
+ if (RMAN_IS_DEFAULT_RANGE(start, end))
+ printf("ERROR: %s: <%s> attempting to manage default range\n",
+ __func__, rm->rm_descr);
+#endif
r = int_alloc_resource(M_NOWAIT);
if (r == NULL)
return ENOMEM;
@@ -447,6 +452,8 @@
dev == NULL ? "<null>" : device_get_nameunit(dev)));
KASSERT((flags & RF_FIRSTSHARE) == 0,
("invalid flags %#x", flags));
+ KASSERT(count != 0, ("%s(): attempting to allocate empty range",
+ __func__));
new_rflags = (flags & ~RF_FIRSTSHARE) | RF_ALLOCATED;
mtx_lock(rm->rm_mtx);

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 16, 12:49 AM (21 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15423696
Default Alt Text
D31312.diff (860 B)

Event Timeline