From 2de2c4b95bede4502a43ec8e2404169f4c7f9eed Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Apr 28 2008 14:28:01 +0000 Subject: - 9.5.0b3 release - dropped patches (upstream) - bind-9.5.0-generate-xml.patch - bind-9.5-transfer-segv.patch - fixed race condition in socket code (#400461, comment #36) --- diff --git a/.cvsignore b/.cvsignore index 462971c..da533c1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -bind-9.5.0b2.tar.gz -bind-chroot.tar.bz2 +bind-9.5.0b3.tar.gz config-2.tar +bind-chroot.tar.bz2 libbind-man.tar.gz diff --git a/bind-9.5-recv-race.patch b/bind-9.5-recv-race.patch new file mode 100644 index 0000000..2207d53 --- /dev/null +++ b/bind-9.5-recv-race.patch @@ -0,0 +1,172 @@ +diff -up bind-9.5.0b2/lib/isc/unix/socket.c.recv bind-9.5.0b2/lib/isc/unix/socket.c +--- bind-9.5.0b2/lib/isc/unix/socket.c.recv 2008-04-10 16:45:33.000000000 +0200 ++++ bind-9.5.0b2/lib/isc/unix/socket.c 2008-04-10 17:00:46.000000000 +0200 +@@ -261,10 +261,10 @@ static isc_result_t allocate_socket(isc_ + static void destroy(isc_socket_t **); + static void internal_accept(isc_task_t *, isc_event_t *); + static void internal_connect(isc_task_t *, isc_event_t *); +-static void internal_recv(isc_task_t *, isc_event_t *); ++static void internal_recv(isc_event_t *); + static void internal_send(isc_task_t *, isc_event_t *); + static void internal_fdwatch_write(isc_task_t *, isc_event_t *); +-static void internal_fdwatch_read(isc_task_t *, isc_event_t *); ++static void internal_fdwatch_read(isc_event_t *); + static void process_cmsg(isc_socket_t *, struct msghdr *, isc_socketevent_t *); + static void build_msghdr_send(isc_socket_t *, isc_socketevent_t *, + struct msghdr *, struct iovec *, size_t *); +@@ -1830,7 +1830,7 @@ isc_socket_detach(isc_socket_t **socketp + * + * The socket and manager must be locked before calling this function. + */ +-static void ++static isc_boolean_t + dispatch_recv(isc_socket_t *sock) { + intev_t *iev; + isc_socketevent_t *ev; +@@ -1841,7 +1841,7 @@ dispatch_recv(isc_socket_t *sock) { + if (sock->type != isc_sockettype_fdwatch) { + ev = ISC_LIST_HEAD(sock->recv_list); + if (ev == NULL) +- return; ++ return ISC_FALSE; + socket_log(sock, NULL, EVENT, NULL, 0, 0, + "dispatch_recv: event %p -> task %p", + ev, ev->ev_sender); +@@ -1855,13 +1855,16 @@ dispatch_recv(isc_socket_t *sock) { + + sock->references++; + iev->ev_sender = sock; ++ iev->ev_arg = sock; + if (sock->type == isc_sockettype_fdwatch) +- iev->ev_action = internal_fdwatch_read; ++ internal_fdwatch_read (iev); + else +- iev->ev_action = internal_recv; +- iev->ev_arg = sock; ++ internal_recv (iev); + +- isc_task_send(sender, (isc_event_t **)&iev); ++ if (sock->references == 0) ++ return ISC_TRUE; ++ ++ return ISC_FALSE; + } + + static void +@@ -2228,7 +2231,7 @@ internal_accept(isc_task_t *me, isc_even + } + + static void +-internal_recv(isc_task_t *me, isc_event_t *ev) { ++internal_recv(isc_event_t *ev) { + isc_socketevent_t *dev; + isc_socket_t *sock; + +@@ -2237,21 +2240,13 @@ internal_recv(isc_task_t *me, isc_event_ + sock = ev->ev_sender; + INSIST(VALID_SOCKET(sock)); + +- LOCK(&sock->lock); +- socket_log(sock, NULL, IOEVENT, +- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV, +- "internal_recv: task %p got event %p", me, ev); +- + INSIST(sock->pending_recv == 1); + sock->pending_recv = 0; + + INSIST(sock->references > 0); + sock->references--; /* the internal event is done with this socket */ +- if (sock->references == 0) { +- UNLOCK(&sock->lock); +- destroy(&sock); ++ if (sock->references == 0) + return; +- } + + /* + * Try to do as much I/O as possible on this socket. There are no +@@ -2289,7 +2284,6 @@ internal_recv(isc_task_t *me, isc_event_ + if (!ISC_LIST_EMPTY(sock->recv_list)) + select_poke(sock->manager, sock->fd, SELECT_POKE_READ); + +- UNLOCK(&sock->lock); + } + + static void +@@ -2388,7 +2382,7 @@ internal_fdwatch_write(isc_task_t *me, i + } + + static void +-internal_fdwatch_read(isc_task_t *me, isc_event_t *ev) { ++internal_fdwatch_read(isc_event_t *ev) { + isc_socket_t *sock; + int more_data; + +@@ -2400,31 +2394,19 @@ internal_fdwatch_read(isc_task_t *me, is + sock = (isc_socket_t *)ev->ev_sender; + INSIST(VALID_SOCKET(sock)); + +- LOCK(&sock->lock); +- socket_log(sock, NULL, IOEVENT, +- isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV, +- "internal_fdwatch_read: task %p got event %p", me, ev); +- + INSIST(sock->pending_recv == 1); + +- UNLOCK(&sock->lock); +- more_data = (sock->fdwatchcb)(me, sock, sock->fdwatcharg); +- LOCK(&sock->lock); ++ INSIST(0); /* We should not be here */ + + sock->pending_recv = 0; + + INSIST(sock->references > 0); + sock->references--; /* the internal event is done with this socket */ +- if (sock->references == 0) { +- UNLOCK(&sock->lock); +- destroy(&sock); ++ if (sock->references == 0) + return; +- } + + if (more_data) + select_poke(sock->manager, sock->fd, SELECT_POKE_READ); +- +- UNLOCK(&sock->lock); + } + + static void +@@ -2434,6 +2416,7 @@ process_fds(isc_socketmgr_t *manager, in + int i; + isc_socket_t *sock; + isc_boolean_t unlock_sock; ++ isc_boolean_t destroy_sock; + + REQUIRE(maxfd <= (int)FD_SETSIZE); + +@@ -2462,6 +2445,7 @@ process_fds(isc_socketmgr_t *manager, in + + sock = manager->fds[i]; + unlock_sock = ISC_FALSE; ++ destroy_sock = ISC_FALSE; + if (FD_ISSET(i, readfds)) { + if (sock == NULL) { + FD_CLR(i, &manager->read_fds); +@@ -2473,7 +2457,7 @@ process_fds(isc_socketmgr_t *manager, in + if (sock->listener) + dispatch_accept(sock); + else +- dispatch_recv(sock); ++ destroy_sock = dispatch_recv(sock); + } + FD_CLR(i, &manager->read_fds); + } +@@ -2497,6 +2481,8 @@ process_fds(isc_socketmgr_t *manager, in + } + if (unlock_sock) + UNLOCK(&sock->lock); ++ if (destroy_sock) ++ destroy(&sock); + } + } + diff --git a/bind-9.5-transfer-segv.patch b/bind-9.5-transfer-segv.patch deleted file mode 100644 index 8ba5456..0000000 --- a/bind-9.5-transfer-segv.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up bind-9.5.0b1/lib/dns/rbtdb.c.segv bind-9.5.0b1/lib/dns/rbtdb.c ---- bind-9.5.0b1/lib/dns/rbtdb.c.segv 2008-02-11 14:52:12.000000000 +0100 -+++ bind-9.5.0b1/lib/dns/rbtdb.c 2008-02-11 14:55:58.000000000 +0100 -@@ -1633,7 +1633,8 @@ decrement_reference(dns_rbtdb_t *rbtdb, - "decrement_reference: " - "dns_rbt_deletenode: %s", - isc_result_totext(result)); -- } else if (dns_rbtnode_refcurrent(node) == 0) { -+ } else if (rbtdb->deadnodes != NULL && -+ dns_rbtnode_refcurrent(node) == 0) { - INSIST(!ISC_LINK_LINKED(node, deadlink)); - ISC_LIST_APPEND(rbtdb->deadnodes[bucket], node, deadlink); - } diff --git a/bind-9.5.0-generate-xml.patch b/bind-9.5.0-generate-xml.patch deleted file mode 100644 index 8a34e37..0000000 --- a/bind-9.5.0-generate-xml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bind-9.5.0a5/bin/named/Makefile.in.xml 2007-06-19 11:49:35.000000000 +0200 -+++ bind-9.5.0a5/bin/named/Makefile.in 2007-06-19 11:49:48.000000000 +0200 -@@ -154,7 +154,7 @@ bind9.xsl.h: bind9.xsl convertxsl.pl - ${PERL} ${srcdir}/convertxsl.pl < ${srcdir}/bind9.xsl > bind9.xsl.h - - depend: bind9.xsl.h --server.@O@: bind9.xsl.h -+server.o: bind9.xsl.h - - installdirs: - $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir} diff --git a/bind.spec b/bind.spec index 3dc253e..152548d 100644 --- a/bind.spec +++ b/bind.spec @@ -2,7 +2,7 @@ # Red Hat BIND package .spec file # -%define RELEASEVER b2 +%define RELEASEVER b3 %{?!SDB: %define SDB 1} %{?!LIBBIND: %define LIBBIND 1} @@ -20,7 +20,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: ISC Version: 9.5.0 -Release: 25.1.%{RELEASEVER}%{?dist} +Release: 26.%{RELEASEVER}%{?dist} Epoch: 32 Url: http://www.isc.org/products/BIND/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -57,11 +57,9 @@ Patch10: bind-9.3.2b1-PIE.patch Patch13: bind-9.3.1rc1-fix_libbind_includedir.patch Patch16: bind-9.3.2-redhat_doc.patch Patch63: bind-9.4.0-dnssec-directory.patch -Patch69: bind-9.5.0-generate-xml.patch Patch71: bind-9.5-overflow.patch Patch72: bind-9.5-dlz-64bit.patch Patch80: bind-9.5-edns.patch -Patch87: bind-9.5-transfer-segv.patch Patch88: bind-9.5-recv-race.patch # SDB patches @@ -193,7 +191,6 @@ Based on the code from Jan "Yenya" Kasprzak %patch5 -p1 -b .nonexec %patch6 -p1 -b .nsl %patch10 -p1 -b .PIE -%patch69 -p1 -b .generate-xml %patch16 -p1 -b .redhat_doc %patch80 -p1 -b .edns %if %{SDB} @@ -251,7 +248,6 @@ cp -fp contrib/dbus/{dbus_mgr.h,dbus_service.h} bin/named/include/named %patch73 -p1 -b .libidn %patch83 -p1 -b .libidn2 %patch85 -p1 -b .libidn3 -%patch87 -p1 -b .transfer-segv %patch88 -p1 -b .recv-race :; @@ -409,7 +405,7 @@ for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.int echo '@ in soa localhost. root 1 3H 15M 1W 1D ns localhost.' > sample/var/named/$f; done -/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: bind.spec,v 1.243 2008/04/23 15:03:02 atkac Exp $/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\ +/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: bind.spec,v 1.244 2008/04/28 14:28:01 atkac Exp $/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\ *\ * NOTE: you only need to create this file if it is to\ * differ from the following default contents: @@ -668,6 +664,13 @@ rm -rf ${RPM_BUILD_ROOT} %{_sbindir}/bind-chroot-admin %changelog +* Mon Apr 28 2008 Adam Tkac 32:9.5.0-26.b3 +- 9.5.0b3 release +- dropped patches (upstream) + - bind-9.5.0-generate-xml.patch + - bind-9.5-transfer-segv.patch +- fixed race condition in socket code (#400461, comment #36) + * Wed Apr 23 2008 Adam Tkac 32:9.5.0-25.1.b2 - fixed building of named-sdb (#432497) - bind-9.3.2-prctl_set_dumpable.patch is obsoleted diff --git a/sources b/sources index 88a7b8c..13f1837 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -d64e5ac8b5d98508b450bf999c33e7df bind-9.5.0b2.tar.gz -4faa4395b955e5f8a3d50f308b9fabc8 bind-chroot.tar.bz2 +9dbacfd7a957efd36e30736d579ed519 bind-9.5.0b3.tar.gz 9c3905b6aece5b4aa0deba6029437483 config-2.tar +4faa4395b955e5f8a3d50f308b9fabc8 bind-chroot.tar.bz2 13fef79f99fcefebb51d84b08805de51 libbind-man.tar.gz