IB/rdmavt: Only put mmap_info ref if it exists
rvt_create_qp() creates qp->ip only when a qp creation request comes from userspace (udata is not NULL). If we exceed the number of available queue pairs however, the error path always attempts to put a kref to this structure. If the requestor is inside the kernel, this leads to a crash. We fix this by checking that qp->ip is not NULL before caling kref_put(). Signed-off-by: NJim Foraker <foraker1@llnl.gov> Acked-by: NDennis Dalessandro <dennis.dalessandro@intel.com> Acked-by: NJonathan Toppins <jtoppins@redhat.com> Acked-by: NAlex Estrin <alex.estrin@intel.com> Signed-off-by: NDoug Ledford <dledford@redhat.com>
Showing
想要评论请 注册 或 登录