lantiq: net: fix duplicated skb in rx descriptor ring
authorAleksander Jan Bajkowski <olek2@wp.pl>
Tue, 15 Jun 2021 20:42:57 +0000 (22:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jun 2021 12:42:46 +0000 (14:42 +0200)
commit70c8418469fb22a679fe5015ebe60fe15011ea43
treea0d8da698bb54cba8322d95f681826dbd6c9f358
parent11fac7e9127078fe3275642742cf5e2336fa934a
lantiq: net: fix duplicated skb in rx descriptor ring

[ Upstream commit 7ea6cd16f1599c1eac6018751eadbc5fc736b99a ]

The previous commit didn't fix the bug properly. By mistake, it replaces
the pointer of the next skb in the descriptor ring instead of the current
one. As a result, the two descriptors are assigned the same SKB. The error
is seen during the iperf test when skb_put tries to insert a second packet
and exceeds the available buffer.

Fixes: c7718ee96dbc ("net: lantiq: fix memory corruption in RX ring ")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/lantiq_xrx200.c