From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Doug Oucharek <doug.s.oucharek@intel.com>
Subject: [PATCH 4/7] staging: lustre: Change connect peer failed cleanup order
Date: Wed, 2 Mar 2016 18:53:27 -0500 [thread overview]
Message-ID: <1456962810-21806-5-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1456962810-21806-1-git-send-email-jsimmons@infradead.org>
From: Doug Oucharek <doug.s.oucharek@intel.com>
A race condition has been found where connd is cleaning up failed
connections, the peer ref counter goes to zero, but we stil have
a connecting counter > 0.
One possible race is when we are retrying a connection by
calling kiblnd_connect_peer() which itself fails and decrements
the peer ref counter and gets swapped out before it can decrement
the connecting counter. connd swaps in and cleans up the
connection where it sees a peer ref counter of 1 and a connecting
counter of 1. This will trigger the assert seen in LU-7210 when
it decrements the peer counter.
The solution: be sure to decrement the connecting counter
before decrementing the peer counter in the peer connect
failure path.
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7210
Reviewed-on: http://review.whamcloud.com/17004
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index f76c570..7602d71 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1298,8 +1298,10 @@ kiblnd_connect_peer(kib_peer_t *peer)
return;
failed2:
+ kiblnd_peer_connect_failed(peer, 1, rc);
kiblnd_peer_decref(peer); /* cmid's ref */
rdma_destroy_id(cmid);
+ return;
failed:
kiblnd_peer_connect_failed(peer, 1, rc);
}
--
1.7.1
next prev parent reply other threads:[~2016-03-02 23:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 23:53 [PATCH 0/7] All remaining outstanding bug fixes for ko2iblnd James Simmons
2016-03-02 23:53 ` [PATCH 1/7] staging: lustre: Support different ko2iblnd configs between systems James Simmons
2016-03-02 23:53 ` [PATCH 2/7] staging: lustre: make ko2iblnd connect parameters persistent James Simmons
2016-03-02 23:53 ` [PATCH 3/7] staging: lustre: take extra refcount in kiblnd_connreq_done James Simmons
2016-03-02 23:53 ` James Simmons [this message]
2016-03-02 23:53 ` [PATCH 5/7] staging: lustre: check wr_id returned by ib_poll_cq James Simmons
2016-03-02 23:53 ` [PATCH 6/7] staging: lustre: avoid intensive reconnecting for ko2iblnd James Simmons
2016-03-02 23:53 ` [PATCH 7/7] staging: lustre: do less intense allocating retry " James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456962810-21806-5-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=doug.s.oucharek@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®