[patch] Fix for bz22161: ncsd: avoid dangling lock in netgroup cache timeout code
Andreas Schwab
schwab@suse.de
Thu Sep 21 07:08:00 GMT 2017
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."
More information about the Libc-alpha
mailing list