Commit 788885ae authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

drivers/gpu/drm/i915/i915_irq.c:i915_error_object_create(): use correct kmap-atomic slot

i915_error_object_create() is called from the timer interrupt and hence
can corrupt the KM_USER0 slot.  Use KM_IRQ0 instead.
Reported-by: default avatarJaswinder Singh Rajput <>
Tested-by: default avatarJaswinder Singh Rajput <>
Acked-by: default avatarChris Wilson <>
Cc: Dave Airlie <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 06efbeb4
......@@ -456,11 +456,15 @@ i915_error_object_create(struct drm_device *dev,
for (page = 0; page < page_count; page++) {
void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
unsigned long flags;
if (d == NULL)
goto unwind;
s = kmap_atomic(src_priv->pages[page], KM_USER0);
s = kmap_atomic(src_priv->pages[page], KM_IRQ0);
memcpy(d, s, PAGE_SIZE);
kunmap_atomic(s, KM_USER0);
kunmap_atomic(s, KM_IRQ0);
dst->pages[page] = d;
dst->page_count = page_count;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment