提交 246e8d5b 编写于 作者: S Sang Yan 提交者: Zheng Zengkai

arm64: Uninstall cpu park after cpu up

hulk inclusion
category: feature
bugzilla: 48159
CVE: N/A

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

One cpu in PARK state could not come up in this case:
	CPU 0			    |   CPU 1
	boot_secondary(cpu 1)	    |
	--> write_park_exit(cpu 1)  |
				    |	cpu uping from PARK
				    |	...
	uninstall_cpu_park()	    |
	--> memset to 0 park text   |
				    |	...
				    |	Exception in memory !!
	wait for cpu up		    |

Cpu 1 uping from PARK may trap into exception while cpu 0
clear cpu 1's park text memory.

This uninstall_cpu_park should be after waiting for cpu up.
Signed-off-by: NSang Yan <sangyan@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e4a530d6
...@@ -300,15 +300,15 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) ...@@ -300,15 +300,15 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
return ret; return ret;
} }
#ifdef CONFIG_ARM64_CPU_PARK
uninstall_cpu_park(cpu);
#endif
/* /*
* CPU was successfully started, wait for it to come online or * CPU was successfully started, wait for it to come online or
* time out. * time out.
*/ */
wait_for_completion_timeout(&cpu_running, wait_for_completion_timeout(&cpu_running,
msecs_to_jiffies(5000)); msecs_to_jiffies(5000));
#ifdef CONFIG_ARM64_CPU_PARK
uninstall_cpu_park(cpu);
#endif
if (cpu_online(cpu)) if (cpu_online(cpu))
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册