public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: hooanon05@yahoo.co.jp
Cc: Catalin Marinas <catalin.marinas@arm.com>, linux-kernel@vger.kernel.org
Subject: Re: Q, slab, kmemleak_erase() and redzone?
Date: Wed, 02 Dec 2009 09:01:14 +0200	[thread overview]
Message-ID: <4B1610BA.5090906@cs.helsinki.fi> (raw)
In-Reply-To: <9890.1259737038@jrobl>

Hi!

hooanon05@yahoo.co.jp kirjoitti:
> Pekka Enberg:
>>> No, you are absolutely correct. Can you please send an updated patch to 
>>> Catalin that adds a comment on top of the cpu_cache_get() call that 
>>> explains why we need it there?
>> Doh, this was supposed to be a reply to Okajima's email :-).
> 
> Before I send a small patch, let me make sure about other small issues.
> 
> - How heavy is 'ac = cpu_cache_get(cachep)' (which will be inserted by
>   the patch)?
>   It will be compiled and executed regardless CONFIG_DEBUG_KMEMLEAK, and
>   it is totally meaningless when DEBUG_KMEMLEAK is disabled. Can we
>   ignore this loss?

No, it won't be. The compiler should notice it's dead code and remove it 
when CONFIG_KMEMLEAK is disabled.

> - Should we add a condition 'if (objp)' before calling kmemleak_erase()?
>   As Catalin wrote, it may be harmless. But setting NULL is unnecessary.
>   Do you accept this change too?

Yeah, I'd prefer to see the check there. While Catalin is correct, 
that's not obvious from reading the code.

			Pekka

  reply	other threads:[~2009-12-02  7:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 16:14 Q, slab, kmemleak_erase() and redzone? hooanon05
2009-11-22  9:35 ` Pekka Enberg
2009-11-24  7:06   ` hooanon05
2009-12-01 11:49     ` Pekka Enberg
2009-12-01 17:56       ` Catalin Marinas
2009-12-02  6:31         ` Pekka Enberg
2009-12-02  6:32           ` Pekka Enberg
2009-12-02  6:57             ` hooanon05
2009-12-02  7:01               ` Pekka Enberg [this message]
2009-12-02  3:21       ` hooanon05

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B1610BA.5090906@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=catalin.marinas@arm.com \
    --cc=hooanon05@yahoo.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox