Skip to content
Commit 3ec2f427 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Daniel Vetter
Browse files

drm/i915: Fix refcount leak and possible NULL pointerdereference.



Since get_pid_task() grabs a reference on the task_struct, we have to drop the
refcount after reading that task's comm name. Use pid_task() with RCU instead.

Also, avoid directly reading like pid_task()->comm because
pid_task() will return NULL if the task have already exit()ed.

This patch fixes both problems.

Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d8ccba86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment