Re: [PATCH 08/13] drm/msm/gpu: Rearrange the code that collects the task during a hang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Jordan Crouse (2018-07-12 19:59:25)
> Do a bit of cleanup to prepare for upcoming changes to pass the
> hanging task comm and cmdline to the crash dump function.
> 
> Signed-off-by: Jordan Crouse <jcrouse@xxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/msm/msm_gpu.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index 1c09acfb4028..2ca354047250 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
> @@ -314,6 +314,7 @@ static void recover_worker(struct work_struct *work)
>         struct msm_drm_private *priv = dev->dev_private;
>         struct msm_gem_submit *submit;
>         struct msm_ringbuffer *cur_ring = gpu->funcs->active_ring(gpu);
> +       char *comm = NULL, *cmd = NULL;
>         int i;
>  
>         mutex_lock(&dev->struct_mutex);
> @@ -327,7 +328,7 @@ static void recover_worker(struct work_struct *work)
>                 rcu_read_lock();
>                 task = pid_task(submit->pid, PIDTYPE_PID);
>                 if (task) {
> -                       char *cmd;
> +                       comm = kstrdup(task->comm, GFP_KERNEL);

Under rcu_read_lock(), GFP_KERNEL is not allowed, you need GFP_NOWAIT or
some such (or grab a reference to the pid and drop rcu then GFP_KERNEL).
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux