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] [day] [month] [year] [list]
Message-ID: <64266e0ab45a37ce050b154269574d113137f9d6.camel@oracle.com>
Date: Tue, 2 Dec 2025 22:28:13 +0000
From: Allison Henderson <allison.henderson@...cle.com>
To: "horms@...nel.org" <horms@...nel.org>,
        "achender@...nel.org"
	<achender@...nel.org>
CC: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "rds-devel@....oracle.com" <rds-devel@....oracle.com>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>
Subject: Re: [PATCH net-next v3 2/2] net/rds: Give each connection path its
 own workqueue

On Tue, 2025-12-02 at 15:10 +0000, Simon Horman wrote:
> On Sun, Nov 30, 2025 at 11:10:36PM -0700, Allison Henderson wrote:
> 
> ...
> 
> > diff --git a/net/rds/connection.c b/net/rds/connection.c
> > index dc7323707f450..cfe6b50db8a6f 100644
> > --- a/net/rds/connection.c
> > +++ b/net/rds/connection.c
> > @@ -269,7 +269,11 @@ static struct rds_connection *__rds_conn_create(struct net *net,
> >  		__rds_conn_path_init(conn, &conn->c_path[i],
> >  				     is_outgoing);
> >  		conn->c_path[i].cp_index = i;
> > -		conn->c_path[i].cp_wq = rds_wq;
> > +		conn->c_path[i].cp_wq =
> > +			alloc_ordered_workqueue("krds_cp_wq#%lu/%d", 0,
> > +						rds_conn_count, i);
> > +		if (!conn->c_path[i].cp_wq)
> > +			conn->c_path[i].cp_wq = rds_wq;
> >  	}
> >  	rcu_read_lock();
> >  	if (rds_destroy_pending(conn))
> 
> Hi Allison,
> 
> The code following the hunk above looks like this:
> 
> 		ret = -ENETDOWN;
> 	else
> 		ret = trans->conn_alloc(conn, GFP_ATOMIC);
> 	if (ret) {
> 		rcu_read_unlock();
> 		kfree(conn->c_path);
> 		kmem_cache_free(rds_conn_slab, conn);
> 		conn = ERR_PTR(ret);
> 		goto out;
> 	}
> 
> There are no more error paths that free resources in the remainder of
> the function. And the out label simply returns conn.
> 
> It looks like the ordered workqueue allocation added by this patch
> will be leaked if we reach the error condition above.
> 
> Flagged by Code Spell with review prompts.
> 
> https://urldefense.com/v3/__https://netdev-ai.bots.linux.dev/ai-review.html?id=89a5d15b-cd8c-4403-81ff-8577dc0069a6*patch-1__;Iw!!ACWV5N9M2RV99hQ!KnPqisPP6XfmV5F6LJJAri_f4-kTCKqDcHE4IWxZxNjLu5hECsHolnFkelLryzlQL9WMl4YZVuftHKE1RjM$ 
> 
Hi Simon,

Yes, I noticed the patch work warning.  I will fix the error path and repost in a couple weeks.  Thank you!

Allison

> ...
> 
> Also, please note that net-next is currently closed for the merge window.
> So the usual guidance about that applies:
> 
> ## Form letter - net-next-closed
> 
> The merge window for v6.19 has begun and therefore net-next is closed
> for new drivers, features, code refactoring and optimizations. We are
> currently accepting bug fixes only.
> 
> Please repost when net-next reopens after 15th December.
> 
> RFC patches sent for review only are obviously welcome at any time.
> 
> See: https://urldefense.com/v3/__https://www.kernel.org/doc/html/next/process/maintainer-netdev.html*development-cycle__;Iw!!ACWV5N9M2RV99hQ!KnPqisPP6XfmV5F6LJJAri_f4-kTCKqDcHE4IWxZxNjLu5hECsHolnFkelLryzlQL9WMl4YZVuft11YRP3A$ 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ