Actually set RLE_ALLOCATED when allocating a reserved resource so that

resource_list_release() will later release the resource instead of failing.
This commit is contained in:
John Baldwin 2009-12-30 22:37:28 +00:00
parent 3a6b4b04ab
commit 6a41dc1043
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201287

View File

@ -3063,12 +3063,12 @@ resource_list_alloc(struct resource_list *rl, device_t bus, device_t child,
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");
}