Re: [PATCH/opensm] Decode the SAPKeyTableRecord block number properly, and don't segv
From: Alex Netes <hidden>
Date: 2011-02-25 22:02:59
On 12:35 Fri 25 Feb , Jason Gunthorpe wrote:
On Fri, Feb 25, 2011 at 01:25:15PM +0200, Alex Netes wrote:quoted
quoted
quoted
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