]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix invalid cache-line padding for qpcache buckets
authorOndřej Surý <ondrej@isc.org>
Fri, 21 Mar 2025 08:29:17 +0000 (09:29 +0100)
committerOndřej Surý <ondrej@isc.org>
Tue, 25 Mar 2025 09:56:21 +0000 (10:56 +0100)
The isc_queue_t was missing in the calculation of the required
padding size inside the qpcache bucket structure.

lib/dns/qpcache.c

index 5ec6bc66db33d00c4872d4a712da05e3d39469a4..44339525a1615064646c4679722b48a9dfc1c701 100644 (file)
@@ -238,8 +238,8 @@ typedef struct qpcache_bucket {
 
        /* Padding to prevent false sharing between locks. */
        uint8_t __padding[ISC_OS_CACHELINE_SIZE -
-                         (sizeof(dns_slabheaderlist_t) + sizeof(isc_heap_t *) +
-                          sizeof(isc_rwlock_t)) %
+                         (sizeof(isc_queue_t) + sizeof(isc_rwlock_t) +
+                          sizeof(dns_slabheaderlist_t) + sizeof(isc_heap_t *)) %
                                  ISC_OS_CACHELINE_SIZE];
 
 } qpcache_bucket_t;