Re: [PATCH 15/20] RDMA/core: Validate signature handover device cap

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

 




On 6/4/2019 10:48 AM, Christoph Hellwig wrote:
On Thu, May 30, 2019 at 04:25:26PM +0300, Max Gurtovoy wrote:
Protect the case that a ULP tries to allocate a QP with signature
enabled flag while the LLD doesn't support this feature.

Signed-off-by: Max Gurtovoy <maxg@xxxxxxxxxxxx>
Oh, ok.  I think this should be folded into the previous patch.

I'm fine with this squash.


+	if ((qp_init_attr->rwq_ind_tbl &&
+	     (qp_init_attr->recv_cq ||
+	      qp_init_attr->srq || qp_init_attr->cap.max_recv_wr ||
+	      qp_init_attr->cap.max_recv_sge)) ||
+	    ((qp_init_attr->create_flags & IB_QP_CREATE_SIGNATURE_EN) &&
+	     !(device->attrs.device_cap_flags & IB_DEVICE_SIGNATURE_HANDOVER)))
  		return ERR_PTR(-EINVAL);
This looks almost unreadable.   Just make the signature check a separate
conditional.

Yup we'll fix that.






[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