Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Feb 2012 20:45:32 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r231049 - stable/9/sys/netinet
Message-ID:  <201202052045.q15KjWbi000729@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Feb  5 20:45:32 2012
New Revision: 231049
URL: http://svn.freebsd.org/changeset/base/231049

Log:
  MFC r230104:
  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@.

Modified:
  stable/9/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/9/sys/netinet/sctp_usrreq.c	Sun Feb  5 20:18:53 2012	(r231048)
+++ stable/9/sys/netinet/sctp_usrreq.c	Sun Feb  5 20:45:32 2012	(r231049)
@@ -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?201202052045.q15KjWbi000729>