There's several incidents of "flights to nowhere", e.g. https://onemileatatime.com/klm-787-nine-hour-flight-to-nowhere/
After a pilot decides to turn back, how is this handled from a routing/flight plan/ATC perspective? I assume ATC needs a flight plan back to the airport; is this just generated "on the fly"? Who does this, ATC or the airline's dispatch?
I'm not talking about a diversion to the nearest airport but actually returning to the origin airport after the flight's been underway for a while. I assume this needs to be coordinated with all the FIRs/centers.