Skip to content

Commit

Permalink
[PATCH] irq-devres: fix failure path of devm_request_irq()
Browse files Browse the repository at this point in the history
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>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Apr 7, 2007
1 parent 995f054 commit 7f30e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/devres.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7f30e49

Please sign in to comment.