svn commit: r201287 - head/sys/kern
John Baldwin
jhb at FreeBSD.org
Wed Dec 30 22:37:28 UTC 2009
Author: jhb
Date: Wed Dec 30 22:37:28 2009
New Revision: 201287
URL: http://svn.freebsd.org/changeset/base/201287
Log:
Actually set RLE_ALLOCATED when allocating a reserved resource so that
resource_list_release() will later release the resource instead of failing.
Modified:
head/sys/kern/subr_bus.c
Modified: head/sys/kern/subr_bus.c
==============================================================================
--- head/sys/kern/subr_bus.c Wed Dec 30 22:34:26 2009 (r201286)
+++ head/sys/kern/subr_bus.c Wed Dec 30 22:37:28 2009 (r201287)
@@ -3063,12 +3063,12 @@ resource_list_alloc(struct resource_list
if (rle->flags & RLE_RESERVED) {
if (rle->flags & RLE_ALLOCATED)
return (NULL);
- else if ((flags & RF_ACTIVE) &&
+ if ((flags & RF_ACTIVE) &&
bus_activate_resource(child, type, *rid,
rle->res) != 0)
return (NULL);
- else
- return (rle->res);
+ rle->flags |= RLE_ALLOCATED;
+ return (rle->res);
}
panic("resource_list_alloc: resource entry is busy");
}
More information about the svn-src-all
mailing list