Benny Halevy dfe195fb79 mm: fix uninitialized variables for find_vma_prepare callers
gcc 4.3.0 correctly emits the following warnings.
When a vma covering addr is found, find_vma_prepare indeed returns without
setting pprev, rb_link, and rb_parent.

  mm/mmap.c: In function `insert_vm_struct':
  mm/mmap.c:2085: warning: `rb_parent' may be used uninitialized in this function
  mm/mmap.c:2085: warning: `rb_link' may be used uninitialized in this function
  mm/mmap.c:2084: warning: `prev' may be used uninitialized in this function
  mm/mmap.c: In function `copy_vma':
  mm/mmap.c:2124: warning: `rb_parent' may be used uninitialized in this function
  mm/mmap.c:2124: warning: `rb_link' may be used uninitialized in this function
  mm/mmap.c:2123: warning: `prev' may be used uninitialized in this function
  mm/mmap.c: In function `do_brk':
  mm/mmap.c:1951: warning: `rb_parent' may be used uninitialized in this function
  mm/mmap.c:1951: warning: `rb_link' may be used uninitialized in this function
  mm/mmap.c:1949: warning: `prev' may be used uninitialized in this function
  mm/mmap.c: In function `mmap_region':
  mm/mmap.c:1092: warning: `rb_parent' may be used uninitialized in this function
  mm/mmap.c:1092: warning: `rb_link' may be used uninitialized in this function
  mm/mmap.c:1089: warning: `prev' may be used uninitialized in this function

Hugh adds: in fact, none of find_vma_prepare's callers use those values
when a vma is found to be already covering addr, it's either an error or
an occasion to munmap and repeat.  Okay, let's quieten the compiler (but I
would prefer it if pprev, rb_link and rb_parent were meaningful in that
case, rather than whatever's in them from descending the tree).

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: "Ryan Hope" <rmh3093@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-05 14:33:50 -07:00
..
2008-07-28 16:30:21 -07:00
2008-08-04 21:31:34 -07:00
2008-07-28 16:30:21 -07:00
2008-07-19 22:39:46 -07:00
2008-07-24 10:47:17 -07:00
2008-07-28 16:30:21 -07:00
2008-07-28 16:30:21 -07:00
2008-08-04 21:31:34 -07:00
2007-10-20 01:27:18 +02:00
2008-08-04 21:31:34 -07:00
2008-04-28 08:58:18 -07:00
2008-08-04 16:58:45 -07:00
2008-07-28 16:30:21 -07:00
2008-07-28 16:30:21 -07:00
2008-07-28 16:30:21 -07:00
2007-05-21 09:18:19 -07:00
2008-08-04 16:01:47 +09:00
2008-02-05 09:44:19 -08:00
2008-07-26 12:00:06 -07:00
2008-06-12 18:05:41 -07:00
2007-10-20 01:27:18 +02:00
2008-07-26 12:00:06 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-07-04 10:40:04 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-07-26 12:00:07 -07:00
2008-08-04 21:31:34 -07:00
2008-07-24 10:47:14 -07:00