diff options
| author | Patrick Fay <pfay@codeaurora.org> | 2016-11-03 17:07:16 -0700 |
|---|---|---|
| committer | Patrick Fay <pfay@codeaurora.org> | 2017-01-16 11:52:33 -0800 |
| commit | 377c09d738d74ee059c100e4834fdc5c6736636d (patch) | |
| tree | 0ab4c025a681d7cd45b70d9a8ab7ae00990bd608 /net/unix/af_unix.c | |
| parent | 573979dee2a76e4d7f61cb867c12afbaed7e1eb5 (diff) | |
perf: Fix NULL pointer ref in exclude_idle update
Commit 573979dee2a7 ("perf: Add support for exclude_idle attribute")
registers an idle callback routine armv8pmu_idle_update. Currently
the idle update routine might be called before the pmu has allocated
all the per_cpu structures. This can result in a null pointer
reference. Change arm_pmu_device_probe to allocate the structures
via cpu_pmu_init() before the init_fn() call (which eventually does the
idle_notify_register call). Change a branch to out_free to
out_destroy as out_free doesn't cleanup what was allocated in
cpu_pmu_init(). Also have armv8pmu_idle_update check that the
structure is not null before using it.
Change-Id: Ie1198fc1783804c61467889c68656d6e8c9c9edf
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
