diff options
author | Michael Brown | 2017-03-23 20:10:25 +0100 |
---|---|---|
committer | Michael Brown | 2017-03-23 20:10:25 +0100 |
commit | c13bf525098949291cf930d5c87da5c51c812af4 (patch) | |
tree | ca5506593a626e77807d9662f1775ef6ef478a1e /src/drivers/net | |
parent | [iobuf] Increase minimum I/O buffer size to 128 bytes (diff) | |
download | ipxe-c13bf525098949291cf930d5c87da5c51c812af4.tar.gz ipxe-c13bf525098949291cf930d5c87da5c51c812af4.tar.xz ipxe-c13bf525098949291cf930d5c87da5c51c812af4.zip |
[vxge] Fix use of stale I/O buffer on error path
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net')
-rw-r--r-- | src/drivers/net/vxge/vxge_traffic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/net/vxge/vxge_traffic.c b/src/drivers/net/vxge/vxge_traffic.c index 0b1caf10..dbd79901 100644 --- a/src/drivers/net/vxge/vxge_traffic.c +++ b/src/drivers/net/vxge/vxge_traffic.c @@ -667,6 +667,8 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring) vxge_debug(VXGE_INFO, "%s: rx frame received at offset %d\n", hldev->ndev->name, ring->rxd_offset); + iobuf = (struct io_buffer *)(intptr_t)rxd->host_control; + if (tcode != VXGE_HW_RING_T_CODE_OK) { netdev_rx_err(hldev->ndev, NULL, -EINVAL); vxge_debug(VXGE_ERR, "%s:%d, rx error tcode %d\n", @@ -675,8 +677,6 @@ enum vxge_hw_status vxge_hw_vpath_poll_rx(struct __vxge_hw_ring *ring) goto err1; } - iobuf = (struct io_buffer *)(intptr_t)rxd->host_control; - len = VXGE_HW_RING_RXD_1_BUFFER0_SIZE_GET(rxd->control_1); len -= ETH_FCS_LEN; |