浏览代码

[PATCH] iseries_veth: Don't send packets to LPARs which aren't up

Hi Andrew, Jeff,

The iseries_veth driver has a logic bug which means it will erroneously
send packets to LPARs for which we don't have a connection.

This usually isn't a big problem because the Hypervisor call fails
gracefully and we return, but if packets are TX'ed during the negotiation
of the connection bad things might happen.

Regardless, the right thing is to bail early if we know there's no
connection.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Michael Ellerman 20 年之前
父节点
当前提交
f27eff1ffd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/iseries_veth.c

+ 1 - 1
drivers/net/iseries_veth.c

@@ -924,7 +924,7 @@ static int veth_transmit_to_one(struct sk_buff *skb, HvLpIndex rlp,
 
 	spin_lock_irqsave(&cnx->lock, flags);
 
-	if (! cnx->state & VETH_STATE_READY)
+	if (! (cnx->state & VETH_STATE_READY))
 		goto drop;
 
 	if ((skb->len - 14) > VETH_MAX_MTU)