Skip to contentSkip to conversation

InfiniBand: add missing break between cases

PATCH New Roland Dreier 1 participant 2 messages Feb 3, 2005 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 InfiniBand: add missing break between cases

From: Libor Michalek <[email protected]>

Add a missing break statement between RC and UD cases in mthca_post_send(). This fixes a possible oops for protocols that use the RC transport.

drivers/infiniband/hw/mthca/mthca_qp.c +2 -0
@@ -1323,6 +1323,8 @@
 				break;
 			}
 
+			break;
+
 		case UD:
 			((struct mthca_ud_seg *) wqe)->lkey =
 				cpu_to_be32(to_mah(wr->wr.ud.ah)->key);
#1 lore raw

PATCH 1/1 InfiniBand: remove unbalance refcnt decrement

From: Michael S. Tsirkin <[email protected]>

Fix unbalanced QP reference count decrement (introduced with QP lock optimization patch)

drivers/infiniband/hw/mthca/mthca_cq.c +0 -2
@@ -422,8 +422,6 @@
 				*freed = 0;
 			}
 			spin_unlock(&(*cur_qp)->lock);
-			if (atomic_dec_and_test(&(*cur_qp)->refcount))
-				wake_up(&(*cur_qp)->wait);
 		}
 
 		spin_lock(&dev->qp_table.lock);