Re: [sched-devel/latest] WARNING: at mm/slub.c:2443
From: Pekka J Enberg
Date: Wed Apr 23 2008 - 03:39:03 EST
On Tue, 22 Apr 2008, Pete Zaitcev wrote:
> > Cc:-ing USB folks as the kmem_cache_destroy() comes from
> > drivers/usb/mon/mon_text.c.
>
> I looked at this whole day today, but found nothing.
>
> The code analysis for usbmon shows nothing. Anyone wants to have
> a look?
So something like the following totally untested patch.
Pekka
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c
index 5e3e4e9..c6fdc6e 100644
--- a/drivers/usb/mon/mon_text.c
+++ b/drivers/usb/mon/mon_text.c
@@ -449,6 +449,7 @@ static struct mon_event_text *mon_text_read_wait(struct mon_reader_text *rp,
if (file->f_flags & O_NONBLOCK) {
set_current_state(TASK_RUNNING);
remove_wait_queue(&rp->wait, &waita);
+ kmem_cache_free(rp->e_slab, ep);
return ERR_PTR(-EWOULDBLOCK);
}
/*
@@ -458,6 +459,7 @@ static struct mon_event_text *mon_text_read_wait(struct mon_reader_text *rp,
schedule();
if (signal_pending(current)) {
remove_wait_queue(&rp->wait, &waita);
+ kmem_cache_free(rp->e_slab, ep);
return ERR_PTR(-EINTR);
}
set_current_state(TASK_INTERRUPTIBLE);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/