Skip to content

Commit 3e3650d

Browse files
committed
stress-bad-ioctl: remove division from buf_page1 calculation
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent 151c8ea commit 3e3650d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stress-bad-ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static inline void stress_bad_ioctl_rw(
499499
* Unmap last page so we know that the page following
500500
* buf is definitely not read/writeable
501501
*/
502-
buf_page1 = buf + page_size / sizeof(*buf_page1);
502+
buf_page1 = (uint64_t *)((uintptr_t)buf + page_size);
503503
(void)munmap((void *)buf_page1, page_size);
504504

505505
do {

0 commit comments

Comments
 (0)