lkml.org 
[lkml]   [2020]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] stress-shmsysv: exercise shmat with SHM_REMAP flag on NULL address
Date
Exercise shmat syscall with SHM_REMAP flag on NULL address resulting
in EINVAL error and more kernel coverage.

Signed-off-by: Piyush Goyal <piyushgoyaliit@gmail.com>
---
stress-shm-sysv.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/stress-shm-sysv.c b/stress-shm-sysv.c
index 9efaa091..e2aff788 100644
--- a/stress-shm-sysv.c
+++ b/stress-shm-sysv.c
@@ -149,6 +149,10 @@ static void exercise_shmat(int shm_id)

addr = shmat(shm_id, NULL, SHM_RND);
(void)addr;
+
+ /* Exercise shmat with SHM_REMAP flag on NULL address */
+ addr = shmat(shm_id, NULL, SHM_REMAP);
+ (void)addr;
}

#if defined(__linux__)
--
2.25.1
\
 
 \ /
  Last update: 2020-09-22 09:28    [W:0.064 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site