Whamcloud - gitweb
LU-3221 lov: remove set_fs() call from lov_getstripe()
authorJohn L. Hammond <john.hammond@intel.com>
Wed, 24 Apr 2013 21:13:08 +0000 (16:13 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 11 Jun 2013 15:59:46 +0000 (11:59 -0400)
commit60f6f21489287f0115626f40a5ad404804317f1b
treebe9ded8eb5f9b5a43c215d8d12fe8033fa89ca7a
parent8c801c728822ba232f08272145b0cd4f11fdf7c5
LU-3221 lov: remove set_fs() call from lov_getstripe()

lov_getstripe() calls set_fs(KERNEL_DS) so that it can handle a struct
lov_user_md pointer from user- or kernel-space.  This changes the
behavior of copy_from_user() on SPARC and may result in a misaligned
access exception which in turn oopses the kernel.  In fact the
relevant argument to lov_getstripe() is never called with a
kernel-space pointer and so changing the address limits is unnecessary
and so we remove the calls to save, set, and restore the address
limits.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id23f429875c92f9d6ed5cd06cadd741d98c46074
Reviewed-on: http://review.whamcloud.com/6150
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
lustre/lov/lov_pack.c