summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2009-04-28 15:12:16 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2009-04-28 15:12:16 +1000
commit98572c858c1f9b029159ea583c8b94e4ccd58d75 (patch)
treea08f221313687eb07b8d6adfa8da43f810a1ba12 /drivers
parent9ab558eb3efea0738ee1c2d5a7040ae2c63ef206 (diff)
parentab74b75e7bca94558e20e7e141e6b44d9d823e55 (diff)
Merge commit 'kmemleak/kmemleak'
Conflicts: lib/Kconfig.debug
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);