From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Chiang Date: Tue, 19 Jan 2010 21:29:35 +0000 Subject: Re: SLUB ia64 linux-next crash bisected to 756dee75 Message-Id: <20100119212935.GG11010@ldl.fc.hp.com> List-Id: References: <20100113002923.GF2985@ldl.fc.hp.com> <1263587721.20615.255.camel@useless.americas.hpqcorp.net> <20100119200228.GE11010@ldl.fc.hp.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christoph Lameter Cc: Lee Schermerhorn , penberg@cs.helsinki.fi, linux-ia64@vger.kernel.org, linux-mm@kvack.org * Christoph Lameter : > On Tue, 19 Jan 2010, Alex Chiang wrote: > > > Well, making progress (maybe?). > > Yes I think this is the fix. > > > Now we're hitting a BUG_ON(). > > Thats a kfree of an object not allocated with a slab allocator. > Recovery is easy in such a case: Dont free the object. I don't get it. static int sr_probe(struct device *dev) { /* ... */ cd = kzalloc(sizeof(*cd), GFP_KERNEL); if (!cd) goto fail; /* ... */ fail_put: put_disk(disk); fail_free: kfree(cd); } The kfree() is balanced with kzalloc(). Unless the stack trace is lying to us? /ac