Why not move the assignment down, then? After we have successfully mapped all entries?
Just realized that moving assignment below the loop will open a race window. DT field is set inside the loop, and once it is set, completion interrupt becomes theoretically possible.
Furthermore, realized that existing code already has a race. Interrupt can happen after DT wield was updated but before cur is updated. Then, with the completion code won't check the entry (up to a new interrupt, that can theoretically not happen).
Will fix in the updated patches. Nikita