Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153401155
D32458.id96755.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
754 B
Referenced Files
None
Subscribers
None
D32458.id96755.diff
View Options
Index: sys/dev/pci/pci_host_generic.c
===================================================================
--- sys/dev/pci/pci_host_generic.c
+++ sys/dev/pci/pci_host_generic.c
@@ -305,6 +305,7 @@
{
struct generic_pcie_core_softc *sc;
struct rman *rm;
+ int error;
sc = device_get_softc(dev);
@@ -317,7 +318,12 @@
rm = generic_pcie_rman(sc, type, rman_get_flags(res));
if (rm != NULL) {
KASSERT(rman_is_region_manager(res, rm), ("rman mismatch"));
- rman_release_resource(res);
+ if (rman_get_flags(res) & RF_ACTIVE) {
+ error = bus_deactivate_resource(child, type, rid, res);
+ if (error)
+ return (error);
+ }
+ return (rman_release_resource(res));
}
return (bus_generic_release_resource(dev, child, type, rid, res));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 11:03 PM (6 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31938159
Default Alt Text
D32458.id96755.diff (754 B)
Attached To
Mode
D32458: fix resource double deallocation
Attached
Detach File
Event Timeline
Log In to Comment