From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 3/7] tabled: Stub NULL session in events
Date: Thu, 1 Apr 2010 19:51:27 -0600 [thread overview]
Message-ID: <20100401195127.0e565812@redhat.com> (raw)
Currently ncld has a bug that causes it to report a session failure
when session was not open yet. So, if a session fails to open,
application crashes while trying to print the SID. This problem
made this crash occur easily.
Unfortunately for us, there's more to it. If the library opened
session, but is pre-empted before ncld_sess_open returns, the
same situation may occur legitimately. So this check is still
needed, unless we radically change the locking strategy.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
---
server/cldu.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
commit 446e8ca93ce624797a69841f38081faa369fee4a
Author: Pete Zaitcev <zaitcev@yahoo.com>
Date: Thu Apr 1 19:09:34 2010 -0600
Stub the problem with failure to open.
diff --git a/server/cldu.c b/server/cldu.c
index aecf336..fadc3d8 100644
--- a/server/cldu.c
+++ b/server/cldu.c
@@ -176,8 +176,11 @@ static void cldu_sess_event(void *priv, uint32_t what)
struct cld_session *sp = priv;
if (what == CE_SESS_FAILED) {
- applog(LOG_ERR, "Session failed, sid " SIDFMT,
- SIDARG(sp->nsp->udp->sess->sid));
+ if (sp->nsp)
+ applog(LOG_ERR, "Session failed, sid " SIDFMT,
+ SIDARG(sp->nsp->udp->sess->sid));
+ else
+ applog(LOG_ERR, "Session open failed");
sp->is_dead = true;
} else {
if (sp->nsp)
reply other threads:[~2010-04-02 1:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100401195127.0e565812@redhat.com \
--to=zaitcev@redhat.com \
--cc=hail-devel@vger.kernel.org \
--cc=jeff@garzik.org \
/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