Whamcloud - gitweb
LU-3333 ptlrpc: Protect request buffer changing 67/6467/5
authorOleg Drokin <oleg.drokin@intel.com>
Mon, 27 May 2013 18:06:09 +0000 (14:06 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 17 Apr 2014 15:16:44 +0000 (15:16 +0000)
commitb2bb3b247d1dc75e25f1b5c14a333905909b5e70
tree6db86bdaa93cb70ff7a671509284b737d944df92
parente5f552b70dccbd2fdf21ec7b7053a01bcbe062c2
LU-3333 ptlrpc: Protect request buffer changing

*_enlarge_reqbuf class of functions can change request body location
for a request that's already in replay list, as such a parallel
traverser of the list (after_reply -> ptlrpc_free_committed) might
access freed and scrambled memory causing assertions.

Separate out the common code in ptlrpc_enlarge_req_buffer and
protect the buffer replacement by imp_lock since all users
that can get to this request must be holding this lock themselves
first.

Change-Id: I051d96196b44faafc15c58e0b2127856929f0ba7
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/6467
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
lustre/ptlrpc/gss/sec_gss.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/ptlrpc_internal.h
lustre/ptlrpc/sec_null.c
lustre/ptlrpc/sec_plain.c