Skip to content

fix: correct conditional rwlock acquisition results - #1346

Open
bgly wants to merge 1 commit into
NVIDIA:mainfrom
bgly:BLy/fix-conditional-rwlock-results
Open

bgly wants to merge 1 commit into
NVIDIA:mainfrom
bgly:BLy/fix-conditional-rwlock-results

Conversation

@bgly

@bgly bgly commented Sep 9, 2026

Copy link
Copy Markdown

Linux documents down_read_trylock() and down_write_trylock() as returning 1 on successful acquisition and 0 on contention.

Negate both checks so the conditional rwlock wrappers return NV_ERR_TIMEOUT_RETRY only when acquisition fails, and NV_OK when it succeeds.

down_read_trylock() and down_write_trylock() return nonzero on successful acquisition and zero on failure.

Negate both checks so the conditional rwlock wrappers return NV_ERR_TIMEOUT_RETRY only when acquisition fails, and NV_OK when it succeeds.

Signed-off-by: Bryant Ly <bly@coreweave.com>
@CLAassistant

CLAassistant commented Sep 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@aaronp24

aaronp24 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Thanks for reporting this. It looks like this was already fixed internally and the fix will be in a future release.

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.

3 participants