]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:18:12 +0000 (17:18 +0200)
commit3ef2786e32d93e562cd40601248a14ae090de873
tree4bbaaf984ed39a405d9770216460bbcc1f452d45
parent0d9981b0636dd54f5d17f6bac008d98163e9c509
net: lantiq_xrx200: restore buffer if memory allocation failed

[ Upstream commit c9c3b1775f80fa21f5bff874027d2ccb10f5d90c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/lantiq_xrx200.c