diff options
author | Paolo Galtieri <pgaltieri@mvista.com> | 2006-01-16 18:48:58 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:23:37 -0500 |
commit | 4eaa3cb35b22cccc53846ce2820e244b1fb04f0b (patch) | |
tree | 65aa1145fbf4eed0700ced76dd9a6e9b6a3dfbb2 /drivers | |
parent | cb415d30048f0c1f80fd2f5340a982e8c9617d0d (diff) |
[PATCH] mv643xx_eth: Fix a NULL pointer dereference
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/mv643xx_eth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index fe53fa0e3aed..88a59d9715ac 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -2660,6 +2660,8 @@ static ETH_FUNC_RET_STATUS eth_tx_return_desc(struct mv643xx_private *mp, | |||
2660 | /* Pass the packet information to the caller */ | 2660 | /* Pass the packet information to the caller */ |
2661 | p_pkt_info->cmd_sts = command_status; | 2661 | p_pkt_info->cmd_sts = command_status; |
2662 | p_pkt_info->return_info = mp->tx_skb[tx_desc_used]; | 2662 | p_pkt_info->return_info = mp->tx_skb[tx_desc_used]; |
2663 | p_pkt_info->buf_ptr = p_tx_desc_used->buf_ptr; | ||
2664 | p_pkt_info->byte_cnt = p_tx_desc_used->byte_cnt; | ||
2663 | mp->tx_skb[tx_desc_used] = NULL; | 2665 | mp->tx_skb[tx_desc_used] = NULL; |
2664 | 2666 | ||
2665 | /* Update the next descriptor to release. */ | 2667 | /* Update the next descriptor to release. */ |