From 8cbdf609209780fe359f207c74a75e8f914495c7 Mon Sep 17 00:00:00 2001 From: Ravi Pokala Date: Thu, 19 Jan 2017 23:42:51 +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. --- 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 a90074ed4526..8b7f4fdd516c 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -159,7 +159,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; /*