Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 2021 17:14:27 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 0f9544d03e89 - main - iflib: Fix detach of pseudo interfaces
Message-ID:  <YDA4Q%2B9emx5wfcbn@nuc>
In-Reply-To: <202102192211.11JMBVWh076169@gitrepo.freebsd.org>
References:  <202102192211.11JMBVWh076169@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 19, 2021 at 10:11:31PM +0000, Mark Johnston wrote:
> The branch main has been updated by markj:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=0f9544d03e89d180f94a7a84b110ec7d2b6c625a
> 
> commit 0f9544d03e89d180f94a7a84b110ec7d2b6c625a
> Author:     Mark Johnston <markj@FreeBSD.org>
> AuthorDate: 2021-02-19 22:08:34 +0000
> Commit:     Mark Johnston <markj@FreeBSD.org>
> CommitDate: 2021-02-19 22:10:41 +0000
> 
>     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,

Sorry, missing context.  A device is instantiated for each pseudo
interface, I believe just to satisfy iflib's internal interfaces.

>     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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YDA4Q%2B9emx5wfcbn>