ck_ring: ck_ring_valid should reject wrap-around.

awsm
Samy Al Bahra 5 years ago
parent 8959e94fb6
commit e5bd4c0309

@ -110,7 +110,7 @@ ck_ring_valid(const struct ck_ring *ring)
return false; return false;
/* The producer may only be up to size slots ahead of consumer. */ /* The producer may only be up to size slots ahead of consumer. */
if (p_head - c_head > size) if (p_head - c_head >= size)
return false; return false;
return true; return true;

Loading…
Cancel
Save