On Thu, 21 Jan 2021, Leon Romanovsky wrote: > > spin_lock_irqsave(&port->classport_lock, flags); > > - if ((port->classport_info.valid) && > > - (port->classport_info.data.type == RDMA_CLASS_PORT_INFO_IB)) > > + if (!port->classport_info.valid) { > > + /* Need to wait until the SM data is available */ > > + spin_unlock_irqrestore(&port->classport_lock, flags); > > + goto redo; > > We have all potential to loop forever here, if valid doesn't change. > Right. So what is the right solution here? The sendonly check function could return an errno instead? 0 = Sendonly join is supported -EAGAIN = SM information is currently invalid -ENOSUP = SM does not support sendonly join Since all SMs out there have had support for sendonly join for years now we could just remove the check entirely. If there is an old grizzly SM out there then it would not process that join request and would return an error.