Messages in this thread |  | | | Date | Thu, 20 Nov 2008 13:00:54 +0100 | | From | Ingo Molnar <> | | Subject | Re: [PATCH 2.6.28-rc5 03/11] kmemleak: Add the memory allocation/freeing hooks |
| |
* Catalin Marinas <catalin.marinas@arm.com> wrote:
> --- a/mm/slab.c > +++ b/mm/slab.c > @@ -112,6 +112,7 @@ > #include <linux/rtmutex.h> > #include <linux/reciprocal_div.h> > #include <linux/debugobjects.h> > +#include <linux/memleak.h>
please move this line up 5-7 lines so that it auto-merges fine with the kmemcheck-next tree.
> --- a/mm/slub.c > +++ b/mm/slub.c > @@ -24,6 +24,7 @@ > #include <linux/kallsyms.h> > #include <linux/memory.h> > #include <linux/math64.h> > +#include <linux/memleak.h>
ditto.
> - return __vmalloc_area_node(area, gfp_mask, prot, -1, > - __builtin_return_address(0)); > + void *addr = __vmalloc_area_node(area, gfp_mask, prot, -1, > + __builtin_return_address(0)); > + > + /* this needs ref_count = 2 since vm_struct also contains a > + * pointer to this address. The guard page is also subtracted > + * from the size */ > + memleak_alloc(addr, area->size - PAGE_SIZE, 2);
please use the customary comment style:
/* * Comment ..... * ...... goes here: */ Thanks,
Ingo
|  |