[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090831083813.GD15619@elte.hu>
Date: Mon, 31 Aug 2009 10:38:13 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Catalin Marinas <catalin.marinas@....com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kmemleak: Ignore the aperture memory hole on x86_64
* Catalin Marinas <catalin.marinas@....com> wrote:
> On Sat, 2009-08-29 at 15:31 +0200, Ingo Molnar wrote:
> > * Catalin Marinas <catalin.marinas@....com> wrote:
> > > --- a/arch/x86/kernel/aperture_64.c
> > > +++ b/arch/x86/kernel/aperture_64.c
> > > @@ -20,6 +20,7 @@
> > > #include <linux/bitops.h>
> > > #include <linux/ioport.h>
> > > #include <linux/suspend.h>
> > > +#include <linux/kmemleak.h>
> > > #include <asm/e820.h>
> > > #include <asm/io.h>
> > > #include <asm/iommu.h>
> > > @@ -94,6 +95,11 @@ static u32 __init allocate_aperture(void)
> > > * code for safe
> > > */
> > > p = __alloc_bootmem_nopanic(aper_size, aper_size, 512ULL<<20);
> > > + /*
> > > + * Kmemleak should not scan this block as it may not be mapped via the
> > > + * kernel direct mapping.
> > > + */
> > > + kmemleak_ignore(p);
> > > if (!p || __pa(p)+aper_size > 0xffffffff) {
> > > printk(KERN_ERR
> > > "Cannot allocate aperture memory hole (%p,%uK)\n",
> >
> > This sure does not look right for the rare but theoretically
> > possible !p case, does it?
>
> All the kmemleak_* callbacks check for (p && !IS_ERR(p)), just to
> simplify the calling site.
Indeed, i see. It's OK this way then.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists