On Saturday 15 January 2005 23:01, Andi Kleen wrote: > > Based on the comment it is understood that suddenly this pointer points > > to userspace, because the module got unloaded. > > I wonder why we can rely on the same address now the module got unloaded > > - we may risk this virtual address is taken over by someone else? > > The address is not user space; you would be lying. > > Perhaps it's best to get rid of the hack completely. Turn > kmem_cache_t->name into an array and copy the name instead of storing the > pointer, then it wouldn't be needed at all. Those are just bugs from the time before there was kmem_cache_destroy. I checked the 2.6.11-rc1-mm1 tree: every kmem_cache_create in modules seems to destroyed properly except in decnet, and decnet module unloading currently is disabled. The attached patch fixes the decnet case, puts the slab name in a static array, and removes the name accessibilty check. Regards, -- Andreas Gruenbacher SUSE Labs, SUSE LINUX PRODUCTS GMBH