Whamcloud - gitweb
LU-9817 lnet: safe access to msg 39/28439/2
authorAmir Shehata <amir.shehata@intel.com>
Tue, 1 Aug 2017 21:24:57 +0000 (14:24 -0700)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 16 Aug 2017 20:43:47 +0000 (20:43 +0000)
commit79296f45e8a4f9e4864022263d3f3d7832fc4b6f
treed0e20471aafa4aa918a614924a5ed72a4063c063
parent9ea9bc9f870ede585166d32442ba9bd22f653c32
LU-9817 lnet: safe access to msg

When tx credits are returned if there are pending messages they
need to be sent. Messages could have different tx_cpts, so the
correct one needs to be locked. After lnet_post_send_locked(),
if we locked a different CPT then we need to relock the correct one
However, as part of lnet_post_send_locked(), lnet_finalze() can
be called which can free the message. Therefore, the cpt of the
message being passed must be cached in order to prevent access to
freed memory.

Lustre-change: https://review.whamcloud.com/28308
Lustre-commit: 7af6307ba4e67673bc52aaaeb54f2cb4b632a3b7

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I959fdc30daf87b5575d8371da20d5cf6f64e7d3c
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28439
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lnet/lnet/lib-move.c