"state" is smaller than "kernel_state" so we end up corrupting memory.
Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
unsigned long irqflags;
unsigned int i, unref_list_count;
- kernel_state = kcalloc(1, sizeof(*state), GFP_KERNEL);
+ kernel_state = kcalloc(1, sizeof(*kernel_state), GFP_KERNEL);
if (!kernel_state)
return;