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: <dd2178ca-2875-4afb-b7d0-3a00af9f76bf@flourine.local>
Date: Fri, 28 Feb 2025 09:18:44 +0100
From: Daniel Wagner <dwagner@...e.de>
To: Hannes Reinecke <hare@...e.de>
Cc: James Smart <james.smart@...adcom.com>, Christoph Hellwig <hch@....de>, 
	Sagi Grimberg <sagi@...mberg.me>, Chaitanya Kulkarni <kch@...dia.com>, 
	Keith Busch <kbusch@...nel.org>, linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/11] nvmet-fcloop: track ref counts for nports

On Fri, Feb 28, 2025 at 08:19:19AM +0100, Hannes Reinecke wrote:
> >   static int
> >   __targetport_unreg(struct fcloop_nport *nport, struct fcloop_tport *tport)
> >   {
> > -	if (!tport)
> > -		return -EALREADY;
> > +	int ret;
> That's iffy.
> Q1: How can you end up with a NULL tport?

The existing code doesn't get the life time right. I don't think it's
necessary anymore. This gets removed in the next two patches.

> Q2: Why do we have _two_ arguments? Can't we use 'nport->tport'?

This is addressed when the rport and tport get their own ref counting
(next two patches).

> Q3: What do you do when tport is valid and tport != nport->tport?

That is not going to happen after the full series.

I've tried to keep the changes logically separated. This patch here is
only updating the nport ref counters. It took a long time to get these
changes into a readable state. I really would like to avoid doing to
many things in one patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ