summaryrefslogtreecommitdiffstats
path: root/lib/test_lockup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test_lockup.c')
-rw-r--r--lib/test_lockup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/test_lockup.c b/lib/test_lockup.c
index 419fbaceba73..f258743a0d83 100644
--- a/lib/test_lockup.c
+++ b/lib/test_lockup.c
@@ -103,7 +103,7 @@ MODULE_PARM_DESC(lock_rcu, "grab rcu_read_lock: generate rcu stalls");
static bool lock_mmap_sem;
module_param(lock_mmap_sem, bool, 0400);
-MODULE_PARM_DESC(lock_mmap_sem, "lock mm->mmap_sem: block procfs interfaces");
+MODULE_PARM_DESC(lock_mmap_sem, "lock mm->mmap_lock: block procfs interfaces");
static unsigned long lock_rwsem_ptr;
module_param_unsafe(lock_rwsem_ptr, ulong, 0400);
@@ -191,11 +191,11 @@ static void test_lock(bool master, bool verbose)
if (lock_mmap_sem && master) {
if (verbose)
- pr_notice("lock mmap_sem pid=%d\n", main_task->pid);
+ pr_notice("lock mmap_lock pid=%d\n", main_task->pid);
if (lock_read)
- down_read(&main_task->mm->mmap_sem);
+ mmap_read_lock(main_task->mm);
else
- down_write(&main_task->mm->mmap_sem);
+ mmap_write_lock(main_task->mm);
}
if (test_disable_irq)
@@ -276,11 +276,11 @@ static void test_unlock(bool master, bool verbose)
if (lock_mmap_sem && master) {
if (lock_read)
- up_read(&main_task->mm->mmap_sem);
+ mmap_read_unlock(main_task->mm);
else
- up_write(&main_task->mm->mmap_sem);
+ mmap_write_unlock(main_task->mm);
if (verbose)
- pr_notice("unlock mmap_sem pid=%d\n", main_task->pid);
+ pr_notice("unlock mmap_lock pid=%d\n", main_task->pid);
}
if (lock_rwsem_ptr && master) {
@@ -505,7 +505,7 @@ static int __init test_lockup_init(void)
}
if (lock_mmap_sem && !main_task->mm) {
- pr_err("no mm to lock mmap_sem\n");
+ pr_err("no mm to lock mmap_lock\n");
return -EINVAL;
}