ksm: check for ERR_PTR from follow_page()
authorDan Carpenter <error27@gmail.com>
Fri, 23 Apr 2010 17:18:10 +0000 (13:18 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Apr 2010 18:31:26 +0000 (11:31 -0700)
commit22eccdd7d2d94be48ae9b01fef5f52ccbb81dcd5
tree346ba02239f0d3a1ed5d1d09fc3d323c29202270
parent453dc65931915abc61f92e12bba1fc4747ff5542
ksm: check for ERR_PTR from follow_page()

The follow_page() function can potentially return -EFAULT so I added
checks for this.

Also I silenced an uninitialized variable warning on my version of gcc
(version 4.3.2).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Izik Eidus <ieidus@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/ksm.c