]> git.baikalelectronics.ru Git - 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)
committerDoug Ledford <dledford@redhat.com>
Wed, 5 Apr 2017 18:45:09 +0000 (14:45 -0400)
commit583b3bb5315aa95fd3436548902bddc588332a33
treeffc487a61386670b9fea0621b4ec364b57ce445d
parent890cb05946f663563b41ab1bb359c1a8d590b97b
IB/hfi1: Protect the global dev_cntr_names and port_cntr_names

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.

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: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/verbs.c