On Mon, Jun 23, 2008 at 05:44:57PM +0200, Louis Rilling wrote: > make_item() > new_item = kmalloc(); > config_item_init_type_long_name(); > return new_item; > > drop_item(item) > config_item_put(item); > kfree(item); This is never, ever safe. Consider that someone has an attribute file open - it has a reference to the item. You can still rmdir() the item - doing stuff to the attribute after drop_item() will just get ignored. But you can't free it in drop_item(). Joel -- "Vote early and vote often." - Al Capone Joel Becker Principal Software Developer Oracle E-mail: joel.becker@xxxxxxxxxx Phone: (650) 506-8127 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html