aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/xilinx-spi.c
diff options
context:
space:
mode:
authorMichal Srb <[email protected]>2018-02-05 16:04:37 +0000
committerRodrigo Vivi <[email protected]>2018-02-06 11:41:39 -0800
commitb18224e95cb13ef7517aa26e6b47c85117327f11 (patch)
treef84c747c711fa3b0ad004b60a1bb53e128fcc48a /drivers/fpga/xilinx-spi.c
parent5e1df40f40ee45a97bb1066c3d71f0ae920a9672 (diff)
drm/i915/cmdparser: Check reg_table_count before derefencing.
The find_reg function was assuming that there is always at least one table in reg_tables. It is not always true. In case of VCS or VECS, the reg_tables is NULL and reg_table_count is 0, implying that no register-accessing commands are allowed. However, the command tables include commands such as MI_STORE_REGISTER_MEM. When trying to check such command, the find_reg would dereference NULL pointer. Now it will just return NULL meaning that the register was not found and the command will be rejected. Fixes: 76ff480ec963 ("drm/i915/cmdparser: Use binary search for faster register lookup") Signed-off-by: Michal Srb <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Cc: Chris Wilson <[email protected]> Cc: Matthew Auld <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] register lookup") (cherry picked from commit 2f265fad9756a40c09e3f4dcc62d5d7fa73a9fb2) Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
0 files changed, 0 insertions, 0 deletions