public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Vangelis Tasoulas <vangelis-S8y2klWGCOFhl2p70BpVqQ@public.gmane.org>
To: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Linux RDMA Mailing List
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block()
Date: Sat, 20 Dec 2014 19:22:24 +0100	[thread overview]
Message-ID: <5495BE60.50301@simula.no> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]

From a399cd7398a86b72541c628588365c252882cd80 Mon Sep 17 00:00:00 2001
From: Vangelis Tasoulas <vangelis-e629+x1LERvk1uMJSBkQmQ@public.gmane.org>
Date: Sat, 20 Dec 2014 19:10:33 +0100
Subject: [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block()
 when LIDs from the top LFT block (0xbfc0-0xbfff) are used.

---
 opensm/osm_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opensm/osm_switch.c b/opensm/osm_switch.c
index 11efd54..a28ec28 100644
--- a/opensm/osm_switch.c
+++ b/opensm/osm_switch.c
@@ -168,7 +168,7 @@ boolean_t osm_switch_get_lft_block(IN const
osm_switch_t * p_sw,
        if (base_lid_ho > p_sw->max_lid_ho)
                return FALSE;

-       CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE <= IB_LID_UCAST_END_HO);
+       CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE - 1 <=
IB_LID_UCAST_END_HO);
        memcpy(p_block, &(p_sw->lft[base_lid_ho]), IB_SMP_DATA_SIZE);
        return TRUE;
 }
-- 
1.9.1

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Fixes-wrong-assertion-failed-in-osm_switch_get_lft_b.patch --]
[-- Type: text/x-patch; name="0001-Fixes-wrong-assertion-failed-in-osm_switch_get_lft_b.patch", Size: 939 bytes --]

From a399cd7398a86b72541c628588365c252882cd80 Mon Sep 17 00:00:00 2001
From: Vangelis Tasoulas <vangelis-e629+x1LERvk1uMJSBkQmQ@public.gmane.org>
Date: Sat, 20 Dec 2014 19:10:33 +0100
Subject: [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block()
 when LIDs from the top LFT block (0xbfc0-0xbfff) are used.

---
 opensm/osm_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opensm/osm_switch.c b/opensm/osm_switch.c
index 11efd54..a28ec28 100644
--- a/opensm/osm_switch.c
+++ b/opensm/osm_switch.c
@@ -168,7 +168,7 @@ boolean_t osm_switch_get_lft_block(IN const osm_switch_t * p_sw,
 	if (base_lid_ho > p_sw->max_lid_ho)
 		return FALSE;
 
-	CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE <= IB_LID_UCAST_END_HO);
+	CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE - 1 <= IB_LID_UCAST_END_HO);
 	memcpy(p_block, &(p_sw->lft[base_lid_ho]), IB_SMP_DATA_SIZE);
 	return TRUE;
 }
-- 
1.9.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

             reply	other threads:[~2014-12-20 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20 18:22 Vangelis Tasoulas [this message]
     [not found] ` <5495BE60.50301-S8y2klWGCOFhl2p70BpVqQ@public.gmane.org>
2014-12-21 10:07   ` [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block() Ilya Nelkenbaum
     [not found]     ` <54969BC4.8060400-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-12-21 13:50       ` Vangelis Tasoulas
     [not found]         ` <5496D024.2030704-S8y2klWGCOFhl2p70BpVqQ@public.gmane.org>
2014-12-21 14:02           ` Ilya Nelkenbaum
2015-01-02 13:25   ` 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=5495BE60.50301@simula.no \
    --to=vangelis-s8y2klwgcofhl2p70bpvqq@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox