Skip to content
Commit 5a06fcb1 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

lib/test_lockup: fix kernel pointer check for separate address spaces



test_kernel_ptr() uses access_ok() to figure out if a given address
points to user space instead of kernel space. However on architectures
that set CONFIG_ALTERNATE_USER_ADDRESS_SPACE, a pointer can be valid
for both, and the check always fails because access_ok() returns true.

Make the check for user space pointers conditional on the type of
address space layout.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 12700c17
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment