There's no good justification to permanently hang a thread until the
tunnel can be destroyed. Make it interruptible so that the admin can
^C it and remedy the situation if something erroneously has the tunnel
open, rather than forcing them to open another shell to resolve it.
Details
- Reviewers
- None
- Group Reviewers
network
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 56418 Build 53306: arc lint + arc unit
Event Timeline
Shall we firstly signal the application that the tuntap device is going to be shutdown and destroyed and secondly poll the status of tun_busy ?
Or just return EBUSY if applications can decline interface destroying ?
(Sorry, I just realized I forgot about this review entirely)
I'm not sure what that would look like, exactly.
Or just return EBUSY if applications can decline interface destroying ?
I think that's probably fine (in the may_intr case, since the !may_intr case is usually "we're evacuaating the vnet"), but I'd prefer to do as a follow-up so that we're not changing the semantics that much in a minor release (where-as, we can kinda fix the current situation a little bit)
Use a loop, set error before (it'll either get clobbered or remain untouched),
and just consistently keep it locked leaving the loop.