diff options
author | Roland McGrath <roland@redhat.com> | 2009-02-06 17:34:07 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-12 09:31:11 -0800 |
commit | e87492436fe19cdc2ec41560429840ad8057a044 (patch) | |
tree | e19a72f1e7ecbeb8ca5f8418d5ff043782aa5876 /fs/nfsd/nfs4idmap.c | |
parent | d5ff00ef6bb0bfe01f1481adaec52983e4718b70 (diff) |
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 <gerald.schaefer@de.ibm.com>
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
0 files changed, 0 insertions, 0 deletions