Re: [PATCH rdma-next v1 6/8] IB/uverbs: Move ioctl path of create_cq and destroy_cq to a new file

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

 



On 16/03/2018 00:48, Jason Gunthorpe wrote:
On Wed, Mar 14, 2018 at 04:59:20PM +0200, Leon Romanovsky wrote:

diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h
index 39ce30322211..cddbb7dc33c6 100644
+++ b/include/rdma/uverbs_ioctl.h
@@ -361,6 +361,8 @@ static inline bool uverbs_attr_is_valid(const struct uverbs_attr_bundle *attrs_b
  					    idx & ~UVERBS_ID_NS_MASK);
  }
+#define IS_UVERBS_COPY_ERR(_ret) ((_ret) == -EFAULT)

This should be

static inline bool IS_UVERBS_COPY_ERR(int ret)
{
     return ret != 0 && ret != -ENOENT;
}

Right? Only checking EFAULT seems too frail.


Currently we only return -ENOENT or -EFAULT, but I agree
ret != 0 && ret != -ENOENT
is more robust.

Should I re-spin the series?

Jason


Matan

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