]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cpuidle: Do not unset the driver if it is there already
authorZhenzhong Duan <zhenzhong.duan@oracle.com>
Wed, 23 Oct 2019 01:57:14 +0000 (09:57 +0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:43 +0000 (14:22 -0300)
commiteedb0b9cbb72812b74c834bab00329e3ab821e48
tree86258483632c934d7b4ddbd5c2848f47133aafc1
parentb1b7826186768d40c2c71c93b3abb0db5fe36cac
cpuidle: Do not unset the driver if it is there already

BugLink: https://bugs.launchpad.net/bugs/1857158
commit 918c1fe9fbbe46fcf56837ff21f0ef96424e8b29 upstream.

Fix __cpuidle_set_driver() to check if any of the CPUs in the mask has
a driver different from drv already and, if so, return -EBUSY before
updating any cpuidle_drivers per-CPU pointers.

Fixes: 82467a5a885d ("cpuidle: simplify multiple driver support")
Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/cpuidle/driver.c