msm: kgsl: Fix context timeline show from accessing uninitialized variables
kgsl_sync_timeline_value_str() could be called at the same time as
kgsl_sync_timeline_create(). If kgsl_sync_timeline_value_str() gets
called just after timeline is created but before other variables of
struct kgsl_sync_timeline are initialized, we could be accessing
uninitialized variables in kgsl_sync_timeline_value_str() leading to
kernel panic. If device pointer is NULL in kgsl_sync_timeline_value_str(),
the context timeline is not fully initialized yet. Report the queued and
retired timestamp of this context as 0, because the context and timeline
are just getting initialized.
Change-Id: I288a3b936da5c5900c8eb7eb50988a971dd7a432
Signed-off-by:
Tarun Karra <tkarra@codeaurora.org>
Loading
Please register or sign in to comment