Date: Fri, 11 Apr 2014 13:11:43 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264342 - head/sys/netinet Message-ID: <201404111311.s3BDBhME044050@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Apr 11 13:11:43 2014 New Revision: 264342 URL: http://svnweb.freebsd.org/changeset/base/264342 Log: Don't leak the TCP pcbinfo lock if a time wait connection is closed in between grabbing a reference on the connection structure and obtaining the pcbinfo lock. Reviewed by: Julien Charbon Modified: head/sys/netinet/tcp_timewait.c Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Fri Apr 11 11:56:16 2014 (r264341) +++ head/sys/netinet/tcp_timewait.c Fri Apr 11 13:11:43 2014 (r264342) @@ -731,8 +731,10 @@ tcp_tw_2msl_scan(void) /* Close timewait state */ if (INP_INFO_TRY_WLOCK(&V_tcbinfo)) { TW_WLOCK(V_tw_lock); - if (tw_pcbrele(tw)) + if (tw_pcbrele(tw)) { + INP_INFO_WUNLOCK(&V_tcbinfo); continue; + } KASSERT(tw->tw_inpcb != NULL, ("%s: tw->tw_inpcb == NULL", __func__));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404111311.s3BDBhME044050>