]> 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)
committerJakub Kicinski <kuba@kernel.org>
Sat, 3 Dec 2022 04:46:51 +0000 (20:46 -0800)
commit3d8fdcbf1f42e2bb9ae8b8c0b6f202278c788a22
treeb79be469c8bb05d1ca921cde135ecd5e4c6199a0
parenta789c70c1dfed36a31bae1f2df55bc9b8429287a
net: dsa: ksz: Check return value

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: bafe9ba7d908 ("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>
net/dsa/tag_ksz.c