IB/hfi1: Fix sleep inside atomic issue in init_asic_data
authorTadeusz Struk <tadeusz.struk@intel.com>
Wed, 6 Jul 2016 21:14:47 +0000 (17:14 -0400)
committerDoug Ledford <dledford@redhat.com>
Tue, 12 Jul 2016 14:46:24 +0000 (10:46 -0400)
commit98f179a5eaf77eaac49df3d0c217c6eaaba8c0db
tree4b15d13bca8be3cb662896164d3bf04bac91ede9
parent896ce45da2c2f4abc508d443fdecde7de0b3fa7e
IB/hfi1: Fix sleep inside atomic issue in init_asic_data

The critical section should protect only the list traversal
and dd->asic_data modification, not the memory allocation.
The fix pulls the allocation out of the critical section.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Reviewed-by: Dean Luick <dean.luick@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>
drivers/infiniband/hw/hfi1/chip.c