From owner-svn-src-stable-7@FreeBSD.ORG Wed Oct 8 16:44:36 2008 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55EF5106569E; Wed, 8 Oct 2008 16:44:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43A3D8FC18; Wed, 8 Oct 2008 16:44:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m98Gian6038614; Wed, 8 Oct 2008 16:44:36 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m98Giakt038613; Wed, 8 Oct 2008 16:44:36 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200810081644.m98Giakt038613@svn.freebsd.org> From: Hiroki Sato Date: Wed, 8 Oct 2008 16:44:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183702 - stable/7/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 16:44:36 -0000 Author: hrs Date: Wed Oct 8 16:44:35 2008 New Revision: 183702 URL: http://svn.freebsd.org/changeset/base/183702 Log: OpenSSH has been upgraded to 5.1p1. Approved by: re (implicit) Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Oct 8 14:45:07 2008 (r183701) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Oct 8 16:44:35 2008 (r183702) @@ -274,6 +274,9 @@ OpenPAM has been updated from the Figwort release to the Hydrangea release. + OpenSSH has been updated from + 4.5p1 to 5.1p1. + sendmail has been updated from 8.14.2 to 8.14.3. From owner-svn-src-stable-7@FreeBSD.ORG Wed Oct 8 21:45:57 2008 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 002DF1065687; Wed, 8 Oct 2008 21:45:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E00F38FC1E; Wed, 8 Oct 2008 21:45:56 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m98LjuFG044034; Wed, 8 Oct 2008 21:45:56 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m98LjuRb044033; Wed, 8 Oct 2008 21:45:56 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200810082145.m98LjuRb044033@svn.freebsd.org> From: Marius Strobl Date: Wed, 8 Oct 2008 21:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183710 - in stable/7/sys: . boot/sparc64/loader X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 21:45:57 -0000 Author: marius Date: Wed Oct 8 21:45:56 2008 New Revision: 183710 URL: http://svn.freebsd.org/changeset/base/183710 Log: MFC: r183628 Disable ATAPI DMA as it's once again broken in that it causes data corruption with the on-board AcerLabs M5229 controllers. While at it, remove the pointless "nothing to autoload yet." message. Approved by: re (blackend) Modified: stable/7/sys/ (props changed) stable/7/sys/boot/sparc64/loader/main.c Modified: stable/7/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/7/sys/boot/sparc64/loader/main.c Wed Oct 8 21:10:55 2008 (r183709) +++ stable/7/sys/boot/sparc64/loader/main.c Wed Oct 8 21:45:56 2008 (r183710) @@ -222,7 +222,7 @@ static int sparc64_autoload(void) { - printf("nothing to autoload yet.\n"); + setenv("hw.ata.atapi_dma", "0", 0); return (0); } From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 9 17:52:48 2008 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 499FD1065694; Thu, 9 Oct 2008 17:52:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 386098FC0C; Thu, 9 Oct 2008 17:52:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m99Hqm38067783; Thu, 9 Oct 2008 17:52:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m99HqmLs067782; Thu, 9 Oct 2008 17:52:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810091752.m99HqmLs067782@svn.freebsd.org> From: John Baldwin Date: Thu, 9 Oct 2008 17:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183726 - in stable/7/sys: . kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 17:52:48 -0000 Author: jhb Date: Thu Oct 9 17:52:47 2008 New Revision: 183726 URL: http://svn.freebsd.org/changeset/base/183726 Log: MFC: Wait until after dropping the receive socket buffer lock to allocate space to store the socket address stored in the first mbuf in a packet chain in soreceive_dgram(). Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/uipc_socket.c Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Thu Oct 9 14:55:45 2008 (r183725) +++ stable/7/sys/kern/uipc_socket.c Thu Oct 9 17:52:47 2008 (r183726) @@ -1928,34 +1928,11 @@ soreceive_dgram(struct socket *so, struc SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); nextrecord = m->m_nextpkt; - if (pr->pr_flags & PR_ADDR) { - KASSERT(m->m_type == MT_SONAME, - ("m->m_type == %d", m->m_type)); - if (psa != NULL) - *psa = sodupsockaddr(mtod(m, struct sockaddr *), - M_NOWAIT); - sbfree(&so->so_rcv, m); - so->so_rcv.sb_mb = m_free(m); - m = so->so_rcv.sb_mb; - sockbuf_pushsync(&so->so_rcv, nextrecord); - } - if (m == NULL) { - /* XXXRW: Can this happen? */ - SOCKBUF_UNLOCK(&so->so_rcv); - return (0); - } - KASSERT(m->m_nextpkt == nextrecord, - ("soreceive_dgram: post-control, nextrecord !sync")); if (nextrecord == NULL) { - KASSERT(so->so_rcv.sb_mb == m, - ("soreceive_dgram: post-control, sb_mb!=m")); KASSERT(so->so_rcv.sb_lastrecord == m, ("soreceive_dgram: lastrecord != m")); } - SBLASTRECORDCHK(&so->so_rcv); - SBLASTMBUFCHK(&so->so_rcv); - KASSERT(m == so->so_rcv.sb_mb, ("soreceive_dgram: m not sb_mb")); KASSERT(so->so_rcv.sb_mb->m_nextpkt == nextrecord, ("soreceive_dgram: m_nextpkt != nextrecord")); @@ -1978,6 +1955,19 @@ soreceive_dgram(struct socket *so, struc SBLASTMBUFCHK(&so->so_rcv); SOCKBUF_UNLOCK(&so->so_rcv); + if (pr->pr_flags & PR_ADDR) { + KASSERT(m->m_type == MT_SONAME, + ("m->m_type == %d", m->m_type)); + if (psa != NULL) + *psa = sodupsockaddr(mtod(m, struct sockaddr *), + M_NOWAIT); + m = m_free(m); + } + if (m == NULL) { + /* XXXRW: Can this happen? */ + return (0); + } + /* * Packet to copyout() is now in 'm' and it is disconnected from the * queue. From owner-svn-src-stable-7@FreeBSD.ORG Thu Oct 9 20:40:11 2008 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC6CC106568B; Thu, 9 Oct 2008 20:40:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0E048FC14; Thu, 9 Oct 2008 20:40:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m99KeBPG071047; Thu, 9 Oct 2008 20:40:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m99KeBIN071046; Thu, 9 Oct 2008 20:40:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810092040.m99KeBIN071046@svn.freebsd.org> From: John Baldwin Date: Thu, 9 Oct 2008 20:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183732 - in stable/7/sys: . kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 20:40:12 -0000 Author: jhb Date: Thu Oct 9 20:40:11 2008 New Revision: 183732 URL: http://svn.freebsd.org/changeset/base/183732 Log: MFC: Check for duplicate attempts to add the same positive entry to the name cache. If a duplicate attempt is made, just do nothing. This fixes a race with shared locking in pathname lockups. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Thu Oct 9 20:09:56 2008 (r183731) +++ stable/7/sys/kern/vfs_cache.c Thu Oct 9 20:40:11 2008 (r183732) @@ -496,8 +496,39 @@ cache_enter(dvp, vp, cnp) hold = 0; zap = 0; + + /* + * Calculate the hash key and setup as much of the new + * namecache entry as possible before acquiring the lock. + */ ncp = cache_alloc(cnp->cn_namelen); + ncp->nc_vp = vp; + ncp->nc_dvp = dvp; + len = ncp->nc_nlen = cnp->cn_namelen; + hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); + bcopy(cnp->cn_nameptr, ncp->nc_name, len); + hash = fnv_32_buf(&dvp, sizeof(dvp), hash); CACHE_LOCK(); + + /* + * See if this vnode is already in the cache with this name. + * This can happen with concurrent lookups of the same path + * name. + */ + if (vp) { + struct namecache *n2; + + TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + } + } + numcache++; if (!vp) { numneg++; @@ -509,16 +540,9 @@ cache_enter(dvp, vp, cnp) } /* - * Set the rest of the namecache entry elements, calculate it's - * hash key and insert it into the appropriate chain within - * the cache entries table. + * Insert the new namecache entry into the appropriate chain + * within the cache entries table. */ - ncp->nc_vp = vp; - ncp->nc_dvp = dvp; - len = ncp->nc_nlen = cnp->cn_namelen; - hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); - bcopy(cnp->cn_nameptr, ncp->nc_name, len); - hash = fnv_32_buf(&dvp, sizeof(dvp), hash); ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { From owner-svn-src-stable-7@FreeBSD.ORG Fri Oct 10 11:40:00 2008 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31B8B1065694; Fri, 10 Oct 2008 11:40:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AE718FC18; Fri, 10 Oct 2008 11:40:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9ABdxlk090805; Fri, 10 Oct 2008 11:39:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9ABdxfw090804; Fri, 10 Oct 2008 11:39:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810101139.m9ABdxfw090804@svn.freebsd.org> From: Robert Watson Date: Fri, 10 Oct 2008 11:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183743 - in stable/7/sys: . kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2008 11:40:00 -0000 Author: rwatson Date: Fri Oct 10 11:39:59 2008 New Revision: 183743 URL: http://svn.freebsd.org/changeset/base/183743 Log: Merge r183563 from head to stable/7: Remove or update several stale comments. A bit of whitespace/style cleanup. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/uipc_usrreq.c Modified: stable/7/sys/kern/uipc_usrreq.c ============================================================================== --- stable/7/sys/kern/uipc_usrreq.c Fri Oct 10 07:16:44 2008 (r183742) +++ stable/7/sys/kern/uipc_usrreq.c Fri Oct 10 11:39:59 2008 (r183743) @@ -575,8 +575,8 @@ uipc_detach(struct socket *so) } /* - * We hold the global lock, so it's OK to acquire multiple pcb locks - * at a time. + * We hold the global lock exclusively, so it's OK to acquire + * multiple pcb locks at a time. */ while (!LIST_EMPTY(&unp->unp_refs)) { struct unpcb *ref = LIST_FIRST(&unp->unp_refs); @@ -741,8 +741,6 @@ uipc_rcvd(struct socket *so, int flags) return (0); } -/* pru_rcvoob is EOPNOTSUPP */ - static int uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct mbuf *control, struct thread *td) @@ -760,15 +758,12 @@ uipc_send(struct socket *so, int flags, error = EOPNOTSUPP; goto release; } - if (control != NULL && (error = unp_internalize(&control, td))) goto release; - if ((nam != NULL) || (flags & PRUS_EOF)) UNP_GLOBAL_WLOCK(); else UNP_GLOBAL_RLOCK(); - switch (so->so_type) { case SOCK_DGRAM: { @@ -786,6 +781,7 @@ uipc_send(struct socket *so, int flags, break; unp2 = unp->unp_conn; } + /* * Because connect() and send() are non-atomic in a sendto() * with a target address, it's possible that the socket will @@ -826,12 +822,6 @@ uipc_send(struct socket *so, int flags, } case SOCK_STREAM: - /* - * Connect if not connected yet. - * - * Note: A better implementation would complain if not equal - * to the peer's address. - */ if ((so->so_state & SS_ISCONNECTED) == 0) { if (nam != NULL) { UNP_GLOBAL_WLOCK_ASSERT(); @@ -849,6 +839,7 @@ uipc_send(struct socket *so, int flags, error = EPIPE; break; } + /* * Because connect() and send() are non-atomic in a sendto() * with a target address, it's possible that the socket will @@ -907,7 +898,7 @@ uipc_send(struct socket *so, int flags, } /* - * SEND_EOF is equivalent to a SEND followed by a SHUTDOWN. + * PRUS_EOF is equivalent to pru_send followed by pru_shutdown. */ if (flags & PRUS_EOF) { UNP_PCB_LOCK(unp); @@ -1256,7 +1247,7 @@ bad2: if (vfslocked) /* * Giant has been previously acquired. This means filesystem - * isn't MPSAFE. Do it once again. + * isn't MPSAFE. Do it once again. */ mtx_lock(&Giant); bad: @@ -1576,6 +1567,7 @@ unp_externalize(struct mbuf *control, st unp_freerights(rp, newfds); goto next; } + /* * Now change each pointer to an fd in the global * table to an integer that is the index to the local @@ -1888,6 +1880,7 @@ unp_gc(__unused void *arg, int pending) unp_taskcount++; unp_defer = 0; + /* * Before going through all this, set all FDs to be NOT deferred and * NOT externally accessible. @@ -1913,6 +1906,7 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + /* * If we already marked it as 'defer' in a * previous pass, then try to process it this @@ -1930,6 +1924,7 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + /* * If all references are from messages in * transit, then skip it. it's not externally @@ -1939,12 +1934,14 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + /* * If it got this far then it must be * externally accessible. */ fp->f_gcflag |= FMARK; } + /* * Either it was deferred, or it is externally * accessible and not already marked so. Now check @@ -1955,6 +1952,7 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + if (so->so_proto->pr_domain != &localdomain || (so->so_proto->pr_flags & PR_RIGHTS) == 0) { FILE_UNLOCK(fp); @@ -1990,6 +1988,7 @@ unp_gc(__unused void *arg, int pending) } } while (unp_defer); sx_sunlock(&filelist_lock); + /* * XXXRW: The following comments need updating for a post-SMPng and * deferred unp_gc() world, but are still generally accurate. @@ -2047,6 +2046,7 @@ again: fp != NULL; fp = nextfp) { nextfp = LIST_NEXT(fp, f_list); FILE_LOCK(fp); + /* * If it's not open, skip it */ @@ -2054,6 +2054,7 @@ again: FILE_UNLOCK(fp); continue; } + /* * If all refs are from msgs, and it's not marked accessible * then it must be referenced from some unreachable cycle of @@ -2068,6 +2069,7 @@ again: FILE_UNLOCK(fp); } sx_sunlock(&filelist_lock); + /* * For each FD on our hit list, do the following two things: */ From owner-svn-src-stable-7@FreeBSD.ORG Fri Oct 10 21:18:12 2008 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A84091065687; Fri, 10 Oct 2008 21:18:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D4B38FC12; Fri, 10 Oct 2008 21:18:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9ALICLB001204; Fri, 10 Oct 2008 21:18:12 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9ALIC5M001203; Fri, 10 Oct 2008 21:18:12 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810102118.m9ALIC5M001203@svn.freebsd.org> From: Robert Watson Date: Fri, 10 Oct 2008 21:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183753 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2008 21:18:12 -0000 Author: rwatson Date: Fri Oct 10 21:18:12 2008 New Revision: 183753 URL: http://svn.freebsd.org/changeset/base/183753 Log: Test the soreceive_dgram tunable and set up the pr_usrreqs structure during UDP initialization, not during UDP inpcb initialization. Reported by: Vlad GALU Approved by: re (kib) Modified: stable/7/sys/netinet/udp_usrreq.c Modified: stable/7/sys/netinet/udp_usrreq.c ============================================================================== --- stable/7/sys/netinet/udp_usrreq.c Fri Oct 10 20:05:15 2008 (r183752) +++ stable/7/sys/netinet/udp_usrreq.c Fri Oct 10 21:18:12 2008 (r183753) @@ -163,14 +163,6 @@ udp_inpcb_init(void *mem, int size, int { struct inpcb *inp; - TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", - &udp_soreceive_dgram); - if (udp_soreceive_dgram) { - udp_usrreqs.pru_soreceive = soreceive_dgram; -#ifdef INET6 - udp6_usrreqs.pru_soreceive = soreceive_dgram; -#endif - } inp = mem; INP_LOCK_INIT(inp, "inp", "udpinp"); return (0); @@ -192,6 +184,14 @@ udp_init(void) uma_zone_set_max(udbinfo.ipi_zone, maxsockets); EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); + TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", + &udp_soreceive_dgram); + if (udp_soreceive_dgram) { + udp_usrreqs.pru_soreceive = soreceive_dgram; +#ifdef INET6 + udp6_usrreqs.pru_soreceive = soreceive_dgram; +#endif + } } /*