Skip to content

Commit dbafc67

Browse files
yanzhao56zhenyw
authored andcommitted
drm/i915/gvt: do not check len & max_len for lri
lri ususally of variable len and far exceeding 127 dwords. Fixes: 00a33be ("drm/i915/gvt: Add valid length check for MI variable commands") Signed-off-by: Yan Zhao <[email protected]> Acked-by: Zhenyu Wang <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2484b17 commit dbafc67

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

drivers/gpu/drm/i915/gvt/cmd_parser.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -968,18 +968,6 @@ static int cmd_handler_lri(struct parser_exec_state *s)
968968
{
969969
int i, ret = 0;
970970
int cmd_len = cmd_length(s);
971-
u32 valid_len = CMD_LEN(1);
972-
973-
/*
974-
* Official intel docs are somewhat sloppy , check the definition of
975-
* MI_LOAD_REGISTER_IMM.
976-
*/
977-
#define MAX_VALID_LEN 127
978-
if ((cmd_len < valid_len) || (cmd_len > MAX_VALID_LEN)) {
979-
gvt_err("len is not valid: len=%u valid_len=%u\n",
980-
cmd_len, valid_len);
981-
return -EFAULT;
982-
}
983971

984972
for (i = 1; i < cmd_len; i += 2) {
985973
if (IS_BROADWELL(s->engine->i915) && s->engine->id != RCS0) {

0 commit comments

Comments
 (0)