Commit 4b29a149 authored by Ziyang Xuan's avatar Ziyang Xuan Committed by Yongqiang Liu
Browse files

can: bcm: check the result of can_send() in bcm_can_tx()

stable inclusion
from stable-v4.19.262
commit dae06957f856eb699f2a504a46891718c9b1e0d3
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZXGL


CVE: NA

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

[ Upstream commit 3fd7bfd2 ]

If can_send() fail, it should not update frames_abs counter
in bcm_can_tx(). Add the result check for can_send() in bcm_can_tx().

Suggested-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Suggested-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Link: https://lore.kernel.org/all/9851878e74d6d37aee2f1ee76d68361a46f89458.1663206163.git.william.xuanziyang@huawei.com


Acked-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 16cebfda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment