mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
sunvnet: fix potential NULL pointer dereference
One of the error cases for vnet_start_xmit()'s "out_dropped" label is port == NULL, so only mess with port->clean_timer when port is not NULL. Signed-off-by: David L Stevens <david.stevens@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e506d405ac
commit
a29c9c43bb
1 changed files with 1 additions and 1 deletions
|
@ -1073,7 +1073,7 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if (pending)
|
||||
(void)mod_timer(&port->clean_timer,
|
||||
jiffies + VNET_CLEAN_TIMEOUT);
|
||||
else
|
||||
else if (port)
|
||||
del_timer(&port->clean_timer);
|
||||
dev->stats.tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
|
|
Loading…
Reference in a new issue