From: Jeff Layton <jlayton@redhat.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: "Myklebust, Trond" <Trond.Myklebust@netapp.com>,
Steve Dickson <SteveD@redhat.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] sunrpc: initialize delayed work on each rpc_inode allocation
Date: Tue, 31 Jan 2012 10:12:16 -0500 [thread overview]
Message-ID: <20120131101216.00788753@tlielax.poochiereds.net> (raw)
In-Reply-To: <4F2800B4.6040302@panasas.com>
On Tue, 31 Jan 2012 16:54:44 +0200
Boaz Harrosh <bharrosh@panasas.com> wrote:
> On 01/31/2012 01:57 AM, Jeff Layton wrote:
> > WARNING: at lib/debugobjects.c:262 debug_print_object+0x8c/0xb0()
> >
> > For now, this patch is really just papering over that problem, but it
> > should be "mostly harmless". That said, I'm ok with dropping it if
> > Thomas is planning to fix this in the debugobjects code however.
> >
>
> I disagree it's harmless. What if kmem_cache_free/kmem_cache_alloc deploys
> a poisoning schema, in debug mode. Which stumps over memory. Is it
> initialized then?
>
Different slab allocators handle that differently. As best I can tell:
SLAB: calls ctor on the poisoned object before handing it back out
SLUB: avoids poisoning the object if there's a ->ctor defined
SLOB: I'm not sure -- haven't looked at it
> What was the last state of the timer, is it safe for resume?
>
Yes, either way it's safe to reuse the recycled object, aside from the
problem with debugobjects. If it's not then that's clearly a bug in the
slab allocator.
> For us this is a new object we should initialize it.
>
I tend to agree that not relying on slab ctor functions is preferable.
They are widely used though so this problem almost assuredly exists in
other places besides just rpc_pipefs. If it's not fixed in the
debugobjects code (or the slab allocators) then I wouldn't be surprised
if this popped up again in another area.
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2012-01-31 15:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 17:40 [PATCH] sunrpc: initialize delayed work on each rpc_inode allocation Jeff Layton
2012-01-25 11:48 ` Boaz Harrosh
2012-01-30 20:43 ` Steve Dickson
2012-01-30 21:07 ` Myklebust, Trond
2012-01-30 23:57 ` Jeff Layton
2012-01-31 14:54 ` Boaz Harrosh
2012-01-31 15:03 ` Myklebust, Trond
2012-01-31 15:12 ` Jeff Layton [this message]
2012-01-31 21:56 ` Thomas Gleixner
2012-02-29 16:56 ` Jeff Layton
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=20120131101216.00788753@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=SteveD@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bharrosh@panasas.com \
--cc=linux-nfs@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).