Whamcloud - gitweb
LU-4360 Fix use after free in ksocknal_send 67/8667/3
authorOleg Drokin <oleg.drokin@intel.com>
Sat, 28 Dec 2013 03:31:15 +0000 (22:31 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 11 Jan 2014 17:22:49 +0000 (17:22 +0000)
commit62e3367f94774fd10ab8df307a6eae4da4491554
treeb5953f44ab6d3b9c69852aeb509003adfe4a8ddf
parent2166e18369121021c53b50abaee1bbf533d76d52
LU-4360 Fix use after free in ksocknal_send

Call to ksocknal_launch_packet might schedule a callback that
might free the just sent message, and so subsequent access to it
via lntmsg->msg_vmflush goes to freed memory.

Instead we'll just remember if we are in the vmflush thread and
only restore if we happened to set mempressure flag.

Change-Id: I2f0f8b27e26e11b37ad60fde4c98e86c39768349
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/8667
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
lnet/klnds/socklnd/socklnd_cb.c