* [PATCH][2.5] Add cachep->name to kmem_cache_destroy debug printk
@ 2003-06-14 7:03 Zwane Mwaikambo
2003-06-14 8:13 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Zwane Mwaikambo @ 2003-06-14 7:03 UTC (permalink / raw)
To: Linux Kernel; +Cc: Manfred Spraul
kmem_cache_destroy: Can't free all objects cbc7af30 (dcookie_cache)
I've been getting a number of these, perhaps it might be
worthwhile adding the name too.
Index: linux-2.5/mm/slab.c
===================================================================
RCS file: /home/cvs/linux-2.5/mm/slab.c,v
retrieving revision 1.88
diff -u -p -B -r1.88 slab.c
--- linux-2.5/mm/slab.c 11 Jun 2003 07:09:28 -0000 1.88
+++ linux-2.5/mm/slab.c 14 Jun 2003 05:35:25 -0000
@@ -1319,8 +1319,8 @@ int kmem_cache_destroy (kmem_cache_t * c
up(&cache_chain_sem);
if (__cache_shrink(cachep)) {
- printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n",
- cachep);
+ printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p (%s)\n",
+ cachep, cachep->name);
down(&cache_chain_sem);
list_add(&cachep->next,&cache_chain);
up(&cache_chain_sem);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][2.5] Add cachep->name to kmem_cache_destroy debug printk
2003-06-14 7:03 [PATCH][2.5] Add cachep->name to kmem_cache_destroy debug printk Zwane Mwaikambo
@ 2003-06-14 8:13 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2003-06-14 8:13 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: linux-kernel, manfred
Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>
> kmem_cache_destroy: Can't free all objects cbc7af30 (dcookie_cache)
>
> I've been getting a number of these, perhaps it might be
> worthwhile adding the name too.
>
> ...
> - printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n",
> - cachep);
> + printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p (%s)\n",
> + cachep, cachep->name);
yes, but we have a nice little helper for that.
diff -puN mm/slab.c~kmem_cache_destroy-error-print mm/slab.c
--- 25/mm/slab.c~kmem_cache_destroy-error-print 2003-06-14 01:10:37.000000000 -0700
+++ 25-akpm/mm/slab.c 2003-06-14 01:13:12.000000000 -0700
@@ -1374,8 +1374,7 @@ int kmem_cache_destroy (kmem_cache_t * c
up(&cache_chain_sem);
if (__cache_shrink(cachep)) {
- printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n",
- cachep);
+ slab_error(cachep, "Can't free all objects");
down(&cache_chain_sem);
list_add(&cachep->next,&cache_chain);
up(&cache_chain_sem);
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-14 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-14 7:03 [PATCH][2.5] Add cachep->name to kmem_cache_destroy debug printk Zwane Mwaikambo
2003-06-14 8:13 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).