Files
linux/rust/kernel
Danilo Krummrich 2b55b5be1d rust: device: fix device context of Device::parent()
commit cfec502b3d upstream.

Regardless of the DeviceContext of a device, we can't give any
guarantees about the DeviceContext of its parent device.

This is very subtle, since it's only caused by a simple typo, i.e.

	 Self::from_raw(parent)

which preserves the DeviceContext in this case, vs.

	 Device::from_raw(parent)

which discards the DeviceContext.

(I should have noticed it doing the correct thing in auxiliary::Device
subsequently, but somehow missed it.)

Hence, fix both Device::parent() and auxiliary::Device::parent().

Cc: stable@vger.kernel.org
Fixes: a4c9f71e34 ("rust: device: implement Device::parent()")
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-29 14:10:22 +01:00
..
2025-10-12 13:01:55 +02:00
2025-10-12 13:01:55 +02:00
2025-06-22 23:09:32 +02:00
2025-08-27 22:45:41 -07:00
2025-07-23 02:05:58 +02:00
2025-07-23 02:05:58 +02:00
2025-10-23 16:24:38 +02:00
2025-08-13 17:40:28 +02:00
2025-07-21 01:16:35 +02:00
2025-07-19 23:18:18 +02:00
2024-10-08 15:44:36 +02:00
2025-07-21 01:16:35 +02:00
2024-11-04 16:21:44 -05:00