On Thu, Jan 11, 2018 at 2:16 AM, Jason Wang <jasow...@redhat.com> wrote: > > It looks to me what is actual missed is the cleanups tun_detach_all(). For > me the only case that could leak is > > open > attach > ip link del link dev tap0 > close or another set_iff() > > So in this case, clean during close is not sufficient since it could be > attached to another device.
In this case, close() still calls tun_detach() with clean=true, so with my patch, the tx_array is still cleaned. What am I missing here? Are you implying clean=true is not sufficient?