summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorkrishnae <none@none>2007-04-10 13:53:12 -0700
committerkrishnae <none@none>2007-04-10 13:53:12 -0700
commite0d05aa9b563ace79d6b3be81511a58050e86eba (patch)
tree7a43b319a98c1f5815ebead4f3f207c071e53a9a /usr/src
parentaac11643c466386309a97e46ac9f9a4cad538e5c (diff)
downloadillumos-joyent-e0d05aa9b563ace79d6b3be81511a58050e86eba.tar.gz
6542632 memory leak in pcie module
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/sun4/io/px/px.c3
-rw-r--r--usr/src/uts/sun4/io/px/px_pci.c4
-rw-r--r--usr/src/uts/sun4u/io/pci/pci_pci.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/uts/sun4/io/px/px.c b/usr/src/uts/sun4/io/px/px.c
index 174ff8d128..0f790b052e 100644
--- a/usr/src/uts/sun4/io/px/px.c
+++ b/usr/src/uts/sun4/io/px/px.c
@@ -1255,7 +1255,8 @@ px_ctlops(dev_info_t *dip, dev_info_t *rdip,
if (as->cmd == DDI_ATTACH && as->result != DDI_SUCCESS)
pcie_pm_release(dip);
- pf_init(rdip, (void *)px_p->px_fm_ibc, as->cmd);
+ if (as->result == DDI_SUCCESS)
+ pf_init(rdip, (void *)px_p->px_fm_ibc, as->cmd);
(void) pcie_postattach_child(rdip);
diff --git a/usr/src/uts/sun4/io/px/px_pci.c b/usr/src/uts/sun4/io/px/px_pci.c
index 2d1a88d9df..7536689431 100644
--- a/usr/src/uts/sun4/io/px/px_pci.c
+++ b/usr/src/uts/sun4/io/px/px_pci.c
@@ -701,7 +701,9 @@ pxb_ctlops(dev_info_t *dip, dev_info_t *rdip,
if (as->cmd == DDI_ATTACH && as->result != DDI_SUCCESS)
pcie_pm_release(dip);
- pf_init(rdip, (void *)pxb_p->pxb_fm_ibc, as->cmd);
+ if (as->result == DDI_SUCCESS)
+ pf_init(rdip, (void *)pxb_p->pxb_fm_ibc,
+ as->cmd);
/*
* For hotplug-capable slots, we should explicitly
diff --git a/usr/src/uts/sun4u/io/pci/pci_pci.c b/usr/src/uts/sun4u/io/pci/pci_pci.c
index cdc93cf093..41742b3c4d 100644
--- a/usr/src/uts/sun4u/io/pci/pci_pci.c
+++ b/usr/src/uts/sun4u/io/pci/pci_pci.c
@@ -578,7 +578,7 @@ ppb_ctlops(dev_info_t *dip, dev_info_t *rdip,
as = (struct attachspec *)arg;
if ((ppb_p->parent_bus == PCIE_PCIECAP_DEV_TYPE_PCIE_DEV) &&
- (as->when == DDI_POST))
+ (as->when == DDI_POST) && (as->result == DDI_SUCCESS))
pf_init(rdip, ppb_p->fm_ibc, as->cmd);
return (DDI_SUCCESS);