Skip to content

Commit 5e7aa41

Browse files
rxe: Fix double unlock in cq_ex polling
Fix a bug in rxe cq_ex polling where the cq lock is unlocked twice causing undefined behavior. According the man page, the user should call `cq_end_poll` even if `cq_next_poll` returns ENOENT. This fix removes the `pthread_spin_unlock` call in `cq_next_poll` so that it is correctly called only once in `cq_end_poll`. Fixes: e3af50b ("Provider/rxe: Implement Ibv_create_cq_ex verb") Signed-off-by: Justin Funston <[email protected]>
1 parent e586fcd commit 5e7aa41

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

providers/rxe/rxe.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ static int cq_next_poll(struct ibv_cq_ex *current)
266266

267267
if (next_index == load_producer_index(q)) {
268268
store_consumer_index(cq->queue, cq->cur_index);
269-
pthread_spin_unlock(&cq->lock);
270269
errno = ENOENT;
271270
return errno;
272271
}

0 commit comments

Comments
 (0)