From: Steve Wise Date: Tue, 23 Apr 2013 16:17:14 +0000 (+0000) Subject: RDMA/iwcm: Don't touch cmid after dropping reference X-Git-Tag: v3.10-rc1~43^2^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e413a823f60b582af471f0079eb99f50d34b0da7;p=pandora-kernel.git RDMA/iwcm: Don't touch cmid after dropping reference The function cm_work_handler() cannot touch the cm_id after it derefs it, because it might be freed on another concurrent thread. If there are more work items queued for this cm_id, then we know there must be more references because they are added when the work items are queued. So in the while loop inside cm_work_handler(), after derefing, if the queue is empty, then exit the function. Otherwise we know it's safe to re-acquire the lock. Signed-off-by: Steve Wise Signed-off-by: Roland Dreier --- Reading git-diff-tree failed