iwpm: crash fix for large connections test
authorFaisal Latif <faisal.latif@intel.com>
Fri, 26 Feb 2016 15:18:05 +0000 (09:18 -0600)
committerDoug Ledford <dledford@redhat.com>
Wed, 16 Mar 2016 17:48:32 +0000 (13:48 -0400)
commitdafb5587178afe8abf85f3ae91bbc88de9e54782
treedc4d80e87a0c3a9a3ab70bf485fe79776bd3c7d2
parentc1340e8aa628d65bcb5c5b7e332bde8a17851ebf
iwpm: crash fix for large connections test

During large connection test, there is a crash at wake_up() in the callback as waitq is
not yet initialized. Callback can happen before iwpm_wait_complete_req() is called to
initialize waitq.
To resolve, using signaling semaphore instead of waitq.

Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Reviewed-by: Tatyana E Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Tested-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/iwpm_msg.c
drivers/infiniband/core/iwpm_util.c
drivers/infiniband/core/iwpm_util.h