From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: [PATCH for-next 2/6] IB/core: fix mismatch between locked and pinned pages Date: Thu, 10 May 2012 23:28:05 +0300 Message-ID: <1336681689-16668-3-git-send-email-ogerlitz@mellanox.com> References: <1336681689-16668-1-git-send-email-ogerlitz@mellanox.com> Return-path: In-Reply-To: <1336681689-16668-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Yishai Hadas , Christoph Lameter List-Id: linux-rdma@vger.kernel.org From: Yishai Hadas Commit bc3e53f68 "mm: distinguish between mlocked and pinned pages" introduced a separate counter for pinned pages and used it over the IB stack. Specifically, in ib_umem_get the pinned counter is incremented, but ib_umem_release wrongly decrements the locked counter, fix that. Cc: Christoph Lameter Signed-off-by: Yishai Hadas --- drivers/infiniband/core/umem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 71f0c0f..a841123 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); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html