Re: [PATCH] net: dwc-xlgmac: set skb to NULL after freeing it

2018-11-28 Thread David Miller
From: Pan Bian Date: Wed, 28 Nov 2018 17:20:53 +0800 > @@ -1180,6 +1180,7 @@ static int xlgmac_rx_poll(struct xlgmac_channel > *channel, int budget) > netif_err(pdata, rx_err, netdev, > "error in received packet\n"); >

Re: [PATCH] net: dwc-xlgmac: set skb to NULL after freeing it

2018-11-28 Thread Jose Abreu
On 28-11-2018 09:20, Pan Bian wrote: > The buffer skb is freed via dev_kfree_skb in a loop. After freeing skb, > the value of packet_count is updated via packet_count++. If packet_count > happens to equal the upper bound (i.e., budget), the loop will be broken > and skb may be assigned to desc_data

[PATCH] net: dwc-xlgmac: set skb to NULL after freeing it

2018-11-28 Thread Pan Bian
The buffer skb is freed via dev_kfree_skb in a loop. After freeing skb, the value of packet_count is updated via packet_count++. If packet_count happens to equal the upper bound (i.e., budget), the loop will be broken and skb may be assigned to desc_data->state.skb. Resulting that desc_data->state.