Jakub Sitnicki wrote: > Sockets cloned from the listening sockets that belongs to a SOCKMAP must > not inherit the psock state. Otherwise child sockets unintentionally share > the SOCKMAP entry with the listening socket, which would lead to > use-after-free bugs. > > Restore the child socket psock state and its callbacks at the earliest > possible moment, that is right after the child socket gets created. This > ensures that neither children that get accept()'ed, nor those that are left > in accept queue and will get orphaned, don't inadvertently inherit parent's > psock. > > Signed-off-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx> > --- Acked-by: John Fastabend <john.fastabend@xxxxxxxxx>