Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60a596da authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Roland Dreier
Browse files

IPoIB/cm: Fix reaping of stale connections



The sense of the time_after_eq() test in ipoib_cm_stale_task() is
reversed so that only non-stale connections are reaped.  Fix this by
changing to time_before_eq().

Noticed by Pradeep Satyanarayana <pradeep@us.ibm.com>.

Signed-off-by: default avatarMichael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 8559840c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1095,7 +1095,7 @@ static void ipoib_cm_stale_task(struct work_struct *work)
		/* List if sorted by LRU, start from tail,
		 * stop when we see a recently used entry */
		p = list_entry(priv->cm.passive_ids.prev, typeof(*p), list);
		if (time_after_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT))
		if (time_before_eq(jiffies, p->jiffies + IPOIB_CM_RX_TIMEOUT))
			break;
		list_del_init(&p->list);
		spin_unlock_irqrestore(&priv->lock, flags);