[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adaiqqff086.fsf@cisco.com>
Date: Sat, 22 Nov 2008 22:03:05 -0800
From: Roland Dreier <rdreier@...co.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: netdev@...r.kernel.org, bugme-daemon@...zilla.kernel.org,
danielm77@...ay.se, Jay Cliburn <jacliburn@...lsouth.net>
Subject: Re: [Bugme-new] [Bug 12087] New: [drivers/net/cxgb3/sge.c:563]: Possible memory leak: s
> There will be a memory leak in the function alloc_ring when the parameter
> sw_size is nonzero and metadata is NULL. I don't know if that can happen.
>
> Here is the code, taken from the latest git tree.
>
> static void *alloc_ring(struct pci_dev *pdev, size_t nelem, size_t elem_size,
> size_t sw_size, dma_addr_t * phys, void *metadata)
It might make sense to stick a WARN_ON(sw_size && !metadata) in that
function or something like that, but a quick audit of the current code
(there are only 4 callers of alloc_ring() in that file -- and it's
static so we know those are all of them -- all in t3_sge_alloc_qset())
shows that all callers pass non-NULL metadata if sw_size != 0.
- R.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists