Revision 4fabb59449aa44a585b3603ffdadd4c5f4d0c033 authored by Wengang Wang on 06 July 2015, 06:35:11 UTC, committed by Doug Ledford on 14 July 2015, 17:20:11 UTC
Fixes: 3e0249f9c05c ("RDS/IB: add refcount tracking to struct rds_ib_device")

There lacks a dropping on rds_ib_device.refcount in case rds_ib_alloc_fmr
failed(mr pool running out). this lead to the refcount overflow.

A complain in line 117(see following) is seen. From vmcore:
s_ib_rdma_mr_pool_depleted is 2147485544 and rds_ibdev->refcount is -2147475448.
That is the evidence the mr pool is used up. so rds_ib_alloc_fmr is very likely
to return ERR_PTR(-EAGAIN).

115 void rds_ib_dev_put(struct rds_ib_device *rds_ibdev)
116 {
117         BUG_ON(atomic_read(&rds_ibdev->refcount) <= 0);
118         if (atomic_dec_and_test(&rds_ibdev->refcount))
119                 queue_work(rds_wq, &rds_ibdev->free_work);
120 }

fix is to drop refcount when rds_ib_alloc_fmr failed.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 0a69127
History
File Mode Size
arm
Kconfig -rw-r--r-- 734 bytes
async_pf.c -rw-r--r-- 5.4 KB
async_pf.h -rw-r--r-- 1.1 KB
coalesced_mmio.c -rw-r--r-- 4.1 KB
coalesced_mmio.h -rw-r--r-- 875 bytes
eventfd.c -rw-r--r-- 22.3 KB
irqchip.c -rw-r--r-- 5.8 KB
kvm_main.c -rw-r--r-- 81.5 KB
vfio.c -rw-r--r-- 6.0 KB
vfio.h -rw-r--r-- 250 bytes

back to top