Thread (5 messages) 5 messages, 2 authors, 2009-06-29

Re: kmemleak reports firmware loader funnies in iwlwifi

From: Pekka Enberg <hidden>
Date: 2009-06-29 09:48:38
Also in: lkml

Possibly related (same subject, not in this thread)

Hi Catalin,

On Mon, Jun 29, 2009 at 12:39 PM, Catalin
Marinas[off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index ddeb819..26fb808 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -179,6 +179,13 @@ static ssize_t firmware_loading_store(struct device *dev,
                               dev_err(dev, "%s: vmap() failed\n", __func__);
                               goto err;
                       }
+                       /*
+                        * This block of memory is later freed using vfree.
+                        * Since kmemleak does not track vmap calls, just
+                        * inform it about this block but ignore it during
+                        * scanning.
+                        */
+                       kmemleak_alloc(fw_priv->fw->data, 0, -1, GFP_KERNEL);
                       /* Pages will be freed by vfree() */
                       fw_priv->pages = NULL;
                       fw_priv->page_array_size = 0;
Would it be possible to put this hook in vmap() somehow?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help