Commit b494bfa8 authored by Qi Liu's avatar Qi Liu Committed by Yang Yingliang
Browse files

drivers/perf: Prevent forced unbinding of PMU drivers

mainline inclusion
from mainline-v5.8-rc1
commit f32ed8eb
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4A1WQ
CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f32ed8eb0e3f0d0ef4ddb854554d60ca5863a9f9



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

Forcefully unbinding PMU drivers during perf sampling will lead to
a kernel panic, because the perf upper-layer framework call a NULL
pointer in this situation.

To solve this issue, "suppress_bind_attrs" should be set to true, so
that bind/unbind can be disabled via sysfs and prevent unbinding PMU
drivers during perf sampling.

Signed-off-by: default avatarQi Liu <liuqi115@huawei.com>
Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1594975763-32966-1-git-send-email-liuqi115@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Reviewed-by: default avatarYang Jihong <yangjihong1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 525a3927
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment