staging/lustre/o2iblnd: connection refcount fix for kiblnd_post_rx
authorLiang Zhen <liang.zhen@intel.com>
Mon, 14 Sep 2015 22:41:24 +0000 (18:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Sep 2015 13:26:53 +0000 (06:26 -0700)
commit6fa3c577bb8d57a517445af1015035eb43a87a1f
tree3e023c183f7f7102e4e2a06c0bfb08f0e3ad923d
parentbbaa9c10328aa14615733c407b0c2f6d9c3df330
staging/lustre/o2iblnd: connection refcount fix for kiblnd_post_rx

kiblnd_post_rx() can't refer to rx::rx_conn anymore after
ib_post_recv() because this rx can be polled out by another thread
which may drop this rx and destroy rx::rx_conn.

This patch fixes this issue by taking an extra refcount on connection
before calling ib_post_recv().

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