From 8c3bb749b2d4562e96ee724d712ae28df7bcc641 Mon Sep 17 00:00:00 2001 From: chengyechun Date: Tue, 30 Nov 2021 15:16:16 +0800 Subject: [PATCH] nss make sure startp initialized do first --- ...ake-sure-startp_initialized-do-first.patch | 26 +++++++++++++++++++ glibc.spec | 6 ++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 backport-nss-make-sure-startp_initialized-do-first.patch diff --git a/backport-nss-make-sure-startp_initialized-do-first.patch b/backport-nss-make-sure-startp_initialized-do-first.patch new file mode 100644 index 0000000..0c28fd2 --- /dev/null +++ b/backport-nss-make-sure-startp_initialized-do-first.patch @@ -0,0 +1,26 @@ +From 9d99c240898d67e7942a9dc0b9967419118a6407 Mon Sep 17 00:00:00 2001 +From: chengyechun +Date: Sat, 27 Nov 2021 10:04:03 +0800 +Subject: [PATCH] backport-nss-make-sure-startp_initialized-do-first + +The function atomic_read_barrier is added for preventing coredump when the script frequently invokes +the getpwnam_r function. +--- + nss/getXXbyYY_r.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c +index 5ebf36c..21b0d98 100644 +--- a/nss/getXXbyYY_r.c ++++ b/nss/getXXbyYY_r.c +@@ -297,6 +297,7 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer, + } + else + { ++ atomic_read_barrier(); + fct.l = start_fct; + nip = startp; + #ifdef PTR_DEMANGLE +-- +1.8.3.1 + diff --git a/glibc.spec b/glibc.spec index a17ad05..ca68647 100644 --- a/glibc.spec +++ b/glibc.spec @@ -66,7 +66,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 56 +Release: 57 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -188,6 +188,7 @@ Patch102: socket-Do-not-use-AF_NETLINK-in-__opensock.patch Patch103: tst-socket-timestamp-compat.c-Check-__TIMESIZE-BZ-28.patch Patch104: linux-Fix-missing-__convert_scm_timestamps-BZ-28860.patch Patch105: linux-fix-accuracy-of-get_nprocs-and-get_nprocs_conf.patch +Patch106: backport-nss-make-sure-startp_initialized-do-first.patch Patch9000: turn-default-value-of-x86_rep_stosb_threshold_form_2K_to_1M.patch Patch9001: delete-no-hard-link-to-avoid-all_language-package-to.patch @@ -1217,6 +1218,9 @@ fi %endif %changelog +* Thu Feb 17 2022 jiangheng - 2.34-57 +- nss make sure startp initialized do first + * Thu Feb 10 2022 jiangheng - 2.34-56 - remove nscd; the functionality nscd currently provides can be achieved by using systemd-resolved for DNS caching and the sssd -- Gitee