OpenBSD cvs log

created 2020-02-11T07:01:14Z
begin 2020-02-05T10:19:34Z
end 2020-02-05T10:21:17Z
path src/sys
commits 1

date 2020-02-05T10:21:17Z
author mpi
files src/sys/dev/ic/com.c log diff annotate
message Detach timeouts and the softint handler before freeing memory.

As more and more teardown functions include barriers, or any kind of
context change, it is unsafe to continue to assume that such code paths
are atomic. So a good practise is to only free descriptor when we're
sure that no other context can access them.

Found while looking at visa@'s ttkqflush() replacement diff. The same
pattern is present in many USB drivers as found with Peter Stuge.

ok visa@