File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,6 +228,8 @@ struct StepContext {
228228 prev_va : Option < Pin < KBox < gpuvm:: GpuVa < VmInner > > > > ,
229229 next_va : Option < Pin < KBox < gpuvm:: GpuVa < VmInner > > > > ,
230230 vm_bo : Option < ARef < gpuvm:: GpuVmBo < VmInner > > > ,
231+ prev_vm_bo_1 : Option < ARef < gpuvm:: GpuVmBo < VmInner > > > ,
232+ prev_vm_bo_2 : Option < ARef < gpuvm:: GpuVmBo < VmInner > > > ,
231233 prot : u32 ,
232234}
233235
@@ -408,6 +410,17 @@ impl gpuvm::DriverGpuVm for VmInner {
408410 }
409411 }
410412
413+ if ctx. prev_vm_bo_1 . is_none ( ) {
414+ assert ! ( ctx. prev_vm_bo_1. replace( vm_bo) . is_none( ) ) ;
415+ } else if ctx. prev_vm_bo_2 . is_none ( ) {
416+ assert ! ( ctx. prev_vm_bo_2. replace( vm_bo) . is_none( ) ) ;
417+ } else {
418+ dev_crit ! (
419+ self . dev. as_ref( ) ,
420+ "step_remap: too many remap ops, deadlock expected"
421+ ) ;
422+ }
423+
411424 Ok ( ( ) )
412425 }
413426}
You can’t perform that action at this time.
0 commit comments