diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2014-11-09 04:42:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-11 05:05:36 +0300 |
commit | df20286ab1e36eaaf1f6c7e5e2c56bea1ffc26c0 (patch) | |
tree | 5b6407ada4165f5355f1f4e55f07d79f0a1fa417 | |
parent | 777362d7215f63318fc4a6fae9b320328d92e9f6 (diff) | |
download | linux-df20286ab1e36eaaf1f6c7e5e2c56bea1ffc26c0.tar.xz |
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: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 826b3852c7df..55d66c9a6627 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c @@ -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; |