Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Jaswinder Singh Rajput <jaswinderlinux@gmail.com>
Tested-by: Jaswinder Singh Rajput <jaswinderlinux@gmail.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
788885ae 06efbeb4

+6 -2
+6 -2
drivers/gpu/drm/i915/i915_irq.c
··· 456 456 457 457 for (page = 0; page < page_count; page++) { 458 458 void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC); 459 + unsigned long flags; 460 + 459 461 if (d == NULL) 460 462 goto unwind; 461 - s = kmap_atomic(src_priv->pages[page], KM_USER0); 463 + local_irq_save(flags); 464 + s = kmap_atomic(src_priv->pages[page], KM_IRQ0); 462 465 memcpy(d, s, PAGE_SIZE); 463 - kunmap_atomic(s, KM_USER0); 466 + kunmap_atomic(s, KM_IRQ0); 467 + local_irq_restore(flags); 464 468 dst->pages[page] = d; 465 469 } 466 470 dst->page_count = page_count;