Whamcloud - gitweb
LU-6302 lov: copy_to_user uses wrong casting 13/14613/6
authorJames Simmons <uja.ornl@yahoo.com>
Thu, 7 May 2015 22:23:05 +0000 (18:23 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 28 May 2015 22:28:18 +0000 (22:28 +0000)
commit99393dc16a663fcf028b49353333a24f1dd3bb1c
treeb4346895cf4e8a78cb368acdb20c34e5c7f8141e
parent5b6d23d7fb8de7ae44ca369381a128c78f78bf21
LU-6302 lov: copy_to_user uses wrong casting

While testing on newer kernels lov_obd.c failes to compile
with the following warning.

In function copy_to_user,
inlined from lov_iocontrol at
lustre-2.7.52/lustre/lov/lov_obd.c:1168:
./arch/x86/include/asm/uaccess.h:735: error: call to
__copy_to_user_overflow declared with attribute warning:
copy_to_user() buffer size is not probably correct

In lov_iocontrol the data was being casted to int instead
of the required unsigned long. This patch changes the cast
to what is needed for copy_to_user.

Change-Id: I75b9f4f935d57dc3df56a2c0869c7d2506217d39
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/14613
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lov/lov_obd.c