net: lantiq_xrx200: restore buffer if memory allocation failed
authorAleksander Jan Bajkowski <olek2@wp.pl>
Wed, 24 Aug 2022 21:54:08 +0000 (23:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Aug 2022 19:41:39 +0000 (12:41 -0700)
commitc9c3b1775f80fa21f5bff874027d2ccb10f5d90c
tree0cf00b5ba91a14b954cf0529123230d8cfae9a51
parentc4b6e9341f930e4dd089231c0414758f5f1f9dbd
net: lantiq_xrx200: restore buffer if memory allocation failed

In a situation where memory allocation fails, an invalid buffer address
is stored. When this descriptor is used again, the system panics in the
build_skb() function when accessing memory.

Fixes: 7ea6cd16f159 ("lantiq: net: fix duplicated skb in rx descriptor ring")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/lantiq_xrx200.c