Skip to content

ARM64: sevl / wfe usage can hang indefinitely #53

@braindigitalis

Description

@braindigitalis

The lock loop does:

sevl
wfe
ldaxr

if locked: cbnz ... 1b → back to wfe

But there is no corresponding sev anywhere in spin_unlock(). If another CPU releases the lock without generating an event, a waiter may sit in wfe until some unrelated event occurs (timer tick, interrupt, other SEV somewhere), which is not guaranteed in all contexts (especially if interrupts are disabled, or in early boot, or in some low-noise situations).
This is a liveness bug: you can get “lock released but nobody wakes”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions