summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-06-11 13:24:13 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2009-06-11 17:04:18 +0100
commit2e1483c995bbd0fa6cbd055ad76088a520799ba4 (patch)
tree4b555ae3452a80e3cebd7adcab83b019d1ca1b60 /drivers
parent4f2294b6dc88d99295230d97fef2c9863cec44c3 (diff)
downloadblackbird-op-linux-2e1483c995bbd0fa6cbd055ad76088a520799ba4.tar.gz
blackbird-op-linux-2e1483c995bbd0fa6cbd055ad76088a520799ba4.zip
kmemleak: Remove some of the kmemleak false positives
There are allocations for which the main pointer cannot be found but they are not memory leaks. This patch fixes some of them. For more information on false positives, see Documentation/kmemleak.txt. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/vt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 08151d4de489..961c1a788c61 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -104,6 +104,7 @@
#include <linux/io.h>
#include <asm/system.h>
#include <linux/uaccess.h>
+#include <linux/kmemleak.h>
#define MAX_NR_CON_DRIVER 16
@@ -2880,6 +2881,12 @@ static int __init con_init(void)
*/
for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) {
vc_cons[currcons].d = vc = alloc_bootmem(sizeof(struct vc_data));
+ /*
+ * Kmemleak does not track the memory allocated via
+ * alloc_bootmem() but this block contains pointers to
+ * other blocks allocated via kmalloc.
+ */
+ kmemleak_alloc(vc, sizeof(struct vc_data), 1, GFP_ATOMIC);
INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
visual_init(vc, currcons, 1);
vc->vc_screenbuf = (unsigned short *)alloc_bootmem(vc->vc_screenbuf_size);
OpenPOWER on IntegriCloud