[ 21/91] IB/core: Fix mismatch between locked and pinned pages
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2012-05-27 01:33:02
Also in:
lkml
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2012-05-27 01:33:02
Also in:
lkml
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <redacted>
commit c4870eb874ac16dccef40e1bc7a002c7e9156adc upstream.
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 <redacted>
Reviewed-by: Christoph Lameter <redacted>
Signed-off-by: Roland Dreier <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/core/umem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c@@ -269,7 +269,7 @@ void ib_umem_release(struct ib_umem *ume } 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);