Re: [bug report] Crash in rdma_disconnect()

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

 



On Wed, Mar 07, 2018 at 01:17:35PM +0000, Boyer, Andrew wrote:
> If the client accidentally calls rdma_disconnect() before the connection is complete, it will crash in ucma_shutdown(). Should this be hardened to return an error rather than crashing?

Yes, graceful exist is always better than crash.

Thanks

>
> Thanks,
> Andrew
>
> #9  0x00007f2f0c9da81e in ucma_shutdown (id=id@entry=0x269c2010) at /usr/src/debug/rdma-core-16/librdmacm/cma.c:1687
> 1687		switch (id->verbs->device->transport_type) {
> (gdb) p id
> $2 = (struct rdma_cm_id *) 0x269c2010
> (gdb) p id->verbs
> $3 = (struct ibv_context *) 0x0
>
> int ucma_shutdown(struct rdma_cm_id *id)
> {
>         switch (id->verbs->device->transport_type) {
>         case IBV_TRANSPORT_IB:
>                 return ucma_modify_qp_err(id);
>         case IBV_TRANSPORT_IWARP:
>                 return ucma_modify_qp_sqd(id);
>         default:
>                 return ERR(EINVAL);
> 	}
> }
>
> int rdma_disconnect(struct rdma_cm_id *id)
> {
>         struct ucma_abi_disconnect cmd;
>         struct cma_id_private *id_priv;
>         int ret;
>
>         ret = ucma_shutdown(id);
>         if (ret)
>                 return ret;
>
>
>
>

Attachment: signature.asc
Description: PGP signature


[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