Whamcloud - gitweb
LU-3333 ptlrpc: Protect request buffer changing 74/10074/3
authorOleg Drokin <oleg.drokin@intel.com>
Mon, 27 May 2013 18:06:09 +0000 (14:06 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Apr 2014 16:16:53 +0000 (16:16 +0000)
commitb35de525a14843f07ca0dbe611e254c82b08e161
tree92c18790b929b21c75859b483fef6a25623bbff0
parentdb63362b7a25434cadccb01a2237a1f5368887b1
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 assertion.

Since all such users only can get to this request under imp_lock, take
imp_lock to protect against them in *_enlarge_reqbuf

Change-Id: I0fa690aabd8696a9f05b94c66e06e30eefb5c759
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10074
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/ptlrpc/gss/sec_gss.c
lustre/ptlrpc/sec_null.c
lustre/ptlrpc/sec_plain.c