From owner-svn-src-all@FreeBSD.ORG Sat Mar 6 22:04:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F11F11065670; Sat, 6 Mar 2010 22:04:45 +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 E0D028FC12; Sat, 6 Mar 2010 22:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o26M4juY050546; Sat, 6 Mar 2010 22:04:45 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o26M4j7H050544; Sat, 6 Mar 2010 22:04:45 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201003062204.o26M4j7H050544@svn.freebsd.org> From: Robert Watson Date: Sat, 6 Mar 2010 22:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204810 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 22:04:46 -0000 Author: rwatson Date: Sat Mar 6 22:04:45 2010 New Revision: 204810 URL: http://svn.freebsd.org/changeset/base/204810 Log: Remove unnecessary locking of divcbinfo lock from div_output(): this has not been required since FreeBSD 7.0 when the so_pcb pointer leading to inp was guaranteed to be stable when a valid socket reference is held (as it is in the output path). MFC after: 1 week Reviewed by: bz Sponsored by: Juniper Networks Modified: head/sys/netinet/ip_divert.c Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Sat Mar 6 21:38:31 2010 (r204809) +++ head/sys/netinet/ip_divert.c Sat Mar 6 22:04:45 2010 (r204810) @@ -385,7 +385,6 @@ div_output(struct socket *so, struct mbu struct inpcb *inp; dt->info |= IPFW_IS_DIVERT | IPFW_INFO_OUT; - INP_INFO_WLOCK(&V_divcbinfo); inp = sotoinpcb(so); INP_RLOCK(inp); /* @@ -396,7 +395,6 @@ div_output(struct socket *so, struct mbu ((u_short)ntohs(ip->ip_len) > m->m_pkthdr.len)) { error = EINVAL; INP_RUNLOCK(inp); - INP_INFO_WUNLOCK(&V_divcbinfo); m_freem(m); } else { /* Convert fields to host order for ip_output() */ @@ -437,7 +435,6 @@ div_output(struct socket *so, struct mbu error = ENOBUFS; } INP_RUNLOCK(inp); - INP_INFO_WUNLOCK(&V_divcbinfo); if (error == ENOBUFS) { m_freem(m); return (error);