The code assumed that the sync framework will not call nvhost
specific functions until the pointer has been returned to
the caller. In most cases this is a fair assumption, however,
if the sync dump was in progress at the same time we created a
new fence, we may try to print out fence specific data before
it has been created.
This function adds necessary check to nvhost_sync_pt_value_str()
which is the only function suffering from this issue.
Bug
200001909
Change-Id: Ieaf8352eb48aedbb984e05caec241aca3e593810
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/407592
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
int size)
{
struct nvhost_sync_pt *pt = to_nvhost_sync_pt(sync_pt);
- struct nvhost_sync_timeline *obj = pt->obj;
+ struct nvhost_sync_timeline *obj;
+
+ /* shared data may not be available yet */
+ if (!pt)
+ return;
+
+ obj = pt->obj;
if (obj->id != NVSYNCPT_INVALID)
snprintf(str, size, "%d", pt->thresh);