svn commit: r283198 - stable/10/sys/kern

Andrey V. Elsukov ae at FreeBSD.org
Thu May 21 08:28:36 UTC 2015


Author: ae
Date: Thu May 21 08:28:35 2015
New Revision: 283198
URL: https://svnweb.freebsd.org/changeset/base/283198

Log:
  MFC r282594:
    m_dup() is supposed to give a writable copy of an mbuf chain. It uses
    m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field.
    If original mbuf chain has M_RDONLY flag, its copy also will have it.
    Reset this flag explicitly.

Modified:
  stable/10/sys/kern/uipc_mbuf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/uipc_mbuf.c
==============================================================================
--- stable/10/sys/kern/uipc_mbuf.c	Thu May 21 08:26:24 2015	(r283197)
+++ stable/10/sys/kern/uipc_mbuf.c	Thu May 21 08:28:35 2015	(r283198)
@@ -934,6 +934,7 @@ m_dup(struct mbuf *m, int how)
 			}
 			if ((n->m_flags & M_EXT) == 0)
 				nsize = MHLEN;
+			n->m_flags &= ~M_RDONLY;
 		}
 		n->m_len = 0;
 


More information about the svn-src-all mailing list