]> Pileus Git - ~andy/linux/commit
staging/lustre/lnet: Fix use after free in ksocknal_send
authorOleg Drokin <green@linuxhacker.ru>
Fri, 24 Jan 2014 04:45:05 +0000 (23:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 17:09:38 +0000 (09:09 -0800)
commitaadbacc7f2f0f359bd562cb95adde3da348fb643
tree8a3b945d03f27e839e40c0b8e3f7bf426882a757
parent52481e4b00f0f2922f2b0d3a3ee392677476c250
staging/lustre/lnet: 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.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/8667
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4360
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c