On Thu, Oct 27, 2016 at 11:59:43PM -0700, Christoph Hellwig wrote: > > + mm_segment_t currentfs = get_fs(); > > > > if (!ib_dev) > > return -EIO; > > @@ -240,8 +242,10 @@ static long ib_uverbs_cmd_verbs(struct ib_device *ib_dev, > > goto out; > > } > > > > + set_fs(oldfs); > > err = uverbs_handle_action(buf, ctx->uattrs, hdr->num_attrs, ib_dev, > > file, action, ctx->uverbs_attr_array); > > + set_fs(currentfs); > > Adding this magic in new code is not acceptable. Any given API > must take either a kernel or a user pointer. And it is indeed happen for new code. This magic is needed to allow legacy write interface to be converted to new ioctl interface internally in kernel. > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html