This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix for bz22161: ncsd: avoid dangling lock in netgroup cache timeout code


On Sep 20 2017, DJ Delorie <dj@redhat.com> wrote:

> Patch for https://sourceware.org/bugzilla/show_bug.cgi?id=22161
>
>  "From the bz: in nscd/netgroupcache.c in addinnetgrX() we call
>   mempool_alloc(..., 1) which takes a lock on the database.  If we
>   exit via the "bump timeout" clause, the lock is not released."
>
> This patch adds an unlock if mempool_alloc actually took a lock, in
> the case where we return early because the timeout hasn't timed out.

What about the uses of mempool_alloc in the other *cache.c
implementations.  Are they ok?

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]