diff options
author | ae <ae@FreeBSD.org> | 2015-05-21 08:28:35 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2015-05-21 08:28:35 +0000 |
commit | 511909eef43c51e1bc4372a7e87cde8fe9248bd7 (patch) | |
tree | c8f383a5aaa9ae3689be2592b8a10fbaf63cb17f /sys | |
parent | 0c5326891a41e294cfc53f380ea5bc5c7cf2cbb6 (diff) | |
download | FreeBSD-src-511909eef43c51e1bc4372a7e87cde8fe9248bd7.zip FreeBSD-src-511909eef43c51e1bc4372a7e87cde8fe9248bd7.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index a16af57..01e4c31 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -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; |