svn commit: r190890 - stable/6/sys/netinet
Bjoern A. Zeeb
bz at FreeBSD.org
Fri Apr 10 04:08:29 PDT 2009
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;
}
More information about the svn-src-stable-6
mailing list