On Thu, Oct 06, 2022 at 02:21:51PM -0400, Rich Felker wrote: > On Thu, Oct 06, 2022 at 09:37:50AM +0300, Alexey Izbyshev wrote: > > Hi, > > > > I noticed that fork() doesn't take key_lock that is used to protect > > the global table of thread-specific keys. I couldn't find mentions > > of this lock in the MT fork discussion in the mailing list archive. > > Was this lock overlooked? > > I think what happened was that we made the main list of locks to > review and take care of via grep for LOCK, and then manually added > known instances of locks using other locking primitives. This one must > have been missed. > > Having special-case lock types like this is kinda a pain, but as long > as there aren't too many I guess it's not a big deal. Proposed patch attached.