
From: Joao Martins <joao.m.martins@oracle.com> mainline inclusion from mainline-5.4 commit 472f263660832b90e53bede2020f68cd14f8b76c category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA cpuidle-haltpoll can be built as a module to allow optional late load. Given we are setting @owner to THIS_MODULE, cpuidle will attempt to grab a module reference every time a cpuidle_device is registered -- so essentially all online cpus get a reference. This prevents for the module to be unloaded later, which makes the module_exit callback entirely unused. Thus remove the @owner and allow module to be unloaded. Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Yubo Miao <miaoyubo@huawei.com> Signed-off-by: Xiangyou Xie <xiexiangyou@huawei.com> Reviewed-by: Hailiang Zhang <zhang.zhanghailiang@huawei.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Jiajun Chen <chenjiajun8@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/cpuidle/cpuidle-haltpoll.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/drivers/cpuidle/cpuidle-haltpoll.c index 7a0239ef717e9..49a65c6fe91e3 100644 --- a/drivers/cpuidle/cpuidle-haltpoll.c +++ b/drivers/cpuidle/cpuidle-haltpoll.c @@ -35,7 +35,6 @@ static int default_enter_idle(struct cpuidle_device *dev, static struct cpuidle_driver haltpoll_driver = { .name = "haltpoll", .governor = "haltpoll", - .owner = THIS_MODULE, .states = { { /* entry 0 is for polling */ }, { -- 2.25.1