Skip to content

Commit

Permalink
[PATCH] mv643xx_eth: Fix a NULL pointer dereference
Browse files Browse the repository at this point in the history
Fix a NULL pointer dereference.

Fill in the buf_ptr and byte_cnt fields of pkt_info in
eth_tx_return_desc().

Signed-off-by: Paolo Galtieri <pgaltieri@mvista.com>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

 mv643xx_eth.c |   51 +++++++++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 30 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Paolo Galtieri authored and Jeff Garzik committed Jan 17, 2006
1 parent cb415d3 commit 4eaa3cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2660,6 +2660,8 @@ static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv643xx_private *mp,
/* Pass the packet information to the caller */
p_pkt_info->cmd_sts = command_status;
p_pkt_info->return_info = mp->tx_skb[tx_desc_used];
p_pkt_info->buf_ptr = p_tx_desc_used->buf_ptr;
p_pkt_info->byte_cnt = p_tx_desc_used->byte_cnt;
mp->tx_skb[tx_desc_used] = NULL;

/* Update the next descriptor to release. */
Expand Down

0 comments on commit 4eaa3cb

Please sign in to comment.