Whamcloud - gitweb
LU-6995 osd: fix invalid use of bvec_iter_page 67/15967/2
authorFrank Zago <fzago@cray.com>
Wed, 12 Aug 2015 16:44:24 +0000 (11:44 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 19 Sep 2015 03:33:28 +0000 (03:33 +0000)
commitdecbd1c0bfbc2d6c9e43c6fb880d7cbfe41b9143
tree96fef62923a66d96be919e0228d02202d6503e65
parent3f92b85d0db612517bb473212fa15fe967539f88
LU-6995 osd: fix invalid use of bvec_iter_page

bvec_iter_page is expecting a biovecs list as a first argument, not a
biovec. That works as long as there is only one biovec in the bio. If
there is more than one, then invalid memory is dereferences since bvl
is a single vector, not a list. This only affect 3.14+ kernels, where
HAVE_BVEC_ITER is true. Don't use bvec_iter_page, but create the right
macro to simply return the vector's bv_page. Bug introduced in commit
833b670a.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I390b527bacae9dd650814bb19ab2dbc9184a605d
Reviewed-on: http://review.whamcloud.com/15967
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_compat.h
lustre/osd-ldiskfs/osd_io.c