diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-05-21 23:05:30 +0200 |
---|---|---|
committer | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2018-05-28 12:36:41 +0200 |
commit | 540ead8c5a0e2910fc7bf0839982921c8f11b31c (patch) | |
tree | 0e499fabee55adc0096280cdcf1fc8d6925d7ace /drivers/dma-buf | |
parent | drm/i915/lvds: Move acpi lid notification registration to registration phase (diff) | |
download | linux-540ead8c5a0e2910fc7bf0839982921c8f11b31c.tar.xz linux-540ead8c5a0e2910fc7bf0839982921c8f11b31c.zip |
drm/i915/query: Protect tainted function pointer lookup
Smatch identifies i915_query_ioctl() as being a potential victim of
Spectre due to its use of a tainted user index into a function pointer
array. Use array_index_nospec() to defang the user index before using it
to lookup the function pointer.
Fixes: a446ae2c6e65 ("drm/i915: add query uAPI")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180521210530.26008-1-chris@chris-wilson.co.uk
(cherry picked from commit 84b510e22da7926522a257cfe295d3695346a0bd)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/dma-buf')
0 files changed, 0 insertions, 0 deletions