From: "Jim Schutt" <jaschut-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
To: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"linux-rdma
(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] opensm/osm_torus.c: Fix crash in torus_update_osm_vlarb
Date: Mon, 3 Dec 2012 14:09:50 -0700 [thread overview]
Message-ID: <50BD151E.40205@sandia.gov> (raw)
In-Reply-To: <50BCC497.2030207-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
On 12/03/2012 08:26 AM, Hal Rosenstock wrote:
>
> Signed-off-by: Alex Netes<alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Hal Rosenstock<hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> opensm/osm_torus.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c
> index c06f8d4..075f84a 100644
> --- a/opensm/osm_torus.c
> +++ b/opensm/osm_torus.c
> @@ -8089,7 +8089,7 @@ void torus_update_osm_vlarb(void *context, osm_physp_t *osm_phys_port,
> * So, leave VL 0 alone, remap VL 4 to VL 1, zero out the rest,
> * and compress out the zero entries to the end.
> */
> - if (!sw || !port_num ||
> + if (!sw || !port_num || sw->port[port_num] ||
> sw->port[port_num]->pgrp->port_grp != 2 * TORUS_MAX_DIM)
> return;
>
With the patch as-is, if torus_update_osm_vlarb() returns early
for any non-NULL switch port, it will never do any updates.
If the crash was that sw->port[port_num] was NULL,
shouldn't the check be !sw->port[port_num] ?
Can you tell me more about the test case that leads to the crash?
Is it that there's a switch with a port that's not connected
to anything, and torus_update_osm_vlarb() was called for it?
Testing for a non-NULL sw->port[port_num] is definitely the right
thing to do to handle that case, and I'm sorry I missed it earlier.
If not, then something else is likely broken, and we need to find
and fix that.
-- Jim
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-12-03 21:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 15:26 [PATCH] opensm/osm_torus.c: Fix crash in torus_update_osm_vlarb Hal Rosenstock
[not found] ` <50BCC497.2030207-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-12-03 21:09 ` Jim Schutt [this message]
[not found] ` <50BD151E.40205-4OHPYypu0djtX7QSmKvirg@public.gmane.org>
2012-12-03 21:18 ` Hal Rosenstock
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=50BD151E.40205@sandia.gov \
--to=jaschut-4ohpyypu0djtx7qsmkvirg@public.gmane.org \
--cc=alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.