forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 487
Current use of pin is unsound #286
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomersunsoundThe possibility of UB in safe code.The possibility of UB in safe code.• driversRelated to the example drivers in `drivers/`.Related to the example drivers in `drivers/`.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersunsoundThe possibility of UB in safe code.The possibility of UB in safe code.• driversRelated to the example drivers in `drivers/`.Related to the example drivers in `drivers/`.
In rust_miscdev, this would compile:
but this swaps two pinned
CondVar, which is unsound. After pinning theCondVar, we shouldn't be able to obtain anyArc<SharedState>, but rather onlyPin<Arc<SharedState>>.