[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070407055941.GA14120@htj.dyndns.org>
Date: Sat, 7 Apr 2007 14:59:41 +0900
From: Tejun Heo <htejun@...il.com>
To: torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
gregkh@...e.de
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] irq-devres: fix failure path of devm_request_irq()
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@...il.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;
}
-
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