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; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"