Re: [PATCH v2] irqchip: gicv3-its: Fix memory leak in its_free_tables()

2016-01-29 Thread Shanker Donthineni
On 01/29/2016 02:30 AM, Thomas Gleixner wrote: On Thu, 28 Jan 2016, Shanker Donthineni wrote: @@ -807,9 +810,10 @@ static void its_free_tables(struct its_node *its) int i; for (i = 0; i < GITS_BASER_NR_REGS; i++) { - if (its->tables[i]) { - fr

Re: [PATCH v2] irqchip: gicv3-its: Fix memory leak in its_free_tables()

2016-01-29 Thread Thomas Gleixner
On Thu, 28 Jan 2016, Shanker Donthineni wrote: > @@ -807,9 +810,10 @@ static void its_free_tables(struct its_node *its) > int i; > > for (i = 0; i < GITS_BASER_NR_REGS; i++) { > - if (its->tables[i]) { > - free_page((unsigned long)its->tables[i]); > -

[PATCH v2] irqchip: gicv3-its: Fix memory leak in its_free_tables()

2016-01-28 Thread Shanker Donthineni
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 f