]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Protect against leaks in pipe_crc_set_source
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 10 Dec 2014 10:00:29 +0000 (11:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 10 Dec 2014 16:47:27 +0000 (17:47 +0100)
commite3fae1ac8bc7514240dab4c6822c2f698e512153
tree06d3bdfd27694d2d7f588d32a6b9a0876820a989
parenta128c86dc2fbcc3b2c354065e0b1344a23c359e3
drm/i915: Protect against leaks in pipe_crc_set_source

Stupid userspace (there is no evil userspace in debugfs by assumption)
might provoke a leak since we allocate the new array without holding
any locks. Drop in an unconditional kfree to deal with this - kfree
can handle NULL.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c