aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@mellanox.com>2012-05-10 16:28:05 -0400
committerRoland Dreier <roland@purestorage.com>2012-05-11 14:38:22 -0400
commitc4870eb874ac16dccef40e1bc7a002c7e9156adc (patch)
tree111be5cae7c0180f6e15a06b83dca96da5155491 /drivers/infiniband
parentc3bccbfbb71f5e8a77129c7a069f5c5648cc9cf1 (diff)
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 <yishaih@mellanox.com> Reviewed-by: Christoph Lameter <cl@linux.com> Cc: <stable@vger.kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/umem.c2
1 files changed, 1 insertions, 1 deletions
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)
269 } else 269 } else
270 down_write(&mm->mmap_sem); 270 down_write(&mm->mmap_sem);
271 271
272 current->mm->locked_vm -= diff; 272 current->mm->pinned_vm -= diff;
273 up_write(&mm->mmap_sem); 273 up_write(&mm->mmap_sem);
274 mmput(mm); 274 mmput(mm);
275 kfree(umem); 275 kfree(umem);