]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2017 07:47:34 +0000 (09:47 +0200)
commit2cfa35c2f21437421d6afeda3be7d7341d2b15af
tree90b46cbb7cb1bfc795772b75985285b4f3a64227
parentde8c137cb712c65f59f4e97e5a3b90d75b7edf59
irq/generic-chip: Don't replace domain's name

commit 72364d320644c12948786962673772f271039a4a upstream.

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: d59f6617eef0 ("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>
Link: https://lkml.kernel.org/r/20170928043731.4764-1-jeffy.chen@rock-chips.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/irq/generic-chip.c