fixup! Have dns_zt_apply lock the zone table
Correct the change to include important locks. Correct backport issue in statistics rendering fix. Resolves: rhbz#2126912
This commit is contained in:
		
							parent
							
								
									dc3f4d28ab
								
							
						
					
					
						commit
						889db13e6f
					
				| @ -1,4 +1,4 @@ | |||||||
| From 37ba012cf603f126f31ff7647d6ee4f6fe708e8f Mon Sep 17 00:00:00 2001 | From b1871274cd2c97b63f3b90d608b7f8936d4ff3c5 Mon Sep 17 00:00:00 2001 | ||||||
| From: Mark Andrews <marka@isc.org> | From: Mark Andrews <marka@isc.org> | ||||||
| Date: Wed, 24 Aug 2022 12:21:50 +1000 | Date: Wed, 24 Aug 2022 12:21:50 +1000 | ||||||
| Subject: [PATCH] Have dns_zt_apply lock the zone table | Subject: [PATCH] Have dns_zt_apply lock the zone table | ||||||
| @ -16,8 +16,8 @@ Modified upstream commit for v9_16 | |||||||
|  lib/dns/include/dns/zt.h |  3 ++- |  lib/dns/include/dns/zt.h |  3 ++- | ||||||
|  lib/dns/tests/zt_test.c  |  4 ++-- |  lib/dns/tests/zt_test.c  |  4 ++-- | ||||||
|  lib/dns/view.c           |  3 ++- |  lib/dns/view.c           |  3 ++- | ||||||
|  lib/dns/zt.c             | 21 ++++++++++----------- |  lib/dns/zt.c             | 29 ++++++++++++++++++----------- | ||||||
|  6 files changed, 30 insertions(+), 25 deletions(-) |  6 files changed, 38 insertions(+), 25 deletions(-) | ||||||
| 
 | 
 | ||||||
| diff --git a/bin/named/server.c b/bin/named/server.c
 | diff --git a/bin/named/server.c b/bin/named/server.c
 | ||||||
| index 860ccae..c2a5887 100644
 | index 860ccae..c2a5887 100644
 | ||||||
| @ -130,7 +130,7 @@ index 8c7e40a..dcb0f18 100644 | |||||||
|   |   | ||||||
|  void |  void | ||||||
| diff --git a/lib/dns/zt.c b/lib/dns/zt.c
 | diff --git a/lib/dns/zt.c b/lib/dns/zt.c
 | ||||||
| index 8ca9cd6..cb90950 100644
 | index 8ca9cd6..1bfc308 100644
 | ||||||
| --- a/lib/dns/zt.c
 | --- a/lib/dns/zt.c
 | ||||||
| +++ b/lib/dns/zt.c
 | +++ b/lib/dns/zt.c
 | ||||||
| @@ -223,7 +223,8 @@ flush(dns_zone_t *zone, void *uap) {
 | @@ -223,7 +223,8 @@ flush(dns_zone_t *zone, void *uap) {
 | ||||||
| @ -189,6 +189,28 @@ index 8ca9cd6..cb90950 100644 | |||||||
|  	     isc_result_t (*action)(dns_zone_t *, void *), void *uap) { |  	     isc_result_t (*action)(dns_zone_t *, void *), void *uap) { | ||||||
|  	dns_rbtnode_t *node; |  	dns_rbtnode_t *node; | ||||||
|  	dns_rbtnodechain_t chain; |  	dns_rbtnodechain_t chain; | ||||||
| -- 
 | @@ -532,6 +531,10 @@ dns_zt_apply(dns_zt_t *zt, bool stop, isc_result_t *sub,
 | ||||||
| 2.38.1 |  	REQUIRE(VALID_ZT(zt)); | ||||||
|  |  	REQUIRE(action != NULL); | ||||||
|  |   | ||||||
|  | +	if (lock != isc_rwlocktype_none) {
 | ||||||
|  | +		RWLOCK(&zt->rwlock, lock);
 | ||||||
|  | +	}
 | ||||||
|  | +
 | ||||||
|  |  	dns_rbtnodechain_init(&chain); | ||||||
|  |  	result = dns_rbtnodechain_first(&chain, zt->table, NULL, NULL); | ||||||
|  |  	if (result == ISC_R_NOTFOUND) { | ||||||
|  | @@ -568,6 +571,10 @@ cleanup:
 | ||||||
|  |  		*sub = tresult; | ||||||
|  |  	} | ||||||
|  |   | ||||||
|  | +	if (lock != isc_rwlocktype_none) {
 | ||||||
|  | +		RWUNLOCK(&zt->rwlock, lock);
 | ||||||
|  | +	}
 | ||||||
|  | +
 | ||||||
|  |  	return (result); | ||||||
|  |  } | ||||||
|  |   | ||||||
|  | -- 
 | ||||||
|  | 2.39.2 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -51,7 +51,7 @@ Summary:  The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv | |||||||
| Name:     bind | Name:     bind | ||||||
| License:  MPLv2.0 | License:  MPLv2.0 | ||||||
| Version:  9.16.23 | Version:  9.16.23 | ||||||
| Release:  10%{?dist} | Release:  11%{?dist} | ||||||
| Epoch:    32 | Epoch:    32 | ||||||
| Url:      https://www.isc.org/downloads/bind/ | Url:      https://www.isc.org/downloads/bind/ | ||||||
| # | # | ||||||
| @ -1162,6 +1162,9 @@ fi; | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Mon Feb 27 2023 Petr Menšík <pemensik@redhat.com> - 32:9.16.23-11 | ||||||
|  | - Correct backport issue in statistics rendering fix (#2126912) | ||||||
|  | 
 | ||||||
| * Sat Feb 25 2023 Petr Menšík <pemensik@redhat.com> - 32:9.16.23-10 | * Sat Feb 25 2023 Petr Menšík <pemensik@redhat.com> - 32:9.16.23-10 | ||||||
| - Handle subtle difference between upstream and rhel (CVE-2022-3094) | - Handle subtle difference between upstream and rhel (CVE-2022-3094) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user