[Slirp] Q
Samuel Thibault
samuel.thibault at ens-lyon.org
Mon May 16 23:00:48 UTC 2022
Michail T, le mar. 15 févr. 2022 22:01:24 +0200, a ecrit:
> I would like to ask if it would be possible that tftp_input() is called twice
> at the same time?
I'm not sure what you mean exactly.
Do you mean whether libslirp can happen to call tftp_input twice at
the same time? Or do you mean whether the tftp_input function is safe
against being called twice at the same time? It'd probably be good that
you explain your situation, otherwise we're probably in an XY problem.
Generally speaking, libslirp is thread-unsafe: there is global state in
the slirp variable and yet no single mention of thread calls. So it's
unsafe to call slirp_input several times concurrently for the same slirp
state. As for tftp's tftp_input, tftp_session_allocate clearly shows
that it's unsafe against concurrency.
Samuel
More information about the Slirp
mailing list