Re: [PATCH 07/11] RDMA: Check flags during create_cq

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

 



On Tue, Oct 06, 2020 at 06:04:29PM +0000, Saleem, Shiraz wrote:
> > a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> > b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> > index 26a61af2d3977f..4aade66ad2aea8 100644
> > +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
> > @@ -1107,6 +1107,9 @@ static int i40iw_create_cq(struct ib_cq *ibcq,
> >  	int err_code;
> >  	int entries = attr->cqe;
> > 
> > +	if (attr->flags)
> > +		return -EOPNOTSUPP;
> > +
> 
> I am slightly confused.
> So these flags are set for drivers that support the extended create CQ API?

No, the flags can be set by any user or kernel program creating a
CQ. The driver must ensure it supports all requested flags.

Omitting the flags check was always a mistake because an in-kernel ULP
could attempt to use them - luckily none due today.

Jason



[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