Date: Fri, 10 Apr 2009 11:08:27 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r190890 - stable/6/sys/netinet Message-ID: <200904101108.n3AB8RIg046822@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Fri Apr 10 11:08:27 2009 New Revision: 190890 URL: http://svn.freebsd.org/changeset/base/190890 Log: Fix a locking bug introduced in r190369 - add a missing unlock operation on the pcbinfo. Also porperly protect the inp before releasing the lock as in 6.x inps can possibly become invalid at that point. [1] PR: kern/133415 PR: kern/133445 Tested by: eugen kuzbass.ru (Eugene Grosbein) Discussed with: rwatson [1] Pointy hat: obrien Modified: stable/6/sys/netinet/ip_output.c Modified: stable/6/sys/netinet/ip_output.c ============================================================================== --- stable/6/sys/netinet/ip_output.c Fri Apr 10 10:59:48 2009 (r190889) +++ stable/6/sys/netinet/ip_output.c Fri Apr 10 11:08:27 2009 (r190890) @@ -1376,7 +1376,10 @@ ip_ctloutput_pcbinfo(so, sopt, pcbinfo) error = EINVAL; break; } + INP_LOCK(inp); + INP_INFO_WUNLOCK(pcbinfo); error = ipsec4_set_policy(inp, optname, req, len, priv); + INP_UNLOCK(inp); m_freem(m); break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904101108.n3AB8RIg046822>