Skip to content

Commit

Permalink
sunvnet: Add missing rcu_read_unlock() in vnet_start_xmit
Browse files Browse the repository at this point in the history
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: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sowmini Varadhan authored and David S. Miller committed Nov 11, 2014
1 parent 777362d commit df20286
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/sun/sunvnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,10 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)

rcu_read_lock();
port = __tx_port_find(vp, skb);
if (unlikely(!port))
if (unlikely(!port)) {
rcu_read_unlock();
goto out_dropped;
}

if (skb->len > port->rmtu) {
unsigned long localmtu = port->rmtu - ETH_HLEN;
Expand Down

0 comments on commit df20286

Please sign in to comment.