Project

General

Profile

Bug #11560

found leak in pci_get_irq_routing_table()

Added by Joshua M. Clulow 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

> ::findleaks
CACHE             LEAKED           BUFCTL CALLER
fffffe038142bb08       1 fffffe03862eeeb8 pci_get_irq_routing_table+0x27
------------------------------------------------------------------------
           Total       1 buffer, 512 bytes
> fffffe03862eeeb8::bufctl -v
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
fffffe03862eeeb8 fffffe0386294b80                0 fffffffffbc490a0
                 fffffe038142bb08 fffffe0381e58e00                0
                 kmem_cache_alloc_debug+0x2f4
                 kmem_cache_alloc+0x18d
                 kmem_zalloc+0x47
                 pci_get_irq_routing_table+0x27
                 startup_pci_bios+9
                 startup+0x4a
                 main+0x36
                 _locore_start+0x90

It seems as if pci_get_irq_routing_table() will leak its allocated memory if nroutes ends up being zero. It should probably free it instead!

Also available in: Atom PDF