]> 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)
commite9bb9a4e275c29d2572658dba1e618dccc0fe021
tree0cf00b5ba91a14b954cf0529123230d8cfae9a51
parent401170a59c50ae9d1df0186b6f107f99562bdfc0
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: aaabf04caa78 ("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