From: Yishai Hadas Date: Thu, 10 May 2012 20:28:05 +0000 (+0300) Subject: IB/core: Fix mismatch between locked and pinned pages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c4870eb874ac16dccef40e1bc7a002c7e9156adc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git IB/core: Fix mismatch between locked and pinned pages Commit bc3e53f682d9 ("mm: distinguish between mlocked and pinned pages") introduced a separate counter for pinned pages and used it in the IB stack. However, in ib_umem_get() the pinned counter is incremented, but ib_umem_release() wrongly decrements the locked counter. Fix this. Signed-off-by: Yishai Hadas Reviewed-by: Christoph Lameter Cc: Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 71f0c0f7df94..a84112322071 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -269,7 +269,7 @@ void ib_umem_release(struct ib_umem *umem) } else down_write(&mm->mmap_sem); - current->mm->locked_vm -= diff; + current->mm->pinned_vm -= diff; up_write(&mm->mmap_sem); mmput(mm); kfree(umem);