Skip to content

libbladeRF: unlock the device mutex on the 8-bit format error path - #1073

Open
wormuz wants to merge 1 commit into
Nuand:masterfrom
wormuz:fix/mutex-leak-8bit
Open

libbladeRF: unlock the device mutex on the 8-bit format error path#1073
wormuz wants to merge 1 commit into
Nuand:masterfrom
wormuz:fix/mutex-leak-8bit

Conversation

@wormuz

@wormuz wormuz commented Aug 18, 2026

Copy link
Copy Markdown

bladerf_sync_config() and bladerf_init_stream() take dev->lock, then return BLADERF_ERR_UNSUPPORTED without releasing it when an SC8_Q7 format is requested on a bladeRF1.

The device is left locked, so every subsequent API call on that handle blocks forever. The caller sees a hang rather than the error that was actually returned.

Both call sites are in bladerf.c; the fix adds the missing MUTEX_UNLOCK before each early return.

Found while auditing the 2.6.0 changes against a bladeRF 2.0 micro xA4.

@CLAassistant

CLAassistant commented Aug 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

bladerf_sync_config() and bladerf_init_stream() take dev->lock, then
return BLADERF_ERR_UNSUPPORTED without releasing it when an SC8_Q7 format
is requested on a bladeRF1.

The device is left locked, so every subsequent API call on that handle
blocks forever. The caller sees a hang rather than the error that was
actually returned.

Found while auditing 2.6.0 changes; both call sites are in bladerf.c.
@bekkah1

bekkah1 commented Aug 18, 2026 via email

Copy link
Copy Markdown

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