perf parse-events: Check if the software events array slots are populated
mainline inclusion from mainline-5.13-rc3 commit 3b2f17ad category: bugfix bugzilla: 78520 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3b2f17ad1770e51b8b4e68b5069c4f1ee477eff8 --------------------------- To avoid a NULL pointer dereference when the kernel supports the new feature but the tooling still hasn't an entry for it. This happened with the recently added PERF_COUNT_SW_CGROUP_SWITCHES software event. Reported-by: NThomas Richter <tmricht@linux.ibm.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Sumanth Korikkar <sumanthk@linux.ibm.com> Link: https://lore.kernel.org/linux-perf-users/YKVESEKRjKtILhog@kernel.org/Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: NYang Jihong <yangjihong1@huawei.com> Reviewed-by: NKuohai Xu <xukuohai@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录