diff options
author | Mark Johnston <markj@FreeBSD.org> | 2021-02-19 22:08:34 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2021-02-19 22:10:41 +0000 |
commit | 0f9544d03e89d180f94a7a84b110ec7d2b6c625a (patch) | |
tree | 2109e8fac778f694c97964ef8612dedc2feb2f80 /usr.bin/setchannel | |
parent | d2b3fadf2db56131376a71b0597876b591a6aee4 (diff) | |
download | src-0f9544d03e89d180f94a7a84b110ec7d2b6c625a.tar.gz src-0f9544d03e89d180f94a7a84b110ec7d2b6c625a.zip |
iflib: Fix detach of pseudo interfaces
In commit 38bfc6dee33b we added an IFDI_DETACH() call to
iflib_pseudo_deregister() since it looked like it was missing. One is
present in the error-handling path of iflib_pseudo_register(). However,
the detach actually comes from the DEVICE_DETACH() method for the
above-mentioned device_t, so now we're calling IFDI_DETACH() twice when
destroying a pseudo interface.
Fix the problem by not calling IFDI_DETACH() from the device detach
routine. This way we can ensure that iflib de-initialization always
happens in a consistent order. It also ensures that you can't do silly
things like "devctl detach <pseudo ifnet>", which would previously
detach the driver without tearing down the corresponding ifnet.
PR: 253541
Reviewed by: erj
MFC after: 1 week
Fixes: 38bfc6dee33b
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28774
Diffstat (limited to 'usr.bin/setchannel')
0 files changed, 0 insertions, 0 deletions