Skip to content

Commit

Permalink
[vxge] Fix use of stale I/O buffer on error path
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 23, 2017
1 parent b340971 commit c13bf52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/net/vxge/vxge_traffic.c
Expand Up @@ -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",
Expand All @@ -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;

Expand Down

0 comments on commit c13bf52

Please sign in to comment.