Re: [PATCH rdma-core 2/2] mlx5: Allow creation of a Multi-Packet RQ using direct verbs

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

 



On Mon, Nov 20, 2017 at 12:04:34PM -0700, Jason Gunthorpe wrote:
> On Sun, Nov 19, 2017 at 09:21:08PM +0200, Yishai Hadas wrote:
> > +	if (mlx5wq_attr) {
> > +		if (mlx5wq_attr->comp_mask & ~(MLX5DV_WQ_INIT_ATTR_MASK_RESERVED - 1))
> > +			return -EINVAL;
>
> Please no. Check that only the bits this function actually supports
> are set and get rid of _RESERVED.

It is classical API mistake do not properly check validity of input parameters [1].

Thanks

[1] https://lwn.net/Articles/726917/

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

Attachment: signature.asc
Description: PGP signature


[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