Skip to content

Commit

Permalink
similar to "kasan: test: fix compatibility with FORTIFY_SOURCE"
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
Stephen Rothwell committed Jan 28, 2022
1 parent 56cf096 commit 790a96c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/test_kasan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,8 @@ static void vmalloc_oob(struct kunit *test)
v_ptr = vmalloc(size);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, v_ptr);

OPTIMIZER_HIDE_VAR(v_ptr);

/*
* We have to be careful not to hit the guard page in vmalloc tests.
* The MMU will catch that and crash us.
Expand Down

0 comments on commit 790a96c

Please sign in to comment.