summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2012-01-14 09:10:20 +0000
committertuexen <tuexen@FreeBSD.org>2012-01-14 09:10:20 +0000
commitf8b7dd31321b8987a6225523e25c177e0a5cdb78 (patch)
tree86a798edef6e7df8bc67e4f3cabac22c5f6e708c /sys/netinet
parent9d0dd43b7c0115a36b4d25c6e5059a989aec8b76 (diff)
downloadFreeBSD-src-f8b7dd31321b8987a6225523e25c177e0a5cdb78.zip
FreeBSD-src-f8b7dd31321b8987a6225523e25c177e0a5cdb78.tar.gz
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.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 3f3c62d..c08872c 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -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);
}
OpenPOWER on IntegriCloud