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]

 



> --- a/drivers/infiniband/core/ucma.c
> +++ b/drivers/infiniband/core/ucma.c
> @@ -1363,6 +1363,9 @@ static ssize_t ucma_process_join(struct
> ucma_file *file,
>  	if (IS_ERR(ctx))
>  		return PTR_ERR(ctx);
> 
> +	if (!ctx->cm_id->device)
> +		return -EINVAL;

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.

- Sean

--
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