summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-06-15 19:28:58 +0000
committerrrs <rrs@FreeBSD.org>2007-06-15 19:28:58 +0000
commit4fb690ad98a7a387ff4d28d762a45f130a049552 (patch)
treeb64727055a3c8e039fe51c6179e848d590912caf /sys/netinet
parent524be46e982f8abdda41e597068fa8a19d8288ee (diff)
downloadFreeBSD-src-4fb690ad98a7a387ff4d28d762a45f130a049552.zip
FreeBSD-src-4fb690ad98a7a387ff4d28d762a45f130a049552.tar.gz
- Update the comment lines in sctp_input.c
- We need to init the INP_LOCK since otherwise for non-SMP kernels you crash when you set the TOS.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_input.c10
-rw-r--r--sys/netinet/sctp_pcb.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 2578d9f..f1fad88 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -3676,19 +3676,17 @@ process_control_chunks:
return (NULL);
}
} else {
- /*
- * For cookies and all other chunks. if the
- */
+ /* For cookies and all other chunks. */
if (chk_length > sizeof(chunk_buf)) {
/*
* use just the size of the chunk buffer so
* the front part of our chunks fit in
* contiguous space up to the chunk buffer
* size (508 bytes). For chunks that need to
- * get more than that they mus use the
+ * get more than that they must use the
* sctp_m_getptr() function or other means
- * (know how to parse mbuf chains). Cookies
- * do this already.
+ * (e.g. know how to parse mbuf chains).
+ * Cookies do this already.
*/
ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset,
(sizeof(chunk_buf) - 4),
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 4d23f24..d5d5ffd 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -1861,6 +1861,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
SCTP_INP_INFO_WLOCK();
SCTP_INP_LOCK_INIT(inp);
+ INP_LOCK_INIT(&inp->ip_inp.inp, "inp", "sctpinp");
SCTP_INP_READ_INIT(inp);
SCTP_ASOC_CREATE_LOCK_INIT(inp);
/* lock the new ep */
@@ -2892,6 +2893,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
inp->sctp_tcbhash = NULL;
}
/* Now we must put the ep memory back into the zone pool */
+ INP_LOCK_DESTROY(&inp->ip_inp.inp);
SCTP_INP_LOCK_DESTROY(inp);
SCTP_INP_READ_DESTROY(inp);
SCTP_ASOC_CREATE_LOCK_DESTROY(inp);
OpenPOWER on IntegriCloud