File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,6 +231,8 @@ struct StepContext {
231231 prev_va : Option < Pin < KBox < gpuvm:: GpuVa < VmInner > > > > ,
232232 next_va : Option < Pin < KBox < gpuvm:: GpuVa < VmInner > > > > ,
233233 vm_bo : Option < ARef < gpuvm:: GpuVmBo < VmInner > > > ,
234+ prev_vm_bo_1 : Option < ARef < gpuvm:: GpuVmBo < VmInner > > > ,
235+ prev_vm_bo_2 : Option < ARef < gpuvm:: GpuVmBo < VmInner > > > ,
234236 prot : u32 ,
235237}
236238
@@ -412,6 +414,17 @@ impl gpuvm::DriverGpuVm for VmInner {
412414 }
413415 }
414416
417+ if ctx. prev_vm_bo_1 . is_none ( ) {
418+ assert ! ( ctx. prev_vm_bo_1. replace( vm_bo) . is_none( ) ) ;
419+ } else if ctx. prev_vm_bo_2 . is_none ( ) {
420+ assert ! ( ctx. prev_vm_bo_2. replace( vm_bo) . is_none( ) ) ;
421+ } else {
422+ dev_crit ! (
423+ self . dev. as_ref( ) ,
424+ "step_remap: too many remap ops, deadlock expected"
425+ ) ;
426+ }
427+
415428 Ok ( ( ) )
416429 }
417430}
You can’t perform that action at this time.
0 commit comments