From bbc1f596694e4a052558da1a7cec42b38d30e3fc Mon Sep 17 00:00:00 2001 From: rpokala Date: Thu, 19 Jan 2017 23:44:05 +0000 Subject: [PATCH] MFC r311963: Remove writability requirement for single-mbuf, contiguous- range m_pulldown() m_pulldown() only needs to determine if a mbuf is writable if it is going to copy data into the data region of an existing mbuf. It does this to create a contiguous data region in a single mbuf from multiple mbufs in the chain. If the requested memory region is already contiguous and nothing needs to change, the mbuf does not need to be writeable. git-svn-id: svn://svn.freebsd.org/base/stable/10@312442 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/kern/uipc_mbuf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c index 00472d303..f69b47e8e 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -161,7 +161,7 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp) * the target data is on . * if we got enough data on the mbuf "n", we're done. */ - if ((off == 0 || offp) && len <= n->m_len - off && writable) + if ((off == 0 || offp) && len <= n->m_len - off) goto ok; /* -- 2.45.0