Date: Sat, 14 Jan 2012 09:10:20 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r230104 - head/sys/netinet Message-ID: <201201140910.q0E9AKdG003803@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@. 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201140910.q0E9AKdG003803>