Commit 74083f78 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by liwei
Browse files

media: dvbdev: fix error logic at dvb_register_device()

mainline inclusion
from mainline-v5.14-rc1
commit 1fec2ecc
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I635IG
CVE: CVE-2022-45884

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1fec2ecc252301110e4149e6183fa70460d29674



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

As reported by smatch:

	drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:510 dvb_register_device() warn: '&dvbdev->list_head' not removed from list
	drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:530 dvb_register_device() warn: '&dvbdev->list_head' not removed from list
	drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:545 dvb_register_device() warn: '&dvbdev->list_head' not removed from list

The error logic inside dvb_register_device() doesn't remove
devices from the dvb_adapter_list in case of errors.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarliwei <liwei728@huawei.com>
parent aef6b782
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment