From: Roland McGrath Date: Sat, 7 Feb 2009 01:34:07 +0000 (-0800) Subject: elf core dump: fix get_user use X-Git-Tag: v2.6.27.16~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e87492436fe19cdc2ec41560429840ad8057a044;p=pandora-kernel.git elf core dump: fix get_user use commit 92dc07b1f988e8c237a38e23be660b9b8533e6fd upstream. The elf_core_dump() code does its work with set_fs(KERNEL_DS) in force, so vma_dump_size() needs to switch back with set_fs(USER_DS) to safely use get_user() for a normal user-space address. Checking for VM_READ optimizes out the case where get_user() would fail anyway. The vm_file check here was already superfluous given the control flow earlier in the function, so that is a cleanup/optimization unrelated to other changes but an obvious and trivial one. Reported-by: Gerald Schaefer Signed-off-by: Roland McGrath Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed