Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201046
b: refs/heads/master
c: 9078370
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas committed Jul 19, 2010
1 parent 84ef542 commit c32c630
Show file tree
Hide file tree
Showing 3 changed files with 12 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: 7952f98818d561ed0e11434a7a16acd9a7bae859
refs/heads/master: 9078370c0d2cfe4a905aa34f398bbb0d65921a2b
6 changes: 6 additions & 0 deletions trunk/kernel/early_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <linux/bootmem.h>
#include <linux/mm.h>
#include <linux/early_res.h>
#include <linux/slab.h>
#include <linux/kmemleak.h>

/*
* Early reserved memory areas.
Expand Down Expand Up @@ -319,6 +321,8 @@ void __init free_early(u64 start, u64 end)
struct early_res *r;
int i;

kmemleak_free_part(__va(start), end - start);

i = find_overlapped_early(start, end);
r = &early_res[i];
if (i >= max_early_res || r->end != end || r->start != start)
Expand All @@ -333,6 +337,8 @@ void __init free_early_partial(u64 start, u64 end)
struct early_res *r;
int i;

kmemleak_free_part(__va(start), end - start);

if (start == end)
return;

Expand Down
5 changes: 5 additions & 0 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3659,6 +3659,11 @@ void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
ptr = phys_to_virt(addr);
memset(ptr, 0, size);
reserve_early_without_check(addr, addr + size, "BOOTMEM");
/*
* The min_count is set to 0 so that bootmem allocated blocks
* are never reported as leaks.
*/
kmemleak_alloc(ptr, size, 0, 0);
return ptr;
}

Expand Down

0 comments on commit c32c630

Please sign in to comment.