summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Oucharek2016-08-16 22:19:29 +0200
committerGreg Kroah-Hartman2016-08-21 15:57:39 +0200
commite426f0d24e1c92f54098758cc83eb16989c48855 (patch)
tree66c87b9a2dd563dc14e99d0381cbd5695d681414
parentstaging: lustre: llite: set op_max_pages (diff)
downloadkernel-qcow2-linux-e426f0d24e1c92f54098758cc83eb16989c48855.tar.gz
kernel-qcow2-linux-e426f0d24e1c92f54098758cc83eb16989c48855.tar.xz
kernel-qcow2-linux-e426f0d24e1c92f54098758cc83eb16989c48855.zip
staging: lustre: lnet: Do not drop message when shutting down LNet
There is a case in lnet_parse() where we discover that LNet is shutting down but we continue to use the NI when we drop the message and end up calling ko2iblnd_check_send_locked() which tries to allocate from the Tx pool which has been cleaned up already. This triggers a NULL pointer dereference. This fix just returns from lnet_parse() when we disover LNet is shutting down. Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8106 Reviewed-on: http://review.whamcloud.com/19993 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lnet/lnet/lib-move.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 6a3f2e116ff6..5598fa876426 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -2002,6 +2002,9 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t from_nid,
libcfs_nid2str(from_nid), libcfs_nid2str(src_nid),
lnet_msgtyp2str(type), rc);
lnet_msg_free(msg);
+ if (rc == -ESHUTDOWN)
+ /* We are shutting down. Don't do anything more */
+ return 0;
goto drop;
}