sunvnet: free pending tx buffers before clearing ring data
authorDavid L Stevens <david.stevens@oracle.com>
Mon, 26 Jan 2015 20:54:35 +0000 (15:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jan 2015 08:25:21 +0000 (00:25 -0800)
commit07ac3e7099b5788ee4b78233c96532c6209a304b
tree0925365f787ab3ec164440078a9b946f4f421a0e
parent971f49dee2639badd70bea6cf92e4eaa357ffecf
sunvnet: free pending tx buffers before clearing ring data

This patch moves the clearing of ring data in vnet_port_free_tx_bufs to after
 the freeing of pending buffers in the ring. Otherwise, this can result in
 dereferencing a NULL pointer.

Reported-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David L Stevens <david.stevens@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet.c