drm/i915: Fix pid leak with banned clients
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 17 Dec 2019 17:09:33 +0000 (17:09 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Dec 2019 22:17:28 +0000 (22:17 +0000)
commitba16a48af797db124ac100417f9229b1650ce1fb
tree78d9a2130c65077e9f332e3b5c0107c040112d43
parent85bedbf191e82aac0d7f05623bccfeccdcd91cea
drm/i915: Fix pid leak with banned clients

Get_pid_task() needs to be paired with a put_pid or we leak a pid
reference every time a banned client tries to create a context.

v2:
 * task_pid_nr helper exists! (Chris)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: b083a0870c79 ("drm/i915: Add per client max context ban limit")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191217170933.8108-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_context.c