diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2024-11-29 00:08:24 +0300 |
---|---|---|
committer | John Harrison <John.C.Harrison@Intel.com> | 2024-12-03 02:50:44 +0300 |
commit | 906c4b306e9340f6ffd6d44904ebc86e62e63627 (patch) | |
tree | 7b57ef86ac31c7c24010ec4451e9013d47f1f90c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 90f51a7f4ec1004fc4ddfbc6d1f1068d85ef4771 (diff) | |
download | linux-906c4b306e9340f6ffd6d44904ebc86e62e63627.tar.xz |
drm/xe: Add mutex locking to devcoredump
There are now multiple places that can trigger a coredump. Some of
which can happen in parallel. There is already a check against
capturing multiple dumps sequentially, but without locking it doesn't
guarantee to work against concurrent dumps. And if two dumps do happen
in parallel, they can end up doing Bad Things such as one call stack
freeing the data the other call stack is still processing. Which leads
to a crashed kernel.
Further, it is possible for the DRM timeout to expire and trigger a
free of the capture while a user is still reading that capture out
through sysfs. Again leading to dodgy pointer problems.
So, add a mutext lock around the capture, read and free functions to
prevent inteference.
v2: Swap tiny scope spin_lock for larger scope mutex and fix
kernel-doc comment (review feedback from Matthew Brost)
v3: Move mutex locks to exclude worker thread and add reclaim
annotation (review feedback from Matthew Brost)
v4: Fix typo.
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241128210824.3302147-4-John.C.Harrison@Intel.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions