Commit df20286a authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by David S. Miller

sunvnet: Add missing rcu_read_unlock() in vnet_start_xmit

The out_dropped label will only do rcu_read_unlock for non-null port.
So add the missing rcu_read_unlock() when bailing due to non-null port.
Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 777362d7
...@@ -981,8 +981,10 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -981,8 +981,10 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
rcu_read_lock(); rcu_read_lock();
port = __tx_port_find(vp, skb); port = __tx_port_find(vp, skb);
if (unlikely(!port)) if (unlikely(!port)) {
rcu_read_unlock();
goto out_dropped; goto out_dropped;
}
if (skb->len > port->rmtu) { if (skb->len > port->rmtu) {
unsigned long localmtu = port->rmtu - ETH_HLEN; unsigned long localmtu = port->rmtu - ETH_HLEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment