lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Apr 2007 16:44:36 +1000
From:	Neil Brown <neilb@...e.de>
To:	Christoph Lameter <clameter@....com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: SLUB: kmem_cache_destroy doesn't - version 2.

On Thursday April 19, clameter@....com wrote:
> 
> Right. Sigh. But there is no user of the symlinks.
> 
> I could drop the symlinks completely. Just do not track what names a cache 
> aliases to?
> 

Suppose I have a kmem_cache which at different times has different
sizes (like, for example, the cache used for 'stripe_head' in
md/raid5.c.  If I 'grow' and array, I resize that kmem_cache).

Suppose that the first time I create it, it has size X, and then
someone else creates a cache with size X.  The second cache will become
an alias for the first.  So when the first is destroyed, the name
says. 

Now I try to create another cache with the same name (it is serving
the same purpose) but with a different size.  It will need to create a
new cache, but the name is still in use.  Bang!

I really think you need to return a different handle to each
kmem_cache_create call so that you know which cache is being deleted
so you can mangle names correctly.

Another option might be to name each cache actually created with a
unique name, and then create a symlink for each cache that was asked
for (whether it was created or whether a pre-existing cache was used).
Then being lazy about deletion shouldn't be a problem.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ