summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/irq.c
diff options
context:
space:
mode:
authorAndrew Donnellan2015-09-30 03:58:05 +0200
committerMichael Ellerman2015-10-01 03:49:32 +0200
commit8dde152ea34860403c839598bdef3f07239eb25a (patch)
tree487bde4ac3626b4ebb1b966a63fbb98c0d913845 /drivers/misc/cxl/irq.c
parentpowerpc/ps3: Remove unused os_area_db_id_video_mode (diff)
downloadkernel-qcow2-linux-8dde152ea34860403c839598bdef3f07239eb25a.tar.gz
kernel-qcow2-linux-8dde152ea34860403c839598bdef3f07239eb25a.tar.xz
kernel-qcow2-linux-8dde152ea34860403c839598bdef3f07239eb25a.zip
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>
Diffstat (limited to 'drivers/misc/cxl/irq.c')
-rw-r--r--drivers/misc/cxl/irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
index 583b42afeda2..38b57d65b731 100644
--- a/drivers/misc/cxl/irq.c
+++ b/drivers/misc/cxl/irq.c
@@ -414,7 +414,7 @@ void cxl_release_psl_irq(struct cxl_afu *afu)
kfree(afu->psl_irq_name);
}
-static void afu_irq_name_free(struct cxl_context *ctx)
+void afu_irq_name_free(struct cxl_context *ctx)
{
struct cxl_irq_name *irq_name, *tmp;