linux/include
Danilo Krummrich be31fcf5af rust: driver core: drop drvdata before devres release
Move the post_unbind_rust callback before devres_release_all() in
device_unbind_cleanup().

With drvdata() removed, the driver's bus device private data is only
accessible by the owning driver itself. It is hence safe to drop the
driver's bus device private data before devres actions are released.

This reordering is the key enabler for Higher-Ranked Lifetime Types
(HRT) in Rust device drivers -- it allows driver structs to hold direct
references to devres-managed resources, because the bus device private
data (and with it all such references) is guaranteed to be dropped while
the underlying devres resources are still alive.

Without this change, devres resources would be freed first, leaving the
driver's bus device private data with dangling references during its
destructor.

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260525202921.124698-6-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
History 2026-05-27 16:22:41 +02:00
..
acpi Power management updates for 7.1-rc1 2026-04-13 19:47:52 -07:00
asm-generic hyperv-next for v7.1 2026-04-22 09:50:46 -07:00
clocksource clocksource/drivers/arm_arch_timer_mmio: Switch over to standalone driver 2025-09-23 12:31:50 +02:00
crypto This update includes the following changes: 2026-04-15 15:22:26 -07:00
cxl cxl: export internal structs for external Type2 drivers 2026-03-16 16:24:29 -07:00
drm Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07:00
dt-bindings We've finally gotten rid of the struct clk_ops::round_rate() code after months 2026-04-21 08:33:26 -07:00
hyperv x86/hyperv: Skip LP/VP creation on kexec 2026-04-22 06:23:25 +00:00
keys keys/trusted_keys: establish PKWM as a trusted source 2026-01-30 09:27:26 +05:30
kunit kunit: irq: Ensure timer doesn't fire too frequently 2026-02-24 14:44:21 -08:00
kvm KVM: arm64: Kill arch_timer_context::direct field 2026-04-01 15:42:26 +01:00
linux rust: driver core: drop drvdata before devres release 2026-05-27 16:22:41 +02:00
math-emu powerpc/math-emu: Remove -w build flag and fix warnings 2022-09-05 17:28:25 +10:00
media media: subdev: Split v4l2_subdev_get_frame_desc_passthrough() into locked and unlocked 2026-03-24 11:58:02 +01:00
memory memory: renesas-rpc-if: Add RZ/G3E xSPI support 2025-05-01 12:22:25 +02:00
misc cxl: Remove driver 2025-03-16 22:04:27 +11:00
net - 9p access flag fix (cannot change access flag since new mount API implem) 2026-04-24 13:37:26 -07:00
pcmcia pcmcia: remove PCCARD_IODYN 2025-08-16 15:37:47 +02:00
ras PCI/AER: Report CXL or PCIe bus type in AER trace logging 2026-01-22 15:07:04 -07:00
rdma RDMA/umem: Use consistent DMA attributes when unmapping entries 2026-03-30 13:47:45 -04:00
rv rv: Add support for per-object monitors in DA/HA 2026-03-31 16:47:17 +02:00
scsi scsi: libsas: Delete unused to_dom_device() and to_dev_attr() 2026-04-08 21:55:51 -04:00
soc firmware: tegra: Changes for v7.1-rc1 2026-04-02 23:13:02 +02:00
sound ASoC: Fixes for v7.1 2026-04-23 09:34:28 +02:00
target scsi: target: Add support for completing commands from backend context 2026-02-28 21:04:02 -05:00
trace NFS client updates for Linux 7.1 2026-04-24 14:20:03 -07:00
uapi Delete some obsolete networking code 2026-04-24 09:41:58 -07:00
ufs Merge patch series "scsi: ufs: Add TX Equalization support for UFS 5.0" 2026-03-27 17:21:28 -04:00
vdso vdso/datapage: Trim down unnecessary includes 2026-03-11 15:22:39 +01:00
video Merge drm/drm-next into drm-intel-next 2026-02-25 13:23:04 +02:00
xen xen/grant-table: guard gnttab_suspend/resume with CONFIG_HIBERNATE_CALLBACKS 2026-04-10 11:07:21 +02:00
Kbuild drm: ensure drm headers are self-contained and pass kernel-doc 2025-02-12 10:44:43 +02:00