mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 03:21:32 +00:00
1bf66a3042
When memory pinned with ib_umem_get() is released, ib_umem_release() needs to subtract the amount of memory being unpinned from mm->locked_vm. However, ib_umem_release() may be called with mm->mmap_sem already held for writing if the memory is being released as part of an munmap() call, so it is sometimes necessary to defer this accounting into a workqueue. However, the work struct used to defer this accounting is dynamically allocated before it is queued, so there is the possibility of failing that allocation. If the allocation fails, then ib_umem_release has no choice except to bail out and leave the process with a permanently elevated locked_vm. Fix this by allocating the structure to defer accounting as part of the original struct ib_umem, so there's no possibility of failing a later allocation if creating the struct ib_umem and pinning memory succeeds. Signed-off-by: Roland Dreier <rolandd@cisco.com> |
||
---|---|---|
.. | ||
ib_addr.h | ||
ib_cache.h | ||
ib_cm.h | ||
ib_fmr_pool.h | ||
ib_mad.h | ||
ib_marshall.h | ||
ib_pack.h | ||
ib_sa.h | ||
ib_smi.h | ||
ib_umem.h | ||
ib_user_cm.h | ||
ib_user_mad.h | ||
ib_user_sa.h | ||
ib_user_verbs.h | ||
ib_verbs.h | ||
iw_cm.h | ||
Kbuild | ||
rdma_cm_ib.h | ||
rdma_cm.h | ||
rdma_user_cm.h |