HomeFreeBSD

Fix handling of invalid pages in exec_map_first_page().

Description

Fix handling of invalid pages in exec_map_first_page().

exec_map_first_page() would unconditionally free an unbacked, invalid
page from the executable image. However, it is possible that the page
is wired, in which case it is incorrect to free the page, so check for
additional wirings first.

Reported by: syzkaller
Tested by: pho
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21767

Details

Provenance
markjAuthored on
Reviewer
kib
Differential Revision
D21767: Fix handling of page wirings exec_map_first_page().
Parents
rS352747: Add an shm_rename syscall
Branches
Unknown
Tags
Unknown