]> git.karo-electronics.de Git - linux-beck.git/commit
IB/hfi1: Remove critical section gap in sc_buffer_alloc()
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Thu, 8 Dec 2016 03:33:33 +0000 (19:33 -0800)
committerDoug Ledford <dledford@redhat.com>
Sun, 11 Dec 2016 20:29:42 +0000 (15:29 -0500)
commit9b86071c5ef7a8c0a0d6d541cb79df5a8b115d91
treeed743f619a90e42ba28565fd8392b08a3904675d
parentb777f154a0c21e1187c1806ababf9c5ba3e49eea
IB/hfi1: Remove critical section gap in sc_buffer_alloc()

In sc_buffer_alloc(), the sc->alloc_lock is released
before calling sc_release_update(), and it is reacquired
after the function call. This causes CPU lock trading.
Fix it by not dropping the lock before calling
sc_release_update().

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@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>
drivers/infiniband/hw/hfi1/pio.c