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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251120064955.GA30432@lst.de>
Date: Thu, 20 Nov 2025 07:49:55 +0100
From: Christoph Hellwig <hch@....de>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Christoph Hellwig <hch@....de>, Keith Busch <kbusch@...nel.org>,
	Jens Axboe <axboe@...nel.dk>, Sagi Grimberg <sagi@...mberg.me>,
	linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme-pci: deduplicate empty request list checks in
 nvme_queue_rqs()

On Wed, Nov 19, 2025 at 08:01:30AM -0800, Caleb Sander Mateos wrote:
> On Tue, Nov 18, 2025 at 9:48 PM Christoph Hellwig <hch@....de> wrote:
> >
> > On Tue, Nov 18, 2025 at 07:17:00PM -0700, Caleb Sander Mateos wrote:
> > > nvme_queue_rqs() checks that nvmeq is non-NULL before calling
> > > nvme_submit_cmds() and nvme_submit_cmds() checks that submit_list is
> > > non-empty before doing anything. A NULL nvmeq means no requests were
> > > processed from the rqlist in nvme_queue_rqs() since the last call to
> > > nvme_submit_cmds(), which implies submit_list is empty. So just check
> > > that submit_list is non-empty before calling nvme_submit_cmds() and drop
> > > the check for NULL nvmeq.
> >
> > What is the rationale for this?  I had a hard time understanding the
> > logic in the new version, so I don't think this helps with readability
> > at least.
> 
> Just trying to avoid some branches. But if you prefer the current
> version, that's fine.

I find the current version easier to follow.  If there is a good
reason for the new variant I'm ok with it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ