diff options
author | Danilo Krummrich <dakr@redhat.com> | 2023-04-18 12:04:53 +0200 |
---|---|---|
committer | Luben Tuikov <luben.tuikov@amd.com> | 2023-04-18 22:09:41 -0400 |
commit | 96c7c2f4d5bd94b15fe63448c087f01607b56f4a (patch) | |
tree | 8f493c7c878190eff8cdb5f640c5b336341bb907 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 4aa35a0130d6b8afbefc9ef530a521fb0fb9b8e1 (diff) |
drm/scheduler: set entity to NULL in drm_sched_entity_pop_job()
It already happend a few times that patches slipped through which
implemented access to an entity through a job that was already removed
from the entities queue. Since jobs and entities might have different
lifecycles, this can potentially cause UAF bugs.
In order to make it obvious that a jobs entity pointer shouldn't be
accessed after drm_sched_entity_pop_job() was called successfully, set
the jobs entity pointer to NULL once the job is removed from the entity
queue.
Moreover, debugging a potential NULL pointer dereference is way easier
than potentially corrupted memory through a UAF.
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://lore.kernel.org/r/20230418100453.4433-1-dakr@redhat.com
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions