Re: [PATCH] fix race condition in libpq (related to ssl connections) - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] fix race condition in libpq (related to ssl connections)
Date
Msg-id ZWQHEdF1_NOI4jOS@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] fix race condition in libpq (related to ssl connections)  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Fri, Nov 24, 2023 at 04:48:58PM +0900, Michael Paquier wrote:
> I've looked at this idea, and finished by being unhappy with the error
> handling that we are currently assuming in my_SSL_set_fd() in the
> event of an error in the bio method setup, which would be most likely
> an OOM, so let's use ssl_config_mutex in my_BIO_s_socket().  Another
> thing is that I have minimized the manipulation of my_bio_methods in
> the setup routine.

I've spent more time on that today, and the patch I've posted on
Friday had a small mistake in the non-HAVE_BIO_METH_NEW path when
saving the BIO_METHODs causing the SSL tests to fail with older
OpenSSL versions.  I've fixed that and the patch was straight-forward,
so applied it down to v12.  I didn't use Willi's patch at the end,
still credited him as author as his original patch is rather close to
the result committed and it feels that he has spent a good deal of
time on this issue.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: initdb --no-locale=C doesn't work as specified when the environment is not C
Next
From: Tom Lane
Date:
Subject: Re: New instability in stats regression test