[master] 8e0db2c bring back mlock() of vsm mappings

Nils Goroll nils.goroll at uplex.de
Fri Sep 8 17:39:05 UTC 2017


commit 8e0db2caaee32d87c098c345132832c71d018317
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Sep 8 19:22:13 2017 +0200

    bring back mlock() of vsm mappings
    
    It got lost during the new world order megacommit
    74328de8eeb2703591fe59190f73fcabf057adbe

diff --git a/lib/libvarnish/vsmw.c b/lib/libvarnish/vsmw.c
index a5c7e3f..ee2a443 100644
--- a/lib/libvarnish/vsmw.c
+++ b/lib/libvarnish/vsmw.c
@@ -181,6 +181,7 @@ VSMW_Allocv(struct vsmw *vsmw, const char *class, size_t len,
 
 	AZ(close(fd));
 	assert(seg->ptr != MAP_FAILED);
+	(void)mlock(seg->ptr, len);
 
 	VTAILQ_INSERT_TAIL(&vsmw->segs, seg, list);
 	fd = openat(vsmw->vdirfd, vsmw->idx, O_APPEND | O_WRONLY);


More information about the varnish-commit mailing list