projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74e3f3c
)
mm/mempolicy.c: check return code of check_range
author
Vasiliy Kulikov
<
[email protected]
>
Tue, 26 Oct 2010 21:21:32 +0000
(14:21 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Oct 2010 23:52:06 +0000
(16:52 -0700)
Function check_range may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <
[email protected]
>
Acked-by: David Rientjes <
[email protected]
>
Reviewed-by: Christoph Lameter <
[email protected]
>
Reviewed-by: KOSAKI Motohiro <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/mempolicy.c
patch
|
blob
|
history
diff --git
a/mm/mempolicy.c
b/mm/mempolicy.c
index 21243b2b7b070827809e443331be43a7172706d8..81a127643aea889675e9570ebee5653833e55e95 100644
(file)
--- a/
mm/mempolicy.c
+++ b/
mm/mempolicy.c
@@
-924,12
+924,15
@@
static int migrate_to_node(struct mm_struct *mm, int source, int dest,
nodemask_t nmask;
LIST_HEAD(pagelist);
int err = 0;
+ struct vm_area_struct *vma;
nodes_clear(nmask);
node_set(source, nmask);
- check_range(mm, mm->mmap->vm_start, mm->task_size, &nmask,
+
vma =
check_range(mm, mm->mmap->vm_start, mm->task_size, &nmask,
flags | MPOL_MF_DISCONTIG_OK, &pagelist);
+ if (IS_ERR(vma))
+ return PTR_ERR(vma);
if (!list_empty(&pagelist)) {
err = migrate_pages(&pagelist, new_node_page, dest, 0);