Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107084809
D45905.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
961 B
Referenced Files
None
Subscribers
None
D45905.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -780,12 +780,18 @@
linuxkpi_pci_iounmap(struct pci_dev *pdev, void *res)
{
struct pci_mmio_region *mmio, *p;
+ bus_space_handle_t bh = (bus_space_handle_t)res;
TAILQ_FOREACH_SAFE(mmio, &pdev->mmio, next, p) {
- if ((bus_space_handle_t)res < rman_get_bushandle(mmio->res) ||
- (bus_space_handle_t)res >= rman_get_bushandle(mmio->res) +
- rman_get_size(mmio->res))
- continue;
+ if (pdev->want_iomap_res) {
+ if (res != mmio->res)
+ continue;
+ } else {
+ if (bh < rman_get_bushandle(mmio->res) ||
+ bh >= rman_get_bushandle(mmio->res) +
+ rman_get_size(mmio->res))
+ continue;
+ }
bus_release_resource(pdev->dev.bsddev,
mmio->type, mmio->rid, mmio->res);
TAILQ_REMOVE(&pdev->mmio, mmio, next);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 9:12 PM (15 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15746690
Default Alt Text
D45905.diff (961 B)
Attached To
Mode
D45905: LinuxKPI: Fix resource leak on pci_iounmap-ing of PCI BAR
Attached
Detach File
Event Timeline
Log In to Comment