Re: SLUB ia64 linux-next crash bisected to 756dee75

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 19 Jan 2010, Alex Chiang wrote:

> > 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?

cd is pointing for some reason to an object not allocated. This would mean
that kzalloc returns such an object(?). Theoretically one could free a
statically allocated object using kmem_cache_free() and it would be put on
thefreelist. Then it could be returned from kzalloc (all only if debuging
is off)... so

Could you boot with full debugging?

Either switch on

CONFIG_SLUB_DEBUG_ON

or pass

	slub_debug

on the kernel command line.


--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux