[Devel] [PATCH vz10 1/4] Revert "lib/zlib: use atomic GCOV counters to prevent crash in inflate_fast"

Konstantin Khorenko khorenko at virtuozzo.com
Wed Apr 22 17:21:21 MSK 2026


This reverts commit bee6c41d735d71beb080326986df157159520e27.

We will fix the origin issue in another way which has been accepted by
mainstream.

https://virtuozzo.atlassian.net/browse/VSTOR-127788
https://virtuozzo.atlassian.net/browse/VSTOR-128012

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 lib/zlib_deflate/Makefile | 6 ------
 lib/zlib_dfltcc/Makefile  | 6 ------
 lib/zlib_inflate/Makefile | 7 -------
 3 files changed, 19 deletions(-)

diff --git a/lib/zlib_deflate/Makefile b/lib/zlib_deflate/Makefile
index dc0b3e5660e9..2622e03c0b94 100644
--- a/lib/zlib_deflate/Makefile
+++ b/lib/zlib_deflate/Makefile
@@ -7,12 +7,6 @@
 # decompression code.
 #
 
-# Force atomic GCOV counter updates to prevent GCC from merging global
-# counters with loop induction variables (see lib/zlib_inflate/Makefile).
-ifdef CONFIG_GCOV_KERNEL
-ccflags-y += -fprofile-update=atomic
-endif
-
 obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate.o
 
 zlib_deflate-objs := deflate.o deftree.o deflate_syms.o
diff --git a/lib/zlib_dfltcc/Makefile b/lib/zlib_dfltcc/Makefile
index fb08749d2ee7..66e1c96387c4 100644
--- a/lib/zlib_dfltcc/Makefile
+++ b/lib/zlib_dfltcc/Makefile
@@ -6,12 +6,6 @@
 # This is the code for s390 zlib hardware support.
 #
 
-# Force atomic GCOV counter updates to prevent GCC from merging global
-# counters with loop induction variables (see lib/zlib_inflate/Makefile).
-ifdef CONFIG_GCOV_KERNEL
-ccflags-y += -fprofile-update=atomic
-endif
-
 obj-$(CONFIG_ZLIB_DFLTCC) += zlib_dfltcc.o
 
 zlib_dfltcc-objs := dfltcc.o dfltcc_deflate.o dfltcc_inflate.o
diff --git a/lib/zlib_inflate/Makefile b/lib/zlib_inflate/Makefile
index 8707c649adda..27327d3e9f54 100644
--- a/lib/zlib_inflate/Makefile
+++ b/lib/zlib_inflate/Makefile
@@ -14,13 +14,6 @@
 # uncompression can be done without blocking on allocation).
 #
 
-# Force atomic GCOV counter updates to prevent GCC from merging global
-# counters with loop induction variables — concurrent inflate_fast()
-# execution on multiple CPUs causes out-of-bounds writes otherwise.
-ifdef CONFIG_GCOV_KERNEL
-ccflags-y += -fprofile-update=atomic
-endif
-
 obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate.o
 
 zlib_inflate-objs := inffast.o inflate.o infutil.o \
-- 
2.47.1



More information about the Devel mailing list