mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
777362d721
commit
df20286ab1
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue