drm/vmwgfx: Fix command defines and checks
Make sure all guest-backed object commands are properly packed. Have the command verifier treat uninitialized command entries as invalid rather than dereferencing NULL pointers. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
This commit is contained in:
@@ -2032,6 +2032,9 @@ static int vmw_cmd_check(struct vmw_private *dev_priv,
|
||||
goto out_invalid;
|
||||
|
||||
entry = &vmw_cmd_entries[cmd_id];
|
||||
if (unlikely(!entry->func))
|
||||
goto out_invalid;
|
||||
|
||||
if (unlikely(!entry->user_allow && !sw_context->kernel))
|
||||
goto out_privileged;
|
||||
|
||||
|
Reference in New Issue
Block a user