Whamcloud - gitweb
LU-8260 osd-ldiskfs: osd_fiemap_get() fix address space mismatch 78/33878/6
authorArshad Hussain <arshad.super@gmail.com>
Tue, 4 Dec 2018 18:20:59 +0000 (23:50 +0530)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Mar 2019 03:42:29 +0000 (03:42 +0000)
commitdcafe7cb48f5e4582a4711652b38629c46675232
tree48b7318da6bffc72bad87c8d59b775fdc0744c44
parent07911aedd161348867a6126fce2fedc633e5e89e
LU-8260 osd-ldiskfs: osd_fiemap_get() fix address space mismatch

There was an address space mismatch in function
osd_fiemap_get() as this uses "__user" qualifier
in fiemap_extent buffer. Since this buffer is created
under kernel and again passed to another call, this
may fail under some configuration.

This patch address this issue by modifying the
address space limit by using get_fs() and set_fs()
call suggesting that the pointers are intact and
secure.

Change-Id: I25048faecd3475d5e91e25e6a47e065e49e36b26
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/33878
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_io.c