Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Oct 2022 21:36:16 -0400
From: Rich Felker <>
Subject: Re: MT fork and key_lock in pthread_key_create.c

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.

View attachment "pthread_key_fork.diff" of type "text/plain" (2005 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.