Project

General

Profile

Bug #3235

pci: pci_common_intr_ops() leaks ddi_acc_handle_t

Added by Thomas Keiser over 7 years ago.

Status:
In Progress
Priority:
Low
Assignee:
Category:
driver - device drivers
Start date:
2012-09-28
Due date:
% Done:

70%

Estimated time:
Difficulty:
Medium
Tags:

Description

The DDI_INTROP_ALLOC case of pci_common_intr_ops() in the i86pc pci nexus driver can leak a pci config handle on certain error paths:

kmem_alloc_320 leak: 2 buffers, 320 bytes each, 640 bytes total
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
ffffff01db234d18 ffffff01dad29600        30291f043 ffffff0007ed8c40
                 ffffff01cae2a008 ffffff01cf7e4ec0 ffffff01d1bdd788
                 kmem_cache_alloc_debug+0x283
                 kmem_cache_alloc+0x115
                 kmem_zalloc+0x6a
                 impl_acc_hdl_alloc+0x34
                 ddi_regs_map_setup+0x4d
                 pci_config_setup+0x69
                 pci_common_intr_ops+0xf77
                 npe_intr_ops+0x25
                 i_ddi_intr_ops+0x54
                 ddi_intr_alloc+0x3f1
                 pcieb_intr_init+0x23f
                 pcieb_intr_attach+0x5a
                 pcieb_attach+0x1fa
                 devi_attach+0x88
                 attach_node+0x149

kmem_alloc_40 leak: 2 buffers, 40 bytes each, 80 bytes total
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
ffffff01db2270e0 ffffff01dad2f780        30291f0be ffffff0007ed8c40
                 ffffff01cae27008 ffffff01cf7e4f80 ffffff01d1bdd760
                 kmem_cache_alloc_debug+0x283
                 kmem_cache_alloc+0x115
                 kmem_zalloc+0x6a
                 impl_acc_hdl_alloc+0x4a
                 ddi_regs_map_setup+0x4d
                 pci_config_setup+0x69
                 pci_common_intr_ops+0xf77
                 npe_intr_ops+0x25
                 i_ddi_intr_ops+0x54
                 ddi_intr_alloc+0x3f1
                 pcieb_intr_init+0x23f
                 pcieb_intr_attach+0x5a
                 pcieb_attach+0x1fa
                 devi_attach+0x88
                 attach_node+0x149

kmem_alloc_112 leak: 2 buffers, 112 bytes each, 224 bytes total
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
ffffff01db5909a8 ffffff01db561d58        30291f145 ffffff0007ed8c40
                 ffffff01cae29008 ffffff01cf7e5040 ffffff01d1bdd6f0
                 kmem_cache_alloc_debug+0x283
                 kmem_cache_alloc+0x115
                 kmem_zalloc+0x6a
                 impl_acc_hdl_alloc+0x64
                 ddi_regs_map_setup+0x4d
                 pci_config_setup+0x69
                 pci_common_intr_ops+0xf77
                 npe_intr_ops+0x25
                 i_ddi_intr_ops+0x54
                 ddi_intr_alloc+0x3f1
                 pcieb_intr_init+0x23f
                 pcieb_intr_attach+0x5a
                 pcieb_attach+0x1fa
                 devi_attach+0x88
                 attach_node+0x149

Also available in: Atom PDF