Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx1.redhat.com ([209.132.183.28]:53829 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753706Ab2AaPMb (ORCPT ); Tue, 31 Jan 2012 10:12:31 -0500 Date: Tue, 31 Jan 2012 10:12:16 -0500 From: Jeff Layton To: Boaz Harrosh Cc: "Myklebust, Trond" , Steve Dickson , "linux-nfs@vger.kernel.org" , Thomas Gleixner Subject: Re: [PATCH] sunrpc: initialize delayed work on each rpc_inode allocation Message-ID: <20120131101216.00788753@tlielax.poochiereds.net> In-Reply-To: <4F2800B4.6040302@panasas.com> References: <1327426850-14837-1-git-send-email-jlayton@redhat.com> <4F2700E2.9020803@RedHat.com> <1327957652.4090.32.camel@lade.trondhjem.org> <20120130185753.50280816@tlielax.poochiereds.net> <4F2800B4.6040302@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-nfs-owner@vger.kernel.org List-ID: On Tue, 31 Jan 2012 16:54:44 +0200 Boaz Harrosh 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