]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix refcount leak and possible NULL pointerdereference.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fri, 3 Jan 2014 11:42:18 +0000 (20:42 +0900)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 6 Jan 2014 09:56:36 +0000 (10:56 +0100)
commit2a25de39fe7632794bec29b4268ab9873bece56f
treeaf3cabbed351bc396ac4ff44fbd725e4d8f9b4d6
parente19877aab01862a477f4f879d6d27b42c2a60eb9
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: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c