svn commit: r267717 - stable/9/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sun Jun 22 12:16:28 UTC 2014


Author: tuexen
Date: Sun Jun 22 12:16:27 2014
New Revision: 267717
URL: http://svnweb.freebsd.org/changeset/base/267717

Log:
  MFC r267105:
  
  Use ENOBUFS instead of ENOMEM in error situations related to m_uiotombuf().
  This was suggested by kevlo at .

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

Modified: stable/9/sys/netinet/sctp_output.c
==============================================================================
--- stable/9/sys/netinet/sctp_output.c	Sun Jun 22 11:32:23 2014	(r267716)
+++ stable/9/sys/netinet/sctp_output.c	Sun Jun 22 12:16:27 2014	(r267717)
@@ -11911,8 +11911,8 @@ sctp_copy_resume(struct uio *uio,
 	m = m_uiotombuf(uio, M_WAITOK, max_send_len, 0,
 	    (M_PKTHDR | (user_marks_eor ? M_EOR : 0)));
 	if (m == NULL) {
-		SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
-		*error = ENOMEM;
+		SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS);
+		*error = ENOBUFS;
 	} else {
 		*sndout = m_length(m, NULL);
 		*new_tail = m_last(m);
@@ -11931,8 +11931,8 @@ sctp_copy_one(struct sctp_stream_queue_p
 	sp->data = m_uiotombuf(uio, M_WAITOK, sp->length,
 	    resv_upfront, 0);
 	if (sp->data == NULL) {
-		SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
-		return (ENOMEM);
+		SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOBUFS);
+		return (ENOBUFS);
 	}
 	sp->tail_mbuf = m_last(sp->data);
 	return (0);


More information about the svn-src-stable-9 mailing list