diff options
author | Yan Zhao <yan.y.zhao@intel.com> | 2020-03-18 13:48:26 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2020-03-18 13:48:26 +0800 |
commit | dbafc67307ec06036b25b223a251af03fe07969a (patch) | |
tree | 7d1d7539d4b730808a1c0a6aca40e61a8a030076 /drivers/gpu | |
parent | 2484b17242896623b1603b371a6f981c4f197ece (diff) | |
download | linux-stable-dbafc67307ec06036b25b223a251af03fe07969a.tar.gz linux-stable-dbafc67307ec06036b25b223a251af03fe07969a.tar.bz2 linux-stable-dbafc67307ec06036b25b223a251af03fe07969a.zip |
drm/i915/gvt: do not check len & max_len for lri
lri ususally of variable len and far exceeding 127 dwords.
Fixes: 00a33be40634 ("drm/i915/gvt: Add valid length check for MI variable commands")
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200304095121.21609-1-yan.y.zhao@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/cmd_parser.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index bb204cfb9006..a3cc080a46c6 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -968,18 +968,6 @@ static int cmd_handler_lri(struct parser_exec_state *s) { int i, ret = 0; int cmd_len = cmd_length(s); - u32 valid_len = CMD_LEN(1); - - /* - * Official intel docs are somewhat sloppy , check the definition of - * MI_LOAD_REGISTER_IMM. - */ - #define MAX_VALID_LEN 127 - if ((cmd_len < valid_len) || (cmd_len > MAX_VALID_LEN)) { - gvt_err("len is not valid: len=%u valid_len=%u\n", - cmd_len, valid_len); - return -EFAULT; - } for (i = 1; i < cmd_len; i += 2) { if (IS_BROADWELL(s->engine->i915) && s->engine->id != RCS0) { |