]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
IB/hfi1: Protect the global dev_cntr_names and port_cntr_names
authorTadeusz Struk <tadeusz.struk@intel.com>
Tue, 21 Mar 2017 00:25:35 +0000 (17:25 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 26 May 2017 22:27:29 +0000 (17:27 -0500)
commitff841c9f640380964c8cc677c5c3f10500d922da
treeef127d796550b395d609389e844e22074a5be0d6
parent5c70c08db14a98fd0496f521ee5772b304cf0ad4
IB/hfi1: Protect the global dev_cntr_names and port_cntr_names

BugLink: http://bugs.launchpad.net/bugs/1693932
commit 62eed66e98b4c2286fef2ce5911d8d75b7515f7b upstream.

Protect the global dev_cntr_names and port_cntr_names with the global
mutex as they are allocated and freed in a function called per device.
Otherwise there is a danger of double free and memory leaks.

Fixes: Commit b7481944b06e ("IB/hfi1: Show statistics counters under IB stats interface")
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/infiniband/hw/hfi1/verbs.c