]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: ksz: Check return value
authorArtem Chernyshev <artem.chernyshev@red-soft.ru>
Thu, 1 Dec 2022 14:00:30 +0000 (17:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Dec 2022 10:30:45 +0000 (11:30 +0100)
commit1032ca67c40ada11b5fd7a91cedbd073236907b9
tree8b6f8022aceeb1327e63868a9accbf49bacb8225
parentf1d1f3ca40ce45b21401a68fd42b0c3555c4bc07
net: dsa: ksz: Check return value

[ Upstream commit 3d8fdcbf1f42e2bb9ae8b8c0b6f202278c788a22 ]

Return NULL if we got unexpected value from skb_trim_rcsum()
in ksz_common_rcv()

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 615c4ed0bcc1 ("net: dsa: ksz: Factor out common tag code")
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20221201140032.26746-1-artem.chernyshev@red-soft.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/dsa/tag_ksz.c