lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SJ1PR21MB3457C82002C9F8F1E3F04EC7CE172@SJ1PR21MB3457.namprd21.prod.outlook.com>
Date: Thu, 25 Apr 2024 20:29:45 +0000
From: Long Li <longli@...rosoft.com>
To: Konstantin Taranov <kotaranov@...rosoft.com>, Konstantin Taranov
	<kotaranov@...ux.microsoft.com>, "sharmaajay@...rosoft.com"
	<sharmaajay@...rosoft.com>, "jgg@...pe.ca" <jgg@...pe.ca>, "leon@...nel.org"
	<leon@...nel.org>
CC: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH rdma-next 4/6] RDMA/mana_ib: introduce a helper to remove
 cq callbacks

> > > +void mana_ib_remove_cq_cb(struct mana_ib_dev *mdev, struct
> > > mana_ib_cq
> > > +*cq) {
> > > +	struct gdma_context *gc = mdev_to_gc(mdev);
> > > +
> > > +	if (cq->queue.id >= gc->max_num_cqs)
> > > +		return;
> > > +
> > > +	kfree(gc->cq_table[cq->queue.id]);
> > > +	gc->cq_table[cq->queue.id] = NULL;
> >
> > Why the check for (cq->queue.id != INVALID_QUEUE_ID) is removed?
> 
> As max_num_cqs is always less than INVALID_QUEUE_ID, it is included in the "if".
> I can add " || cq->queue.id == INVALID_QUEUE_ID " to the condition if you want.

Okay, can you add a comment before if (cq->queue.id >= gc->max_num_cqs) saying it also works with INVALID_QUEUE_ID?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ