aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/iwcm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 2bbcfa5c6e27..22d498c9a68b 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -829,7 +829,8 @@ static int process_event(struct iwcm_id_private *cm_id_priv,
829 */ 829 */
830static void cm_work_handler(void *arg) 830static void cm_work_handler(void *arg)
831{ 831{
832 struct iwcm_work *work = arg, lwork; 832 struct iwcm_work *work = arg;
833 struct iw_cm_event levent;
833 struct iwcm_id_private *cm_id_priv = work->cm_id; 834 struct iwcm_id_private *cm_id_priv = work->cm_id;
834 unsigned long flags; 835 unsigned long flags;
835 int empty; 836 int empty;
@@ -842,11 +843,11 @@ static void cm_work_handler(void *arg)
842 struct iwcm_work, list); 843 struct iwcm_work, list);
843 list_del_init(&work->list); 844 list_del_init(&work->list);
844 empty = list_empty(&cm_id_priv->work_list); 845 empty = list_empty(&cm_id_priv->work_list);
845 lwork = *work; 846 levent = work->event;
846 put_work(work); 847 put_work(work);
847 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 848 spin_unlock_irqrestore(&cm_id_priv->lock, flags);
848 849
849 ret = process_event(cm_id_priv, &work->event); 850 ret = process_event(cm_id_priv, &levent);
850 if (ret) { 851 if (ret) {
851 set_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags); 852 set_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags);
852 destroy_cm_id(&cm_id_priv->id); 853 destroy_cm_id(&cm_id_priv->id);