]> git.openfabrics.org - ~shefty/librdmacm.git/commit
rdma_cm: Detect recursive calls to rdma_seterrno()
authorSean Hefty <sean.hefty@intel.com>
Sat, 13 Apr 2013 20:18:07 +0000 (13:18 -0700)
committerSean Hefty <sean.hefty@intel.com>
Sat, 13 Apr 2013 20:18:07 +0000 (13:18 -0700)
commit47eb0c419687c2690292c1910acae83a46e5388c
tree4f3a388da1a77b8f0e2ff2459b2b2b48f8c3aa0e
parente57928b701ded6c5417b5ac0c153a239bf947612
rdma_cm: Detect recursive calls to rdma_seterrno()

If rdma_seterrno() is called in a recursive fashion, the
result is that errno ends up set to -1.  We can avoid this
by only setting errno if the return value is > 0.

Problem reported by hookenz@gmail.com.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
include/rdma/rdma_verbs.h