]> asedeno.scripts.mit.edu Git - linux.git/commit
cxl: fix leak of IRQ names in cxl_free_afu_irqs()
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Wed, 30 Sep 2015 01:58:05 +0000 (11:58 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 1 Oct 2015 01:49:32 +0000 (11:49 +1000)
commit8dde152ea34860403c839598bdef3f07239eb25a
tree487bde4ac3626b4ebb1b966a63fbb98c0d913845
parent4fa9a3f6b616fd9f2555d9d0c04513a942750986
cxl: fix leak of IRQ names in cxl_free_afu_irqs()

cxl_free_afu_irqs() doesn't free IRQ names when it releases an AFU's IRQ
ranges. The userspace API equivalent in afu_release_irqs() calls
afu_irq_name_free() to release the IRQ names.

Call afu_irq_name_free() in cxl_free_afu_irqs() to release the IRQ names.
Make afu_irq_name_free() non-static to allow this.

Reported-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Fixes: 6f7f0b3df6d4 ("cxl: Add AFU virtual PHB and kernel API")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/api.c
drivers/misc/cxl/cxl.h
drivers/misc/cxl/irq.c