svn commit: r230104 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat Jan 14 09:10:21 UTC 2012
Author: tuexen
Date: Sat Jan 14 09:10:20 2012
New Revision: 230104
URL: http://svn.freebsd.org/changeset/base/230104
Log:
Fix two bugs, which result in a panic when calling getsockopt()
using SCTP_RECVINFO or SCTP_NXTINFO.
Reported by Clement Lecigne and forwarded to us by zi at .
MFC after: 3 days.
Modified:
head/sys/netinet/sctp_usrreq.c
Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c Sat Jan 14 08:59:02 2012 (r230103)
+++ head/sys/netinet/sctp_usrreq.c Sat Jan 14 09:10:20 2012 (r230104)
@@ -3019,7 +3019,7 @@ flags_out:
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
} else {
- SCTP_INP_RUNLOCK(inp);
+ SCTP_INP_RLOCK(inp);
onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO);
SCTP_INP_RUNLOCK(inp);
}
@@ -3038,7 +3038,7 @@ flags_out:
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
} else {
- SCTP_INP_RUNLOCK(inp);
+ SCTP_INP_RLOCK(inp);
onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO);
SCTP_INP_RUNLOCK(inp);
}
More information about the svn-src-all
mailing list