block: rust: fix Send bound for GenDisk#952
Conversation
|
Upstream branch: 9716c08 |
c3a084b to
5f78e5d
Compare
|
Upstream branch: 2a2974b |
789ce38 to
a634efa
Compare
5f78e5d to
e48f9db
Compare
|
Upstream branch: 062871f |
a634efa to
ef83346
Compare
199644a to
e6d9eb8
Compare
|
Upstream branch: 66affa3 |
ef83346 to
a9662f2
Compare
e6d9eb8 to
7d8604f
Compare
|
Upstream branch: bade58e |
a9662f2 to
8d5e586
Compare
7d8604f to
4cc45a3
Compare
|
Upstream branch: 4edcdef |
8d5e586 to
0ebeb33
Compare
4cc45a3 to
90ffd56
Compare
|
Upstream branch: dc59e4f |
0ebeb33 to
c1c5e35
Compare
90ffd56 to
d52f35a
Compare
|
Upstream branch: 87320be |
c1c5e35 to
bf0c89a
Compare
d52f35a to
a644c13
Compare
The `Send` implementation for `GenDisk<T>` was conditioned on `T: Send`. This constrains the wrong type. `T` is the `Operations` implementation, which is typically a zero-sized marker type that carries no data, so `T: Send` says nothing about whether the data a `GenDisk` actually owns can be moved to another thread. A `GenDisk<T>` owns the queue data `T::QueueData` (stored as the `gendisk`'s `queuedata` and dropped when the `GenDisk` is dropped) and an `Arc<TagSet<T>>`. These are the values transferred when a `GenDisk` is sent across a thread boundary, so the `Send` bound must constrain exactly them. Bound `T::QueueData: Send` and `Arc<TagSet<T>>: Send` instead. Fixes: 3253aba ("rust: block: introduce `kernel::block::mq` module") Reported-by: Priya Bala Govindasamy <pgovind2@uci.edu> Reported-by: Dylan Zueck <dzueck@uci.edu> Suggested-by: Andreas Hindborg <a.hindborg@kernel.org> Signed-off-by: Yuan Tan <ytan089@ucr.edu>
|
Upstream branch: 8cdeaa5 |
bf0c89a to
2c10400
Compare
a644c13 to
a2204c3
Compare
Pull request for series with
subject: block: rust: fix
Sendbound forGenDiskversion: 3
url: https://patchwork.kernel.org/project/linux-block/list/?series=1109585