diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2019-05-08 10:42:05 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2019-05-08 10:42:05 +0000 |
commit | cb678cb9112fb718ecbc3ab463f2981595960925 (patch) | |
tree | affa195c681513b8a5c505ebc225c6e581cc076d /sys | |
parent | 8b1b42c150546de1b0709fd27ca89a0a0230fd48 (diff) | |
download | src-cb678cb9112fb718ecbc3ab463f2981595960925.tar.gz src-cb678cb9112fb718ecbc3ab463f2981595960925.zip |
Fix endless loop in ipoib_poll().
ib_req_notify_cq may return negative value which will indicate a
failure. In the case of uncorrectable error, we will end up in an
endless loop. Fix that, by going to another loop with poll_more
only if there is anything left to poll.
Submitted by: slavash@
MFC after: 3 days
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=347278
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c index f3b13d8c1c51..e38b450eb0b2 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -409,7 +409,7 @@ poll_more: spin_unlock(&priv->drain_lock); if (ib_req_notify_cq(priv->recv_cq, - IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS)) + IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS) > 0) goto poll_more; } |