]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
IB/hfi1: Fix memory leak in exception path in get_irq_affinity()
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Tue, 1 May 2018 12:36:13 +0000 (05:36 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:56:23 +0000 (14:56 +0200)
commit102b2c2f319020e946f6eda8cfdc8a4d6063a2d0
treef1e6bf94f883bea3e7fbcef25648f8d25173ad42
parent79b056bee0d4ace2fb152e7c9f47956a194e84bf
IB/hfi1: Fix memory leak in exception path in get_irq_affinity()

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 59482a14918b282ca2a98f38c69da5ebeb1107d2 ]

When IRQ affinity is set and the interrupt type is unknown, a cpu
mask allocated within the function is never freed. Fix this memory
leak by allocating memory within the scope where it is used.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/infiniband/hw/hfi1/affinity.c