* [PATCH] irq-devres: fix failure path of devm_request_irq()
@ 2007-04-07 5:59 Tejun Heo
0 siblings, 0 replies; only message in thread
From: Tejun Heo @ 2007-04-07 5:59 UTC (permalink / raw)
To: torvalds, akpm, gregkh; +Cc: linux-kernel
devres should be deallocated with devres_free() not kfree(). This bug
corrupts slab on IRQ request failure. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
Sorry about the bug, please apply before 2.6.21 release. Thanks.
diff --git a/kernel/irq/devres.c b/kernel/irq/devres.c
index 85a430d..d8ee241 100644
--- a/kernel/irq/devres.c
+++ b/kernel/irq/devres.c
@@ -54,7 +54,7 @@ int devm_request_irq(struct device *dev, unsigned int irq,
rc = request_irq(irq, handler, irqflags, devname, dev_id);
if (rc) {
- kfree(dr);
+ devres_free(dr);
return rc;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-07 5:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-07 5:59 [PATCH] irq-devres: fix failure path of devm_request_irq() Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®