projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'core-urgent-for-linus', 'irq-urgent-for-linus' and 'sched-urgent...
[cascardo/linux.git]
/
mm
/
util.c
diff --git
a/mm/util.c
b/mm/util.c
index
662cddf
..
1a41553
100644
(file)
--- a/
mm/util.c
+++ b/
mm/util.c
@@
-230,8
+230,10
@@
void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
}
/* Check if the vma is being used as a stack by this task */
}
/* Check if the vma is being used as a stack by this task */
-int vma_is_stack_for_
task(struct vm_area_struct *vma, struct task_struct *t
)
+int vma_is_stack_for_
current(struct vm_area_struct *vma
)
{
{
+ struct task_struct * __maybe_unused t = current;
+
return (vma->vm_start <= KSTK_ESP(t) && vma->vm_end >= KSTK_ESP(t));
}
return (vma->vm_start <= KSTK_ESP(t) && vma->vm_end >= KSTK_ESP(t));
}
@@
-283,7
+285,8
@@
EXPORT_SYMBOL_GPL(__get_user_pages_fast);
int __weak get_user_pages_fast(unsigned long start,
int nr_pages, int write, struct page **pages)
{
int __weak get_user_pages_fast(unsigned long start,
int nr_pages, int write, struct page **pages)
{
- return get_user_pages_unlocked(start, nr_pages, write, 0, pages);
+ return get_user_pages_unlocked(start, nr_pages, pages,
+ write ? FOLL_WRITE : 0);
}
EXPORT_SYMBOL_GPL(get_user_pages_fast);
}
EXPORT_SYMBOL_GPL(get_user_pages_fast);
@@
-623,7
+626,7
@@
int get_cmdline(struct task_struct *task, char *buffer, int buflen)
if (len > buflen)
len = buflen;
if (len > buflen)
len = buflen;
- res = access_process_vm(task, arg_start, buffer, len,
0
);
+ res = access_process_vm(task, arg_start, buffer, len,
FOLL_FORCE
);
/*
* If the nul at the end of args has been overwritten, then
/*
* If the nul at the end of args has been overwritten, then
@@
-638,7
+641,8
@@
int get_cmdline(struct task_struct *task, char *buffer, int buflen)
if (len > buflen - res)
len = buflen - res;
res += access_process_vm(task, env_start,
if (len > buflen - res)
len = buflen - res;
res += access_process_vm(task, env_start,
- buffer+res, len, 0);
+ buffer+res, len,
+ FOLL_FORCE);
res = strnlen(buffer, res);
}
}
res = strnlen(buffer, res);
}
}