IB/hfi1: Serialize hrtimer function calls
authorJubin John <jubin.john@intel.com>
Thu, 14 Apr 2016 15:31:53 +0000 (08:31 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 28 Apr 2016 20:32:29 +0000 (16:32 -0400)
commitd35cf74492c5ba0d8e1c08755c78be4ef3af650e
tree0ff2d6ffff27edf2af8185ece0e9770e30c13f63
parent1cbaa670355e4a4e339ac97167fb8ecf536045d3
IB/hfi1: Serialize hrtimer function calls

hrtimer functions do not guarantee serialization, so we extend the
cca_timer_lock to cover the hrtimer_forward_now() in the hrtimer
callback handler and the hrtimer_start() in process_becn(). This
prevents races between these 2 functions to update the hrtimer state
leading to problems such as:
kernel BUG at kernel/hrtimer.c:1282!
encountered during validation of the CCA feature.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/init.c
drivers/staging/rdma/hfi1/rc.c