When unloading the dummynet module, there is a slight chance that the dummynet timer might be restarted after the callout is drained. Add a drain variable and use an existing lock to ensure the dymmynet timer is not restarted after the teardown sequence is started.
Callout drain can sleep and must not be called locked.