public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Netes <alexne-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH/opensm] Decode the SAPKeyTableRecord block number properly, and don't segv
Date: Sat, 26 Feb 2011 00:02:59 +0200	[thread overview]
Message-ID: <20110225220259.GA7222@calypso.voltaire.com> (raw)
In-Reply-To: <20110225193509.GA9157-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 12:35 Fri 25 Feb     , Jason Gunthorpe wrote:
> On Fri, Feb 25, 2011 at 01:25:15PM +0200, Alex Netes wrote:
> 
> > > > What is the expected behaviour when IB PKey table block is empty?
> > > > rec.pkey_tbl might be uninitialized here.
> > > > Shouldn't SubnAdmGetResp contain ERR_NO_RECORDS in such case?
> > > 
> > > It depends on the method used in the SA query. GetTable never returns
> > > ERR_NO_RECORDS whereas a Get can.
> > 
> > In case when IB PKey table block is empty, p_rec_item->rec.pkey_tbl would be uninitialized.
> 
> No, it isn't, it is zero.
> 
>         memset(p_rec_item, 0, sizeof(*p_rec_item));
> 
>         p_rec_item->rec.lid = lid;
>         p_rec_item->rec.block_num = block;
>         p_rec_item->rec.port_num = osm_physp_get_port_num(p_physp);
>         p_rec_item->rec.pkey_tbl =
>             *(osm_pkey_tbl_block_get(osm_physp_get_pkey_tbl(p_physp),
> 	    block));
> 
> 
> Jason

Sorry. Missed that.
--
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

  parent reply	other threads:[~2011-02-25 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11 22:12 [PATCH/opensm] Decode the SAPKeyTableRecord block number properly, and don't segv Jason Gunthorpe
     [not found] ` <20110211221206.GA8532-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-02-23 17:20   ` Alex Netes
     [not found]     ` <20110223172019.GA8537-iQai9MGU/dyyaiaB+Ve85laTQe2KTcn/@public.gmane.org>
2011-02-23 18:13       ` Jason Gunthorpe
2011-02-23 19:01       ` Hal Rosenstock
     [not found]         ` <AANLkTinm5Uh-9h+WMh6O8dLsPr8wpdt0BJmOu3+Dt8vj-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-23 20:21           ` Hal Rosenstock
2011-02-25 11:25           ` Alex Netes
     [not found]             ` <20110225112514.GC8537-iQai9MGU/dyyaiaB+Ve85laTQe2KTcn/@public.gmane.org>
2011-02-25 19:35               ` Jason Gunthorpe
     [not found]                 ` <20110225193509.GA9157-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-02-25 22:02                   ` Alex Netes [this message]
2011-02-25 22:12   ` Alex Netes

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=20110225220259.GA7222@calypso.voltaire.com \
    --to=alexne-smomgflxvozwk0htik3j/w@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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