diff --git a/rust/kernel/drm/kms/vblank.rs b/rust/kernel/drm/kms/vblank.rs index a33db0f6cf70f289ba4f95228bd39444daf7566f..d8ac61a829c089e08e9feeadcd640cf7b26e2cb7 100644 --- a/rust/kernel/drm/kms/vblank.rs +++ b/rust/kernel/drm/kms/vblank.rs @@ -208,7 +208,8 @@ impl<T: VblankDriverCrtc> Crtc<T> { /// dropped. pub fn vblank_lock<'a>(&'a self, irq: IrqDisabled<'a>) -> VblankGuard<'a, T> { // SAFETY: `vbl_lock` is initialized for as long as `Crtc` is available to users - unsafe { bindings::spin_lock(&mut (*self.drm_dev().as_raw()).vbl_lock) }; + // INVARIANT: We just acquired `vbl_lock`, fulfilling the invariants of `VblankGuard` + unsafe { bindings::spin_lock(addr_of_mut!((*self.drm_dev().as_raw()).vbl_lock)) }; // SAFETY: We just acquired vbl_lock above unsafe { VblankGuard::new(self, irq) }