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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Apr 2008 20:27:19 +0300 (EEST)
From:	Pekka J Enberg <penberg@...helsinki.fi>
To:	Ingo Molnar <mingo@...e.hu>
cc:	Frans Pop <elendil@...net.nl>, linux-kernel@...r.kernel.org,
	Pete Zaitcev <zaitcev@...hat.com>, linux-usb@...r.kernel.org,
	gregkh@...e.de, clameter@....com
Subject: Re: [sched-devel/latest] WARNING: at mm/slub.c:2443

On Tue, 22 Apr 2008, Ingo Molnar wrote:
> * Frans Pop <elendil@...net.nl> wrote:
> 
> > I got the following warning while running sched-devel/latest.
> > 
> > I was not doing any tracing at that point (for the glibc compilation 
> > issue). I suspect it was while I was using a KDE application (amarok) 
> > as the desktop froze for a few seconds at one point.
> 
> i think this message is harmless to system stability.
> 
> Cc:-ing USB folks as the kmem_cache_destroy() comes from 
> drivers/usb/mon/mon_text.c.
> 
> Context: SLUB recently started warning about caches that get destroyed 
> with still outstanding allocations.
> 
> Pekka, it might make sense to turn this SLUB warning into something more 
> specific? It does seem to trigger in practice.

Oh absolutely. Something like this?

[PATCH] slub: improve kmem_cache_destroy() error message

As pointed out by Ingo, the SLUB warning of calling kmem_cache_destroy() 
with cache that still has objects triggers in practice. So turn this 
WARN_ON() into a nice SLUB specific error message to avoid people 
confusing it to a SLUB bug.

Cc: Ingo Molnar <mingo@...e.hu>
Cc: Christoph Lameter <clameter@....com>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---

diff --git a/mm/slub.c b/mm/slub.c
index 7f8aaa2..c372e88 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2426,8 +2426,11 @@ void kmem_cache_destroy(struct kmem_cache *s)
 	if (!s->refcount) {
 		list_del(&s->list);
 		up_write(&slub_lock);
-		if (kmem_cache_close(s))
-			WARN_ON(1);
+		if (kmem_cache_close(s)) {
+			printk(KERN_ERR "SLUB %s: %s called for cache that "
+				"still has objects.\n", s->name, __func__);
+			dump_stack();
+		}
 		sysfs_slab_remove(s);
 	} else
 		up_write(&slub_lock);
--
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