Commit 364de98e authored by Wei Li's avatar Wei Li Committed by Zheng Zengkai
Browse files

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: default avatarWei Li <liwei391@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c31c696f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment