Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147740
b: refs/heads/master
c: 2e1483c
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas committed Jun 11, 2009
1 parent e387777 commit 058588c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f2294b6dc88d99295230d97fef2c9863cec44c3
refs/heads/master: 2e1483c995bbd0fa6cbd055ad76088a520799ba4
7 changes: 7 additions & 0 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/uio.h>
#include <linux/namei.h>
#include <linux/log2.h>
#include <linux/kmemleak.h>
#include <asm/uaccess.h>
#include "internal.h"

Expand Down Expand Up @@ -492,6 +493,11 @@ void __init bdev_cache_init(void)
bd_mnt = kern_mount(&bd_type);
if (IS_ERR(bd_mnt))
panic("Cannot create bdev pseudo-fs");
/*
* This vfsmount structure is only used to obtain the
* blockdev_superblock, so tell kmemleak not to report it.
*/
kmemleak_not_leak(bd_mnt);
blockdev_superblock = bd_mnt->mnt_sb; /* For writeback */
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ struct percpu_data {
void *ptrs[1];
};

/* pointer disguising messes up the kmemleak objects tracking */
#ifndef CONFIG_DEBUG_KMEMLEAK
#define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata)
#else
#define __percpu_disguise(pdata) (struct percpu_data *)(pdata)
#endif

#define per_cpu_ptr(ptr, cpu) \
({ \
Expand Down

0 comments on commit 058588c

Please sign in to comment.