]> git.baikalelectronics.ru Git - kernel.git/commit
irq/generic-chip: Don't replace domain's name
authorJeffy Chen <jeffy.chen@rock-chips.com>
Thu, 28 Sep 2017 04:37:31 +0000 (12:37 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 28 Sep 2017 10:18:59 +0000 (12:18 +0200)
commitb3c738dbbf6a566048a1fcb040c64eb2da0232ec
tree6a4838d855ddcf297eef3ef9c698470992a8a364
parentac2da8aa090318ebfc6bd5e1a3aa8f95cf661ddc
irq/generic-chip: Don't replace domain's name

When generic irq chips are allocated for an irq domain the domain name is
set to the irq chip name. That was done to have named domains before the
recent changes which enforce domain naming were done.

Since then the overwrite causes a memory leak when the domain name is
dynamically allocated and even worse it would cause the domain free code to
free the wrong name pointer, which might point to a constant.

Remove the name assignment to prevent this.

Fixes: e43e5d5fef01 ("genirq: Allow fwnode to carry name information only")
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20170928043731.4764-1-jeffy.chen@rock-chips.com
kernel/irq/generic-chip.c