Commit b7d94f38 authored by Esina Ekaterina's avatar Esina Ekaterina Committed by sanglipeng
Browse files

net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs

stable inclusion
from stable-v5.10.166
commit 613020d0489e3f6058d4f5c7c82bc4396cc880ed
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I87FRA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=613020d0489e3f6058d4f5c7c82bc4396cc880ed



--------------------------------

[ Upstream commit 488e0bf7 ]

If uhdlc_priv_tsa != 1 then utdm is not initialized.
And if ret != NULL then goto undo_uhdlc_init, where
utdm is dereferenced. Same if dev == NULL.

Found by Astra Linux on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.

Fixes: 8d68100a ("soc/fsl/qe: fix err handling of ucc_of_parse_tdm")
Signed-off-by: default avatarEsina Ekaterina <eesina@astralinux.ru>
Link: https://lore.kernel.org/r/20230112074703.13558-1-eesina@astralinux.ru


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent f78ff524
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment