watchdog: Fix sleeping function called from atomic context
hulk inclusion category: bugfix bugzilla: 173968, https://gitee.com/openeuler/kernel/issues/I3J87Y CVE: NA ------------------------------------------------- In '6ab91856 ("watchdog: Fix check_preemption_disabled() error")', we tried to fix check_preemption_disabled() error by disabling preemption in hardlockup_detector_perf_init(), but missed that function perf_event_create_kernel_counter() may sleep. To fix the issue fully, reimplement hardlockup_detector_perf_init() through smp_call_on_cpu() instead of disabling preemption. Fixes: 6ab91856 ("watchdog: Fix check_preemption_disabled() error") Signed-off-by: NWei Li <liwei391@huawei.com> Reviewed-by: NCheng Jian <cj.chengjian@huawei.com> Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录