On 2020-06-26 17:02, J. Bruce Fields wrote: > Unless I'm missing something--an upcall thread could still be using this > file descriptor. > > If we're particularly unlucky, we could do a new open in a moment and > reuse this file descriptor number, and then then writes in do_downcall() > could end up going to some other random file. > > I think we want these closes done by gssd_free_client() in the !refcnt > case? Makes sense. I was thinking more that it was an abort situation and we shouldn't be sending any data to the kernel but re-use is definitely a concern. I've split it so that we are removed from the event loop in destroy() but the close happens in free(). Doug