From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Pekka J Enberg" <penberg@cs.helsinki.fi>
Cc: "Jim Houston" <jim.houston@ccur.com>,
"Ingo Molnar" <mingo@elte.hu>, "Tejun Heo" <htejun@gmail.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: lib/idr.c: initialize struct idr_layer
Date: Sun, 27 Jan 2008 22:30:10 +0100 [thread overview]
Message-ID: <19f34abd0801271330j596cd9fbqbd3691548dff26@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0801272319570.540@sbz-30.cs.Helsinki.FI>
On Jan 27, 2008 10:21 PM, Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> On Sun, 27 Jan 2008, Vegard Nossum wrote:
> > Though in this case, idr_pre_get() actually *is* called first. Hmm...
> > I think there's a pretty big chance that kmemcheck is at fault :-(
>
> Depends on how you track object initialization. An object returned by
> kmem_cache_alloc() is always initialized if the cache it comes from has a
> constructor.
I think there's a pretty big chance I'm wrong (or misunderstanding
something) here, so I'll just ask:
setup_object() from mm/slub.c is what calls the ctor. Shouldn't this
be called from slab_alloc() as well? (I'm marking the data
"uninitialized" there before returning the object.) Otherwise you
might get back an object that is initialized with the previous owner's
data. Or is this intentional?
Thanks.
Vegard
next prev parent reply other threads:[~2008-01-27 21:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-27 20:07 Vegard Nossum
2008-01-27 21:00 ` Pekka Enberg
2008-01-27 21:17 ` Vegard Nossum
2008-01-27 21:21 ` Pekka J Enberg
2008-01-27 21:30 ` Vegard Nossum [this message]
2008-01-27 21:35 ` Pekka Enberg
2008-01-27 21:56 ` Vegard Nossum
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=19f34abd0801271330j596cd9fbqbd3691548dff26@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=htejun@gmail.com \
--cc=jim.houston@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@cs.helsinki.fi \
/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
all inboxes | Powered by JetHome®