cpuidle-haltpoll: return -ENODEV on modinit failure
mainline inclusion from mainline-5.4 commit 5cc59f59 category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=34 CVE: NA When a user loads cpuidle-haltpoll on a non KVM guest the module will successfully load, even though idle driver registration didn't take place. We should instead return -ENODEV signaling the user that the driver can't be loaded, like other error paths in haltpoll_init(). An example of such error paths is when we return -EBUSY when attempting to register an idle driver when it had one already (e.g. intel_idle loads at boot and then we attempt to insert module cpuidle-haltpoll). 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>
Please register or sign in to comment