Page MenuHomeFreeBSD

mlock(2): correct documentation for error conditions.
ClosedPublic

Authored by asomers on Jan 10 2018, 5:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 18, 11:29 PM
Unknown Object (File)
Wed, Feb 18, 1:42 PM
Unknown Object (File)
Tue, Feb 17, 10:43 AM
Unknown Object (File)
Mon, Feb 16, 9:38 PM
Unknown Object (File)
Mon, Feb 16, 2:31 AM
Unknown Object (File)
Thu, Jan 22, 8:55 AM
Unknown Object (File)
Jan 20 2026, 3:33 AM
Unknown Object (File)
Dec 31 2025, 5:28 PM
Subscribers

Details

Summary

mlock(2): correct documentation for error conditions.

The man page is years out of date regarding errors. Our implementation _does_
allow unaligned addresses, and it _does_not_ check for negative lengths,
because the length is unsigned. It checks for overflow instead.

Update the tests accordingly.

Test Plan

Updated ATF tests

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14251
Build 14412: arc lint + arc unit