On Sat, Jun 13, 2015 at 06:52:56AM +0100, fdmanana@xxxxxxxxxx wrote: > From: Filipe Manana <fdmanana@xxxxxxxx> > > The free space entries are allocated using kmem_cache_zalloc(), > through __btrfs_add_free_space(), therefore we should use > kmem_cache_free() and not kfree() to avoid any confusion and > any potential problem. Looking at the kfree() definition at > mm/slab.c it has the following comment: > > /* > * (...) > * > * Don't free memory not originally allocated by kmalloc() > * or you will run into trouble. > */ > > So better be safe and use kmem_cache_free(). > > Cc: stable@xxxxxxxxxxxxxxx > Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx> Reviewed-by: David Sterba <dsterba@xxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html