drm/i915/guc: Fix potential invalid pointer dereferences when decoding G2Hs
authorJohn Harrison <John.C.Harrison@Intel.com>
Wed, 2 Mar 2022 00:33:57 +0000 (16:33 -0800)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 3 Mar 2022 23:03:12 +0000 (15:03 -0800)
commite1dd871442c05ad5f53bc1eac22f71b53eb48a8a
treea535592aedfef9adbe23331262d07c1f7d6e5720
parentd4de9a3eaede440717244672ddc16114e388bc2f
drm/i915/guc: Fix potential invalid pointer dereferences when decoding G2Hs

Some G2H handlers were reading the context id field from the payload
before checking the payload met the minimum length required.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220302003357.4188363-9-John.C.Harrison@Intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c