]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit76e83e376ca07388dc7bff9668397f6b108dc895
tree0cf00b5ba91a14b954cf0529123230d8cfae9a51
parent07e210f29e5060bda3282452945eadbd176fb3e1
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: 8d70fa671061 ("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