diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-01 22:20:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-01 22:20:11 -0400 |
commit | bde17b90dd9712cb61a7ab0c1ccd0f7f6aa57957 (patch) | |
tree | d4597bfde4f5d4a3a5729e5534c44993c6216352 /mm/dmapool.c | |
parent | 1bca1000fa71a1092947b4a51928abe80a3316d2 (diff) | |
parent | 676bd99178cd962ed24ffdad222b7069d330a969 (diff) | |
download | linux-bde17b90dd9712cb61a7ab0c1ccd0f7f6aa57957.tar.bz2 |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
"12 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
dmapool: fix overflow condition in pool_find_page()
thermal: avoid division by zero in power allocator
memcg: remove pcp_counter_lock
kprobes: use _do_fork() in samples to make them work again
drivers/input/joystick/Kconfig: zhenhua.c needs BITREVERSE
memcg: make mem_cgroup_read_stat() unsigned
memcg: fix dirty page migration
dax: fix NULL pointer in __dax_pmd_fault()
mm: hugetlbfs: skip shared VMAs when unmapping private pages to satisfy a fault
mm/slab: fix unexpected index mapping result of kmalloc_size(INDEX_NODE+1)
userfaultfd: remove kernel header include from uapi header
arch/x86/include/asm/efi.h: fix build failure
Diffstat (limited to 'mm/dmapool.c')
-rw-r--r-- | mm/dmapool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/dmapool.c b/mm/dmapool.c index 71a8998cd03a..312a716fa14c 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -394,7 +394,7 @@ static struct dma_page *pool_find_page(struct dma_pool *pool, dma_addr_t dma) list_for_each_entry(page, &pool->page_list, page_list) { if (dma < page->dma) continue; - if (dma < (page->dma + pool->allocation)) + if ((dma - page->dma) < pool->allocation) return page; } return NULL; |