Re: [PATCH rdma-rc] RDMA/ucma: Fix access to non-initialized CM_ID object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 12, 2018 at 09:05:22PM +0200, Leon Romanovsky wrote:
> On Mon, Mar 12, 2018 at 06:39:00PM +0000, Hefty, Sean wrote:
> > > > rdma_join_multicast() includes state checks which are intended to
> > > validate that the cm_id is in a valid state.  It may make more sense
> > > to expand those checks with a device check, since the state checks
> > > alone are insufficient.
> > >
> > > Do you know why these checks not enough? Why did the change state
> > > without cm_id->device?
> >
> > I believe the cm_id can be bound to a wildcard address (state RDMA_CM_ADDR_BOUND), which would leave device unset.  RDMA_CM_ADDR_BOUND is used in both the wildcard and non-wildcard case.
> 
> ok and one more question, the syzkaller reported failure in this line line:
> 4170         if (rdma_protocol_roce(id->device, id->port_num))
> 
> Will the check of existence of id->device enough? Or should I need to check port_num too?

Sure would be confusing if device was valid but port_num was not :(

Jason

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux