|
@@ -813,7 +813,7 @@ static ssize_t mem_rw(struct file *file, char __user *buf,
|
|
|
return -ENOMEM;
|
|
|
|
|
|
copied = 0;
|
|
|
- if (!atomic_inc_not_zero(&mm->mm_users))
|
|
|
+ if (!mmget_not_zero(mm))
|
|
|
goto free;
|
|
|
|
|
|
/* Maybe we should limit FOLL_FORCE to actual ptrace users? */
|
|
@@ -921,7 +921,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
|
|
|
return -ENOMEM;
|
|
|
|
|
|
ret = 0;
|
|
|
- if (!atomic_inc_not_zero(&mm->mm_users))
|
|
|
+ if (!mmget_not_zero(mm))
|
|
|
goto free;
|
|
|
|
|
|
down_read(&mm->mmap_sem);
|