[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <542C1837.6090009@oracle.com>
Date: Wed, 01 Oct 2014 11:05:27 -0400
From: David L Stevens <david.stevens@...cle.com>
To: David Miller <davem@...emloft.net>
CC: netdev@...r.kernel.org
Subject: [PATCH net-next] 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@...cle.com>
---
drivers/net/ethernet/sun/sunvnet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 1262697..1539672 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1073,7 +1073,7 @@ out_dropped:
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;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists