]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: dma: Don't crash on memory in the vmalloc range
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 15 May 2015 07:09:54 +0000 (16:09 +0900)
committerDave Airlie <airlied@redhat.com>
Tue, 2 Jun 2015 07:24:49 +0000 (17:24 +1000)
commit5a97129ca731182ab73ddaf3cd8503eaeca71df3
tree285da60c759743991f5727d8e1a4fd4754482111
parentb442cb5402d7307b8b8078bf566d4c1388dbd909
drm/ttm: dma: Don't crash on memory in the vmalloc range

dma_alloc_coherent() can return memory in the vmalloc range.
virt_to_page() cannot handle such addresses and crashes. This
patch detects such cases and obtains the struct page * using
vmalloc_to_page() instead.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c