diff options
| author | Eliot Courtney <ecourtney@nvidia.com> | 2026-05-01 13:49:37 +0300 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-05-03 15:04:57 +0300 |
| commit | 0a69ac25bd596d50823d530d0a2004336668c0df (patch) | |
| tree | f159d80830e53de47426adc6a7b80b5e839bdd34 /scripts/basic | |
| parent | 2e42a17b8f6bc3c0cd69d7556b588011d3ec2394 (diff) | |
| download | linux-0a69ac25bd596d50823d530d0a2004336668c0df.tar.xz | |
rust: drm: fix unsound initialization in drm::Device::new
If pinned initialization of drm::Device::Data fails, it calls
drm::Device::release via drm_dev_put. This materializes a reference to
&drm::Device, but it's not fully constructed yet, because initializing
`data` failed. It should not be dropped either. Instead, if pinned
initialization fails, make sure drm::Device::release isn't called.
Fixes: 2e9fdbe5ec7a ("rust: drm: device: drop_in_place() the drm::Device in release()")
Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260501-fix-drm-1-v2-1-5c4f681837bc@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
