Whamcloud - gitweb
LU-3333 ptlrpc: Protect request buffer changing
authorOleg Drokin <oleg.drokin@intel.com>
Mon, 27 May 2013 18:06:09 +0000 (14:06 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 29 Apr 2014 00:14:14 +0000 (20:14 -0400)
commit053cc9566d2d38604892e982de75112d2d19942b
treecd905ed25a1f5c1de571182b670358c8a84f6d87
parent3d015e906112cb97ce1187e57bab355d639e471d
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