On 10/04/2014 02:56, Devesh Sharma wrote:
If the rdma_create_qp fails to create qp due to device firmware being in invalid state
xprtrdma still tries to destroy the non-existant qp and ends up in a NULL pointer reference
crash.
Adding proper checks for vaidating QP pointer avoids this to happen.
V0: Using IS_ERR() to check validity of qp pointer.
V1: Use of IS_ERR() will not be able to catch NULL QP pointers as rdma_create_qp() returnes NULL in case
ib_create_qp verb is failed. Therefore, changed from usage of IS_ERR to null pointer check.
V2: ib_post_send() should not abort after DECR_CQCOUNT() checking for NULL pointer was causing exit from functions
after decrementing CQCOUNT(). Fixed this in V2.
Signed-off-by: Devesh Sharma<devesh.sharma@xxxxxxxxxx>
---
net/sunrpc/xprtrdma/verbs.c | 92 ++++++++++++++++++++++++++-----------------
1 files changed, 56 insertions(+), 36 deletions(-)
The V0/V1/V2/etc history should be below the "---" such that it's
stripped out by git am when the maintain picks the patch
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html