Commit 531028a6 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by openeuler-sync-bot
Browse files

drm/bridge: tpd12s015: Drop buggy __exit annotation for remove function

mainline inclusion
from mainline-v6.8-rc1
commit ce3e112e7ae854249d8755906acc5f27e1542114
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q9GI
CVE: CVE-2023-52694

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



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

With tpd12s015_remove() marked with __exit this function is discarded
when the driver is compiled as a built-in. The result is that when the
driver unbinds there is no cleanup done which results in resource
leakage or worse.

Fixes: cff5e6f7 ("drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter")
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-19-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarLuo Gengkun <luogengkun2@huawei.com>
(cherry picked from commit 3d8c4b43)
parent 40e4eb12
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ static int tpd12s015_probe(struct platform_device *pdev)
	return 0;
}

static int __exit tpd12s015_remove(struct platform_device *pdev)
static int tpd12s015_remove(struct platform_device *pdev)
{
	struct tpd12s015_device *tpd = platform_get_drvdata(pdev);

@@ -197,7 +197,7 @@ MODULE_DEVICE_TABLE(of, tpd12s015_of_match);

static struct platform_driver tpd12s015_driver = {
	.probe	= tpd12s015_probe,
	.remove	= __exit_p(tpd12s015_remove),
	.remove = tpd12s015_remove,
	.driver	= {
		.name	= "tpd12s015",
		.of_match_table = tpd12s015_of_match,