From mboxrd@z Thu Jan 1 00:00:00 1970 From: "ira.weiny" Subject: Re: [PATCH 1/5] IB/user_mad: Fix bug in ib_umad_remove_one when rdma_cap_ib_mad implementation changed Date: Tue, 12 May 2015 17:53:28 -0400 Message-ID: <20150512215327.GB7341@phlsvsds.ph.intel.com> References: <1431395218-27693-1-git-send-email-ira.weiny@intel.com> <1431395218-27693-2-git-send-email-ira.weiny@intel.com> <20150512191505.GB3503@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20150512191505.GB3503-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org On Tue, May 12, 2015 at 01:15:05PM -0600, Jason Gunthorpe wrote: > On Mon, May 11, 2015 at 09:46:54PM -0400, ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote: > > From: Ira Weiny > > > > The addition of the rdma_cap_ib_mad is technically broken in ib_umad_remove_one > > because the loop "i" value is not a port value. > > > > This bug resulted in the ib_umad failing to properly remove its resources when > > the core capability functions were converted to bit fields. > > > > NOTE: This original patch did not result in broken behavior on its own. It was > > only an issue when the implementation of rdma_cap_ib_mad was changed. > > Didn't cause a bug, but is certainly wrong.. > > >+ if (rdma_cap_ib_mad(device, i)) > >- if (rdma_cap_ib_mad(device, i + start_port(device))) > > Is alot simpler. At the very least, use start_port/end_port to compute > those ranges... I was really hoping to avoid making start/end port public. But you are correct... Additional patches on the way. Ira -- 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