Skip to content
Commit 1a485f4d authored by Shanker Donthineni's avatar Shanker Donthineni Committed by Thomas Gleixner
Browse files

irqchip/gicv3-its: Fix memory leak in its_free_tables()



The current ITS driver has a memory leak in its_free_tables(). It
happens on tear down path of the driver when its_probe() call fails.
its_free_tables() should free the exact number of pages that have
been allocated, not just a single page as current code does.

This patch records the memory size for each ITS_BASERn at the time of
page allocation and uses the same size information when freeing pages
to fix the issue.

Signed-off-by: default avatarShanker Donthineni <shankerd@codeaurora.org>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Vikram Sethi <vikrams@codeaurora.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1454379584-21772-1-git-send-email-shankerd@codeaurora.org


Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 6235f0ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment