[PATCH v2 1/2] copyfd: reinstate proper guard around munmap()

Denys Vlasenko vda.linux at googlemail.com
Sat Jul 15 09:46:57 UTC 2017


On Fri, Jul 14, 2017 at 10:25 PM, Johannes Schindelin
<johannes.schindelin at gmx.de> wrote:
> In 4c1392296 (Introduce FEATURE_COPYBUF_KB, 2007-12-02), a feature was
> introduced where a large stack was allocated via mmap()

No, it is not a stack allocated there. It's a buffer for copying.

> But 8d75d794e (libbb: use sendfile() to copy data between file
> descriptors, 2014-11-27) removed that guard around the munmap() call.
> That was most likely a mistake, as the corresponding mmap() call is
> *still* inside an equivalent #if ... #endif guard.
>
> Let's revert the mistaken change.

It was not a mistake.

Applied with edited description.


More information about the busybox mailing list