git: kernel - Fix cryptsetup bug / fix bug in mlockall()

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Sep 16 18:38:31 PDT 2026


commit ab80faa015dd7109e0968a60798c3d13bbb3ebc5
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Sep 16 18:34:58 2026 -0700

    kernel - Fix cryptsetup bug / fix bug in mlockall()
    
    * mlockall() uncovererd an old bug in the VM system that was previously
      masked by other code.  The VM system going way way back assumed that
      wired pages were already wired and that at worst only a zero-fill was
      needed, so the TRYPAGER() macro checked for the case.
    
      However, when issuing a mlockall(), the refactored VM system uses
      vm_fault() to bring in missing wired pages to satisfy the request,
      was hitting the old condition, and doing a zero-fill instead.
    
    * This caused cryptsetup() (one of the few programs to actually use
      mlockall()) to seg-fault under typical conditions.
    
    * Fix by removing that part of the conditional.  Regardless of the
      wiring flags, the pager is still tried for non-default VM objects.
    
    Reported-by: mneumann, aly

Summary of changes:
 sys/vm/vm_fault.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ab80faa015dd7109e0968a60798c3d13bbb3ebc5


-- 
DragonFly BSD source repository


More information about the Commits mailing list