diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-09-23 12:33:55 -0400 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-09-26 04:40:06 -0400 |
commit | 68c4fce737c4b963e336435f225621dc21138397 (patch) | |
tree | 4a651315ab08412d05490f66033ce738a8ac16e9 | |
parent | 4f20d9ebb9c2a6b5db3d187595cbf437ee81d135 (diff) |
vmwgfx: corruption in vmw_event_fence_action_create()
We don't allocate enough data for this struct. As soon as we start
modifying event->event on the next lines, then we're going beyond the
end of the memory we allocated.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@gmail.com>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c index f2fb8f15e2f..7e0743358df 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | |||
@@ -1018,7 +1018,7 @@ int vmw_event_fence_action_create(struct drm_file *file_priv, | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | 1020 | ||
1021 | event = kzalloc(sizeof(event->event), GFP_KERNEL); | 1021 | event = kzalloc(sizeof(*event), GFP_KERNEL); |
1022 | if (unlikely(event == NULL)) { | 1022 | if (unlikely(event == NULL)) { |
1023 | DRM_ERROR("Failed to allocate an event.\n"); | 1023 | DRM_ERROR("Failed to allocate an event.\n"); |
1024 | ret = -ENOMEM; | 1024 | ret = -ENOMEM; |