From: Paolo Galtieri Date: Mon, 16 Jan 2006 23:48:58 +0000 (-0700) Subject: [PATCH] mv643xx_eth: Fix a NULL pointer dereference X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4eaa3cb35b22cccc53846ce2820e244b1fb04f0b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Dale Farnsworth mv643xx_eth.c | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-) Signed-off-by: Jeff Garzik --- 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, /* 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. */