Skip to content

Fix: Guard st22p_rx_get_frame block wait with pending flag - #1690

Open
awilczyns wants to merge 1 commit into
mainfrom
fix/coverity-560632-st22p-rx-block-wait
Open

Fix: Guard st22p_rx_get_frame block wait with pending flag#1690
awilczyns wants to merge 1 commit into
mainfrom
fix/coverity-560632-st22p-rx-block-wait

Conversation

@awilczyns

Copy link
Copy Markdown
Collaborator

Coverity CID 560632 (BAD_CHECK_OF_WAIT_COND): the block-mode wait in st22p_rx_get_frame used a bare if-guarded single
mt_pthread_cond_timedwait_ns. A spurious wakeup, or a wake-then-lose-CAS race under contention, returned NULL immediately instead of waiting up to block_timeout_ns as documented for ST22P_RX_FLAG_BLOCK_GET. Adopt the block_wake_pending predicate-loop pattern already used by st20/30/40 pipeline RX and st22 pipeline TX.

Coverity CID 560632 (BAD_CHECK_OF_WAIT_COND): the block-mode wait in
st22p_rx_get_frame used a bare if-guarded single
mt_pthread_cond_timedwait_ns. A spurious wakeup, or a
wake-then-lose-CAS race under contention, returned NULL immediately
instead of waiting up to block_timeout_ns as documented for
ST22P_RX_FLAG_BLOCK_GET. Adopt the block_wake_pending predicate-loop
pattern already used by st20/30/40 pipeline RX and st22 pipeline TX.

Signed-off-by: Wilczynski, Andrzej <andrzej.wilczynski@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant