diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2008-12-16 02:06:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-16 11:19:23 -0500 |
commit | c095adbc211f9f4e990eac7d6cb440de35e4f05f (patch) | |
tree | b2da614d48d715816b8ee7172918fa9d2f089a24 /mm | |
parent | a3dd15444baa9c7522c8457ab564c41219dfb44c (diff) |
mm: Don't touch uninitialized variable in do_pages_stat_array()
Commit 80bba1290ab5122c60cdb73332b26d288dc8aedd removed one necessary
variable initialization. As a result following warning happened:
CC mm/migrate.o
mm/migrate.c: In function 'sys_move_pages':
mm/migrate.c:1001: warning: 'err' may be used uninitialized in this function
More unfortunately, if find_vma() failed, kernel read uninitialized
memory.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Brice Goglin <Brice.Goglin@inria.fr>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index d8f07667fc80..037b0967c1e3 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -998,7 +998,7 @@ static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages, | |||
998 | unsigned long addr = (unsigned long)(*pages); | 998 | unsigned long addr = (unsigned long)(*pages); |
999 | struct vm_area_struct *vma; | 999 | struct vm_area_struct *vma; |
1000 | struct page *page; | 1000 | struct page *page; |
1001 | int err; | 1001 | int err = -EFAULT; |
1002 | 1002 | ||
1003 | vma = find_vma(mm, addr); | 1003 | vma = find_vma(mm, addr); |
1004 | if (!vma) | 1004 | if (!vma) |