drm/msm: Add a way to override processes comm/cmdline

In the cause of using the GPU via virtgpu, the host side process is
really a sort of proxy, and not terribly interesting from the PoV of
crash/fault logging.  Add a way to override these per process so that
we can see the guest process's name.

v2: Handle kmalloc failure, add comment to explain kstrdup returns
    NULL if passed NULL [Dan Carpenter]

Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20220317165144.222101-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Rob Clark 2022-03-17 09:51:40 -07:00
parent 39ba0c0d6c
commit d4726d7700
5 changed files with 60 additions and 5 deletions

View file

@ -61,6 +61,8 @@ void __msm_file_private_destroy(struct kref *kref)
}
msm_gem_address_space_put(ctx->aspace);
kfree(ctx->comm);
kfree(ctx->cmdline);
kfree(ctx);
}