Skip to content
Commit 22dccc54 authored by Jim Foraker's avatar Jim Foraker Committed by Doug Ledford
Browse files

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: default avatarJim Foraker <foraker1@llnl.gov>
Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Acked-by: default avatarJonathan Toppins <jtoppins@redhat.com>
Acked-by: default avatarAlex Estrin <alex.estrin@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent f5eabf5e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment