Skip to content
Snippets Groups Projects
Commit ea6d73b7 authored by Jake Freeland's avatar Jake Freeland Committed by Kamil Konieczny
Browse files

lib/tests/igt_fork.c: Fix error in mmap() flags


In subtest_leak(), mmap() is called with the flag PROT_WRITE,
but no PROT_READ. Later in the function, the mapped memory is
read using `children[i]`. In FreeBSD, the lack of PROT_READ
causes SIGSEGV. Adding the PROT_READ flag to the mmap() call
fixes this.

Signed-off-by: default avatarJake Freeland <jfree@freebsd.org>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
parent fb11941e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment