]> git.baikalelectronics.ru Git - kernel.git/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)
commitbca7437899ade553644813fb461b06cf7c1bf65d
tree8a3b945d03f27e839e40c0b8e3f7bf426882a757
parenta590ab32b3b4dfae5d6f6ae9b3677882d8c99777
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