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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <17949.57189.565653.289035@notabene.brown>
Date:	Thu, 12 Apr 2007 17:27:33 +1000
From:	Neil Brown <neilb@...e.de>
To:	Christoph Lameter <clameter@....com>
Cc:	linux-kernel@...r.kernel.org
Subject: SLUB: kmem_cache_destroy doesn't 


I tried out SLOB in latest mm.
raid5 uses kmem_cache_create to create a cache, a deletes it with
kmem_cache_destroy.

After I change the name for the slab to not include a '/' the create
worked fine, but the destroy seems incomplete.
If I stop an array and restart it, the second kmem_cache_create fails
because it thinks the name is already in use.

If I look in sysfs, I can see it there.
And 

  # cat /sys/slab/raid5-md1/aliases
  -1

is a bit suspicious.

And

void kmem_cache_destroy(struct kmem_cache *s)
{
	down_write(&slub_lock);
	if (s->refcount)
		s->refcount--;
	else {
		list_del(&s->list);
		WARN_ON(kmem_cache_close(s));
		sysfs_slab_remove(s);
		kfree(s);
	}
	up_write(&slub_lock);
}

looks a bit odd.
I would have thought the test should be:

        if (s->refcount > 1)

??

(2.6.21-rc6-mm1 to be precise)

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