[openib-general] [RFC] [PATCH 1/3] RDMA CM: addrdma_get/set_optioncalls to get/set path records

Michael S. Tsirkin mst at mellanox.co.il
Wed Apr 26 01:04:54 PDT 2006


Sean, what's up with patch numbering?
I see two 1/3 patches.

http://openib.org/pipermail/openib-general/2006-April/date.html

# [openib-general] [RFC] [PATCH 1/3] RDMA CM: add rdma_get/set_option calls to get/set path records   Sean Hefty
# [openib-general] [RFC] [PATCH 1/3] RDMA CM: add rdma_get/set_option calls to get/set path records   Sean Hefty
# # [openib-general] [RFC] [PATCH 3/3] RDMA CM: add rdma_get/set_option calls to userspace library   Sean Hefty
# # [openib-general] [RFC] [PATCH 2/3] RDMA CM: expose rdma_get/set_option calls to userspace   Sean Hefty 

And two first patches are not identical either.
I'm a bit confused as to what constitutes the series.

Is it just me?

More on the specific patch:

Quoting r. Sean Hefty <sean.hefty at intel.com>:
> +static ssize_t ucma_set_option(struct ucma_file *file, const char __user *inbuf,
> +			       int in_len, int out_len)
> +{
> +	struct rdma_ucm_set_option cmd;
> +	struct ucma_context *ctx;
> +	int ret;
> +
> +	if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
> +		return -EFAULT;
> +
> +	ctx = ucma_get_ctx(file, cmd.id);
> +	if (IS_ERR(ctx))
> +		return PTR_ERR(ctx);
> +
> +	ret = rdma_set_option(ctx->cm_id, cmd.level, cmd.optname,
> +			      (void *) (unsigned long) cmd.optval,
> +			      cmd.optlen);

Casting a value from userspace to void * looks iffy.

-- 
MST



More information about the general mailing list